Template:Scottish settlement populations

Documentation icon Template documentation[view] [edit] [history] [purge]

This template links to the latest population estimate for settlements 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 settlement or its ONS code in the data page, and outputs the population as a number.

What are settlements?

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 urban areas (such as Greater Glasgow). Infoboxes in articles for individual towns, cities and villages should use the similar {{Scottish locality populations}} template. Most settlements are also localities, so if this is the case it is preferable to use the locality template for consistency.

Usage

Inputting...

  • {{Scottish settlement populations|name|POP=Aberdeen, Milltimber, and Peterculter}}

or...

  • {{Scottish settlement populations|code|POP=S20001020}}

produces...

Lua error in Module:Tabular_data at line 91: attempt to index field 'data' (a nil 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 settlement populations|name|POP=Aberdeen, Milltimber, and Peterculter|year=yes|ref=yes}}

or...

  • {{Scottish settlement populations|code|POP=S20001020|year=yes|ref=yes}}

produces...

Lua error in Module:Tabular_data at line 91: attempt to index field 'data' (a nil value). (mid-2020 est.)[2]

Template Data

<templatedata> { "params": { "1": { "label": "Input type", "description": "Specify the input, either a settlement's name or its ONS code", "example": "name", "type": "string", "required": true }, "POP": { "label": "Population", "description": "The name or ONS code of the settlement you wish to get population data for", "example": "Aberdeen", "type": "string", "required": true }, "year": { "label": "Year", "description": "Include the year that the population figures were published in brackets (yes/no)", "example": "yes", "type": "string", "required": false }, "ref": { "label": "Reference", "description": "Include a citation to the source of the population figures (yes/no)", "example": "yes", "type": "string", "required": false } }, "description": "A template to link to population figures for settlements in Scotland." } </templatedata>

See also

References

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