query-d2db31070693e60c74fc6d9718642aed

rq turtle/ttl

If you are interressed I just made a query about the historic resources of Alberta who are in Wikidata. Alberta Register of Historic Places today. Actually I just ended the letter K on the (Q14465918)provincial historic resource Hi, I just added about 100 ]reply[18:09, 10 August 2017 (UTC)) talk (Arctic.gnome: Thanks for letting me know. I was trying to figure out an efficient way to upload all of them, but I'll leave it to you if you've done it before. --Fralambert@ ]reply[15:20, 23 July 2018 (UTC)) talk (Arctic.gnome: I've been using your search tool, but I was wondering how to make it show me the items in the Canadian Register. I've tried changing the P1435 and Q14465882 to P477 and Q3456275, but that gives me an error. Could you let me know how to fix it? Thanks! Fralambert@If you want all the heritage properties, you can try this one. I generrally use it for having the heritage properties in a municipality, but it work just fine for a province.

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT DISTINCT
  ?item
  ?itemLabel
  ?communeLabel
  ?coords
  ?image
WHERE { {
    SELECT DISTINCT ?item WHERE {
      ?item wdt:P1435/wdt:P279* wd:Q14469659 .
      ?item p:P1435 ?heritage_statement .
      FILTER NOT EXISTS { ?heritage_statement pq:P582 ?end . }
    } }
  ?item wdt:P131/wdt:P131* wd:Q1951 . #For a other place, change Q1951 for a another item.
  ?item wdt:P131 ?commune .
  OPTIONAL { ?item wdt:P625 ?coords . }
  OPTIONAL { ?item wdt:P18 ?image . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" . }
}
GROUP BY ?item ?itemLabel ?communeLabel ?coords ?image
ORDER BY ?communeLabel ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?commune") v1("?communeLabel"):::projected v7("?coords"):::projected v4("?end") v3("?heritage_statement") v8("?image"):::projected v5("?item"):::projected v2("?itemLabel"):::projected a1((" ")) a2((" ")) c13(["fr"]):::literal c11(["bd:serviceParam"]):::iri c4(["wd:Q14469659"]):::iri c7(["wd:Q1951"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:qualifier/P582"--> e0v2 e0v2("?end"):::projected e0v1("?heritage_statement"):::projected end f0--EXISTS--> f0e0 f0 --> v3 f0 --> c1 f0 --> v4 v3 --"p:qualifier/P582"--> v4 v5 --"p:direct/P1435"--> a1 a1 --"p:direct/P279"--> c4 v5 --"p:P1435"--> v3 v5 --"p:direct/P131"--> a2 a2 --"p:direct/P131"--> c7 v5 --"p:direct/P131"--> v6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P625".-> v7 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P18".-> v8 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end