{
  "id": "correlation-heatmap",
  "name": "Correlation heatmap",
  "family": "relationships",
  "tier": "free",
  "summary": "Use a correlation heatmap to scan how every pair in a set of measures moves together, then open the pairs that matter.",
  "title": "Health, wealth and the internet move together; forest cover moves with none of them",
  "subtitle": "Spearman rank correlation between eight development measures across 174 countries, 2022",
  "howToRead": "Each square is one pair of measures: blue squares rise together, warm squares move in opposite directions, and paler means weaker.",
  "useWhen": [
    "you have 4 to 15 numeric measures for the same items",
    "you want to find which pairs are linked before you chart them",
    "an overview for analysts, followed by a closer look"
  ],
  "avoidWhen": [
    "you need to show the shape of one relationship (use a scatter)",
    "the measures are on very few items (r is unstable below about 20)",
    "readers may read correlation as cause",
    "more than 15 measures (only the first 15 are drawn)"
  ],
  "fields": [
    {
      "name": "country",
      "type": "category",
      "description": "the item, one row each; every other number column is a measure"
    },
    {
      "name": "lifeExp",
      "series": true,
      "type": "number",
      "description": "life expectancy at birth, years",
      "unit": "years",
      "format": "decimal"
    },
    {
      "name": "infantMort",
      "series": true,
      "type": "number",
      "description": "infant deaths per 1,000 live births",
      "unit": "per 1,000 births",
      "format": "decimal"
    },
    {
      "name": "fertility",
      "series": true,
      "type": "number",
      "description": "births per woman",
      "unit": "births per woman",
      "format": "decimal"
    },
    {
      "name": "gdp",
      "series": true,
      "type": "number",
      "description": "GDP per person, PPP, constant 2021 international $",
      "unit": "USD",
      "format": "currency"
    },
    {
      "name": "internet",
      "series": true,
      "type": "number",
      "description": "share of people using the internet, %",
      "unit": "%",
      "format": "percent"
    },
    {
      "name": "electricity",
      "series": true,
      "type": "number",
      "description": "share of people with electricity, %",
      "unit": "%",
      "format": "percent"
    },
    {
      "name": "urban",
      "series": true,
      "type": "number",
      "description": "share of people living in urban areas, %",
      "unit": "%",
      "format": "percent"
    },
    {
      "name": "forest",
      "series": true,
      "type": "number",
      "description": "forest area as a share of land, %",
      "unit": "%",
      "format": "percent"
    }
  ],
  "hints": {
    "names": {
      "lifeExp": "Life expectancy",
      "infantMort": "Infant deaths",
      "fertility": "Fertility rate",
      "gdp": "GDP per person",
      "internet": "Internet users",
      "electricity": "Electricity access",
      "urban": "Living in cities",
      "forest": "Forest cover"
    },
    "log": [
      "gdp"
    ]
  },
  "interactions": [
    "hover or tap a square to read r and open that pair's scatter"
  ],
  "motion": "Squares pop in from the corner outward along the diagonals.",
  "sound": "A pop on hover, higher for stronger links. Quiet while it draws and between steps; mute it from its card.",
  "annotations": [
    {
      "type": "underline",
      "words": "forest cover",
      "in": "title"
    }
  ],
  "tags": [
    "correlation matrix",
    "heatmap",
    "many measures",
    "spearman",
    "development",
    "world bank"
  ],
  "mobile": "desktop",
  "mobileNote": "On a phone labels are hard to read or overlap (checked by eye)",
  "mobileChecked": "2026-12-02",
  "ratios": [
    "16:9"
  ],
  "bestRatio": "16:9",
  "source": {
    "title": "World Development Indicators (SP.DYN.LE00.IN, SP.DYN.IMRT.IN, SP.DYN.TFRT.IN, NY.GDP.PCAP.PP.KD, IT.NET.USER.ZS, EG.ELC.ACCS.ZS, SP.URB.TOTL.IN.ZS, AG.LND.FRST.ZS)",
    "publisher": "World Bank",
    "url": "https://data.worldbank.org/indicator",
    "license": "CC BY 4.0",
    "retrieved": "2026-12-01"
  },
  "note": "The 174 countries with all eight measures for 2022; the Central African Republic is left out because its 2022 values are a lone outlier in this release. Spearman's r uses ranks, so it catches curved but steady relationships."
}