query-ece489568339f4b0b056c4fd581bceaf
MH en Occitanie vs Années de protection
Use at
- https://query.wikidata.org/sparql
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 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
SELECT DISTINCT ?item ?itemLabel ?coord ?articleWikipédia ?layer WHERE {
{ ?item wdt:P1435 wd:Q10387575 . } UNION { ?item wdt:P1435 wd:Q10387684 . } #MH
?item wdt:P131/wdt:P131/wdt:P131 wd:Q18678265 . # en Occ
?item p:P380 []. #immeubles
?item wdt:P625 ?coord.
?item p:P1435 ?stat .
{ ?stat ps:P1435 wd:Q10387575 ; pq:P580 ?protDate . } UNION { ?stat ps:P1435 wd:Q10387684 ; pq:P580 ?protDate . } #MH
FILTER( year(?protDate) > 1970 ) # à adapter
OPTIONAL {?articleWikipédia schema:about ?item .
?articleWikipédia schema:isPartOf <https://fr.wikipedia.org/>. }
BIND( year(?protDate) AS ?layer)
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;
v5("?articleWikipédia"):::projected
v3("?coord"):::projected
v2("?item"):::projected
v6("?layer"):::projected
v1("?protDate")
v4("?stat")
a3((" "))
a1((" "))
a2((" "))
c14([https://fr.wikipedia.org/]):::iri
c4(["wd:Q10387684"]):::iri
c3(["wd:Q10387575"]):::iri
c16(["bd:serviceParam"]):::iri
c6(["wd:Q18678265"]):::iri
c18(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["year-from-dateTime(?protDate) > '1970^^xsd:integer'"]]
f0 --> v1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P1435"--> c4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P1435"--> c3
end
union0r <== or ==> union0l
end
v2 --"p:direct/P131"--> a1
a1 --"p:direct/P131"--> a2
a2 --"p:direct/P131"--> c6
v2 --"p:P380"--> a3
v2 --"p:direct/P625"--> v3
v2 --"p:P1435"--> v4
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v4 --"p:statement/P1435"--> c4
v4 --"p:qualifier/P580"--> v1
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v4 --"p:statement/P1435"--> c3
v4 --"p:qualifier/P580"--> v1
end
union1r <== or ==> union1l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."schema:about".-> v2
v5 --"schema:isPartOf"--> c14
end
bind1[/"year-from-dateTime(?protDate)"/]
v1 --o bind1
bind1 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c16 --"wikibase:language"--> c18
end