Wikidata:WikiProject Protected areas/Queries
National parks
editList of national parks of Australia
editThe following query uses these:
- Items: national park of Australia (Q18618819) , protected area of Australia (Q17000624) , state or territory of Australia (Q178712)
- Properties: instance of (P31) , subclass of (P279) , located in the administrative territorial entity (P131) , inception (P571) , operator (P137) , main regulatory text (P92) , Commons category (P373) , area (P2046)
SELECT DISTINCT ?national_park_of_Australia ?national_park_of_AustraliaLabel ?administrative_areaLabel ?area ?establishedYear ?operatorLabel ?main_regulatory_text ?main_regulatory_textLabel ?commons_category_link WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } ?national_park_of_Australia wdt:P31 wd:Q18618819. ?national_park_of_Australia wdt:P31/wdt:P279* wd:Q17000624. ?national_park_of_Australia wdt:P131 ?administrative_area. ?administrative_area wdt:P31/wdt:P279* wd:Q178712. OPTIONAL { ?national_park_of_Australia wdt:P571 ?established. BIND(STR(YEAR(?established)) AS ?establishedYear). }. OPTIONAL { ?national_park_of_Australia wdt:P137 ?operator }. OPTIONAL { ?national_park_of_Australia wdt:P92 ?main_regulatory_text }. OPTIONAL { ?national_park_of_Australia p:P2046/psn:P2046/wikibase:quantityAmount ?area }. OPTIONAL { ?national_park_of_Australia wdt:P373 ?commons_category. BIND(CONCAT("https://commons.wikimedia.org/wiki/Category:", ?commons_category) AS ?commons_category_link). }. } ORDER BY DESC(?area) ASC(?establishedYear) ASC(?national_park_of_AustraliaLabel)
Trails
editList of trails within protected areas of Australia
editThe following query uses these:
- Items: trail (Q628179) , protected area of Australia (Q17000624) , state or territory of Australia (Q178712)
- Properties: instance of (P31) , subclass of (P279) , located in protected area (P3018) , located in the administrative territorial entity (P131) , length (P2043)
SELECT ?trail ?trailLabel ?length ?located_in_protected_area ?located_in_protected_areaLabel ?administrative_areaLabel WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } ?trail wdt:P31/wdt:P279* wd:Q628179. ?trail wdt:P3018 ?located_in_protected_area. ?located_in_protected_area wdt:P31/wdt:P279* wd:Q17000624. ?located_in_protected_area wdt:P131 ?administrative_area. ?administrative_area wdt:P31/wdt:P279* wd:Q178712. OPTIONAL { ?trail p:P2043/psn:P2043/wikibase:quantityAmount ?length }. } ORDER BY DESC(?length) ASC(?located_in_protected_areaLabel) ASC(?trailLabel)