Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

grlc. store, share and run sparql queries


Published on

Non-technical demonstration of grlc intended for users without prior knowledge of SPARQL or github. See and SALAD best paper awarded research:

Published in: Software
  • Be the first to comment

  • Be the first to like this

grlc. store, share and run sparql queries

  1. 1. grlc. store, share and run sparql queries using github Workshop Amsterdam, October 19th 2017 Richard Zijdeman (IISG/ University of Stirling) @rlzijdeman #grlc
  2. 2. Question: In what types of houses were people living, at the end of the 19th century in the Netherlands, by year and municipality?
  3. 3. spoiler you will be able to provide that information in about an hour
  4. 4. Current workflow •Go to website •Download excel files •Clean them •Harmonize them •Merge them
  5. 5. Linked Data
  6. 6. Problem • Linked Data has much potential • But: ‘SPARQL looks though” • building and maintaining API’s on Linked Data is cumbersome
  7. 7. Sharing by email: what is the endpoint? PREFIX rdf: <> PREFIX rdfs: <> PREFIX gg: <> PREFIX strikes: <> PREFIX skos: <> PREFIX xsd: <> SELECT * # SELECT ?muni (COUNT(?muni) as ?muniCount) WHERE { ?strike strikes:place ?splace . ?strike strikes:date ?sdate . ?muni rdf:type gg:Municipality . ?muni rdfs:label ?ggplace . FILTER regex(?splace, ?ggplace) FILTER (year(?sdate) = 1970) } # GROUP BY ?muni LIMIT 10
  8. 8. Sharing by email: what is that about? clariahTech2017#query=PREFIX+rdf%3A+ ns%23%3E%0APREFIX+rdfs%3A+ schema%23%3E%0APREFIX+gg%3A+ schema%23%3E%0APREFIX+strikes%3A+ FIX+xsd%3A+*% 0A%23+SELECT+%3Fmuni+(COUNT(%3Fmuni)+as+%3FmuniCount)++ %0A%0AWHERE+%7B%0A++%3Fstrike+strikes%3Aplace+%3Fsplace+.%0A++ %3Fstrike+strikes%3Adate+%3Fsdate+.%0A++ %3Fmuni+rdf%3Atype+gg%3AMunicipality+.%0A++%3Fmuni+rdfs%3Alabel+ %3Fggplace+.+%0A++FILTER+regex(%3Fsplace%2C+%3Fggplace)%0A++FILTER+ (year(%3Fsdate)+%3D+1970)%0A%7D+%0A%23+GROUP+BY+ %3Fmuni%0ALIMIT+10&contentTypeConstruct=text%2Fturtle&contentTypeSelect=a pplication%2Fsparql- results%2Bjson& ets%2Frlzijdeman%2FClariahTech2017%2Fcontainers%2FclariahTech2017%2Fsparql &requestMethod=POST&tabTitle=strikesMeetsGG&headers=%7B%7D&outputForm at=table
  9. 9. Sharing by email: FAIR? Well, not really… Fair data principles for proper data management: • Findable • Accessible • Interoperable • Reusable
  10. 10. But wait a minute…. …. isn’t this just like sharing code over the web?
  11. 11. Basil • Building API’s on SPARQL endpoints • • ✴ single repository for ALL queries ✴ move your sparql queries ✴ each query needs its own API
  12. 12. GRLC • Building API’s on SPARQL endpoints • Via your own github repo(sitory) • 1 API per repo (rather than per query) • award: best SALAD paper • ✴ not a really great front end …but the chefs are working on it!
  13. 13. name of repository keyword keyword specific query description of query
  14. 14. name of query description of query query run metadata
  15. 15. Invoking grlc queries • Find a github repository • Take the name of the owner • Take the name of repository • Find the queries at:<repo owner>/<repo name> e.g.
  16. 16. Do it yourself! • find the CEDAR data repository • find the owner name • find the repository with queries • create the grlc URI remember:<repo owner>/<repo name> • run the query called ‘houseTyple_all’
  17. 17. Problems, ideas? Please let us know at: CLICK here