Template:RegionInfobox: Difference between revisions
mNo edit summary |
m (Transclude /doc page) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| class="infobox" style="width: 300px; border: solid 1px #AAA;" | <includeonly>{| class="infobox" style="width: 300px; border: solid 1px #AAA;" | ||
|+ style="background-color: #A9BCF5; text-align: center;" | '''{{{Region name|{{PAGENAME}}}}}''' | |+ style="background-color: #A9BCF5; text-align: center;" | '''{{{Region name|{{PAGENAME}}}}}''' | ||
|- {{#if: {{{flag|}}}{{{coa|}}} | | style="display: none;" }} | |- {{#if: {{{flag|}}}{{{coa|}}} | | style="display: none;" }} | ||
Line 22: | Line 22: | ||
|- {{#if: {{{density|}}} | | {{#if: {{{area|}}} | {{#if: {{{population|}}} | | style="display:none;" }} | style="display:none;" }} }} | |- {{#if: {{{density|}}} | | {{#if: {{{area|}}} | {{#if: {{{population|}}} | | style="display:none;" }} | style="display:none;" }} }} | ||
! Density | ! Density | ||
| {{#if: {{{density|}}} | {{{density}}}/km<sup>2</sup> | {{#if: {{{area|}}}{{{population|}}} | {{#expr: {{formatnum:{{{population}}}|R}}/{{formatnum:{{{area}}}|R}} round 2 }}/km<sup>2</sup> | }} }} | | {{#if: {{{density|}}} | {{{density}}}/km<sup>2</sup> | {{#if: {{{area|}}}{{{population|}}} | {{formatnum: {{#expr: {{formatnum:{{{population}}}|R}}/{{formatnum:{{{area}}}|R}} round 2 }} }}/km<sup>2</sup> | }} }} | ||
|- {{#if: {{{demonym|}}} | | style="display: none;" }} | |- {{#if: {{{demonym|}}} | | style="display: none;" }} | ||
! Demonym | ! Demonym | ||
Line 29: | Line 29: | ||
! Time zone | ! Time zone | ||
| {{{timezone}}} | | {{{timezone}}} | ||
|- {{#if: {{{gdp|}}} | | {{#if: {{{population|}}} | {{#if: {{{ | |- {{#if: {{{gdp|}}} | | {{#if: {{{population|}}} | {{#if: {{{gdp per capita|}}} | | style="display: none;" }} | style="display: none;" }} }} | ||
! GDP | ! GDP | ||
| {{#if: {{{gdp|}}} | [[Gotha standard|₲]]{{{gdp}}} | {{#if: {{{population|}}}{{{ | | {{#if: {{{gdp|}}} | [[Gotha standard|₲]]{{{gdp}}} | {{#if: {{{population|}}}{{{gdp per capita|}}} | [[Gotha standard|₲]]{{formatnum: {{#expr: {{formatnum:{{{population}}}|R}} * {{formatnum: {{{gdp per capita}}}|R}} round 0 }} }} | }} }} | ||
|- {{#if: {{{ | |- {{#if: {{{gdp per capita|}}} | | {{#if: {{{population|}}} | {{#if: {{{gdp|}}} | | style="display:none;" }} | style="display: none;" }} }} | ||
! GDP per capita | ! GDP per capita | ||
| {{#if: {{{ | | {{#if: {{{gdp per capita|}}} | [[Gotha standard|₲]]{{{gdp per capita}}} | {{#if: {{{population|}}}{{{gdp|}}} | [[Gotha standard|₲]]{{formatnum: {{#expr: {{formatnum:{{{gdp}}}|R}}/{{formatnum:{{{population}}}|R}} round 0 }} }} | }} }} | ||
|} | |}</includeonly><noinclude>{{doc}}[[Category:Infobox templates]]</noinclude> |
Latest revision as of 08:58, 13 November 2024
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}}