Template:France metadata Wikidata/doc
| icon | This is a documentation subpage for Template:France metadata Wikidata. It may contain usage information, categories and other content that is not part of the original template page. |
| Warning | This template is used on approximately 36,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template can be used to feed area and population figures from Wikidata to fields in templates such as {{Infobox settlement}}.
Usage
[edit source]{{France metadata Wikidata}} works by checking if the Wikidata entity linked to the article has a population or area statement and sourced by an external reference (not (P143) or similar properties). If the condition is verified, the figure is displayed.
Examples
[edit source]{{France metadata Wikidata|population_total}}
- Returns the total population from Wikidata, defaulting to 2022 census if available, otherwise using latest value
{{France metadata Wikidata|population_footnotes}}
- Returns reference to support total population value
{{France metadata Wikidata|population_as_of}}
- Returns year of census displayed
{{France metadata Wikidata|area_km2_total}}
- Returns the area in square kilometers from Wikidata
{{France metadata Wikidata|area_footnotes}}
- Returns the reference to support area value
{{France metadata Wikidata|area_as_of}}
- Returns year that the area is valid (if available)
Also: when as_of parameters are given, the template accepts an optional second parameter which is the format of the returned date. Possible values include "y", "ymd", "dmy", and "mdy".
Updating the figures
[edit source]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.
See also
[edit source]- Template:Austria metadata Wikidata
- Template:Population Germany
- French municipalities by population - Wikidata Query