{
  "id": "density",
  "name": "Density curve",
  "family": "spread",
  "tier": "free",
  "summary": "Use a density curve to show the smooth shape of a distribution, with a marker readers can drag to ask 'how many are below this?'.",
  "title": "The typical country's life expectancy rose from 49 years in 1950 to 75 in 2023",
  "subtitle": "Distribution of countries by life expectancy at birth, years, 1950 and 2023",
  "howToRead": "Each curve is high where many countries share a life expectancy; drag the marker to read the share of countries below it in each year.",
  "useWhen": [
    "one or two distributions with dozens of values or more",
    "the overall shape (peaks, skew, shift) is the story",
    "readers want to test a threshold"
  ],
  "avoidWhen": [
    "fewer than about 30 values (the smoothing invents shape; use a strip plot)",
    "readers need exact counts (use a histogram)",
    "values have hard limits the curve would cross"
  ],
  "fields": [
    {
      "name": "years",
      "type": "year",
      "description": "the two years compared"
    },
    {
      "name": "rows[].year",
      "type": "year",
      "description": "the year of the value"
    },
    {
      "name": "rows[].country",
      "type": "place",
      "description": "the country"
    },
    {
      "name": "rows[].years",
      "type": "number",
      "description": "life expectancy at birth, years",
      "unit": "years",
      "format": "decimal"
    }
  ],
  "hints": {
    "marker": 65
  },
  "interactive": [
    "slider"
  ],
  "interactions": [
    "drag the marker, or click the chart, to read the share of countries below any age",
    "hover a curve for its median and range"
  ],
  "motion": "The 2023 curve slides out of the 1950 shape to its own place, carrying the marker with it.",
  "sound": "A settle when the marker reaches the last year. Quiet while it draws, between steps and while you drag the slider; mute it from its card.",
  "annotations": [
    {
      "type": "underline",
      "words": "75 in 2023",
      "in": "title"
    }
  ],
  "tags": [
    "distribution",
    "KDE",
    "smooth",
    "life expectancy",
    "health",
    "threshold",
    "slider"
  ],
  "mobile": "adapts",
  "mobileNote": "Draws its own phone layout below 520px",
  "mobileChecked": "2026-12-02",
  "ratios": [
    "16:9"
  ],
  "bestRatio": "16:9",
  "source": {
    "title": "Life expectancy",
    "publisher": "Our World in Data (UN World Population Prospects; Human Mortality Database; Zijdeman et al.)",
    "url": "https://ourworldindata.org/grapher/life-expectancy",
    "license": "CC BY 4.0",
    "retrieved": "2026-12-01"
  },
  "note": "Gaussian kernel, bandwidth 2.6 years. Each country counts once, whatever its size."
}