Link LSOA codes with ordnance survey postcodes and endpoint - sparql

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.

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.

How to get the weatherbox from a wikipedia page using the 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

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.

Get geo-locations from cities

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.

Values between pages with Apex

I tried looking for an answer, but everything I found seemed too high level. I am a college student who's working on a database project. We need to use apex (oracle) to shred data from an open API source. You can see what me & my team are working on here: http://bit.ly/Jvt4av.
I have listing of movies with links. Those links go to another page that is supposed to show all sorts of details for that movie.
I have successfully passed the movie_id variable between the list and the detail page, but I am stumped now. I need to show the movie's details and I don't want to use reports or forms because they're too ugly to show this kind of info. I want to be able to show the data with HTML. So, my questions are:
Where/how do I query the database, so I can use the results in HTML?
How do I display those results in HTML?
Thank you!
Well, if you have the movie ID then you can use it to query the database and get all the other details from the database. If you want to render those details using just plain HTML then a PL/SQL region in conjunction with some htp.p calls will do the job. For example:
for x in (select * from movies_details where id=<MOVIE_ID>) loop
htp.p('<h1>' || x.movie_title || '</h1>');
end loop