Jump to content

Template:Infobox settlement/Wikidata: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
+area, pop
move to doc page where it belongs
 
(24 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<noinclude>{{Improve documentation|date=September 2017}}</noinclude>
<includeonly>{{Infobox settlement
<includeonly>{{Infobox settlement
<!-- See Template:Infobox settlement for additional fields and descriptions -->
<!-- See Template:Infobox settlement for additional fields and descriptions -->
Line 13: Line 12:
| image_seal = {{#property:p158}}
| image_seal = {{#property:p158}}
| seal_alt =
| seal_alt =
| image_shield =
| image_shield = {{#property:p94}}
| shield_alt =
| shield_alt =
| nickname = {{#property:p1449}}
| nickname = {{#property:p1449}}
| motto =
| motto =
| image_map =
| image_map = {{#if: {{#property:p242}} | {{#property:p242}} | }}
| map_alt =
| map_alt =
| map_caption = {{#if:{{#property:p242}} | {{#if:{{#Property:P625}}|{{Coord|nosave=1|display=inline,title|format=dms}}{{#ifeq:{{{refs|yes}}}|yes|{{wikidata|references|normal+|{{{qid|}}}|P625}} }}{{EditAtWikidata|pid=P625|qid={{{qid|}}} }} }} }}
| map_caption =
| pushpin_map = {{#property:P17}}
| pushpin_map = {{#property:P17}}
| pushpin_label_position =
| pushpin_label_position =
| pushpin_map_alt =
| pushpin_map_alt =
| pushpin_map_caption =
| pushpin_map_caption =
| coordinates = {{#if:{{{coords|}}}{{{coordinates|}}} | {{if empty|{{{coordinates|}}}|{{{coords|}}}}} | {{#if:{{#Property:P625}} | {{Coord|nosave=1|display=inline,title|format=dms}}{{#ifeq:{{{refs|yes}}}|yes|{{wikidata|references|normal+|{{{qid|}}}|P625}} }}{{EditAtWikidata|pid=P625|qid={{{qid|}}} }} }} }}
| coordinates = {{#if: {{#property:p242}} || {{#if:{{{coords|}}}{{{coordinates|}}} | {{if empty|{{{coordinates|}}}|{{{coords|}}}}} | {{#if:{{#Property:P625}} | {{Coord|nosave=1|display=inline,title|format=dms}}{{#ifeq:{{{refs|yes}}}|yes|{{wikidata|references|normal+|{{{qid|}}}|P625}} }}{{EditAtWikidata|pid=P625|qid={{{qid|}}} }} }} }} }}
| coor_pinpoint =
| coor_pinpoint =
| coordinates_footnotes =
| coordinates_footnotes =
Line 30: Line 29:
| subdivision_name = {{#if: {{#property:P17}} | [[{{#property:P17}}]] }}
| subdivision_name = {{#if: {{#property:P17}} | [[{{#property:P17}}]] }}
| subdivision_type1 = Subdivision
| subdivision_type1 = Subdivision
| subdivision_name1 = {{#if: {{#property:P131}} | [[{{#property:P131}}]] }}
| subdivision_name1 = {{#invoke:WikidataIB|getValue|rank=best|qid={{{qid|}}}|P131|fetchwikidata=ALL|onlysourced=yes}}
| subdivision_type2 =
| subdivision_type2 =
| subdivision_name2 =
| subdivision_name2 =
| subdivision_type3 =
| subdivision_type3 =
| subdivision_name3 =
| subdivision_name3 =
| established_title = {{#if:{{{established_date|}}}{{wikidata|property|P571}} | Established}}
| established_title =
| established_date =
| established_date = {{#if: {{{established_date|}}} | {{{established_date}}}{{{established_date_ref|}}} | {{wikidata|property|edit@end|P571}}{{wikidata|reference|P571}} }}
| founder = {{#property:P112}}
| founder =
| seat_type =
| seat_type =
| seat =
| seat =
Line 43: Line 42:
| leader_party =
| leader_party =
| leader_title =
| leader_title =
| leader_name =
| leader_name = {{#invoke:WikidataIB|getValue|rank=best|qid={{{qid|}}}|P6|fetchwikidata=ALL|onlysourced=yes}}
| unit_pref = Metric
| unit_pref = Metric
<!-- ALL fields with measurements have automatic unit conversion -->
<!-- ALL fields with measurements have automatic unit conversion -->
Line 59: Line 58:
<!-- square kilometers -->
<!-- square kilometers -->
| area_total_km2 = {{#if: {{{area_km2|}}} | {{{area_km2}}} | {{wikidata|property|raw|P2046}} }}
| area_total_km2 = {{#if: {{{area_km2|}}} | {{{area_km2}}} | {{wikidata|property|raw|P2046}} }}
| area_land_km2 =
| area_land_km2 =
{{#if: {{#invoke:WikidataIB | getValueByQual | rank=best |qid={{{qid|}}} | P2046 | qualID=P518 | qvalue=Q11081619 |fwd=ALL |osd=no |noicon=true | showunits = false}} | {{#invoke:WikidataIB | getValueByQual | rank=best |qid={{{qid|}}} | P2046 | qualID=P518 | qvalue=Q11081619 |fwd=ALL |osd=no |noicon=true | showunits = false}} | {{#if: {{#invoke:WikidataIB | getValueByQual | rank=best |qid={{{qid|}}} | P2046 | qualID=P518 | qvalue=Q205895 |fwd=ALL |osd=no |noicon=true | showunits = false}} |{{#invoke:WikidataIB | getValueByQual | rank=best |qid={{{qid|}}} | P2046 | qualID=P518 | qvalue=Q205895 |fwd=ALL |osd=no |noicon=true | showunits = false}}}}}}
| area_water_km2 =
| area_water_km2 = {{#if:{{#invoke:WikidataIB | getValueByQual | rank=best |qid={{{qid|}}} | P2046 | qualID=P518 | qvalue=Q15324 |fwd=ALL |osd=no |noicon=true | showunits = false}}|{{#invoke:WikidataIB | getValueByQual | rank=best |qid={{{qid|}}} | P2046 | qualID=P518 | qvalue=Q15324 |fwd=ALL |osd=no |noicon=true | showunits = false}}|{{#if:{{both|{{#invoke:WikidataIB | getValueByQual | rank=best |qid={{{qid|}}} | P2046 | qualID=P518 | qvalue=Q16868672 |fwd=ALL |osd=no |noicon=true | showunits = false}}|
{{#invoke:WikidataIB | getValueByQual | rank=best |qid={{{qid|}}} | P2046 | qualID=P518 | qvalue=Q11081619 |fwd=ALL |osd=no |noicon=true | showunits = false}}}}|
{{#expr: {{#invoke:WikidataIB | getValueByQual | rank=best |qid={{{qid|}}} | P2046 | qualID=P518 | qvalue=Q16868672 |fwd=ALL |osd=no |noicon=true | showunits = false}} - {{#invoke:WikidataIB | getValueByQual | rank=best |qid={{{qid|}}} | P2046 | qualID=P518 | qvalue=Q11081619 |fwd=ALL |osd=no |noicon=true | showunits = false}}round2}}|{{#if:{{both|{{{area_total_km2|}}}|{{#invoke:WikidataIB | getValueByQual | rank=best |qid={{{qid|}}} | P2046 | qualID=P518 | qvalue=Q11081619 |fwd=ALL |osd=no |noicon=true | showunits = false}}}}|{{#expr:{{{area_total_km2|}}}-{{#invoke:WikidataIB | getValueByQual | rank=best |qid={{{qid|}}} | P2046 | qualID=P518 | qvalue=Q11081619 |fwd=ALL |osd=no |noicon=true | showunits =false}}round2}}}}}}}}
| area_urban_km2 =
| area_urban_km2 =
| area_rural_km2 =
| area_rural_km2 =
Line 82: Line 84:
| population_footnotes = {{#if: {{wikidata|property|P1082}} | {{wikidata|references|best|P1082}} }}
| population_footnotes = {{#if: {{wikidata|property|P1082}} | {{wikidata|references|best|P1082}} }}
| population_total = {{wikidata|property|best|P1082}}
| population_total = {{wikidata|property|best|P1082}}
| population_as_of =
| population_as_of = {{#if: {{wikidata|property|P1082}} | {{wikidata|qualifier|best|P1082|P585}} }}
| population_density_km2 = auto
| population_density_km2 = auto
| population_demonym =
| population_demonym =
| population_note =
| population_note =
Line 91: Line 93:
| utc_offset1_DST =
| utc_offset1_DST =
| postal_code_type = Postal code
| postal_code_type = Postal code
| postal_code = {{#property:P281}}
| postal_code =
| area_code_type =
| area_code_type =
| area_code = {{#property:P473}}
| area_code = {{#property:P473}}
Line 100: Line 102:


Try it on {{Wikidata test|San Francisco|{{PAGENAME}}}}, {{Wikidata test|Vladivostok|{{PAGENAME}}}}, {{Wikidata test|Sapporo|{{PAGENAME}}}}
Try it on {{Wikidata test|San Francisco|{{PAGENAME}}}}, {{Wikidata test|Vladivostok|{{PAGENAME}}}}, {{Wikidata test|Sapporo|{{PAGENAME}}}}
{{documentation}}
</noinclude><noinclude>
{{Documentation}}
<!--Please add this template's categories to the /doc subpage, not here - thanks!-->
<!--Please add this template's categories to the /doc subpage, not here - thanks!-->
</noinclude>
</noinclude>

Latest revision as of 18:19, 9 August 2023


Try it on San Francisco , Vladivostok , Sapporo