Have you ever come across a Wikidata item that looks like this: List of Nobel laureates in Physics? You notice the word “list” in the label of the item and you get excited to see a list of laureates on the page. But as you scroll, you find there is no list. There is just a set of strange statements. Where is the list? You are frustrated. How can there possibly be an item with “list” in the label that doesn’t contain a list?! Does it make you want to tear your hair out?
Well, my list-loving friends, I’m here to tell you about a wonderful Wikidata property that will reveal lists to you. Before we get to that property, we need to understand why these confusing list-labeled items exist, even though they don’t contain lists. Take a deep breath with me.
Why these items exist
In addition to representing the world as linked data, Wikidata serves to support other Wikimedia projects. Projects like Wikipedia and Wikimedia Commons contain pages of categories, lists, and other supporting or interconnecting pages. Wikidata items like the one at the top of this post (Q852317) represent those pages on other Wikimedia projects and not the list themselves. If that’s a confusing sentence to you, another way to think of it that (almost) every Wikipedia page has a corresponding Wikidata item. This item corresponds to the Wikipedia page where a list is.
Tell me about the Wikidata list property
Okay, so this property deals specifically with items that represent lists on Wikimedia projects. That still may be confusing, but I want you to see your list! This is where a wonderful Wikidata property becomes useful. Its name is a mouthful, but I promise it’s worth it: Wikidata SPARQL query equivalent or P3921. The reason why this property exists is to create the list that those items represent. Since Wikidata is built as linked data, the way you see a list with Wikidata is through the query service. This property contains the SPARQL code for each corresponding list so all you have to do is click the SPARQL link, run the query, and (snaps) you’ve got your list.
You may say, “well, that’s a lot of clicks to get to a list that already exists on a Wikipedia page.” And you would be right. I can’t argue with that. But part of the beauty of having the SPARQL code is that you can customize the query to pull in relevant data for you. Maybe you want images of the Nobel Prize laureates or maybe you want to create a map showing all of their birth places. Maybe you want to see the same map, but have the points color-coordinated by gender. All of these queries are just a quick tweak away from the query contained within the SPARQL equivalent property statement.
Even though representing lists on Wikidata may seem less convenient than just looking at a list on Wikipedia, it makes revealing otherwise-complex relationships much easier to see, use, adapt, and share. Feel free to sort through the list of lists here.
If you like lists, odds are you like SPARQL. So if you’re able to write SPARQL queries, this property is underused (as of April 2021) and you can take a look at this query to create more statements on item pages.
Want your lists to SPARQL?
Learn more about lists, querying, and linked data in one of our Wikidata classes, enrolling now at wikiedu.org/wikidata.