Jump to content

Template:Data Philippines

Frae Wikipedia, the free beuk o knawledge

This template contains sindry independently retrievable data items anent Philippines 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 Philippines 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 Philippines; 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 Asia continent, if type is lawer than "continent"
country country, if type is lawer than "country"
province province, if type is lawer than "province"
popbase 100,981,437 population on a gien date (stored wioot commas)
popbaseyear 2015 year for which the population base figure applies
popbasemonth 8 month for which the population base figure applies
popbaseday 1 day for which the population base figure applies
popinc 4665 population increase per day; uised tae extrapolate the population figure
land area 298,170 land aurie in km2 (stored wioot commas)
total area 300,000 tot aurie in km2 (stored wioot commas)
flag image Flag of the Philippines.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.


[eedit soorce]


Derived data

[eedit soorce]

The population today is 116,900,000.[2]

The population is 1.44% of that o the warld. It is 3% of that of Asie.

The total area is 300,000 square kilometre (120,000 sq mi). It is 0.201% of the land area of the world. It is 0.7% of that of Asie.

The water area is 0.6% of the total area.

The population density is 392.1 per square kilometre (1,015.5/sq mi) land area.


Retrieval of data items

[eedit soorce]

{{data Philippines|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 Philippines|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:

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 "4665" 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.

  1. 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).
  2. Estimated by extrapolation.
  3. 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.


References

[eedit soorce]
  • popbase: Philippine Statistics Authority, Retrieved on 2016-05-20.
  • poptoday: extrapolated from popbase.
  • total area and land area: Philippines, CIA Factbook, Retrieved on 2014-01-24.
  • flag:
    • Executive Order No. 23, s. 1936 Official Gazette of the Republic of the Philippines.
    • "The Philippine National Flag" (PDF). Monuments and Heraldry division, National Historical institute. National Commission for Culture and the Arts. Retrieved 24 Januar 2014.