{{i}} Документація шаблону[перегляд] [редагувати] [історія] [очистити кеш]

Шаблон:Historical populations використовується для створення інформаційної таблички, що показує населення міста чи території за роком із приростом чи спадом населення у відсотках.

Використання ред.

Шаблон використовує параметри вигляду |date |population. Ці параметри є достатніми, їхня кількість не може перевищувати 50.

Повністю заповнений шаблон ред.

{{Historical populations
|title       = 
|type        = 
|align       = 
|width       = 
|state       = 
|shading     = 
|percentages = 
|footnote    = 
|date |population
|date |population
|date |population
|date |population
|date |population
|date |population
|date |population
}}

Параметри ред.

Параметр Опис
daten Ideally, a four-digit year, but can be anything. Usually a multiple of 10, but does not have to be.
populationn The population of row n. Must be a plain number with no formatting (commas, etc.).
title Optional. The title of the table.
  • Historical populations (Default)
type Optional. This is designed to add functionality specific to different regions or types of information. Currently the only value that does anything is USA.
  • none (Default)
  • USA Will link each year to the relevant United States Census entry. Years that do not have entries will be left alone.

Please think of more ideas for this feature.

align Optional. The alignment of the table on the page.
  • right (Default)
  • left
width Optional. The width of the table. Can be any valid CSS width value.
  • 15em (Default)
state Optional. The collapsation state of the table. Set it to collapsed to collapse the table by default.
  • none (Default)
  • collapsed
shading Optional. Whether to mark off every five entries with a line, to facilitate reading. This works best with large, linear lists (such as the US Census, which has been taken every 10 years for over 200 years), but should probably be turned off for small or irregular lists (e.g., less than 10 entries), where it could be confusing.
  • on (Default)
  • off
percentages Optional. Whether to include an automatically generated column of percent differences. This works best with linear lists (1900, 1910, 1920, etc.) and should probably be turned off for irregular lists with missing data.
  • on (Default)
  • off
footnote Optional. A footnote that will be displayed under the table. Every table should have a footnote indicating the source of the data.

Приклади ред.

Зміни населення
Рік Населення Зміна
1890 1 046 964
1900 1 293 697 +23.6%
1910 1 549 008 +19.7%
1920 1 823 779 +17.7%
1930 1 950 961 +7.0%
1940 1 931 334 −1.0%
1950 2 071 605 +7.3%
1960 2 002 512 −3.3%
1970 1 948 609 −2.7%
1980 1 688 210 −13.4%
1990 1 585 577 −6.1%
2000 1 517 550 −4.3%
2006 (est.) 1 448 394 −4.6%
Source: American FactFinder. United States Census Bureau.

Цей код згенерує табличку справа:

{{Historical populations
|type = USA
|footnote = Source: {{subst:Historical populations/USCensusRef}}
|1890 |1046964
|1900 |1293697
|1910 |1549008
|1920 |1823779
|1930 |1950961
|1940 |1931334
|1950 |2071605
|1960 |2002512
|1970 |1948609
|1980 |1688210
|1990 |1585577
|2000 |1517550
|2006 (est.)
      |1448394
}}
Зміни населення
Рік Населення
1845 749
1951 6717
1960 6984
1970 31 752
1980 34 758
1990 35 888
2000 39 317
Note: Sandefjord and Sandar were merged in 1970.
Source: SSB

Цей код згенерує табличку справа:

{{Historical populations
|width = 10em
|shading = off
|percentages = off
|1845 |749
|1951 |6717
|1960 |6984
|1970 |31752
|1980 |34758
|1990 |35888
|2000 |39317
|footnote=Note: Sandefjord and [[Sandar]] were merged in 1970.
          <br />Source: [http://www.ssb.no/ SSB]
}}

Див. також ред.