User:Fralambert/Sparql
Jump to navigation
Jump to search
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Vous trouverez un peu d'explication sur les cartes dans RAW 2016-07-15.
Carte des 1024 lieux historiques nationaux du Canada[edit]
#defaultView:Map
SELECT ?item ?itemLabel ?coord
WHERE {
?item wdt:P1435/wdt:P279* wd:Q1568567;
rdfs:label ?itemLabel;
wdt:P625 ?coord;
FILTER (lang(?itemLabel) = "fr").
}
Carte des 12,200 lieux patrimoniaux au Canada (tous les types)[edit]
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?coord ?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 . }
} }
OPTIONAL { ?item wdt:P625 ?coord . }
OPTIONAL { ?item wdt:P18 ?image . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr, en" . } .
}
Carte du patrimoine culturel du Québec[edit]
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?coord ?image
WHERE { {
SELECT DISTINCT ?item WHERE {
?item wdt:P1435/wdt:P279* wd:Q3370013 .
?item p:P1435 ?heritage_statement .
FILTER NOT EXISTS { ?heritage_statement pq:P582 ?end . }
} }
OPTIONAL { ?item wdt:P625 ?coord . }
OPTIONAL { ?item wdt:P18 ?image . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr, en" . } .
}
Carte des ressources historiques de l'Alberta[edit]
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?coord ?image
WHERE { {
SELECT DISTINCT ?item WHERE {
?item wdt:P1435/wdt:P279* wd:Q14465882 .
?item p:P1435 ?heritage_statement .
FILTER NOT EXISTS { ?heritage_statement pq:P582 ?end . }
} }
OPTIONAL { ?item wdt:P625 ?coord . }
OPTIONAL { ?item wdt:P18 ?image . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr, en" . } .
}
Carte des bien patrimoniaux de l'Ontario[edit]
- Tous les biens, avec et sans photos
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?coord ?image
WHERE { {
SELECT DISTINCT ?item WHERE {
?item wdt:P1435/wdt:P279* wd:Q18341711 .
?item p:P1435 ?heritage_statement .
FILTER NOT EXISTS { ?heritage_statement pq:P582 ?end . }
} }
OPTIONAL { ?item wdt:P625 ?coord . }
OPTIONAL { ?item wdt:P18 ?image . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en, fr" . } .
}
- Sans photos
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?coord ?image
WHERE { {
SELECT DISTINCT ?item WHERE {
?item wdt:P1435/wdt:P279* wd:Q18341711 .
?item p:P1435 ?heritage_statement .
FILTER NOT EXISTS { ?heritage_statement pq:P582 ?end . }
} }
OPTIONAL { ?item wdt:P625 ?coord . }
FILTER NOT EXISTS { ?item wdt:P18 ?image . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en, fr" . } .
}
Carte des phares patrimoniaux du Canada[edit]
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?coord ?image
WHERE { {
SELECT DISTINCT ?item WHERE {
?item wdt:P1435/wdt:P279* wd:Q15641550 .
?item p:P1435 ?heritage_statement .
FILTER NOT EXISTS { ?heritage_statement pq:P582 ?end . }
} }
OPTIONAL { ?item wdt:P625 ?coord . }
OPTIONAL { ?item wdt:P18 ?image . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr, en" . } .
}
Carte des lieux patrimoniaux pour une région donnée[edit]
#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:Q680780 . # Pour une autre région, changer "Q680780" pour une autre entité administrative.
?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
L'identifiant Q680780
dans le script correspond à la région administrative de la ville de Québec. Toutes les régions administratives du Québec sont listées dans Q176 en vis-à-vis de la déclaration « contient les subdivisions territoriales administratives ». Dans le script là-bas, remplacez Q680780
par l'identifiant Wikidata de la région administrative (exemple, Estrie : Q1122368).
Carte des lieux patrimoniaux du Canada sans photos[edit]
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?coord ?image
WHERE {
?item wdt:P1435/wdt:P279* wd:Q14469659;
wdt:P17 wd:Q16;
wdt:P625 ?coord;
MINUS { ?item wdt:P18 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" . }
}
Lieux patrimoniaux dans une aire protégée[edit]
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?coord ?image ?park ?parkLabel
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 . }
} }
OPTIONAL { ?item wdt:P625 ?coord . }
OPTIONAL { ?item wdt:P18 ?image . }
?item wdt:P3018 ?park .
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr, en" . } .
}
Quelques autres requêtes[edit]
- Catégories Commons sans éléments Wikidata pour Canadian Register of Historic Places ID (P477): [1]
- Lieux patrimoniaux du Canada désignés au court d'une année précise: https://w.wiki/MHg (2019 dans ce cas précis)
- https://w.wiki/kp5
- Graphique de lieux patrimoniaux du Canada par années: https://w.wiki/PvS
- Même chose, mais juste pour le Québec: https://w.wiki/orX
- Immeuble patrimoniaux citées seulement https://w.wiki/6Gbj
- Pour l'Ontario https://w.wiki/4vKW
- Même chose, mais juste pour le Québec: https://w.wiki/orX
- Et pour les États-Unis: https://w.wiki/gzD
- Wisconsin State Register of Historic Places https://w.wiki/mHZ
- New York City Landmark https://w.wiki/6Gbh
- Propriétés constributrices de l'Oregon sans Oregon Historic Sites Database ID (P8177): https://w.wiki/Pqr