# Cumulative distribution

> Use a cumulative distribution (ECDF) to show the share of items at or below every value, and to compare whole distributions without choosing bins.

- 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: **In 2005, 86% of countries had fewer than half their people online; by 2023, 22%** (Share of countries (y) whose share of people using the internet is at or below each value (x), 2005, 2015 and 2023)
- How to read it: Each staircase climbs one step per country; a curve further right means more countries online, and the dashed line reads off the share of countries below any level.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9 (best 16:9)

## Use it when
- comparing two to four whole distributions
- readers ask 'what share is below X?'
- you want every item in, with no binning choices

## Avoid it when
- the audience expects a histogram's bumps (an ECDF hides peaks in its slope)
- more than about four distributions
- only the median matters (use a dot plot)

## Fields (data.json)
- `years` (year): the years compared
- `rows[].year` (year): the year of the value
- `rows[].country` (place): the country
- `rows[].share` (number, unit "%", format percent): share of people using the internet, %

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
- move across the chart to slide the dashed line and read the share of countries below it in each year
- hover a staircase for that year's median
- Motion: The three staircases draw on one after another, then the reading line appears at 50%.
- 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": "ecdf",
  "title": "In 2005, 86% of countries had fewer than half their people online; by 2023, 22%",
  "subtitle": "Share of countries (y) whose share of people using the internet is at or below each value (x), 2005, 2015 and 2023",
  "data": "/charts/ecdf.data.json"
}
```

## Source
Share of the population using the internet, Our World in Data (International Telecommunication Union via World Bank) (CC BY 4.0), retrieved 2026-12-01: https://ourworldindata.org/grapher/share-of-individuals-using-the-internet

Note: Countries with data that year: 199 in 2005, 201 in 2015 and 181 in 2023. Each country counts once, whatever its size.

Live: /charts/ecdf · Manifest: /charts/ecdf.json · Tags: cumulative, ECDF, percentiles, internet, technology, distribution, change
