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

233 views

Published on

Non-technical demonstration of grlc intended for users without prior knowledge of SPARQL or github. See grlc.io and SALAD best paper awarded research: http://datalegend.net/assets/paper7.pdf

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: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX gg: <http://www.gemeentegeschiedenis.nl/gg-schema#> PREFIX strikes: <https://iisg.amsterdam/vocab/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 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? https://druid.datalegend.net/rlzijdeman/ClariahTech2017/containers/ clariahTech2017#query=PREFIX+rdf%3A+ %3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax- ns%23%3E%0APREFIX+rdfs%3A+ %3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf- schema%23%3E%0APREFIX+gg%3A+ %3Chttp%3A%2F%2Fwww.gemeentegeschiedenis.nl%2Fgg- schema%23%3E%0APREFIX+strikes%3A+ %3Chttps%3A%2F%2Fiisg.amsterdam%2Fvocab%2F%3E%0APREFIX+skos%3A+ %3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0APRE FIX+xsd%3A+ %3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0ASELECT+*% 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&endpoint=https%3A%2F%2Fdruid.datalegend.net%2F_api%2Fdatas 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 • http://basil.kmi.open.ac.uk/ • http://oro.open.ac.uk/44026/ ✴ 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 • http://datalegend.net/assets/paper7.pdf ✴ 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: http://grlc.io/api/<repo owner>/<repo name> e.g. http://grlc.io/api/CLARIAH/wp4-queries-hisco
  16. 16. Do it yourself! • find the CEDAR data repository • find the owner name • find the repository with queries • create the grlc URI remember: http://grlc.io/api/<repo owner>/<repo name> • run the query called ‘houseTyple_all’
  17. 17. Problems, ideas? Please let us know at: https://github.com/CLARIAH/grlc/issues CLICK here

×