Difference between revisions of "Template:France metadata Wikidata"

From blackwiki
Jump to navigation Jump to search
imported>Markussep
m
imported>Markussep
(2018 population data)
 
Line 1: Line 1:
 
{{#switch: {{{1}}}
 
{{#switch: {{{1}}}
  
| population_footnotes  = {{#if: {{wikidata|reference|raw|P1082|P585=2017-01-01}} | <ref>{{cite web  
+
| population_footnotes  = {{#if: {{wikidata|reference|raw|P1082|P585=2018-01-01}} | <ref>{{cite web
 +
|title={{wikidata|label|eid=Q104619889}}
 +
|url=https://www.insee.fr/fr/statistiques/5001880?geo=COM-{{#if: {{wikidata|property|P374}} | {{wikidata|property|P374}} | {{main other|[[Category:Pages using Template:France metadata Wikidata without references]]}} }}
 +
|publisher={{wikidata|property|linked|eid=Q104619889|P123}}
 +
|accessdate=4 January 2021}}</ref> | {{#if: {{wikidata|reference|raw|P1082|P585=2017-01-01}} | <ref>{{cite web  
 
|title={{wikidata|label|eid=Q81204110}}
 
|title={{wikidata|label|eid=Q81204110}}
 
|url=https://www.insee.fr/fr/statistiques/4269674?geo=COM-{{#if: {{wikidata|property|P374}} | {{wikidata|property|P374}} | {{main other|[[Category:Pages using Template:France metadata Wikidata without references]]}} }}
 
|url=https://www.insee.fr/fr/statistiques/4269674?geo=COM-{{#if: {{wikidata|property|P374}} | {{wikidata|property|P374}} | {{main other|[[Category:Pages using Template:France metadata Wikidata without references]]}} }}
 
|publisher={{wikidata|property|linked|eid=Q81204110|P123}}
 
|publisher={{wikidata|property|linked|eid=Q81204110|P123}}
|accessdate=6 January 2020}}</ref> | {{#if: {{wikidata|reference|raw|P1082|P585=2016-01-01}} | <ref>{{cite web
+
|accessdate=6 January 2020}}</ref> }} }}
|title={{wikidata|label|eid=Q63330390}}
 
|url=https://www.insee.fr/fr/statistiques/3681328?geo=COM-{{#if: {{wikidata|property|P374}} | {{wikidata|property|P374}} | {{main other|[[Category:Pages using Template:France metadata Wikidata without references]]}} }}
 
|publisher={{wikidata|property|linked|eid=Q63330390|P123}}
 
|accessdate=25 April 2019}}</ref> }} }}
 
  
| population_total = {{#if: <!-- if wikidata pop as of 2017-01-01 is set and has an external source, display pop --> {{wikidata|reference|raw|P1082|P585=2017-01-01}} | {{wikidata|property|raw|P1082|P585=2017-01-01}} | {{#if: <!-- if wikidata pop as of 2016-01-01 is set and has an external source, display pop --> | {{wikidata|reference|raw|P1082|P585=2016-01-01}} | {{wikidata|property|raw|P1082|P585=2016-01-01}} | {{main other|[[Category:Pages using Template:France metadata Wikidata without references]]}} }} }}
+
| population_total = {{#if: <!-- if wikidata pop as of 2018-01-01 is set and has an external source, display pop --> {{wikidata|reference|raw|P1082|P585=2018-01-01}} | {{wikidata|property|raw|P1082|P585=2018-01-01}} | {{#if: <!-- if wikidata pop as of 2017-01-01 is set and has an external source, display pop --> | {{wikidata|reference|raw|P1082|P585=2017-01-01}} | {{wikidata|property|raw|P1082|P585=2017-01-01}} | {{main other|[[Category:Pages using Template:France metadata Wikidata without references]]}} }} }}
  
| population_as_of = {{#if: <!-- if wikidata pop as of 2017-01-01 is set and has an external source, display as_of date --> {{wikidata|reference|raw|P1082|P585=2017-01-01}} | 2017-01-01 | {{#if: <!-- if wikidata pop as of 2016-01-01 is set and has an external source, display pop --> | {{wikidata|reference|raw|P1082|P585=2016-01-01}} | 2016-01-01}} }}
+
| population_as_of = {{#if: <!-- if wikidata pop as of 2018-01-01 is set and has an external source, display as_of date --> {{wikidata|reference|raw|P1082|P585=2018-01-01}} | 2018-01-01 | {{#if: <!-- if wikidata pop as of 2017-01-01 is set and has an external source, display pop --> | {{wikidata|reference|raw|P1082|P585=2017-01-01}} | 2017-01-01}} }}
  
 
}}<noinclude>{{doc}}
 
}}<noinclude>{{doc}}
 
</noinclude>
 
</noinclude>

Latest revision as of 08:54, 4 January 2021

Template documentation[view] [edit] [history] [purge]

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

Population

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

Usage

{{France metadata Wikidata|population_footnotes}}

OR

{{France metadata Wikidata|population_total}}

OR

{{France metadata Wikidata|population_as_of}}

Updating the figures

See the procedure explained on Wikipedia:Uploading metadata to Wikidata. The mappings between Wikidata IDs for municipalities and municipality keys are available through this Wikidata Query.

Maintenance categories

See also