Skip to content

Instantly share code, notes, and snippets.

@ewg118
Created May 13, 2015 03:20
Show Gist options
  • Save ewg118/f5e177c30fff5a282cb2 to your computer and use it in GitHub Desktop.
Save ewg118/f5e177c30fff5a282cb2 to your computer and use it in GitHub Desktop.
SPARQL filter: geographic distribution of Jupiter coins minter after A.D. 1
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dcmitype: <http://purl.org/dc/dcmitype/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX nm: <http://nomisma.org/id/>
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?coinTypeLabel ?mintLabel ?lat ?long ?date ?denominationLabel WHERE {
?coinType nmo:hasReverse ?reverse .
?reverse dcterms:description ?description FILTER regex(?description, "jupiter", "i") .
?coinType skos:prefLabel ?coinTypeLabel FILTER langMatches(lang(?coinTypeLabel), "en") .
?coinType nmo:hasMint ?mint .
?mint geo:location ?loc ;
skos:prefLabel ?mintLabel FILTER langMatches(lang(?mintLabel), "en") .
?loc geo:lat ?lat ;
geo:long ?long .
?coinType nmo:hasEndDate ?date FILTER (?date >= "0001"^^xsd:gYear)
OPTIONAL { ?coinType nmo:hasDenomination ?denomination .
?denomination skos:prefLabel ?denominationLabel FILTER langMatches(lang(?denominationLabel), "en") }
} ORDER BY ASC(?date)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment