Page MenuHomePhabricator

SPARQL or: How I Learned to Stop Worrying and Love the Triples
Closed, ResolvedPublic


Wednesday, 22. June, at 13:00 in Room 50

Sparql and have been around for some time now, but could be used more. We should do a SPARQL beginners workshop during the Wikimania Hackathon 2016 to get more people started with SPARQL. It would be nice if non-hackathon participants would be allowed in too.

Related Objects

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript

I won't be on Wikimania but if any help is needed I would be glad to assist.

Yay! Let me know if you need any held and/or presentations on the topic and/or basic explanation of how this whole SPARQL thing works! :)


About the format: We probably need a couple of slides, but more important, we need people to bring their laptops and have a couple of people walk around.

We need to start with the basics (like ) and add the pieces for people who to build queries. Components we probably want to explain:

  • basic SELECT .. WHERE .. LIMIT
  • Label service
  • BIND
  • Visualizations! Maps, external, on Wikidata

I’m not going to the hackathon but will be there on Wednesday and would love to attend this.

I'm not a programmer. I’m able to take existing queries and modify them a bit. I'm also able to build WDQ queries and then use the converter. Would like to learn to build SPARQL queries from scratch.

Haven’t been able to figure out the scenarios and questions below, though, and would like to learn this (if it is doable via Wikidata’s SPARQL engine):

  • Give me all the paintings that are depicted in and put them on a map - this should be retrieved via the coordinates of their collections
  • Give me all the artworks in one art collection + all their inventory numbers + the reference URLs in the references for the inventory numbers (that last part is something I can’t do yet)
  • I'd like to get lists of items that have specific statements *with specific qualifiers* (so I'd like to learn to integrate qualifiers in a query)
  • Give me all the artists who are creators of artworks of one art collection, show each artist only once, and put them on a map based on their birth date
  • Give me all the public artworks (genre: public art) in an area 3 km around a given point
  • I’d like to see an interesting and working use case for the Graph and the Dimensions display mode
  • Is it possible to generate a graph visualization of 8 different art collections and their connected artists (so that you see which artists are represented in multiple collections)?
  • I'd like to work with pagepiles and/or with sets of handpicked Wikidata items, but have a hunch that this is not possible, is this correct? If it is possible, how to do it?

Here is a video showing how to use the query explanation box and different result views:

This comment was removed by Jonas.

I think we also need to mention how the completion works, both when writing and reading, not everybody is aware of it. And give some insight in the data model - i.e. how wdt: works, how statements work, etc.

You can also point out talk page. There are also many examples, which probably could be ported to queries page itself some day, but that is another story.

I am completely a newbie and my first query thanks to this session is this. Now I have 43 entries of people born in Ukraine before year 1890 with no death date which I will need to check :) Thanks a lot for the session.

Multichill claimed this task.
Multichill triaged this task as Medium priority.

Backing up the etherpad:

llllllllllllllPhab task:



RDF is a triple language: Subject Predicate Object

Can render output of query as a map; this scales to ~100,000 points.

Components include


Label service









Query for artists that are a member of collection rights society (CRO):
(space at start of English label)

@Lucie gave a nice presentation to a classroom full of people. Most people were fairly new to sparql, but managed to get some queries working and continued to improve and expand them on the hackathon.