Archive
GeoSPARQL and Ordnance Survey Linked Data
The Ordnance Survey Linked Data contains lots of qualitative spatial information – that is topological relationships between different regions. We have information about what each region contains, is within and touches (e.g. Cambridgeshire touches Norfolk). These relationships were encoded using an Ordnance Survey vocabulary as there was nothing suitable at the time. Since then a new standard has emerged from the OGC called GeoSPARQL. In the long term we would probably like to migrate the OS data over to the GeoSPARQL standard, but to stop third party applications using the data from breaking we decided not to on this release. However, mappings from the OS vocabulary have been made to the GeoSPARQL vocabulary via ‘owl:equivalentProperty’. So each of the spatial relationships now have a link to their equivalent in GeoSPARQL. Please see: contains, within, touches, equals, disjoint and partially overlaps for more details on which properties they are related to in GeoSPARQL.
Ordnance Survey Linked Data and the Reconciliation API
The new Ordnance Survey Linked Data has a reconciliation API that allows users to turn text into URIs by matching against the Ordnance Survey linked data using a tool called open refine.
I’m not an expert on open refine but had a quick try of the tool today using some open data about libraries (available here). Instructions on installing Open Refine can be found here.
To use the Open Refine load your data into the tool and create your new project. On loading the library data into Open Refine you should see something like this:
We can use Open Refine to turn the labels in both the ‘county’ column and postcode column into URIs. For the county column click the down arrow next the column name and select reconcile -> start reconciling. Now click ‘Add Standard Service’ and add the following URL http://beta.data.ordnancesurvey.co.uk/datasets/boundary-line/apis/reconciliation.
As the ‘county’ column will contain a mixture of types select the ‘reconcile against no particular type’ option and click ‘start reconciling’. You should now see that most of the text labels have turned to hyperlinks (note OS linked data does not included Northern Ireland data…this accounts for the missing values).
You can do the same for the postcode column, but this time use the API at: http://beta.data.ordnancesurvey.co.uk/datasets/code-point-open/apis/reconciliation
Your data should now look something like:
You have now successfully replaced the text in these columns with links to the OS linked data.
Another useful thing to try is a simple bit of geocoding based on postcodes. Again go to the postcode column and select “Edit Column -> Add Column by fetching URLs’. Where asked type in a column name (e.g. PC JSON) and in the Expression box type:
‘http://beta.data.ordnancesurvey.co.uk/datasets/code-point-open/apis/search?output=json&query=’ + escape(value,’url’)
You should now see a column appear full of JSON results:
On the PC JSON column select “Edit Column -> Add Column Based on this column”. Again add a column name of your choice. I wanted to extract the value of the easting and northing and add it as a column so I called my new column ‘easting,northing’. In the expression box enter the following to get the value of the easting and northing:
with(value.parseJson(), pair, pair.results[0].easting + ‘,’ + pair.results[0].northing)
and you should now see something like:
Congratulations…you have now geo-coded your libary spreadsheet via a postcode and the OS linked data.
For more info on how to use Open Refine for reconciliation watch this youtube video.
Announcing new beta Ordnance Survey Linked Data Site
Ordnance Survey has released a new beta linked data site. You can read the official press release here.
I thought I’d write a quick (unofficial) guide to some of the changes. The most obvious one that is hopefully apparent as you navigate round the site is the much improved look and feel of the site. Including maps (!) showing where particular resources are located. Try this and this for example. Maps can be viewed at different levels of zoom.
Another improvement is the addition of new APIs. The first of these is an improved search function. Supported fields for search and some examples can be found here. The search API now includes a spatial search element.
The SPARQL API is improved. Output is now available in additional formats (such as CSV) as well as the usual SPARQL-XML and SPARQL-JSON. Example SPARQL queries are also included to get users started.
Another interesting addition is a new reconciliation API. This allows developers to use the Ordnance Survey linked data with the Open Refine tool. This would allow a user to match a list of postcodes or place names in a spreadsheet to URIs in the Ordnance Survey linked data.
In the new release the Ordnance Survey linked data has been split into distinct datasets. You could use the above described APIs with the complete dataset or, if preferred, just work on the Code-Point Open or Boundary Line datasets.
For details on where to send feedback on the new site please see the official press release here.
Update: I blogged a bit more about some of the new APIs here.
My Family Tree Linked Data Resurrected with some RAGLD Help
I’ve been looking for a new home for my family tree linked data since the Talis Store holding the data was turned off. A new (temporary) home has been found thanks to the RAGLD project. RAGLD is all about creating simple tools and services to allow people to publish and consume linked data. One of these simple RAGLD services is a linked data publishing platform. I have moved my Family Tree linked data onto a RAGLD service for the time being. You can find the service here. The service still needs some polish, but it works well as a very simple platform for publishing linked data. For more information on how that works be sure to check the RAGLD website, or follow RAGLD on Twitter.
Meanwhile here is a SPARQL endpoint and here are some example URIs: my grandfather and I.
So long and thanks for all the triplestores…
Not the most exciting of updates this one. A number of the linked data hacks I have built over on my homepage were powered by Talis services. It’s old news now that Talis have focused their efforts elsewhere and as a result a lot of my linked data applications (including my family tree linked data) no longer work. I’m currently considering other options at the moment such as running my own triplestores in the cloud using Apache Jena or Stardog Community Edition, or possibly using the EasyRDF library. Watch this space…
Meanwhile I’d just like to say a bit thank you to the folks at Talis (and ex-Talis folks) for letting me use their services to experiment – it was fun while it lasted
What is Linked Data?
I wrote an introductory blog entitled “What is Linked Data?” over at the newly revamped data.gov.uk. You can read it here.
About Space…
I’ve had an initial stab at encoding the RCC8 spatial relations as an ontology. This is probably actually more RCC6 as I collapsed the TPP/NTPP and TPPi/NTPPi relations down to simpler properties. The ontology here is an extension of the spatial relations ontology I wrote for work. I’ve tried to capture as many property compositions as possible using OWL. Here is an example including the data for Hampshire to show some of the reasoning in action. As with the Allen Interval algebra ontology this is not a complete axiomatisation of the RCC8 relationships (not possible in OWL), but hopefully has some use. Again feedback appreciated…
About Time…
I’ve had an initial stab at encoding the Allen Interval algebra as an ontology mainly using this page as guidance for property composition. I’ve done two versions: the first is limited to the subset of the composition rules that can be expressed in OWL 2 and the second contains a hopefully complete axiomatisation using DL Safe SWRL rules.
I’ve included some simple examples in the ontologies to show the inference at work.
Next step will be aligning this ontology to the OWL Time ontology. Feed back on potential applications etc. would be appreciated.
Introducing RAGLD
RAGLD (Rapid Assembly of Geo-centred Linked Data) is a project looking at the development of a software component library to support the Rapid Assembly of Geo-centred Linked Data applications
The advent of new standards and initiatives for data publication in the context of the World Wide Web (in particular the move to linked data formats) has resulted in the availability of rich sources of information about the changing economic, geographic and socio-cultural landscape of the United Kingdom, and many other countries around the world. In order to exploit the latent potential of these linked data assets, we need to provide access to tools and technologies that enable data consumers to easily select, filter, manipulate, visualize, transform and communicate data in ways that are suited to specific decision-making processes.In this project, we will enable organizations to press maximum value from the UK’s growing portfolio of linked data assets. In particular, we will develop a suite of software components that enables diverse organizations to rapidly assemble ‘goal-oriented’ linked data applications and data processing pipelines in order to enhance their awareness and understanding of the UK’s geographic, economic and socio-cultural landscape.A specific goal for the project will be to support comparative and multi-perspective region-based analysis of UK linked data assets (this refers to an ability to manipulate data with respect to various geographic region overlays), and as part of this activity we will incorporate the results of recent experimental efforts which seek to extend the kind of geo-centred regional overlays that can be used for both analytic and navigational purposes. The technical outcomes of this project will lead to significant improvements in our ability to exploit large-scale linked datasets for the purposes of strategic decision-making.RAGLD is a collaboative research initiative between the Ordnance Survey, Seme4 Ltd and the University of Southampton, and is funded in part by the Technology Strategy Board‘s “Harnessing Large and Diverse Sources of Data” programme. Commencing October 2011, the project runs for 18 months.
If you’d like to input into the requirements phase of the project I’d be very grateful if you could fill in one of these questionnaires. Many thanks in advance.
Making things with Ordnance Survey Linked Data…
Following the example of “Making things with BBC data” I thought I’d ask the same question for Ordnance Survey linked data. Please leave a comment if you’ve used Ordnance Survey linked data for anything from a quick hack, full blown project or if you even just link to it in your data. Thanks!



