قالب:Scottish locality populations/doc

This template links to the latest population estimate for localities in Scotland. The population figures are stored as tabular data on Commons here. The template works by using the tabular data module to lookup the name of the locality or its ONS code in the data page, and outputs the population as a number.

What are localities?

According to the National Records of Scotland (who publish the data):

The settlements of Scotland are built-up areas which round to 500 people or more, with larger settlements divided into localities to reflect areas which are more easily identifiable as the towns and cities of Scotland.[1]

Use this template for infoboxes in articles about towns, cities and villages. Infoboxes in articles for urban areas (such as Greater Glasgow) should use the similar {{Scottish settlement populations}}. Most localities are also settlements, but it is preferable to use this template for consistency.

Usage

Inputting...

  • {{Scottish locality populations|name|POP=Aberdeen}}

or...

  • {{Scottish locality populations|code|POP=S19001274}}

produces...

خطأ لوا في وحدة:Tabular_data على السطر 97: attempt to index local 'data' (a boolean value).

You can also add the year that the population figures were published in brackets and/or include a citation to the source of the population figures:

  • {{Scottish locality populations|name|POP=Aberdeen|year=yes|ref=yes}}

or...

  • {{Scottish locality populations|code|POP=S19001274|year=yes|ref=yes}}

produces...

خطأ لوا في وحدة:Tabular_data على السطر 97: attempt to index local 'data' (a boolean value).(mid-2016 est.)[2]

Template Data

A template to link to population figures for localities in Scotland.

وسائط القالب

وسيطوصفنوعحالة
Input type1

Specify the input, either a locality's name or its ONS code

مثال
name
نصمطلوب
PopulationPOP

The name or ONS code of the locality you wish to get population data for

مثال
Aberdeen
نصمطلوب
Yearyear

Include the year that the population figures were published in brackets (yes/no)

مثال
yes
نصاختياري
Referenceref

Include a citation to the source of the population figures (yes/no)

مثال
yes
نصاختياري

See also

References

  1. ^ https://www.nrscotland.gov.uk/statistics-and-data/statistics/statistics-by-theme/population/population-estimates/settlements-and-localities
  2. ^ "Mid-2016 Population Estimates for Settlements and Localities in Scotland". National Records of Scotland. 12 March 2018. Retrieved 30 December 2020.