I'm using the wunderground api to get weather conditions from a specific city. They have various ways to query the data here ---> http://www.wunderground.com/weather/api/d/docs?d=data/index. The response is in JSON.
Is there a possible way to GET the locations from a specific key, value using the api; like getting all the cities that have a current temperature of 75 degrees, without getting the data for various locations, then checking if the temperature is a certain number?
Related
Good day everyone,
Am using amadeus self-service for the first time, i wanted to know if it was possible to get list of airports by their country.
Thanks for the assist.
We do not have a specific API that retrieves airports in given countries. However, you could use our Airport Nearest Relevant API.
This API allows you to find all the airports around specific coordinates (latitude & longitude). You can query the API with the coordinates of the specific country (like the center) and play with the radius parameter (note that the maximum value is 500 kms). This will give you all the airports in this search radius. You can then filter the response by countryName to only retrieve airports in the given country. Of course depending on the size of the country you may need to do this process with multiple geocoordinates.
I'm trying to read measurement data, and I get a large amount of data back. I can narrow down the items per page and get the last page, but is there a way to reverse the data so I get the most recent measurement POST?
For example, I to a:
GET: {{url}}/measurement/measurements?dateTo={{dateTo}}&dateFrom={{dateFrom}}&source={{deviceId}}
And I get get 100's of pages back, the list beginning from the first measurement. I want the last measurement first.
I found the answer, add revert=True
i.e.:
{{url}}/measurement/measurements?dateTo={{dateTo}}&dateFrom={{dateFrom}}&source={{deviceId}}¤tPage=1&pageSize=200&revert=True
I am using Alteryx to extract weather data for a handful of cities and it works great. I'd like to expand this to able to download data for all weather stations in the UK. At the moment I am specifying which cities I want, e.g. London / Manchester.
Is there a way of specifying in the api call to download all stations in 'GB' or 'UK'?
Ideally I'd like to do this in one call rather than listing all locations which will be very laborious
Get a list of stations or cities that you want to retrieve weather data from. I found some good sources from openweather here: http://bulk.openweathermap.org/sample/
Then build a url request using the list of id's above that retrieves specific weather information. Using an id for the weather station in Cairns, id=2172797, the url ends up looking like:
http://api.openweathermap.org/data/2.5/weather?id=2172797&appid=843798874aac0ef138e6f77c72f3af80
Note that this url will return an error because this isn't a real appid. If you replace the appid with your own, this url will give you data for that station.
Putting this process into Alteryx lets you put the list of station id's together with the url and the appid to make many calls into openweather and then process all of the data together. I could not find information from the API on rate limits, so be conscious of how many requests you are posting to the service.
There is an example of this process here: https://www.dropbox.com/s/yoppbx3bw0p4rug/Get%20individual%20stations.yxzp?dl=0
Keep in mind that you have to update the Appid in the text input tool within this sample as well.
I'm trying to get a report from the YouTube Analytics API.
I need this report specifying the country and the dates for an specific video.
This code works:
dimensions=country&metrics=views,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,subscribersGained
sort=-estimatedMinutesWatched&filters=video==VIDEO_ID
If I specify just the country or day dimension, it works.
If I specify day and country dimensions, it throws a 400 error Bad request "The query is not supported. Check the documentation at https://developers.google.com/youtube/analytics/v1/available_reports for a list of supported queries."
This doesn't work:
dimensions=country,day&
metrics=views,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,subscribersGained
sort=-estimatedMinutesWatched&filters=video==VIDEO_ID
Is there another way to get the data in the format I'm looking for, since seems this query is not supported by the API?
This is not allowed. Check the docs:
https://developers.google.com/youtube/analytics/v1/channel_reports
So you could either
query country dimension and filter by day
or
query day dimension and filter by country
I am trying to display a list of closest restaurants of a given city within a radius. In order to do this, I'll have to convert the city to a longitude/latitude.
When the user fills in his/her restaurant information, he/she will fill in the address. Based on that address i need to get a longitude/latitude and save that to the database.
I don't need to point this on a map. I'll be just displaying a list of all closest restaurants within the given radius to the user.
How can I do this with ASP.NET-MVC4?
Also, this project is based on Code First. And for address I have DbGeography as datatype set.
The project is kind of based on this tutorial
Edit
To avoid anyone else telling me this is not possible with ASP.NET on it's own, I am aware of that. an example with Google maps / .NET wrapper would be great.
This query itself is typically done in the database back-end because the program is the consumer of the data not the keeper of the data. You will have a table of restaurants, possibly for many cities, each restaurant having a latitude and longitude. You create a geospatial index on the table, which performs a tesselation for performance; you configure the tesselation parameters. You must determine the latitude/longitude of your restaurant-seeker's location. Your command object would feed that data to a stored procedure, along with the desired radius. The stored procedure would return an enumerable set of rows to your client program.
I found this .NET wrapper which fulfills my need.