Difference between revisions of "Template:Austria metadata Wikidata/doc"

From blackwiki
Jump to navigation Jump to search
imported>Underlying lk
imported>Zyxw
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template can be used to feed population figures from Wikidata to fields in templates such as {{tl|Infobox settlement}}.
+
This template can be used to feed area and population figures from Wikidata to fields in templates such as {{tl|Infobox settlement}}.
 
 
{{tl|Austria metadata Wikidata}} works by checking if the Wikidata entity linked to the article has a {{wpl|P1082}} statement dating to 1 January 2018 and sourced by an external reference (not {{wpl|P143}} or similar properties). If the condition is verified, the population figure is displayed.
 
  
 
For a usage example, see {{oldid2|886924685|Eisenstadt}}.
 
For a usage example, see {{oldid2|886924685|Eisenstadt}}.
  
 
==Population==
 
==Population==
 +
{{tl|Austria metadata Wikidata}} works by checking if the Wikidata entity linked to the article has a {{wpl|P1082}} statement dating to 1 January 2018 and sourced by an external reference (not {{wpl|P143}} or similar properties). If the condition is verified, the population figure is displayed.
 +
 
=== Usage ===
 
=== Usage ===
  
Line 19: Line 19:
  
 
<pre>{{Austria metadata Wikidata|population_as_of}}</pre>
 
<pre>{{Austria metadata Wikidata|population_as_of}}</pre>
 
=== Updating the figures===
 
 
1. Updated population figures are published on the [https://www.statistik.at/web_de/klassifikationen/regionale_gliederungen/gemeinden/index.html Statistik Austria] website.
 
 
2. The mappings between Wikidata IDs for municipalities and municipality keys are available through this [https://query.wikidata.org/#SELECT%20%2a%20WHERE%20%7B%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP964%20%3FAustrian_municipality_key.%20%7D%0A%7D Wikidata Query]. The two tables can be linked through the VLOOKUP function in Excel (or any other spreadsheet program).
 
 
3. [https://tools.wmflabs.org/quickstatements/#/batch QuickStatements] can be used to rapidly upload hundreds of statements in one go. Choosing the 'Run in background' option is advised, so that the process will continue even if the browser window crashes or is closed.
 
 
The example below uploads the updated population of {{Q|126321}} as of 1 January 2018, using the QuickStatements V1 syntax:
 
 
<pre><nowiki>
 
Q126321 P1082 14476 P585 +2018-01-01T00:00:00Z/11 S854 "https://www.statistik.at/web_de/klassifikationen/regionale_gliederungen/gemeinden/index.html" S1476 de:"Einwohnerzahl 1.1.2018 nach Gemeinden mit Status, Gebietsstand 1.1.2018" S813 +2019-03-09T00:00:00Z/11 S123 Q358870
 
</nowiki></pre>
 
 
The same command, using the csv syntax:
 
 
<pre><nowiki>
 
qid,P1082,qal585,S854,s1476,s813,s123
 
Q126321,14476,+2018-01-01T00:00:00Z/11,""""https://www.statistik.at/web_de/klassifikationen/regionale_gliederungen/gemeinden/index.html",de:"Einwohnerzahl 1.1.2018 nach Gemeinden mit Status Gebietsstand 1.1.2018",+2019-03-09T00:00:00Z/11,Q358870
 
</nowiki></pre>
 
 
This uploads this statement to the entity {{Q|126321}}:
 
* {{wpl|P1082}}: 14476
 
 
this qualifier:
 
* {{wpl|P585}}: +2018-01-01T00:00:00Z/11
 
 
and the following references:
 
* {{wpl|P854}}: "https://www.statistik.at/web_de/klassifikationen/regionale_gliederungen/gemeinden/index.html"
 
* {{wpl|P1476}}: de:"Einwohnerzahl 1.1.2018 nach Gemeinden mit Status, Gebietsstand 1.1.2018"
 
* {{wpl|P813}}: +2019-03-09T00:00:00Z/11
 
* {{wpl|P123}}: {{Q|358870}}
 
  
 
==Area==
 
==Area==
Line 62: Line 29:
 
<pre>{{Austria metadata Wikidata|area_total_km2}}</pre>
 
<pre>{{Austria metadata Wikidata|area_total_km2}}</pre>
  
=== Updating the figures===
+
==Tracking categories==
The same procedure can be used to update the area figures:
+
* {{clc|Pages using Template:Austria metadata Wikidata without references}}
<pre><nowiki>
 
qid,P2046,qal585,S854,s1476,s813,s123
 
Q126321,42.88U712226,+2018-01-01T00:00:00Z/11,""""http://www.statistik.at/web_de/klassifikationen/regionale_gliederungen/dauersiedlungsraum/index.html",de:"Dauersiedlungsraum der Gemeinden Politischen Bezirke und Bundesländer - Gebietsstand 1.1.2018",+2019-03-10T00:00:00Z/11,Q358870
 
</nowiki></pre>
 
 
 
This uploads this statement to the entity {{Q|126321}}:
 
* {{wpl|P2046}}: 42.88 {{Q|712226}}
 
 
 
this qualifier:
 
* {{wpl|P585}}: +2018-01-01T00:00:00Z/11
 
 
 
and the following references:
 
* {{wpl|P854}}: "http://www.statistik.at/web_de/klassifikationen/regionale_gliederungen/dauersiedlungsraum/index.html"
 
* {{wpl|P1476}}: de:"Dauersiedlungsraum der Gemeinden Politischen Bezirke und Bundesländer - Gebietsstand 1.1.2018"
 
* {{wpl|P813}}: +2019-03-10T00:00:00Z/11
 
* {{wpl|P123}}: {{Q|358870}}
 
  
 
==See also==
 
==See also==
* [https://query.wikidata.org/#PREFIX%20xsd%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0A%0ASELECT%20%3Fmunicipality_of_Austria%20%3Fmunicipality_of_AustriaLabel%20%3Fpopulation%20%20WHERE%20%7B%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%20%7D%0A%20%20%3Fmunicipality_of_Austria%20wdt%3AP964%20%5B%5D.%0A%20%20%3Fmunicipality_of_Austria%20p%3AP1082%20_%3Ab2.%0A%20%20_%3Ab2%20ps%3AP1082%20%3Fpopulation.%0A%20%20_%3Ab2%20pq%3AP585%20%3FpopDate.%0A%20%20FILTER%28%3FpopDate%20%3D%20%222018-01-01T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%29%0A%7D Austrian municipalities with population as of 2018-01-01] - Wikidata Query
+
* [[Wikipedia:Uploading metadata to Wikidata]]
  
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||
Line 88: Line 39:
 
[[Category:Templates using data from Wikidata]]
 
[[Category:Templates using data from Wikidata]]
 
[[Category:Austria subdivision templates]]
 
[[Category:Austria subdivision templates]]
 
+
[[Category:Template:Metadata Population]]
 +
[[Category:Austria data templates]]
 +
[[Category:Templates that add a tracking category]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 04:25, 11 March 2020

This template can be used to feed area and population figures from Wikidata to fields in templates such as {{Infobox settlement}}.

For a usage example, see Eisenstadt.

Population

{{Austria metadata Wikidata}} works by checking if the Wikidata entity linked to the article has a Template:Wpl statement dating to 1 January 2018 and sourced by an external reference (not Template:Wpl or similar properties). If the condition is verified, the population figure is displayed.

Usage

{{Austria metadata Wikidata|population_footnotes}}

OR

{{Austria metadata Wikidata|population_total}}

OR

{{Austria metadata Wikidata|population_as_of}}

Area

Usage

{{Austria metadata Wikidata|area_footnotes}}

OR

{{Austria metadata Wikidata|area_total_km2}}

Tracking categories

See also