Bản mẫu:Lịch sử dân số

Bách khoa toàn thư mở Wikipedia
Tài liệu bản mẫu[xem] [sửa] [lịch sử] [làm mới]

Bản mẫu:Lịch sử dân số được sử dụng như một hộp thông tin nào trên trang, cho thấy mỗi năm điều tra dân số với dân số, và so sánh phần trăm/lỗ thuần. Nó được thiết kế để kết hợp các chức năng của hai mẫu đang có bản mẫu: Bản mẫu:US Census populationBản mẫu:Histpop, cựu trong số đó là chuyên ngành đối với Hoa Kỳ, và sau này trong đó thiếu nhiều tính năng của các cựu.

Cách sử dụng[sửa mã nguồn]

Bản mẫu này có một loạt các thông số theo hình thức |date |population. Bản mẫu này không yêu cầu bất kỳ nhiều hơn thế. Bản mẫu này sẽ mất khoảng từ 0 đến 50 mục; nữa sẽ được bỏ qua.

Bản mẫu thành công[sửa mã nguồn]

{{Lịch sử dân số
|title       = 
|type        = 
|align       = 
|direction   =
|width       = 
|state       = 
|shading     = 
|pop_name    =
|percentages = 
|footnote    = 
|source      = 
|date |population
|date |population
|date |population
|date |population
|date |population
|date |population
|date |population
}}

Các thông số[sửa mã nguồn]

Parameter Description
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 population (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 US (or the obsolescent USA).
  • none (Default)
  • US 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
  • center
  • none
direction Optional. How the box is arranged on the page.
  • vertical (Default)
  • horizontal
clear Optional. Use to clear any left or right floating elements nearby.
  • right (Default if align = right)
  • left (Default if align = left)
  • none (Default if align = none)
  • both
width Optional. The width of the table (or of each block of columns). Can be any valid CSS width value.
  • 15em (Default)
state Optional. The collapsed 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
pop_name Optional. The text in the column header of the population data.
  • {{abbr|Pop.|Population}} (Default, displays as Pop.)
percentages Optional. Whether to include an automatically generated column of percent differences. This works best with linear lists (1900, 1910, 1920, etc.). Alternately, you can specify "pagr" to display annual growth rates (per annum growth rate) using the formula from Population growth.
  • on (Default)
  • pagr
  • off
cols Optional. Total number of columns of data (default is 1). This is useful for very long tables, or when |align=none.
source Optional. Displayed as a footnote under the table with the text "Source:" inserted automatically. Every table should indicate the source of the data.
footnote Optional. Free-form footnote. Can be used as a variant to, or in addition to, the source parameter.

Các ví dụ[sửa mã nguồn]

Hoa Kỳ[sửa mã nguồn]

Lịch sử dân số
NămSố dân±%
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 (ước tính) 1.448.394−4.6%
Nguồn: “American FactFinder”. Cục Thống kê Dân số Hoa Kỳ.

Đoạn mã dưới đây sẽ mang lại bảng trên bên phải.

{{Lịch sử dân số
|type = US
|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 (ước tính)
      |1448394
}}

Khu vực nhỏ[sửa mã nguồn]

Lịch sử dân số
NămSố dân
1845749
19516.717
19606.984
197031.752
198034.758
199035.888
200039.317
Lưu ý: Sandefjord và Sandar đã được sáp nhập vào năm 1970.
Nguồn: SSB

Đoạn mã dưới đây sẽ mang lại bảng trên bên phải.

{{Lịch sử dân số
|width = 10em
|shading = off
|percentages = off
|1845 |749
|1951 |6717
|1960 |6984
|1970 |31752
|1980 |34758
|1990 |35888
|2000 |39317
|footnote=Lưu ý: Sandefjord và [[Sandar]] đã được sáp nhập vào năm 1970.
|source = [http://www.ssb.no SSB]
}}

Phạm vi ngày không thường xuyên[sửa mã nguồn]

Điều tra dân số
NămSố dân±% năm
1903 219.928—    
1960 1.138.611+2.93%
1970 1.330.788+1.57%
1975 1.479.116+2.14%
1980 1.630.485+1.97%
1990 1.601.234−0.18%
1995 1.654.761+0.66%
2000 1.581.082−0.91%
2007 1.660.714+0.70%
2010 1.652.171−0.17%

Đối với phạm vi ngày không thường xuyên, sử dụng percentages=pagr để hiển thị tỷ lệ phần trăm tỷ lệ tăng trưởng hàng năm.

{{Lịch sử dân số
| title= Điều tra dân số
| percentages = pagr
| 1903 |219928
| 1960 |1138611
| 1970 |1330788
| 1975 |1479116
| 1980 |1630485
| 1990 |1601234
| 1995 |1654761
| 2000 |1581082
| 2007 |1660714
| 2010 |1652171
}}

Hai cột[sửa mã nguồn]

Đối với sử dụng bảng không nổi nhiều cột align=nonecols=2

{{Lịch sử dân số
| title= Điều tra dân số
| percentages = pagr
| align = none
| cols = 2
| 1903 |219928
| 1960 |1138611
| 1970 |1330788
| 1975 |1479116
| 1980 |1630485
| 1990 |1601234
| 1995 |1654761
| 2000 |1581082
| 2007 |1660714
| 2010 |1652171
}}
Điều tra dân số
NămSố dân±% năm
1903 219.928—    
1960 1.138.611+2.93%
1970 1.330.788+1.57%
1975 1.479.116+2.14%
1980 1.630.485+1.97%
NămSố dân±% năm
1990 1.601.234−0.18%
1995 1.654.761+0.66%
2000 1.581.082−0.91%
2007 1.660.714+0.70%
2010 1.652.171−0.17%

Hướng nằm ngang[sửa mã nguồn]

Đối với sử dụng bảng sắp xếp theo chiều ngang direction=horizontal

{{Lịch sử dân số
| title= Điều tra dân số
| align = none
| direction = horizontal
| 1903 |219928
| 1960 |1138611
| 1970 |1330788
| 1975 |1479116
| 1980 |1630485
| 1990 |1601234
| 1995 |1654761
| 2000 |1581082
| 2007 |1660714
| 2010 |1652171
}}
Điều tra dân số
Năm 1903 1960 1970 1975 1980 1990 1995 2000 2007 2010
Số dân219.9281.138.6111.330.7881.479.1161.630.4851.601.2341.654.7611.581.0821.660.7141.652.171
±%—    +417.7%+16.9%+11.1%+10.2%−1.8%+3.3%−4.5%+5.0%−0.5%

Xem thêm[sửa mã nguồn]