query-c7a16621a7b91da6269cae2e4c4123be

rq turtle/ttl

Locations associated with Ashmolean items

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map{"hide": ["?latlong", "?layer"]}
SELECT (URI(CONCAT("http://glam-discovery.bodleian.ox.ac.uk/location/",SUBSTR(STR(?place),32) ) ) as ?link) ?placeX ?placeLabel ?layer (SAMPLE(?coords) AS ?latlong)
WHERE {
?item wdt:P195 wd:Q636400;
    wdt:P973 ?url FILTER (STRSTARTS(STR(?url),"http://jameelcentre") ).
VALUES ?property {wd:P180 wd:P1071} # wdt:P921 wdt:P189 wdt:P138
?property wikibase:directClaim ?prop.
?item ?prop ?place.
?place wdt:P625 ?coords.
SERVICE wikibase:label {bd:serviceParam wikibase:language "en". 
?property rdfs:label ?layer. ?place rdfs:label ?placeLabel; schema:description ?placeX}
} GROUP BY ?place ?placeLabel ?placeX ?layer

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?coords"):::projected v2("?item") v11("?latlong") v7("?layer"):::projected v10("?link") v5("?place"):::projected v8("?placeLabel"):::projected v9("?placeX"):::projected v4("?prop") v3("?property") v1("?url") c8(["bd:serviceParam"]):::iri c3(["wd:Q636400"]):::iri c10(["en"]):::literal f0[["starts-with(str(?url),'http://jameelcentre')"]] f0 --> v1 v2 --"wdt:P195"--> c3 v2 --"wdt:P973"--> v1 bind1[/VALUES ?property/] bind1-->v3 bind10(["wd:P180"]) bind10 --> bind1 bind11(["wd:P1071"]) bind11 --> bind1 v3 --"wikibase:directClaim"--> v4 v2 -->v4--> v5 v5 --"wdt:P625"--> v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 v3 --"rdfs:label"--> v7 v5 --"rdfs:label"--> v8 v5 --"schema:description"--> v9 end bind3[/"concat('http://glam-discovery.bodleian.ox.ac.uk/location/',substring(str(?place),'32^^xsd:integer'))"/] v5 --o bind3 bind3 --as--o v10 bind4[/"sample(?coords)"/] v6 --o bind4 bind4 --as--o v11