Template:Area WD/doc
This is a documentation subpage for Template:Area WD. It may contain usage information, categories and other content that is not part of the original template page. |
Shows the area of a place, according to Wikidata.
Usage
[edit]{{Area WD}}, without arguments, will show the area of the current article subject.
{{Area WD|<page title>}}, will show the area of the Wikipedia article page title stated in the first unnamed parameter. The template does not use the Wikidata label. It also works if the article is moved, since it follows the redirect.
The second unnamed parameter states the unit: {{Area WD|<page title>|<unit>}}, for example km2 (default), sqmi, acre, scyd or sqfoot.
The template is mainly intended for tables showing the area of several geographical regions. A logged-in user will see a clickable pencil next to the area value, which is helpful in finding out at which Wikidata page each value in the table can be edited, and where the citations and edit history of each data value can be found.
A purpose of this template is to avoid advanced code in Wikipedia articles, by using a comprehensible property name and article title instead of pid and qid codes. However, the template may also be called with a parameter named qid.
Current article
[edit]Example:
{{area WD}}
km2
shows the area of the current article subject.
Articles sharing the same Wikidata label
[edit]The template does not use the Wikidata label. These two places have the same label São Paulo:
{{area WD|São Paulo}} km<sup>2</sup>
gives the area of São Paulo: 1,523 km2.
{{area WD|São Paulo (state)}}
gives the area of São Paulo (state): 248,209.4 .
Redirect
[edit]The redirection page Sao Paulo, Brazil also works:
{{area WD|Sao Paulo, Brazil}}
gives: 1,523 .
Qid code
[edit]Another option is to use the qid code of São Paulo (Q174). This however makes the wikicode less comprehensible, but is useful if the place has a wikidata item but no Wikipedia article:
{{area WD|qid=q174}}
which gives: 1,523 .
Other units
[edit]Area units that are accepted by {{convert}} can be used in the second unnamed parameter, for example
{{area WD|São Paulo|acre}} acres
which gives: 376,000 acres.
{{area WD|São Paulo|sqmi}} square miles
gives: 588 square miles.
{{area WD|São Paulo|sqyd}} square yard
gives: 1.821×109 square yard.
{{area WD|São Paulo|km2}} km<sup>2</sup>
gives: 1,523 km2.
See also
[edit]- List of Brazilian states by population density (Example article)
- {{Population density WD}}
- {{Population WD}}
- {{Get QID}}
- {{convert}}
- {{Data/popdens}}