Building applications around Wikidata (a beer example)

January 8, 2016 0 By addshore

Wikidata provides free and open access to entities representing real world concepts. Of course Wikidata is not meant to contain every kind of data, for example beer reviews or product reviews would probably never make it into Wikidata items. However creating an app that is powered by Wikidata & Wikibase to contain beer reviews should be rather easy.

A base data set

I’m going to take the example of beer as mentioned above. I’m sure there are thousands if not millions of beers that Wikidata is currently missing, but at the time of writing this there are 958 contained in the database. These can be found using the simple query below:

PREFIX wd: <>
PREFIX wdt: <>

   ?i wdt:P31/wdt:P279* wd:Q44 .

Any application can use data stored within Wikidata, in the case of beers this includes labels and descriptions in multiple different languages, mappings to wikipedia articles and external databases for even more information, potential images of said beer, the type of beer and much more. Remember the Wikidata dataset is ever evolving and the IDs are persistent.

Application specific data

Lets say that you want to review the beers! You could set up another Wikibase installation and SPARQL endpoint to store and query review and rating information. Wikibase provides an amazingly flexible structure meaning this is easily possible. Reviews and ratings could be stored as a new entity type, linking to an item on Wikibase or an item could be created mapping to a Wikidata item containing statements of review or rating data. Right now documentation is probably lacking but this is all possible.

Of course I am shouting about Wikibase first as Wikidata is powered by it and thus integration should be easier, however there is no reason that you couldn’t use any other database mapping your application specific information to Wikibase item Ids. MusicBrainz is already doing something like this and I am sure there are other applications out there too!

Sharing of knowledge

Knowledge is power, Wikipedia has proven that free and open knowledge is an amazing resource in an  unstructured text form. Wikidata is a step up providing structured data. Imagine a world in which applications share basic world information building a dataset for a common worldwide goal. In the example above, add an image of a beer in one application, have it instantly available in another application, translate a description for one user and have it benefit millions.

Lets see what we can do in the next 10 years!