Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  



1.1  Adding to an article  





1.2  Automatically updating formulae  





1.3  Annual update  







2 See also  














Template:NZ population data 1992






العربية
Basa Bali


Cymraeg
فارسی
Bahasa Indonesia
ि
Македонски


Bahasa Melayu

Scots
Simple English
Suomi
Tagalog
اردو
Tiếng Vit

 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


This 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.

It is used for dynamically-changing populations. Populations on a specific date should not use this template, but should instead be hard-coded manually into the article.

This template uses the New Zealand Standard Areas Classification 1992 (NZSAC92). For the newer Statistical Standard for Geographic Areas 2018 (SSGA18), use {{NZ population data 2018}}. This template is "macron-sensitive", i.e. it will only look up a value if the spelling is exactly as specified (with or without a macron). As a workaround, all places that have recently received a macron have been duplicated in this template and that means that there is always the correct spelling available for a lookup to work.

Adding to an article

{{NZ population data|Example city|y|y|y}}

The template has seven parameters:

  1. area = Statistics NZ name of area for population (e.g. Lower Hutt City). This parameter is mandatory if showpopulation is used. List of names here
  2. showpopulation = display the population figure
  3. showtitle = display the title (e.g. "June 2008")
  4. showref = display the reference, can subsequently be reused by adding: <ref name="NZ_population_data"/>
  5. titlepre = free text before the title, for example to add parentheses
  6. titlepost = free text after the title

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

Annual update

The data on this template needs to be updated once per year, as of 2016 Statistics NZ releases annual population estimates around 20 October.

  1. Download latest spreadsheet from Statistics New Zealand
  2. In a new spreadsheet, collect the data from all tables to get two columns, area name and most recent year data
  3. create a new column with formula =" | "&A1&" = "&TEXT(B1,"#,##0") for first entry, copy down entire column. The TEXT function makes sure that commas are kept in the numbers.
  4. copy & paste results into template
  5. update the name "June XXXX"
  6. update the reference
  7. verify Statistics NZ names are consistent with "Show changes", affected articles need the new name
  8. verify everything is ok by looking at a sample of pages. You may need to purge the cache on some articles by adding ?action=purge to the end of the URL for changes to show.
  9. List of cities in New Zealand and List of New Zealand urban areas need checks for rank changes, affected articles may need a minor reword

See also


Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:NZ_population_data_1992&oldid=949297855"

Categories: 
New Zealand data templates
Template:Metadata Population
Templates that generate named references
Hidden category: 
Wikipedia semi-protected templates
 



This page was last edited on 5 April 2020, at 17:53 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki