(Go: >> BACK << -|- >> HOME <<)

Jump to content

Template:Population WD/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
No edit summary
Line 20: Line 20:
gives: {{population WD|Stockholm, Sweden}}.
gives: {{population WD|Stockholm, Sweden}}.


A last option is to use the qid code of {{Q|q175}}, which however makes the wikicode less comprehensible:
A last option is to use the qid code of {{Q|q1754}} {{Q|{{get QID|Stockholm}}}}, which however makes the wikicode less comprehensible:
<code><nowiki>{{population WD|qid=q175}}</nowiki></code>
<code><nowiki>{{population WD|qid=q1754}}</nowiki></code>
results in: {{population WD|qid=q175}}.
results in: {{population WD|qid=q1754}}.


==See also==
==See also==

Revision as of 21:35, 26 February 2022

Shows the most recent population size of a place, according to Wikidata. If no argument is provided, it will show the population size of the current article subject, otherwise of the article title stated in the first unnamed parameter. It also works if the article is moved, by following the redirection.

A purpose of this 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. It may for example be used in population tables.

Usage

Example:

{{population WD}}

shows the population of the current article subject.

These two places have the same Wikidata label Stockholm:

{{population WD|Stockholm}}

gives the population of Stockholm: 984,748 (evaluation, 2022) Edit this on Wikidata.

{{population WD|Stockholm (town), Wisconsin}}

gives the population of Stockholm (town), Wisconsin: 218 (census, 2020 United States Census, 2020) Edit this on Wikidata.

The redirection page Stockholm, Sweden also works:

{{population WD|Stockholm, Sweden}}

gives: 984,748 (evaluation, 2022) Edit this on Wikidata.

A last option is to use the qid code of Stockholm (Q1754) Stockholm (Q1754), which however makes the wikicode less comprehensible:

{{population WD|qid=q1754}}

results in: 984,748 (evaluation, 2022) Edit this on Wikidata.

See also