# Rain gauge

> Use rain gauges to show amounts that accumulate, like rainfall or savings: drops fall into a cylinder per item until the water reaches its value.

- Data type: Values per item (`compare`)
- Pro · not released yet: its code is not available; try it on its page, or use a free chart of the same data type (`compare`)
- Example: **Colombia gets about 180 times as much rain as Egypt** (Average precipitation in depth, mm per year)
- How to read it: Each cylinder is one country, filled to the depth of rain and snow it gets in an average year; the marks are every 500 mm.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9 (best 16:9)

## Use it when
- amounts that build up, such as rain, water use or savings
- 4 to 10 items on one scale
- the wettest and driest gap is the story

## Avoid it when
- values can be negative
- many items (the gauges get thin)
- the amounts don't accumulate

## Fields (data.json)
- `country` (place): country
- `mm` (number, unit "mm", format count): long-term average precipitation, mm per year
- `year` (year): year of the World Bank release

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 gauge to read its rainfall and how it compares with the driest
- Motion: A shower falls from the cloud bank for about three seconds, heavier over wet countries, while the water in each gauge rises to its level; then the rain stops.
- Sound: No sound of its own: 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": "rain-gauge",
  "title": "Colombia gets about 180 times as much rain as Egypt",
  "subtitle": "Average precipitation in depth, mm per year",
  "data": "/charts/rain-gauge.data.json"
}
```

## Source
Average precipitation in depth (mm per year), AG.LND.PRCP.MM, World Bank (Food and Agriculture Organization AQUASTAT) (CC BY 4.0), retrieved 2026-12-01: https://data.worldbank.org/indicator/AG.LND.PRCP.MM

Note: These are long-term averages over each country's whole area, not one year's rainfall; the number of drops drawn is for show.

Live: /charts/rain-gauge · Manifest: /charts/rain-gauge.json · Tags: fill, accumulation, rainfall, climate, weather, water, geography
