Template:Show data: Difference between revisions

clean up
m (1 revision)
 
(clean up)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{#if:{{{flag image|}}}|[[File:{{{flag image}}}|150px|right]]}}
{{#if:{{{flag image|}}}|[[File:{{{flag image}}}|150px|right]]}}
This template contains various independently retrievable data items about '''{{#if:{{{1|}}}|[[{{{article|{{{1}}}}}}]]|<code><nowiki>[[{{{article|{{{1}}}}}}]]</nowiki></code>}}''' in the form of parameter values of a variable template of choice, in a standardized fashion. It is a member of a family of templates, those with names starting with "Data" in [[:Category:Data templates]]. The system used is similar to that of [[Wikipedia:WikiProject Flag Template]]. {{#ifexist:Template:Country data {{{1}}}| The corresponding template of that project is [[Template:Country data {{{1}}}]].}}
This template contains various independently retrievable data items about '''{{#if:{{{1|}}}|[[{{{article|{{{1}}}}}}]]|<code><nowiki>[[{{{article|{{{1}}}}}}]]</nowiki></code>}}''' in the form of parameter values of a variable template of choice, in a standardized fashion. It is a member of a family of templates, those with names starting with "Data" in [[:Category:Data templates]]. The system used is similar to that of [[Sarkarverse:WikiProject Flag Template]]. {{#ifexist:Template:Country data {{{1}}}| The corresponding template of that project is [[Template:Country data {{{1}}}]].}}


==Parameters==
==Parameters==
Line 58: Line 58:
|name of the flag image (or other illustration, if there is no flag) shown above
|name of the flag image (or other illustration, if there is no flag) shown above
|}
|}
Throughout the family of templates, fixed names are used for the parameters. (The parameter names are kept short to reduce counts for the [[Wikipedia:Template_limits#Post-expand_include_size|post expand include size]] and the [[Wikipedia:Template_limits#Template_argument_size|template argument size]] in cases where these are applicable.) However, not necessarily all parameters have been given a value: some parameters may not be applicable, while for some other parameters the value may just have not been specified yet. The table shows all parameters, and for each the value, if specified.  
Throughout the family of templates, fixed names are used for the parameters. (The parameter names are kept short to reduce counts for the [[Sarkarverse:Template_limits#Post-expand_include_size|post expand include size]] and the [[Sarkarverse:Template_limits#Template_argument_size|template argument size]] in cases where these are applicable.) However, not necessarily all parameters have been given a value: some parameters may not be applicable, while for some other parameters the value may just have not been specified yet. The table shows all parameters, and for each the value, if specified.  


{{#if: {{{related1|}}} |
{{#if: {{{related1|}}} |
Line 119: Line 119:
==Efficiency==
==Efficiency==
In this template system each template contains various properties of a single entity, as opposed to the other common system, where a template contains one property (e.g. population or area) of many entities. Although that other system can be convenient if updates of a property for all these entities become available together, in the case of large-scale use of data on one page that other system can be problematic due to its inefficiency. This is because of the following:
In this template system each template contains various properties of a single entity, as opposed to the other common system, where a template contains one property (e.g. population or area) of many entities. Although that other system can be convenient if updates of a property for all these entities become available together, in the case of large-scale use of data on one page that other system can be problematic due to its inefficiency. This is because of the following:
*There are often more entities than properties, and [[wp:template limits|page counts]] (or in the case of <code>#switch</code>, average page counts) are proportional to the number of data items in the data template (if they are stored in a linear way, not in a tree, and not stored as unnamed parameters).
*There are often more entities than properties, and [[SV:template limits|page counts]] (or in the case of <code>#switch</code>, average page counts) are proportional to the number of data items in the data template (if they are stored in a linear way, not in a tree, and not stored as unnamed parameters).
*In the case of large-scale use of data on one page there are usually one or more tables, where an entity  forms a row and a property a column, because there are often more entities than properties, and because this way the sorting feature allows sorting entities based on a property. In this template system this allows producing a row with only one call of the data template, making the count not grow faster than proportional to the average number of data items stored per data template, times the number of entities in the table.
*In the case of large-scale use of data on one page there are usually one or more tables, where an entity  forms a row and a property a column, because there are often more entities than properties, and because this way the sorting feature allows sorting entities based on a property. In this template system this allows producing a row with only one call of the data template, making the count not grow faster than proportional to the average number of data items stored per data template, times the number of entities in the table.


14,091

edits