# Map with a year slider

> Use a map with a year slider to play a choropleth through time, so the spread of a change across countries can be watched.

- Data type: Values by place (`maps`)
- Pro · not released yet: its code is not available; try it on its page, or use a free chart of the same data type (`maps`)
- Example: **Countries where one adult in five is obese rose from 17 to 122 since 1990** (Share of adults (18+) with obesity, BMI 30 or more, by country, 1990–2022, %)
- How to read it: Darker countries have more adults with obesity; press Play to watch the shades deepen from 1990 to 2022.
- Interactive: slider
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9, 9:16 (best 9:16)

## Use it when
- one rate per country over many years
- how a change spreads across places matters
- readers can watch a short animation

## Avoid it when
- only two or three years (use small-multiple maps)
- exact trends per country (use a line chart)
- still images or print

## Fields (data.json)
- `years` (year): the years on the slider
- `rows.id` (id): ISO 3166-1 numeric code
- `rows.name` (place): the country
- `rows.v` (number, unit "%", format percent): share of adults obese per year, %

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
- Play or drag the scrubber to move through the years
- hover or tap a country to read the share this year and in 1990
- Motion: On arrival the map runs once from 1990 to 2022; the key's bars grow and shrink with each band's count.
- Sound: A pop on hover. 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": "map-year-slider",
  "title": "Countries where one adult in five is obese rose from 17 to 122 since 1990",
  "subtitle": "Share of adults (18+) with obesity, BMI 30 or more, by country, 1990–2022, %",
  "data": "/charts/map-year-slider.data.json"
}
```

## Source
Share of adults who are obese, Our World in Data (NCD Risk Factor Collaboration (NCD-RisC) via WHO Global Health Observatory) (CC BY 4.0), retrieved 2026-12-01: https://ourworldindata.org/grapher/share-of-adults-defined-as-obese

Note: Crude estimates for adults 18 and over, modelled from surveys; the shown years are every fourth year from 1990.

Live: /charts/map-year-slider · Manifest: /charts/map-year-slider.json · Tags: animated map, time slider, choropleth, obesity, health, food, change over time
