# வார்ப்புரு:Historical populations/doc



**Template:Historical populations** is used as an information box on pages, showing each census year with a population, and a percent gain/loss comparison. It is intended to combine the functionalities of two existing templates, Template:US Census population and Template:Histpop, the former of which is specialized for the United States, and the latter of which lacks many features of the former.  

## Usage
This template takes a series of parameters in the form <code>|date |population</code>. This template does not require any more than that. This template will take between 0 and 50 entries; any more will be ignored.  

### Complete template
<pre>  

</pre>  

### Parameters
| date<sub>*n*</sub> | Ideally, a four-digit year, but can be anything. Usually a multiple of 10, but does not have to be. |  |
| --- | --- | --- |
| population<sub>*n*</sub> | The population of row *n*. Must be a plain number with no formatting (commas, etc.). |  |
| title | *Optional.* The title of the table.
* <code>Historical population</code> (**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 <code>US</code> (or the obsolescent <code>USA</code>).
* <code></code> (**Default**)
* <code>US</code> Will link each year to the relevant United States Census entry. Years that do not have entries will be alone.

Please think of more ideas for this feature. |  |
| align | *Optional.* The alignment of the table on the page.
* <code></code> (**Default**)
* <code></code>
* <code></code>
* <code></code> |  |
| direction | *Optional.* How the box is arranged on the page.
* <code>vertical</code> (**Default**)
* <code>horizontal</code> |  |
| clear | *Optional.* Use to clear any or floating elements nearby.
* <code></code> (**Default** if align = )
* <code></code> (**Default** if align = )
* <code></code> (**Default** if align = )
* <code>both</code> |  |
| width | *Optional.* The width of the table (or of each block of columns). Can be any valid CSS <code>width</code> value.
* <code>15em</code> (**Default**) |  |
| state | *Optional.* The collapsed state of the table. Set it to <code>collapsed</code> to collapse the table by default.
* <code></code> (**Default**)
* <code>collapsed</code> |  |
| 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.
* <code>on</code> (**Default**)
* <code>off</code> |  |
| pop_name | *Optional.* The text in the column header of the population data.
* <code></code> (**Default**, displays as ) |  |
| 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.
* <code>on</code> (**Default**)
* <code>pagr</code>
* <code>off</code> |  |
| cols | *Optional.* Total number of columns of data (default is <code>1</code>). This is useful for very long tables, or when . |  |
| 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. | } |

## Examples

### United States

The following code will yield the table on the .  

<pre></pre>  

### Smaller areas

The following code will yield the table on the .  

<pre></pre>  

### Non-regular date ranges

For non-regular date ranges, use <code>percentages=pagr</code> to show annual growth rate percentages.  

<pre></pre>  

### Two columns
For a multicolumn non-floating table use <code>align=</code> and <code>cols=2</code>  

<pre></pre>  

### Horizontal direction
For a horizontally arranged table use <code>direction=horizontal</code>  

<pre></pre>