Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a452a2153fea2780

Jump to content

Template:Spain metadata Wikidata/doc

From Wikipedia, the free encyclopedia

This template can be used to feed area and population figures from Wikidata to fields in templates such as {{Infobox settlement}}.

Usage

[edit]

{{Spain metadata Wikidata}} works by checking if the Wikidata entity linked to the article has a population or area statement and sourced by an external reference (not imported from Wikimedia project (P143) or similar properties). If the condition is verified, the figure is displayed.

Examples

[edit]
{{Spain metadata Wikidata|population_total}}
Returns the total population from Wikidata, defaulting to 2018 census if available, otherwise using latest value
{{Spain metadata Wikidata|population_footnotes}}
Returns reference to support total population value
{{Spain metadata Wikidata|population_as_of}}
Returns year of census displayed
{{spain metadata Wikidata|area_km2_total}}
Returns the area in square kilometers from Wikidata
{{Spain metadata Wikidata|area_footnotes}}
Returns the reference to support area value
{{Spain metadata Wikidata|area_as_of}}
Returns year that the area is valid (if available)

Also: when as_of parameters are given, the template accepts an optional second parameter which is the format of the returned date. Possible values include "y", "ymd", "dmy", and "mdy".

Updating the figures

[edit]

See the procedure explained on Wikipedia:Uploading metadata to Wikidata. The mappings between Wikidata IDs for municipalities and municipality keys are available through this Wikidata Query.

Maintenance categories

[edit]

See also

[edit]