Building closer links between OpenStreetMap and Wikidata in Wales

 

Open who?

OpenStreetMap is a global, crowdsourced geospatial dataset. It can be thought of as like wikipedia, but for maps. OpenStreetMap data is rich and, crucially, open. This means anyone can use it for free, so long as they acknowledge the source.

We are part of a small partnership that uses OpenStreetMap data to create a Welsh language map of Wales. Every night a script on our server gets a fresh copy of the dataset and begins drawing mapping tiles. The script looks for tags that volunteers have added which give the Welsh name of streets, towns, buildings and so on and uses those as labels on the map. If it can’t be sure that the label is the Welsh name, it leaves it off. This can make the map look a bit bare and patchy in places.

We run workshops to encourage people in Wales to start mapping on OpenStreetMap and, especially, to contribute Welsh names to the database. This year we’ve begun adding a new source of Welsh names to the map: Wikidata.

Wiki what?

Wikidata is a curious project that is part of the Wikimedia family that includes Wikipedia. It started to address a particular problem in Wikipedia. Wikipedia is available in many languages but each language is a stand alone site. This means that it’s not necessarily clear when two pages in two languages are about the same thing. For example Is this page on Abbeycwmhir in English about the same place as this page on Abaty Cwm-hir in Welsh? It certainly looks like they are the same but how can we be sure?

Wikidata cuts through this confusion by creating an unique identifier for the Abbey . On each of the Wikipedia pages there is a link to this identifier. That way we can be sure that both pages are referring to the same place. And it doesn’t just apply to places, Wikidata identifiers can be created for people, concepts, fictional characters, anything, in fact that humans might want to refer to.

The design of wikidata means that the identifier for the Abbey is Q143226. Everything else, including its name and what it should be called in different languages, is an attribute. We can add any number of attributes to Q143226 (like which page in English Wikipedia or Cymraeg Wikipedia is about the Abbey).

National Library of Wales volunteers and many others inspired by their work have been ensuring that there are Wikidata IDs for a huge plethora of things in Wales. This year, thanks to funding from the Welsh Government, we are working with the National Library to add Wikidata IDs to the relevant objects in OpenStreetMap.

Making maps richer

Adding Wikidata IDs has a number of benefits. The most obvious benefit for our map is that we have a potential second source of data about the Welsh name of geographical features in Wales. As before, our script looks for the Welsh name in OpenStreetMap and if it can find one it uses it. If it can’t find a Welsh name, it then checks for a Wikidata ID. If it finds one, it then checks Wikidata to see if there is a Welsh name recorded there (which in tens of thousands of cases there is). If there is, it uses that name to label the map.

This has already made the map richer and as we increase the number of wikidata IDs there actually are in the OpenStreetMap data that will continue.

That’s not the only benefit though. Having the wikidata ID in OpenStreetMap opens up the possibility of linking the map to the rest of the knowledge of the world. Here, for example, is a demonstration project from Jean-Baptiste Robertson which uses Wikidata identifiers in OpenStreetMap as a way to get information about that object from Wikipedia.

Get involved

We’ll be running online workshops in Welsh and English over the autumn and winter if you would like to get involved in improving mapping data in Wales and in Welsh. Keep an eye on our events section or sign up for our (excellent and not too frequent) newsletter for more details.

 
 
 
 
Ben Proctor