Template:Data Egyp
This template contains sindry independently retrievable data items anent Egyp in the form of parameter values o a variable template o walin, in a standardised fashion. It is a member o a faimily o templates, those wi names stairtin wi "Data" in Category:Data templates.
Parameters
[eedit soorce]Parameter name | Value | Meanin |
---|---|---|
1
|
Egyp |
last pairt of template name, uised tae identify it within the faimily of templates[1] |
article |
article name; needs tae be specified anly if it differs frae Egyp ; in applications, uise [[{{{article|{{{1}}}}}}]] tae link tae the article (as haes been done at the tap of this page)
| |
short name |
shorter display name tae be uised in some contexts; an application or application parameter can specify whether this is uised; anly intendit for dispensing wi disambiguation in a context whaur it is nae needed | |
type |
country |
teep of entity, e.g. continent, country, province, municipality |
code |
code | |
code description |
code description | |
continent |
Africae |
continent, if type is lawer than "continent" |
country |
country, if type is lawer than "country" | |
province |
province, if type is lawer than "province" | |
popbase
|
83,661,000
|
population on a gien date (stored wioot commas) |
popbaseyear
|
2013
|
year for which the population base figure applies |
popbasemonth
|
1
|
month for which the population base figure applies |
popbaseday
|
1
|
day for which the population base figure applies |
popinc
|
5858
|
population increase per day; uised tae extrapolate the population figure |
land area
|
995,450
|
land aurie in km2 (stored wioot commas) |
total area
|
1,002,450
|
tot aurie in km2 (stored wioot commas) |
flag image
|
Flag of Egypt.svg
|
name o the banner image (or ither illustration, if thare is no banner) shawn abuin |
Throughout the faimily of templates, fixed names are uised for the parameters. (The parameter names are kept short tae reduce counts for the post expand include size an the template argument size in cases whaur thir are applicable.) Houiver, nae necessarily aw parameters hae been gien a value: some parameters mey nae be applicable, while for some ither parameters the value mey juist hae nae been specified yet. The table shows aw parameters, an for each the value, if specified.
Related data templates
[eedit soorce]
Derived data
[eedit soorce]The population today is 109,000,000.[2]
The population is
1.34% of that o the warld. It is Expression error: Unrecognised punctuation character "[".% of that of Africae.The total area is 1,002,450 square kilometre (387,050 sq mi). It is
0.673% of the land area of the world. It is Expression error: Unrecognised punctuation character "[".% of that of Africae.The water area is 0.7% of the total area.
The population density is 109.5 per square kilometre (283.6/sq mi) land area.
Retrieval of data items
[eedit soorce]{{data Egyp|pst2|land area}}
, uisin parameter selection template Template:Pst2, gies the parameter land area, etc.
For retrieval of mair data items it is mair efficient tae prepare a template for that, tae be uised as follows:
{{data Egyp|
template name|..|..|..|..}}
sae that this data template needs tae be cried anly ance.[3] The default template is Template:Show data, producin this page.
The fower parameters are optional, thay are passed on tae the prepared template as parameters 2-5.
Special templates:
- Template:Linkd - link tae article
- Template:Poptoday - uised abuin
- Template:Popdens - for uise on the page Leet o sovereign states and dependent territories by population density
- Template:Poptoday 1 - for uise on the page Leet o countries by population
- Template:Popareadens - for uise on the page Leet o countries by population
A parameter bein undefined or empty teepically means the same, see ablo. {{data ..|pst2|..}}
gies the empty string an the text "{{{..}}}
", respectively. Therefore an application checking the parameter haes tae check baith. Checking whether a result is equal tae e.g. the text "5858
" canna be done directly wi #ifeq in a template which itself haes an aa a parameter wi that name, acause if that is defined, thare wad be a comparison wi the value instead o the text itself. Instead, it can be checked whether the first character o the result is "{
", e.g.: {{#ifeq:{{padleft:|1|{{data {{{continent}}}|pst2|popinc}}}}|{|..|..}}
.
Creating new data templates
[eedit soorce]Template:Data/preload can be uised tae creaut new data templates. On the page o the data template o a province, if thare is no data template yet for the country, a link appears tae creaut that, preloading this template. Otherwise the wikitext can be copied tae the new data template. For parameters which are nae applicable, sic as country for a country, the parameter definition "country=" can be deleted. For parameters tae be filled in later the parameter definition lik "popinc=" (specifying the empty string as value) can be left in the wikitext tae be filled in later. Do nae forget parameter 1.
Efficiency
[eedit soorce]In this template system ilka template contains sindry properties o a single entity, as opponed tae the ither common system, whaur a template contains ae property (e.g. population or area) o mony entities. Awtho that ither system can be convenient gin updates o a property for aw thir entities become available thegither, in the case of muckle-scale uise of data on ae page that ither system can be problematic acause o its inefficiency. This is acause o the follaein:
- Thare are eften mair entities than properties, an page counts (or in the case of
#switch
, average page counts) are proportional tae the nummer of data items in the data template (if thay are stored in a linear wey, nae in a tree, an nae stored as unnamed parameters). - In the case of lairge-scale uise of data on ane page thare are uisually ane or mair tables, whaur an entity forms a row and a property a column, acause thare are eften mair entities than properties, an acause this wey the sorting featur allows sorting entities based on a property. In this template seestem this allows producin a row wi anly ane caw o the data template, makin the count nae grow faster than proportional tae the average nummer of data items stored per data template, times the nummer of entities in the table.
The include pairt o the data template of an entity daes nae contain a lang leet of its sub-entities or thair properties, acause that wad mak this method inefficient too.
- ↑ It may seem odd, but a template cannot retrieve its own name (PAGENAME only provides this on the template page itself), and even if it could, a string operation would be needed tae remove "Data ". Putting the name of the entity in the data template removes the need tae supply it as a parameter when the data template is called (in the cases that it would need this name).
- ↑ Estimated by extrapolation.
- ↑ See the first two rows of the first table in m:Help:Array#Summary of counts for template limits.
Until here the documentation is automatically generated by Template:Show data.