Jump to content

User:Mathglot/sandbox/Templates/Alberta templates/Cpmr/doc

From Wikipedia, the free encyclopedia

Generates a single wikitable row contributing to Canadian province municipality templates.

Usage

[edit]

{{cpmr|prov=Alberta|loc=Airdrie|type=City|inc=January 1, 1985|pop2=61581|pop1=43271|area=84.57}}
{{cpmr|Airdrie|City|January 1, 1985|61581|43271|84.57}}

Parameters

[edit]

This template has three named parameters, and six positional parameters (with named aliases):

  • |1= or |loc= – municipality (e.g., 'Banff')
  • |2= or |type= – type (e.g. 'City')
  • |3= or |inc= – incorporation date (format: t.b.d.; currently: any)
  • |4= or |pop2= – latest population (no punct.)
  • |5= or |pop1= – previous population (no punct.)
  • |6= or |area= – area (in km sq)

If one unnamed positional param is used, such as the first unnamed param for the municipality name, then all six must be used positionally. I.e., don't use |loc= for municipality, and then switch to positional for 'type' and the others. Either all positional, or all named.

The three optional named parameters are:

  • |prov= – province (default: 'Alberta')
  • |muni-link= – replaces the target article for the municipality
  • |suffix= – appends an unlinked text string to the linked municipality name (default:

Table cells

[edit]

The template generates a single wikitable row with eight columns. The content of the cells in the table row are a function of the parameters, sometimes in combination, and are not simply a copy of the individual parameters, or a formatted copy of them. The content of the cells, in left-to-right column order are:

  1. Name – the linked name of the Municipality, plus any unlinked suffix. Made up of the required |loc= (or alias param 1), and the province (from |prov=) linked by default as: MunicipalityName + + ProvinceName; e.g., 'Athabasca, Alberta')
  2. Status – whether the municipality is a town, city, village, parish, district, and so on. A copy of |type=.
  3. Incorporation date – copy of param |inc=
  4. Population (year) – the recent population figure (default year: 2016); formatted copy of param |pop2=.
  5. Population (year) – older population figure (default year: 2011); formatted copy of param |pop1=.
  6. Change – change in population; a positive value indicates rising population; calculated from two population figures
  7. Land area km2 – Area of the municipality in square kilometers; copied from |area=.
  8. Population density km2 – Population density in square kilometers; calculated from population and area parameters.

Examples

[edit]

This mixed-province example is merely illustrative of how to use the template, and not likely to exist in any article in this form:

{{Draft:cpmh|prov=various provinces}}
{{Draft:cpmr|prov=Quebec|Clermont|Township|January 1, 1985|61581|43271|84.57|muni-link=Clermont, Abitibi-Témiscamingue, Quebec}} 
{{Draft:cpmr|Edmonton|City|January 1, 1985|61581|43271|84.57|muni-link=Edmonton}}
{{Draft:cpmr|prov=British Columbia|Langley|District municipality|January 1, 1985|61581|43271|84.57|muni-link=Langley, British Columbia (district municipality)}}
{{Draft:cpmr|Lloydminster|City|January 1, 1985|61581|43271|84.57|suffix=(part)}}
{{Draft:cpmr|Lesser Slave River|Municipal district|January 1, 1985|61581|43271|84.57|muni-link=Municipal District of Lesser Slave River No. 124|suffix=(dist. #124)}}
{{Draft:cpmr|prov=Quebec|Plessisville|Parish|January 1, 1985|61581|43271|84.57|muni-link=Plessisville, Quebec (parish)}}
Tabular result for this example

Note: Illustrative only; a table of municipalities in multiple provinces is not a recommended usage of this template. Draft:Cpmh Draft:Cpmr Draft:Cpmr Draft:Cpmr Draft:Cpmr Draft:Cpmr Draft:Cpmr

|}

See also

[edit]