# Raincloud

> Use a raincloud to show a distribution three ways at once: a half-violin cloud for the shape, a box for the summary and raw dots as rain.

- Data type: Many values of one measure (`spread`)
- Pro · not released yet: its code is not available; try it on its page, or use a free chart of the same data type (`spread`)
- Example: **Europe's countries cluster near 82 years of life; Africa's spread across almost three decades** (Life expectancy at birth by country and continent, years, 2023)
- How to read it: The cloud is the shape of each continent's distribution, the bar under it the middle half with the median dot, and each raindrop one country.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9 (best 16:9)

## Use it when
- comparing 2 to 8 groups where the shape, the summary and the raw values all matter
- groups have 10 to 200 values
- an audience that might distrust a summary alone

## Avoid it when
- thousands of values per group (the rain becomes fog)
- small screens with many groups
- readers only need the medians (use a dot plot)
- more than 8 groups (the smallest fold into Other)

## Fields (data.json)
- `year` (year): the year shown
- `rows[].country` (place): the country
- `rows[].continent` (category): the group: any labels, one row each; 2 to 8 groups, the smallest fold into Other past 8
- `rows[].years` (number, unit "years", format decimal): life expectancy at birth, years

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 cloud for its median and range
- hover a raindrop to read the country
- Motion: Clouds swell up from their baselines, then the countries fall as rain into place.
- Sound: A soft pop on hover, pitched by continent. 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": "raincloud",
  "title": "Europe's countries cluster near 82 years of life; Africa's spread across almost three decades",
  "subtitle": "Life expectancy at birth by country and continent, years, 2023",
  "data": "/charts/raincloud.data.json"
}
```

## Source
Life expectancy, Our World in Data (UN World Population Prospects; Human Mortality Database; Zijdeman et al.) (CC BY 4.0), retrieved 2026-12-01: https://ourworldindata.org/grapher/life-expectancy

Note: Countries and territories count once each. Continents follow Our World in Data's grouping.

Inspired by: [Raincloud plots: a multi-platform tool for robust data visualization](https://doi.org/10.12688/wellcomeopenres.15191.2), Allen, Poggiali, Whitaker, Marshall, van Langen and Kievit (linked, not copied).

Live: /charts/raincloud · Manifest: /charts/raincloud.json · Tags: distribution, raincloud, violin, box plot, raw data, life expectancy, health
