WikidataShow

Some of you might know our project about school archives. This catalogues historical sources about schools and helps researchers to find these sources easier. One big problem we came across when building this platform was the effort to collect basic information about a school.

This is very time-consuming (there are more than 1000 schools in the platform already) and needs a lot of effort to keep up to date. Luckily, there are already some databases where such information can be found. The largest is Wikidata. So why not just display information from Wikidata in our system?

Wikipedia does this in an elegant way using infoboxes and Lua. Sadly, this is only possible within the Wikimedia network. I also wanted to make use of the data storage capabilities of Semantic MediaWiki.

This is why we developed the extension WikidataShow. It allows to display information from Wikidata, you just need to provide the Wikidata ID. The extension gets all other needed data directly from wikidata.

It is fairly easy to just store the Wikidata ID in our platform using Semantic MediaWiki. Based on this, we use templates within the wiki to retrieve the needed information. The nice thing is: you just need to provide the Wikidata ID and with the templates all the other information about the school is displayed automatically. So users do not have to worry about the data and if they want to change it, they do this on Wikidata, so everyone else can use it as well.

We used the PHP library Wikidata to get the information. This library works quite well: you provide a Wikidata ID and then you get an object where the information is stored. But this library omits some of the information. For instance, it is not possible to rank the information like it is done on Wikidata. You can for every data item in Wikidata add specifiers. One way to get this is directly via the Wikidata API.

There are also other ideas for this around: Professional.Wiki work on a way deeper and more sophisticated connection where it is also possible to query data from Wikidata or even better – from every Wikibase instance (Extension Semantic Wikibase, description of the concept). This functionality is also very nice, for the school archives wiki this enables us to display data queries directly in our semantic Media Wiki instance.