Template:Pop density/doc

Usage

This template converts a population and area to a density.

{{Pop density|number of people|numerical value of area|unit of area|area unit to convert to}}

Examples

  • {{Pop density|120|240|km2|sqmi}} → "0.500/km2 (1.29/sq mi)"
  • {{Pop density|1600|600|sqmi|km2}} → "2.67/sq mi (1.03/km2)"
rounding
  • {{Pop density|120|240|km2|sqmi|prec=1}} → "0.5/km2 (1.3/sq mi)"
no conversion
reverse outputs
  • {{Pop density|1600|600|sqmi|km2|flip=on}} → "1.03/km2 (2.67/sq mi)"
give only raw numerical output
table
{| class="wikitable"
! Population !! Area (km<sup>2</sup>) !! Density (/km<sup>2</sup>)
|-
| {{pop density|120|2400|km2|disp=table}}
|}
Population Area (km2) Density (/km2)
120 2400 0.0500
{| class="wikitable"
! Population !! Area (km<sup>2</sup>) !! Density (/km<sup>2</sup>) !! Density (/sqmi)
|-
| {{pop density|120|2400|km2|sqmi|disp=table}}
|}
Population Area (km2) Density (/km2) Density (/sqmi)
120 2400 0.0500 0.129

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Pop density in articles based on its TemplateData.

TemplateData for Pop density

This template converts a population and area to a density.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Number of people1

no description

Example
1600000
Numberrequired
Area2

Numerical value of area

Example
240
Numberrequired
Unit of area3

no description

Suggested values
sqkm km2 mi2 sqmi acres acre ha dunam sqm m2
Stringrequired
Convert to units4

Area unit to convert to

Stringoptional
Precisionprec

Round to this number of decimals

Example
2
Numberoptional
Displaydisp

Give only raw numerical output. Use "num" for usage in normal text; use "table" within tables.

Suggested values
num table
Stringoptional
Reverse outputsflip

no description

Suggested values
on
Stringoptional

See also



Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.