Jump to content
Wikipedia The Free Encyclopedia

Template:Choropleth world map

From Wikipedia, the free encyclopedia
Template documentation[view] [edit] [history] [purge]
This template is rated as alpha. It is ready for third party input, and may be used on a few pages to see if problems arise, but should be watched. Suggestions for new features or changes in their input and output mechanisms are welcome.

Usage

[edit ]

This template creates an interactive world choropleth map, indicating some statistical value with different colors for different countries. A tooltip with country data is shown when the mouse is over a country.

Example

[edit ]
{{Choropleth world map
| title=Net official development assistance and official aid (ODA) received in 2019
| table=OdaReceived2019.tab
| column=oda_received
| columnName= ODA received
| year=2019
}}
Graphs are unavailable due to technical issues. Updates on reimplementing the Graph extension, which will be known as the Chart extension, can be found on Phabricator and on MediaWiki.org.

See or edit source data.

{{Choropleth world map
| title=CO2 Per Capita
| table=CO2PerCapita.tab
| column=tonnes
| columnName=tonnes per Capita
| year=2017
}}
Graphs are unavailable due to technical issues. Updates on reimplementing the Graph extension, which will be known as the Chart extension, can be found on Phabricator and on MediaWiki.org.

See or edit source data.

{{Choropleth world map
| title=Share of the population infected with HIV
| table=HIV_rates.tab
| column=HIV_rate
| columnName=Percent of people with HIV
| year=2017
}}
Graphs are unavailable due to technical issues. Updates on reimplementing the Graph extension, which will be known as the Chart extension, can be found on Phabricator and on MediaWiki.org.

See or edit source data.


Dataset format

[edit ]

The dataset should be stored at Wikimedia commons, in the Data namespace, as a tabular data (.tab) file. Currently, the file format should be JSON, representing a three column table, where the first column is the three-letter ISO country code, the second is the year and the third is the value. In the future, CSV-files may be possible.

Steps:

  • Download a .csv file, for example from https://ourworldindata.org
  • Trim to three columns in a spreadsheet program
  • Upload it at https://www.csvjson.com/csv2json . Select "parse numbers".
  • Copy the json output and paste it into Notepad. Find and replace { with [, and "Country:" with nothing
  • Paste this data below the heading data, at for example [:commons:Data:Child Mortality.tab]

Be aware of some minor bugs.

See also

[edit ]
The above documentation is transcluded from Template:Choropleth world map/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.

AltStyle によって変換されたページ (->オリジナル) /