{
  "id": "nested-treemap",
  "name": "Nested treemap",
  "family": "hierarchy",
  "tier": "pro",
  "summary": "Use a nested treemap to show a two-level hierarchy by size: groups as bordered boxes, their members as tiles inside.",
  "title": "The US and China together make 43% of the world's GDP",
  "subtitle": "Gross domestic product by country, 2024, current US dollars; boxed by continent",
  "howToRead": "Each box is a continent and each tile a country, its area its GDP; faded tiles fold the economies under $100 billion together.",
  "useWhen": [
    "two levels (groups and members) of one total",
    "both the group totals and the biggest members matter",
    "20 to 200 members"
  ],
  "avoidWhen": [
    "more than two levels (use a sunburst, an icicle or a zoomable treemap)",
    "exact comparison of similar tiles",
    "negative values"
  ],
  "fields": [
    {
      "name": "country",
      "type": "place",
      "description": "the country, or a continent's smaller economies folded together"
    },
    {
      "name": "continent",
      "type": "category",
      "description": "the group"
    },
    {
      "name": "usd",
      "type": "number",
      "description": "GDP, billion current US dollars",
      "unit": "billion USD",
      "format": "count"
    },
    {
      "name": "worldBn",
      "type": "number",
      "description": "world GDP, billion US dollars",
      "unit": "billion USD",
      "format": "count"
    }
  ],
  "interactions": [
    "hover or tap a tile to read its GDP and its share of the world and of its continent"
  ],
  "motion": "Continent boxes appear one by one, then their countries pour into them from the top, biggest first.",
  "sound": "A soft pop on hover, pitched by continent. Quiet while it draws and between steps; mute it from its card.",
  "annotations": [
    {
      "type": "underline",
      "words": "43%",
      "in": "title",
      "style": "underline"
    }
  ],
  "tags": [
    "nested treemap",
    "treemap",
    "hierarchy",
    "gdp",
    "economy",
    "countries",
    "continents",
    "money"
  ],
  "mobile": "desktop",
  "mobileNote": "On a phone labels are hard to read or overlap (checked by eye)",
  "mobileChecked": "2026-12-02",
  "ratios": [],
  "bestRatio": "9:16",
  "source": {
    "title": "GDP (current US$), NY.GDP.MKTP.CD; continents from Our World in Data",
    "publisher": "World Bank World Development Indicators",
    "url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.CD",
    "license": "CC BY 4.0",
    "retrieved": "2026-12-01"
  },
  "note": "Shares are of the World Bank's world total; a few economies with no 2024 figure are missing, so the tiles add to 99%."
}