{
  "id": "back-to-back-bars",
  "name": "Back-to-back bars",
  "family": "compare",
  "tier": "free",
  "summary": "Use back-to-back bars (a population pyramid) to compare two groups across the same ordered categories, mirrored on a shared spine.",
  "title": "Japan has three times as many people over 80 as under 5; Nigeria is its mirror image",
  "subtitle": "People by five-year age group and sex, 2023; switch between Japan and Nigeria",
  "howToRead": "Men extend left and women right from the age labels in the middle, youngest at the bottom; each country has its own scale.",
  "useWhen": [
    "two groups share the same ordered categories (ages, income bands, survey answers)",
    "the shape of each side tells the story",
    "comparing the two sides row by row"
  ],
  "avoidWhen": [
    "more than two groups",
    "the categories have no order",
    "the exact difference between sides matters most (plot the difference)"
  ],
  "fields": [
    {
      "name": "Japan",
      "series": true,
      "type": "id",
      "description": "one group's list of { age, men, women }, first row at the bottom (Japan in the example; any names, one chip each)"
    },
    {
      "name": "Nigeria",
      "series": true,
      "type": "id",
      "description": "another group's list of { age, men, women } (Nigeria in the example)"
    },
    {
      "name": "age",
      "type": "category",
      "description": "the ordered row (a five-year age group in the example)"
    },
    {
      "name": "men",
      "type": "number",
      "description": "the left side's value (men in the example, people); its name is hints.sides[0]",
      "unit": "people",
      "format": "count"
    },
    {
      "name": "women",
      "type": "number",
      "description": "the right side's value (women in the example, people); its name is hints.sides[1]",
      "unit": "people",
      "format": "count"
    }
  ],
  "hints": {
    "sides": [
      "men",
      "women"
    ],
    "row": "ages"
  },
  "interactions": [
    "hover or tap a row to read both sides and its share of everyone",
    "the country chips switch the pyramid"
  ],
  "motion": "Bars grow out from the spine, youngest first; switching country reshapes the pyramid in place.",
  "sound": "A whoosh when the country changes; a pop pitched by age on hover. Quiet while it draws and between steps; mute it from its card.",
  "annotations": [
    {
      "type": "underline",
      "words": "three times",
      "in": "title"
    }
  ],
  "tags": [
    "population pyramid",
    "back to back",
    "butterfly chart",
    "mirror",
    "age",
    "population",
    "demography"
  ],
  "mobile": "adapts",
  "mobileNote": "Draws its own phone layout below 520px",
  "mobileChecked": "2026-12-02",
  "ratios": [
    "16:9",
    "9:16"
  ],
  "bestRatio": "9:16",
  "source": {
    "title": "World Development Indicators: population by five-year age group and sex (SP.POP.xxxx.MA.5Y, SP.POP.xxxx.FE.5Y) and total population by sex",
    "publisher": "World Bank (from UN World Population Prospects)",
    "url": "https://data.worldbank.org/indicator/SP.POP.0004.FE.5Y",
    "license": "CC BY 4.0",
    "retrieved": "2026-12-01"
  },
  "note": "Counts are the World Bank's share of each age group times the total by sex, so they are rounded estimates."
}