# World choropleth

> Use a world choropleth to show one rate or share per country, coloured in shades of one ink, when where it happens is the story.

- Data type: Values by place (`maps`)
- Free (MIT): install with `npx chartreuse add world-choropleth`, or registry item `/r/world-choropleth.json`
- Example: **Twenty countries make at least 90% of their electricity from renewables** (Share of electricity generated from renewable sources, by country, 2024, %)
- How to read it: Darker countries make more of their electricity from wind, sun, water and other renewables; grey means no data.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9 (best 16:9)

## Use it when
- one rate, share or per-person value per country
- the geographic pattern matters (neighbours, regions)
- readers will look up their own country

## Avoid it when
- the value is a total such as people or tonnes (big countries look important; use bubbles or a cartogram)
- readers must compare close values exactly (use sorted bars)
- small countries carry the story (use a tile grid)

## Fields (data.json)
- `id` (id): ISO 3166-1 numeric code, matching world-atlas
- `code` (id): ISO 3166-1 alpha-3 code
- `name` (place): the country
- `v` (number, unit "%", format percent): renewables' share of electricity, %

Units are the example's: with your own data, set each number field's `unit` and `format` (percent, count, decimal, currency, compact) in the meta you pass to mount, or `chartreuse render --unit field=text --format field=count`. Scales and labels follow your data.

## Interactions, motion, sound
- hover or tap a country to read its share
- hover a key swatch to show only that band
- Motion: Ink soaks into the map greenest grids first, as if poured from the top band down.
- Sound: A soft pop on hover, pitched by band. Quiet while it draws and between steps; mute it from its card. (sound is off until the viewer turns it on)

## Example spec
```json
{
  "chart": "world-choropleth",
  "title": "Twenty countries make at least 90% of their electricity from renewables",
  "subtitle": "Share of electricity generated from renewable sources, by country, 2024, %",
  "data": "/charts/world-choropleth.data.json"
}
```

## Source
Share of electricity generated by renewables, Our World in Data (Ember; Energy Institute Statistical Review of World Energy) (CC BY 4.0), retrieved 2026-12-01: https://ourworldindata.org/grapher/share-electricity-renewables

Note: Renewables include hydropower, wind, solar, bioenergy, geothermal and marine. Countries with little generation can reach 100% with a single dam.

Live: /charts/world-choropleth · Manifest: /charts/world-choropleth.json · Tags: choropleth, world map, renewables, electricity, energy, climate, share, sequential colour
