• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.154
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:Pop density

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
Template documentation[view] [edit] [history] [purge]
This template uses Lua:
  • Module:Pop density

Contents

  • 1 Usage
    • 1.1 Examples
  • 2 TemplateData
  • 3 See also

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
  • {{Pop density|120|240|km2}} → "0.500/km2"
reverse outputs
  • {{Pop density|1600|600|sqmi|km2|flip=on}} → "1.03/km2 (2.67/sq mi)"
give only raw numerical output
  • {{Pop density|120|240|km2|disp=num}} → "0.500"
  • {{Pop density|1600|600|sqmi|disp=num}} → "2.67"
  • {{Pop density|120|240|km2|sqmi|disp=num}} → "1.29"
  • {{Pop density|1600|600|sqmi|km2|disp=num}} → "1.03"
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. Click here to see a monthly parameter usage report for this template based on this 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

  • {{Popdens}}
  • {{Population density WD}}, {{Area WD}}


  • v
  • t
  • e
Math templates
  • Functions
  • Numeral systems
Functions
  • elementary arithmetic
  • precision
  • val (value)
Numeral systems
  • {{#invoke:BaseConvert|XtoY}}
  • binary
  • decimal2Base
  • hex2dec
  • hexadecimal
  • octal
  • quaternary
  • quinary
  • rn
  • roman
  • senary
  • ternary
  • vigesimal
Conversions
convert many units (see: list)
cvt abbreviated {{convert}}
convinfobox {{convert}} for infoboxes
bbl to t barrels of oil to tonnes
long ton long hundredweights, quarters and pounds to kilograms;
long tons and hundredweights to pounds and metric tons
miles-chains miles and chains to kilometres linking "chains"
decdeg degrees, minutes, and seconds to decimal degrees
deg2dms decimal degrees to degrees, minutes, and seconds
deg2hms decimal degrees to hour angle (in hours, minutes, and seconds)
hms2deg hour angle (in hours, minutes, and seconds) to decimal degrees
inflation calculate inflation of Consumer Price Index-related prices
pop density population density in an area
track gauge railway track gauges
Notation and formatting
bigmath bigger font to match TeX \displaystyle (standalone formulas only)
  • bra-ket
  • braket
  • bra
  • ket
bra–ket notation
ceil, floor calculations :mw:Help:#expr; formatting indicators ⌈3.14⌉, ⌊3.14⌋ (no calculation performed)
frac slant fractions 3⁄5 (not for maths/science articles; use standing or upright fractions {{sfrac}} instead)
intmath integral symbols
  • langle
  • rangle
  • angbr
angular brackets
  • ldelim
  • rdelim
multiline delimiters (2–5 lines inclusive)
abs absolute values (paired vertical lines)
math short text-based formulas
mathcal [mathematical] calligraphic font; alternative to LaTeX \mathcal{...}
mvar individual italicized maths variables in normal text
  • overline
  • underline
a line set above/below a sequence of characters
overarc an arc set above a sequence of characters
  • overset
  • underset
arbitrary characters/diacritics set above/below one another
pars parentheses that can be resized (∑)
sfrac “standing” or upright fractions 3/5 (use in maths/science articles instead of{{frac}})
  • sub
  • sup
  • su
subscripts and superscripts
tmath Wrap TeX in <math> tags
tombstone symbol indicating the end of a proof
val measurement values, uncertainties and units
vec various overarrows, underarrows, etc.
  • Boxes
  • Tags
  • Notices
BoxesTags
  • calculation results
  • calculus
  • Infobox mathematics function
  • functions
  • metricate
  • undue precision
  • units attention
Category · Module:Math
The above documentation is transcluded from Template:Pop density/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:Pop_density&oldid=27101"
Categories:
  • Lua-based templates
  • Templates using TemplateData
  • Convert-like templates
Last edited on 23 February 2018, at 12:02

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 23 February 2018, at 12:02.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop