Spark simple table example

The following table is a spark showing the result of a query to DBpedia, asking for all the Messier objects included in Wikipedia. This is based on the Simple Table example from the Spark site; really I should add my own formatter so that the URIs are actually links you can follow, but this is too cool to pass up.

The query - which you can try out yourself at the Snorql or Virtuoso Sparql interfaces - is

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>

select ?label ?abstract ?url ?thumbnail
where {
    ?url rdf:type <http://dbpedia.org/class/yago/MessierObjects> .
    ?url rdfs:label ?label .
    OPTIONAL { ?url dbpedia-owl:thumbnail ?thumbnail . } .
    ?url dbpedia-owl:abstract ?abstract .
    filter (langMatches(lang(?abstract), "en")) .
    filter (langMatches(lang(?label), "en")) .
   }

Hmm, I wonder why Messier marathon has been classified as an object?

Results

loading…

Awesome sauce indeed!