query-2b476f5299db88a257c18ed550f348c7

rq turtle/ttl

Map of slighted places with filters for type

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map{"hide": ["?geo", "?layer"]}
SELECT ?item ?itemLabel ?layer ?geo (year (?date) as ?year) ?image WHERE { 
  ?item p:P793 ?s .
  ?s ps:P793 wd:Q2238935. 
OPTIONAL { ?s pq:P585 ?date }.
  ?item wdt:P625 ?geo ;
        wdt:P31 ?type .
OPTIONAL { ?item wdt:P18 ?image }.
  FILTER (  ?type !=wd:Q839954 ). #filter archaeological sites from appearing in the layer
  FILTER (  ?type !=wd:Q17715832 ). #filter castle ruins from appearing in the layer
    #FILTER ( year (?date) < 1200).  #filter sites slighted after 1200; deactivated by default
    #FILTER ( year (?date) > 1000).  #filter sites slighted before 1000; deactivated by default
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". 
                            ?type rdfs:label ?layer . 
                            ?item rdfs:label ?itemLabel
}
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?date"):::projected v5("?geo"):::projected v6("?image"):::projected v2("?item"):::projected v8("?itemLabel"):::projected v7("?layer"):::projected v3("?s") v1("?type") v9("?year") c5(["wd:Q2238935"]):::iri c11(["bd:serviceParam"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?type != 'wd:Q17715832'"]] f0 --> v1 f1[["?type != 'wd:Q839954'"]] f1 --> v1 v2 --"p:P793"--> v3 v3 --"p:statement/P793"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P585".-> v4 end v2 --"p:direct/P625"--> v5 v2 --"p:direct/P31"--> v1 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P18".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 v1 --"rdfs:label"--> v7 v2 --"rdfs:label"--> v8 end bind2[/"year-from-dateTime(?date)"/] v4 --o bind2 bind2 --as--o v9