Lua error in Module:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value).
Shows the area of a place, according to Wikidata.
Usage
{{Area WD}}, without arguments, will show the area of the current article subject.
{{Area WD|<page title>}}, will show the area of the OODA WIKI 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 OODA WIKI 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
Example:
{{area WD}}
km2
shows the area of the current article subject.
Articles sharing the same Wikidata label
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: Lua error in Module:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value). km2.
{{area WD|São Paulo (state)}}
gives the area of São Paulo (state): Lua error in Module:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value)..
Redirect
The redirection page Sao Paulo, Brazil also works:
{{area WD|Sao Paulo, Brazil}}
gives: Lua error in Module:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value)..
Qid code
Another option is to use the qid code of Lua error in Module:Wd at line 621: attempt to index field 'wikibase' (a nil value). (Q174). This however makes the wikicode less comprehensible, but is useful if the place has a wikidata item but no OODA WIKI article:
{{area WD|qid=q174}}
which gives: Lua error in Module:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value)..
Other units
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: Lua error in Module:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value). acres.
{{area WD|São Paulo|sqmi}} square miles
gives: Lua error in Module:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value). square miles.
{{area WD|São Paulo|sqyd}} square yard
gives: Lua error in Module:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value). square yard.
{{area WD|São Paulo|km2}} km<sup>2</sup>
gives: Lua error in Module:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value). km2.