Template:Populationof
no population data for this page
Template {{populationof}} is used in destination articles to output text stating the population of that location, using data extracted from Wikidata. Using this template, rather than simple text, provides an easier method of identifying pages with population statements with the intention of keeping numbers more up to date.
Basic usage
editWith no input, the template will automatically find the Wikidata item for the article, retrieve the population, and output a suitable sentence along with a Wikidata link icon ().
For example, placing the template on page Metro Cebu without any parameters will give:
Code | Output |
---|---|
{{populationof}} | It is home to about 2.8 million people (census, 1 August 2015) |
This template does not include a sentence-ending period, so it should be followed by a period to make a complete sentence, or an optional comma and the rest of the sentence.
Advanced usage
editIf set, |pop=
will output "population of" and the pop number given. You can also set |year=
to include the year of the census or |text=
to use custom text. (If both are provided, |text=
will be used and |year=
will be ignored.)
Code | Output |
---|---|
{{populationof|pop=123456}} | population of 123456 |
{{populationof|pop=123456|year=2021}} | As of 2021 population was 123456 |
{{populationof|text=It's believed that [[North Sentinel Island]] has a population as high as|pop=400}} | It's believed that North Sentinel Island has a population as high as 400 |
If set, |qwd=
will use data from the Wikidata item qwd, rather than the article's linked Wikidata item.
Code | Output |
---|---|
{{populationof|qwd=Q574903}} | It is home to about 498,000 people (census, 1 May 2020) |