10 useful things about Wikidata & SPARQL that I wish I knew earlier

  • 🐱 Mayors that are any kind of domesticated animal (query)
  • ⚰️ Inventors killed by their own invention (query)
  • 🦸 Humans whose gender we know we don’t know (query)
  • 🥐 Birthplaces of humans named Antoine (query)
  • Serious: OpenParliamentTV is a project I contribute to as a data scientist/programmer. It is an interactive database of parliamentary speeches. We use Wikidata to provide additional data about the deputies and other entities.
  • Fun: “Speculative Datasets” is a Github repository and ongoing art project in which I create and collect custom image datasets for machine learning by leveraging Wikidata queries
Familiarizing yourself with Wikidata’s terminology and taxonomy is a good start

Now let’s get to the 10 useful tips:

1 — The Wikidata Query Service website is the place you want to hang out

2 — Start with an example query and adapt

3 — Do the official Wikidata SPARQL tutorial

4 — In case of utter despair: There are actual human beings (called “query helpers”) that are willing to help you with your query!

5 — Help, the Wikidata Query Service returns a red error message saying a comma is wrong?!

6 — SPARQL pitfall: Missing properties = missing entries

7 — SPARQL pitfall: Ddduuuuplicaaaations

8 — Use INCLUDE to avoid time outs

9 — How to query the description of an item

10 — In some cases you just want to avoid SPARQL altogether and work with grep&friends on a Wikidata dump

More useful links

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alexa Steinbrück

Alexa Steinbrück

A mix of Frontend Development, Machine Learning, Musings about Creative AI and more