Templat:NZ population data/doc
Usage
suntingThis template is to supply uniform, up-to-date population data to New Zealand articles. It facilitates a mass update of all the population numbers in articles.
Adding to an article
sunting{{NZ population data|Example city|y|y|y}}
The template has seven parameters:
- area = Statistics NZ name of area for population (e.g. Auckland City), defaults to pagename.
- showpopulation = display the population figure
- showtitle = display the title (e.g. "June 2008 estimate")
- showref = display the reference, can be reused by adding:
<ref name="NZ_population_data"/>
- titlepre = free text before the title, for example to add parentheses
- titlepost = free text after the title
- aucklandref = For the new Auckland Council and the altered Waikato District, displays a reference to the new population figures, can be reused by adding:
<ref name="Auckland_population_data"/>
Leaving a show parameter empty results in that value being hidden.
The template data uses formatted text numbers, with the comma thousands separator, which is suitable for the majority of uses. For the numerical value, for example to use in {{Infobox Settlement}}, use the formula: {{formatnum:{{NZ population data| ##Example city## |y}}|R}}
Automatically updating formulae
sunting- Population density:
{{Decimals|{{formatnum:{{NZ population data| ##Example city## |y}}|R}}/ ##numerical land area## |1}}
- Percent of national population:
{{Decimals|{{formatnum:{{NZ population data| ##Example city## |y}}|R}}/{{formatnum:{{NZ population data|New Zealand|y}}|R}}*100|1}}