This article is devoted to the study of the Wikidata objects "National Park". With the help of SPARQL queries, computed on the objects of the "national park" type in the Wikidata, the following tasks were solved: a list of all the existing national parks, a list of national parks, ordered by date of creation, a diagram of parks ordered by quantity for different years and by countries World, as well as a map of all national parks, built on the basis of geographical coordinates.
Instances of the object "National park"
Let's build a list of all national parks.
- Property: instance of (P31)
- Item: national park (Q46169)
#added 2017-02
#List of `instances of` "national park"
SELECT ?park ?parkLabel
WHERE
{
?park wdt:P31 wd:Q46169.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
SPARQL-query, 1665 records.
πThe most complete and elaborated national parks on the Wikidata are: Teide, Γingvellir, Alejandro de Humboldt National Park
πAlmost empty and uninformative national parks on the Wikidata are: Pripyshminskiye Bory National Park , Smolny National Park, Khvalynsky National Park
Chart of parks ordered by number in different years and by countries
Let's plot a diagram of the parks ordered by the number of parks created for different years and by countries (from 1900 and to this year 2017). Include in this script, similary, in which countries these parks were created.
#added 2017-03
#defaultView:BarChart
#underscore is for using a variable more than 1 time
SELECT DISTINCT (SAMPLE(?year) AS ?year) (COUNT(?year) AS ?count) (SAMPLE(?parkLabel) AS ?parkLabel) WHERE {
?object (wdt:P31) wd:Q46169. #instance of national park
BIND(str(YEAR(?inception)) AS ?year) #definition of year
?object wdt:P571 ?inception. #definition of inception
?object wdt:P17 ?country. #definition of country
?country rdfs:label ?parkLabel.
FILTER((LANG(?parkLabel)) = "en") #filter in parkLabel = en
}
GROUP BY ?inception ?country #group by inception + country
ORDER BY ?year ?inception #order by year + inception
SPARQL-query, 612 records.
This script displays the number of parks created in certain years, as well as the countries in which they were created (Figure 1). For example, blue column for 2006 year means that 25 national parks have been established in Australia.
Let's sort this list so that the years are displayed sequentially (Figure 2).
The lack of the this script that national parks of several countries are not presented at Figure 2. For example, national parks of Norway are absent at this figure, because there is Wikidata object National park of Norway. Thus, the previous SPARQL script should be extended with the following lines.
#defaultView:BarChart
SELECT DISTINCT (SAMPLE(?year) AS ?year) (COUNT(?year) AS ?count) (SAMPLE(?parkLabel) AS ?parkLabel) WHERE {
?object (wdt:P31/wdt:P279*) wd:Q46169. #instance of national park of .. (Russia as example)
BIND(str(YEAR(?inception)) AS ?year) #definition of year
?object wdt:P571 ?inception. #definition of _inception
?object wdt:P17 ?country. #definition of _country
?country rdfs:label ?parkLabel.
FILTER((LANG(?parkLabel)) = "en") #filter in parkLabel = en
}
GROUP BY ?inception ?country #group by inception + country
ORDER BY ?year ?inception #order by year + inception
SPARQL-query, 980 records.
You can see from (Figure 3) that the number of national parks has increased.
Fullness of Wikidata
There are so many national parks in the world. However, most likely, not all the parks are filled with the field 'geographical coordinates' (en. 'location'). Let's build a list of national parks, which have geographical coordinates.
#List of parks with filled 'location'
#defaultView:Map
SELECT ?park ?parkLabel ?location
WHERE
{
?park wdt:P31 wd:Q46169.
?park wdt:P625 ?location
SERVICE wikibase:label { bd:serviceParam wikibase:language "en"}
}
SPARQL-query, 1405 records.
Let's build a list of national parks, which have geographic coordinates in Russia.
#List of national parks in Russia
#defaultView:Map
SELECT ?park ?parkLabel ?location
WHERE
{
?park wdt:P31 wd:Q46169. #instance of national park
?park wdt:P17 wd:Q159. #country = Russia
?park wdt:P625 ?location #display location
SERVICE wikibase:label { bd:serviceParam wikibase:language "en"}
}
SPARQL-query, 7 records.
There are not so many natinal parks in Russia (which were displayed by this script), only seven . Although, really, there are six of them, because one park (National park Bikin) was duplicated due to the repeated filling of the 'location' field. In fact, these parks are 'wrong', because they must belong to a subclass of parks of a particular country.
We will build a list of national parks in Russia, using a subclass (national park in Russia).
#List of national parks in Russia
#defaultView:Map
SELECT ?park ?parkLabel ?location
WHERE
{
?park wdt:P31 wd:Q1969226. #instance of national park in Russia
?park wdt:P625 ?location #display location
SERVICE wikibase:label { bd:serviceParam wikibase:language "en"}
}
SPARQL-query, 44 records.
The resulting list consists of 44 parks (Figure 4).
Let's look at the article on Russian Wikipedia. National parks of Russia includes 49 parks.
In the book "Around the World: Russian National Parks: The Volga Region and the North Caucasus Guidebook", it is said (at the time of writing in 2007) about the current 35 national parks in Russia.
The site worldatlas.com describes the 46 national parks. [1]
The site russia.com describes the 46 national parks. [2]
The site nationalgeographic.comdescribes the 50 national parks. [3]
Wikitravel shows the result in 40 national parks in Russia.
On English Wikipedia, you can find the result in 48 national parks (National parks of Russia).
Filling 100 objects
Information on Wikidata says that not all the parks have a 'geographic coordinates' field (en. 'location'). Let's write a script that displays a list of all national parks with an empty 'location' field.
SPARQL-query, 283 records.
#List of national parks with unfilled property 'location'
SELECT ?park ?parkLabel ?location
WHERE
{
?park wdt:P31 wd:Q46169. #instance of national park
FILTER NOT EXISTS { ?park wdt:P625 [] } #if property location is unfilled
SERVICE wikibase:label { bd:serviceParam wikibase:language "en"}
}
This script built a list of 283 national parks with an empty 'location' field.
Let's write a script that will build a list of all national parks that have a 'location' field.
SPARQL-query, 1417 records.
#List of national parks
#defaultView:Map
SELECT ?park ?parkLabel ?location
WHERE
{
?park wdt:P31 wd:Q46169. #instance of national park
?park wdt:P625 ?location #display location
SERVICE wikibase:label { bd:serviceParam wikibase:language "en"}
}
After the execution of this script, 1417 national parks were displayed on the map. It is necessary to fill in the 'location' field to increase the count of displayed parks.
As can be seen from the image (Figure 5), the number of parks become larger, due to the filling of the field. The country with the largest (for example) number of national parks (312) - Australia.
Future work
- Display on the map all parks in the world that are protected areas (with the "IUCN protected areas category" field)
- Display 10 countries in which the number of national parks is the largest
- Build a histogram (Bar chart) of national parks in Russia by the years of creation, calculate which year was the "peak" (the largest number of parks), compare with the parks of some other country
Test
SPARQL-queries with answers:
References
- NSW Government (2015). "What is National Park?".
- worldatlas.com (2017). "The Biggest National Parks In Russia".
- russia.com (2017). "National Parks of Russia".
- National Geographic News (2017). "Look Inside Russia's Wildest Nature Reserves β Now Turning 100".
- Andrew Krizhanovsky, Nikita Bazhenov (2017). "ΠΡΡΠ»Π΅Π΄ΠΎΠ²Π°Π½ΠΈΠ΅ Π½Π°ΡΠΈΠΎΠ½Π°Π»ΡΠ½ΡΡ ΠΏΠ°ΡΠΊΠΎΠ² Π ΠΎΡΡΠΈΠΈ ΠΈ ΠΌΠΈΡΠ° ΠΏΠΎ ΠΠΈΠΊΠΈΠ΄Π°Π½Π½ΡΠΌ" [Research of national parks of Russia and the world parks on the Wikidata]. Authorea.