How to get the weatherbox from a wikipedia page using the API? - wikipedia-api

Most of the larger cities have a table with climate data. I think Wikipedia calls them weatherbox.
Is there a way to retrieve these tables via the API?
For instance, to get the climate section for NYC I do:
https://en.wikipedia.org/w/api.php?action=parse&prop=wikitext&pageid=645042&section=18&format=json
I get the text but not the actual table which is referred to as {{New York City weatherbox}}.
There seems to be another way to retrieve some weatherboxes but this isn't working for many cities.
This one works:
https://en.wikipedia.org/wiki/Template:New_York_City_weatherbox
but this one doesn't:
https://en.wikipedia.org/wiki/Template:Turin_weatherbox

Related

GDELT Medical/Doctor/Nurse/Hospital protest data

I am trying to fetch data related to medical or doctor related protest from gdelt. I have tried using GDELT API, it returns results with a few irrelevant links but for further analysis it has very few columns.
While using Big query the columns returned our more and good for analysis. But I want to know what event codes should I use to fetch only medical or doctor related protests data.

Amadeus api List of airport by country

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.

How can I pull and concactenate a Wikipedia table with individual article data

I'm looking to pull together a full list of the current FTSE 100 constituents with the addition of a column highlighting when the company was founded.
Each wiki info box for the individual companies within a table contains the founder date. I'm struggling to work out the function in sparql utilising dbpedia to take the existing ftse 100 table.

How to access weather data from all the stations in one country using openweathermap?

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.

Link LSOA codes with ordnance survey postcodes and endpoint

I am new to linked data and trying to link ordnance survey postcodes to LSOA data.
I am using the OS linked Data Sparql API and the end point is:
http://data.ordnancesurvey.co.uk/datasets/os-linked-data/apis/sparql
I have a query which returns the postcodes, although I am trying to link LSOA codes with the postcodes to learn from. The code I have so far is:
SELECT ?postcode WHERE {
?postcodeUnit a <http://data.ordnancesurvey.co.uk/ontology/postcode/PostcodeUnit>
BIND (STRAFTER((STR(?postcodeUnit)),'postcodeunit/') as ?postcode)
}limit 10
This code brings back the postcodes, but I am trying to link to LSOA codes.
Thanks in Advance
You may be a bit stuck with this data source.
http://data.ordnancesurvey.co.uk/ontology/postcode/PostcodeUnit
Shows that there is no LSOA data associated with a postcode unit. And a quick look at the RDF for the site shows that they don't have a field called LSOA.