Template:Population WD/doc: Difference between revisions
No edit summary |
|||
(15 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Documentation subpage}} |
{{Documentation subpage}} |
||
Shows the |
Shows the population size of a place, according to [[WP:Wikidata|Wikidata]], together with the year. |
||
{{tlp|Population WD}} without argument, shows the population of the current article subject. |
|||
⚫ | |||
{{tlp|Population WD|<page title>}} shows the population size of the ''page title'' subject stated in the first unnamed parameter (it does ''not'' use the Wikidata label). It also works if the article is moved, since it follows the redirection. |
|||
⚫ | The template is intended for population tables of several different places. A purpose of this kind of template is to avoid advanced code in Wikipedia articles, and use a comprehensible property name and article title instead of pid and qid codes. However, the template may also be called with a parameter named ''qid''. |
||
A logged-in user will see a clickable pen next to the value and date. This is helpful in population tables for several different places, to find at which Wikidata page each value can be edited, and where the source and editing history of the value can be found. |
|||
An advise is to not replace new values with older Wikidata values. |
|||
== Usage == |
== Usage == |
||
The template shows the Wikidata population value of highest [[d:Help:Ranking|rank]] (typically the most recent reliable value) or, if several values have highest rank, the most recently entered value. |
|||
=== Current page === |
|||
Example: |
Example: |
||
<code><nowiki>{{population WD}}</nowiki></code> |
<code><nowiki>{{population WD}}</nowiki></code> |
||
shows the population of the current article subject. |
shows the population of the current article subject. |
||
=== Articles sharing the same label === |
|||
The template does ''not'' use the Wikidata label. These two places have the same label ''Stockholm'': |
|||
<code><nowiki>{{population WD|Stockholm}}</nowiki></code> |
<code><nowiki>{{population WD|Stockholm}}</nowiki></code> |
||
gives the population of [[Stockholm]]: {{population WD|Stockholm}}. |
gives the population of [[Stockholm]]: {{population WD|Stockholm}}. |
||
Line 16: | Line 28: | ||
gives the population of [[Stockholm (town), Wisconsin]]: {{population WD|Stockholm (town), Wisconsin}}. |
gives the population of [[Stockholm (town), Wisconsin]]: {{population WD|Stockholm (town), Wisconsin}}. |
||
===Redirections=== |
|||
The redirection page [[Stockholm, Sweden]] also works: |
The redirection page [[Stockholm, Sweden]] also works: |
||
<code><nowiki>{{population WD|Stockholm, Sweden}}</nowiki></code> |
<code><nowiki>{{population WD|Stockholm, Sweden}}</nowiki></code> |
||
and gives: {{population WD|Stockholm, Sweden}}. |
and gives: {{population WD|Stockholm, Sweden}}. |
||
===Qid code=== |
|||
A last option is to use the qid code of |
A last option is to use the qid code of a place, which however makes the wikicode less comprehensible, but is useful if the place has no Wikipedia article: |
||
<code><nowiki>{{population WD|qid=q1754}}</nowiki></code> |
<code><nowiki>{{population WD|qid=q1754}}</nowiki></code> |
||
results in: {{population WD|qid=q1754}}. |
results in the population of {{Q|q1754}}: {{population WD|qid=q1754}}. |
||
==See also== |
==See also== |
||
* [https://en.wikipedia.org/w/index.php?title=List_of_Brazilian_states_by_population_density&oldid=1075098058 List of Brazilian states by population density] (Example article) |
|||
⚫ | |||
* {{tl|Area WD}} |
* {{tl|Area WD}} |
||
* {{tl|Population density WD}} |
|||
⚫ | |||
* {{tl|Show data}} |
|||
* {{tl|Poptoday}} |
|||
* {{tl|Poptoday 1}} |
|||
* {{tl|UN Population}} |
|||
<includeonly>{{sandbox other|| |
<includeonly>{{sandbox other|| |
||
<!-- Categories below this line --> |
<!-- Categories below this line --> |
Latest revision as of 00:43, 11 March 2022
This is a documentation subpage for Template:Population WD. It may contain usage information, categories and other content that is not part of the original template page. |
Shows the population size of a place, according to Wikidata, together with the year.
{{Population WD}} without argument, shows the population of the current article subject.
{{Population WD|<page title>}} shows the population size of the page title subject stated in the first unnamed parameter (it does not use the Wikidata label). It also works if the article is moved, since it follows the redirection.
The template is intended for population tables of several different places. A purpose of this kind of template is to avoid advanced code in Wikipedia articles, and use a comprehensible property name and article title instead of pid and qid codes. However, the template may also be called with a parameter named qid.
A logged-in user will see a clickable pen next to the value and date. This is helpful in population tables for several different places, to find at which Wikidata page each value can be edited, and where the source and editing history of the value can be found.
An advise is to not replace new values with older Wikidata values.
Usage[edit]
The template shows the Wikidata population value of highest rank (typically the most recent reliable value) or, if several values have highest rank, the most recently entered value.
Current page[edit]
Example:
{{population WD}}
shows the population of the current article subject.
Articles sharing the same label[edit]
The template does not use the Wikidata label. These two places have the same label Stockholm:
{{population WD|Stockholm}}
gives the population of Stockholm: 984,748 (evaluation, 2022) .
{{population WD|Stockholm (town), Wisconsin}}
gives the population of Stockholm (town), Wisconsin: 218 (census, 2020 United States Census, 2020) .
Redirections[edit]
The redirection page Stockholm, Sweden also works:
{{population WD|Stockholm, Sweden}}
and gives: 984,748 (evaluation, 2022) .
Qid code[edit]
A last option is to use the qid code of a place, which however makes the wikicode less comprehensible, but is useful if the place has no Wikipedia article:
{{population WD|qid=q1754}}
results in the population of Stockholm (Q1754): 984,748 (evaluation, 2022) .
See also[edit]
- List of Brazilian states by population density (Example article)
- {{Area WD}}
- {{Population density WD}}
- {{Get QID}}
- {{Show data}}
- {{Poptoday}}
- {{Poptoday 1}}
- {{UN Population}}