Template:RegionInfobox/doc: Difference between revisions
mNo edit summary |
m (Convert to Template:Code) |
||
Line 26: | Line 26: | ||
! width="125px" | Parameter !! width="150px" | Description !! Type !! Status !! Notes | ! width="125px" | Parameter !! width="150px" | Description !! Type !! Status !! Notes | ||
|- | |- | ||
| | | {{code|region name}} || Region name || String || '''Required''' || Defaults to the article pagename | ||
|- | |- | ||
| | | {{code|flag}} || Flag image filename || String || Optional || | ||
|- | |- | ||
| | | {{code|coa}} || Coat of arms filename || String || Optional || | ||
|- | |- | ||
| | | {{code|map}} || Map filename || String || Optional || | ||
|- | |- | ||
| | | {{code|country}} || Country location || String || Optional || Recommended: <code><nowiki>{{</nowiki>[[Template:Flag|flag]]|''countryname''}}</code> | ||
|- | |- | ||
| | | {{code|capital}} || Capital || String || Optional || | ||
|- | |- | ||
| | | {{code|area}} || Area size || Numeric || Optional || In square kilometers (km<sup>2</sup>) | ||
|- | |- | ||
| | | {{code|population}} || Population || Numeric || Optional || | ||
|- | |- | ||
| | | {{code|density}} || Population density || Numeric || Optional || If {{code|area}} and {{code|population}} have numeric values, the template will calculate the population density per km<sup>2</sup>. A value in {{code|density}} overrides the template's calculation. | ||
|- | |- | ||
| | | {{code|demonym}} || {{wp|Demonym}} || String || Optional || | ||
|- | |- | ||
| | | {{code|timezone}} || Time zone || String || Optional || Should be expressed as an offset from UTC (e.g., {{code|UTC +3}}) | ||
|- | |- | ||
| | | {{code|gdp}} || {{wp|Gross domestic product}} || Numeric || Optional || If {{code||population}} and {{code|gdp per capita}} have numeric values, the template will calculate the region's total GDP. A value in {{code|gdp}} overrides the template's calculation. | ||
|- | |- | ||
| | | {{code|gdp per capita}} || {{wp|GDP}} per capita || Numeric || Optional || If {{code|population}} and {{code|gdp}} have numeric values, the template will calculate the GDP per capita. A value in {{code|gdp per capita}} supersedes the template's calculation. | ||
|} | |} | ||
Non-numeric data for | Non-numeric data for {{code|area}}, {{code|population}}, {{code|gdp}}, and/or {{code|gdp per capita}} may result in calculation errors for {{code|density}}, {{code|gdp}}, and/or {{code|gdp per capita}}. Please use numeric values for those fields. Providing a parameter value supersedes any calculation, however. For example, using "25M" as a population figure results in the template not calculating density since "25M" is a non-numeric value. Also, providing a value for the {{code|density}} parameter, in this instance, supersedes the template's attempt to calculate a density value, so "25M" can display as the population and whatever value was provided for the {{code|density}} parameter will display in that field. | ||
Provided the | Provided the {{code|population}} parameter has a numeric value, the template can calculate either {{code|gdp}} ''or'' {{code|gdp per capita}} provided one of those parameters has a numeric value. If {{code|population}} and {{code|gdp}} have numeric values, the template will calculate {{code|gdp per capita}}. If {{code|population}} and {{code|gdp per capita}} have numeric values, then the template will calculate {{code|gdp}}. Values provided for the {{code|gdp}} and/or {{code|gdp per capita}} supersede the template's calculations. | ||
==Examples== | ==Examples== |
Latest revision as of 09:24, 13 November 2024
This is a documentation subpage for Template:RegionInfobox. It may contain usage information, categories and other content that is not part of the original template page. |
The {{RegionInfobox}} template provides an infobox for a geographic region or country's administrative divisions. Typically a geo-political infobox, its natural geographic area counter part is {{GeoInfobox}}.
Usage
To use the template, copy and paste the following code into the desired article page. Then add the appropriate parameter data.
{{RegionInfobox | region name = | flag = | coa = | map = | country = | capital = | area = | population = | density = | demonym = | timezone = | gdp = | gdp per capita = }}
Parameters
Optional parameters are not displayed if left blank.
Parameter | Description | Type | Status | Notes |
---|---|---|---|---|
region name |
Region name | String | Required | Defaults to the article pagename |
flag |
Flag image filename | String | Optional | |
coa |
Coat of arms filename | String | Optional | |
map |
Map filename | String | Optional | |
country |
Country location | String | Optional | Recommended: {{flag|countryname}}
|
capital |
Capital | String | Optional | |
area |
Area size | Numeric | Optional | In square kilometers (km2) |
population |
Population | Numeric | Optional | |
density |
Population density | Numeric | Optional | If area and population have numeric values, the template will calculate the population density per km2. A value in density overrides the template's calculation.
|
demonym |
Demonym | String | Optional | |
timezone |
Time zone | String | Optional | Should be expressed as an offset from UTC (e.g., UTC +3 )
|
gdp |
Gross domestic product | Numeric | Optional | If and gdp per capita have numeric values, the template will calculate the region's total GDP. A value in gdp overrides the template's calculation.
|
gdp per capita |
GDP per capita | Numeric | Optional | If population and gdp have numeric values, the template will calculate the GDP per capita. A value in gdp per capita supersedes the template's calculation.
|
Non-numeric data for area
, population
, gdp
, and/or gdp per capita
may result in calculation errors for density
, gdp
, and/or gdp per capita
. Please use numeric values for those fields. Providing a parameter value supersedes any calculation, however. For example, using "25M" as a population figure results in the template not calculating density since "25M" is a non-numeric value. Also, providing a value for the density
parameter, in this instance, supersedes the template's attempt to calculate a density value, so "25M" can display as the population and whatever value was provided for the density
parameter will display in that field.
Provided the population
parameter has a numeric value, the template can calculate either gdp
or gdp per capita
provided one of those parameters has a numeric value. If population
and gdp
have numeric values, the template will calculate gdp per capita
. If population
and gdp per capita
have numeric values, then the template will calculate gdp
. Values provided for the gdp
and/or gdp per capita
supersede the template's calculations.
Examples
Country | Sokoku |
---|---|
Capital | Kin Haala |
Area | 220,859 km2 |
Population | 11,858,501 |
Density | 53.69/km2 |
Demonym | Shaanian |
Time zone | UTC-10 |
{{RegionInfobox | Region name = Shaaniaah | flag = Flag_shaaniaah.png | coa = CoA_shaaniaah.png | map = Map_shaaniaah.png | country = {{flag|Sokoku}} | capital = Kin Haala | area = 220,859 | population = 11,858,501 | density = | demonym = Shaanian | timezone = UTC-10 | gdp = | gdp per capita = }}
Country | Nestor |
---|---|
Capital | Giondo City |
Area | 1000 km2 |
Population | 6,741,662 |
Density | 6,741.66/km2 |
Demonym | Gion |
Time zone | UTC-5 |
GDP | ₲171,633,472,183 |
GDP per capita | ₲25,459 |
{{RegionInfobox |Region name = Giondo |country = {{flag|Nestor}} |capital = Giondo City |area = 1000 |population = 6,741,662 |density = |demonym = Gion |timezone = UTC-5 |gdp = 171,633,472,183 |gdp per capita = }}
See also
- {{GeoInfobox}}