query-650d56d5f96d426d5c88b3b2320711bb

rq turtle/ttl

DISTINCT

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# defaultView:Map
SELECT DISTINCT ?url ?item ?itemLabel ?itemDescription ?coords


WHERE {

   {
  SELECT ?item ?id WHERE {
    ?item wdt:P1343 wd:Q105770461 .
#    ?item wdt:P31 wd:Q2116450 .
    ?item wdt:P3029 ?id 
  }
}.  
  ?item (wdt:P276|wdt:P131)/wdt:P625 ?coords.

  BIND(IRI(CONCAT("https://discovery.nationalarchives.gov.uk/details/c/", ?id)) AS ?url)
  # wd:P3029 wdt:P1630 ?fmt .
  # BIND(IRI(REPLACE(?fmt, "\\$1", ?id)) AS ?url)
  # BIND(IRI(REPLACE(?id, '(^.*$)', ?fmt)) AS ?url) .

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?coords"):::projected v2("?id") v1("?item"):::projected v4("?url"):::projected a1((" ")) c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q105770461"]):::iri v1 --"wdt:P1343"--> c2 v1 --"wdt:P3029"--> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P131"--> a1 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P276"--> a1 end union0r <== or ==> union0l end a1 --"wdt:P625"--> v3 bind0[/"concat('https://discovery.nationalarchives.gov.uk/details/c/',?id)"/] v2 --o bind0 bind0 --as--o v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end