आकृति:Infobox settlement/densdisp/doc
This is a documentation subpage for आकृति:Infobox settlement/densdisp. It contains usage information, categories and other content that is not part of the original आकृति page. |
This subtemplate of {{Infobox settlement}} displays a metric/imperial pair of population density values for a line in the main infobox.
Usage
सम्पादन करी{{Infobox settlement/densdisp | /km2 = auto or population density per km2 (via population_density_km2 and others) | /sqmi = auto or population density per sqmi (via population_density_sq_mi and others) | pop = population (via population_total and others) | km2 = area in square kilometres (via area_total_km2 and others) | sqmi = area in square miles (via area_total_sq_mi and others) | ha = area in hectares (via area_total_ha and others) | acre = area in acres (via area_total_acre and others) | dunam = area in dunams (via area_total_dunam and others) | pref = preference to display /km2 or /sqmi (via unit_pref) | name = name of country (via subdivision_name) }}
Examples of density as auto
सम्पादन करीAs shown in the following examples, this template calculates the density if all three of the following conditions are met: /km2 (or /sqmi) is set to auto, a number if given for population, and a number is given for area. It also strips any formatting from the numbers, such as population with commas in the examples, which would otherwise cause an error in the calculation (see mw:Help:Magic words#Formatting).
Code | Result | Number (not rounded) |
Order of magnitude |
---|---|---|---|
{{Infobox settlement/densdisp|/km2=auto|pop=10|km2=0.00023456}}
|
43000/वर्ग किमी (110000/वर्ग माइल) | 42633.015006821 | 4 |
{{Infobox settlement/densdisp|/km2=auto|pop=10|km2=0.0023456}}
|
4300/वर्ग किमी (11000/वर्ग माइल) | 4263.3015006821 | 3 |
{{Infobox settlement/densdisp|/km2=auto|pop=10|km2=0.023456}}
|
430/वर्ग किमी (1100/वर्ग माइल) | 426.33015006821 | 2 |
{{Infobox settlement/densdisp|/km2=auto|pop=10|km2=0.23456}}
|
43/वर्ग किमी (110/वर्ग माइल) | 42.633015006821 | 1 |
{{Infobox settlement/densdisp|/km2=auto|pop=10|km2=2.3456}}
|
4.3/वर्ग किमी (11/वर्ग माइल) | 4.2633015006821 | 0 |
{{Infobox settlement/densdisp|/km2=auto|pop=10|km2=23.456}}
|
0.43/वर्ग किमी (1.1/वर्ग माइल) | 0.42633015006821 | -1 |
{{Infobox settlement/densdisp|/km2=auto|pop=10|km2=234.56}}
|
0.043/वर्ग किमी (0.11/वर्ग माइल) | 0.042633015006821 | -2 |
{{Infobox settlement/densdisp|/km2=auto|pop=10|km2=2345.6}}
|
0.0043/वर्ग किमी (0.011/वर्ग माइल) | 0.0042633015006821 | -3 |
{{Infobox settlement/densdisp|/km2=auto|pop=10|km2=23456}}
|
0.00043/वर्ग किमी (0.0011/वर्ग माइल) | 0.00042633015006821 | -4 |
{{Infobox settlement/densdisp|/km2=auto|pop=0|km2=23456}}
|
0�0/वर्ग किमी (0�0/वर्ग माइल) | 0 | 0 |
Code | Result | Number (not rounded) |
---|---|---|
{{Infobox settlement/densdisp|pref=Imperial|/sqmi=auto|pop=123,456|sqmi=10}}
|
१२०००/वर्ग माइल (४८००/वर्ग किमी) | 12345.6 |
{{Infobox settlement/densdisp|pref=Imperial|/sqmi=auto|pop=12345|sqmi=10}}
|
१२००/वर्ग माइल (४८०/वर्ग किमी) | 1234.5 |
{{Infobox settlement/densdisp|pref=Imperial|/sqmi=auto|pop=1234|sqmi=10}}
|
१२०/वर्ग माइल (४८/वर्ग किमी) | 123.4 |
{{Infobox settlement/densdisp|pref=Imperial|/sqmi=auto|pop=123|sqmi=10}}
|
१२/वर्ग माइल (४.७/वर्ग किमी) | 12.3 |
{{Infobox settlement/densdisp|pref=Imperial|/sqmi=auto|pop=12|sqmi=10}}
|
१.२/वर्ग माइल (०.४६/वर्ग किमी) | 1.2 |
{{Infobox settlement/densdisp|pref=Imperial|/sqmi=auto|pop=0|sqmi=10}}
|
०�०/वर्ग माइल (०�०/वर्ग किमी) | 0 |
Examples of missing population or area
सम्पादन करीAs shown in the following examples, this template outputs nothing if density = auto, but either population or area is missing.
Code | Result |
---|---|
{{Infobox settlement/densdisp|/km2=auto|pop=123,456|km2= }}
|
|
{{Infobox settlement/densdisp|/km2=auto|pop= |km2=10}}
|
|
{{Infobox settlement/densdisp|/km2=auto|pop= |km2= }}
|
|
{{Infobox settlement/densdisp|/km2= |pop= |km2= }}
|
Examples of density as number
सम्पादन करीAs shown in the following examples, this template always displays the density if given as a number, regardless of whether the population and area are defined. It also strips any formatting in the number, such as the commas in the examples.
Code | Result |
---|---|
{{Infobox settlement/densdisp|/km2=12,345.67}}
|
12345.67/वर्ग किमी (31975.1/वर्ग माइल) |
{{Infobox settlement/densdisp|/sqmi=12,345.67}}
|
4766.69/वर्ग किमी (12345.67/वर्ग माइल) |
{{Infobox settlement/densdisp|pref=Imperial|/sqmi=12,345.67}}
|
१२,३४५.६७/वर्ग माइल (४७६६.६९/वर्ग किमी) |
{{Infobox settlement/densdisp|/km2=0}}
|
0/वर्ग किमी (0/वर्ग माइल) |
{{Infobox settlement/densdisp|pref=Imperial|/sqmi=0}}
|
०/वर्ग माइल (०/वर्ग किमी) |
See also
सम्पादन करी- {{Infobox settlement}}
- {{Infobox settlement/areadisp}}
- {{Infobox settlement/lengthdisp}}
- {{Infobox settlement/pref}}
- {{Infobox settlement/metric}}
- {{Infobox settlement/metric/mag}}
- {{Infobox settlement/impus}}
- {{Infobox settlement/impus/mag}}
- {{Infobox settlement/dunam}}
- {{Infobox settlement/dunam/mag}}
- {{Infobox settlement/link}}
- {{Infobox settlement cleaner}}