# Hypothetical outcomes

> Use hypothetical outcome plots to show uncertainty as a run of possible worlds: each frame is one draw, and the odds emerge as you watch.

- 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: **Paris is usually hotter than London in July, but on 1 day in 7 London wins** (Daily maximum temperature on 40 July days drawn at random from 2016–2025, °C)
- How to read it: Each frame is one real July day in all three cities; faint ticks pile up where days are common, and the counter keeps score of London against Paris.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9 (best 16:9)

## Use it when
- the audience should feel how often an outcome happens, not read a probability
- comparing two or three uncertain quantities that are drawn together
- a screen where motion is welcome

## Avoid it when
- print or a static image (use quantile dots or a gradient interval)
- readers need exact intervals
- more than about four quantities at once (past six, only the first six lanes are drawn)

## Fields (data.json)
- `city` (place): the city; one lane each, in the data's order (up to six); the counter compares meta.hints.pair, else the first two
- `date` (date): the day (July in the example); only days with a value for every city are drawn
- `tmax` (number, unit "°C", format decimal): the day's maximum temperature, °C

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
- 'Draw 40 July days' runs the draws again
- Play scrubs through the same 40 days one at a time
- hover or tap a city's dot for that day's value
- Motion: Three dots jump to a new day's temperatures every 0.65 seconds for 40 draws, then stop; ghost ticks build up the distribution.
- Sound: A chime when London is hotter than Paris. 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": "hypothetical-outcomes",
  "title": "Paris is usually hotter than London in July, but on 1 day in 7 London wins",
  "subtitle": "Daily maximum temperature on 40 July days drawn at random from 2016–2025, °C",
  "data": "/charts/hypothetical-outcomes.data.json"
}
```

## Source
Historical Weather API (ERA5 reanalysis), daily maximum 2 m temperature, Open-Meteo (Copernicus Climate Change Service ERA5) (CC BY 4.0), retrieved 2026-12-01: https://open-meteo.com/en/docs/historical-weather-api

Note: Grid-cell values from a weather reanalysis for each city centre, not single weather stations. London was hotter than Paris on 46 of 310 July days (15%).

Inspired by: [Hypothetical outcome plots outperform error bars and violin plots for inferences about reliability of variable ordering](https://doi.org/10.1371/journal.pone.0142444), Kale, Nguyen, Kay and Hullman (linked, not copied).

Live: /charts/hypothetical-outcomes · Manifest: /charts/hypothetical-outcomes.json · Tags: uncertainty, HOPs, animation, weather, temperature, cities, probability
