{
  "id": "spine-plot",
  "name": "Spine plot",
  "family": "parts",
  "tier": "pro",
  "summary": "Use a spine plot to show two-way shares: each group is one 100% bar, as wide as the group is big, split by the outcome.",
  "title": "Six in ten first-class passengers survived the Titanic; one in four in third class",
  "subtitle": "People aboard RMS Titanic by class and whether they survived, April 1912",
  "howToRead": "Each column is one class, as wide as its number aboard; the coloured part is the share who survived.",
  "useWhen": [
    "an outcome rate compared across groups of different sizes",
    "both the rate and the group size matter",
    "2 to 8 groups, a yes/no or a few-part outcome"
  ],
  "avoidWhen": [
    "the groups are about the same size (use a 100% stacked bar)",
    "readers need the counts more than the rates",
    "many outcome categories"
  ],
  "fields": [
    {
      "name": "class",
      "type": "category",
      "description": "the column, 2 to 8 of them in the data's order (1st, 2nd, 3rd or crew in the example; long names in hints.groupNames)"
    },
    {
      "name": "sex",
      "type": "category",
      "description": "an optional second grouping, a filter button each (Female or Male in the example; names in hints.sexNames)",
      "optional": true
    },
    {
      "name": "survived",
      "type": "number",
      "description": "the coloured outcome's count (people who survived in the example); its name is hints.outcomes[0]",
      "unit": "people",
      "format": "count"
    },
    {
      "name": "died",
      "type": "number",
      "description": "the other outcome's count (people who died in the example); its name is hints.outcomes[1]",
      "unit": "people",
      "format": "count"
    }
  ],
  "interactions": [
    "hover or tap a column to read the counts and the rate",
    "Everyone, Women and girls, and Men and boys rebuild the columns for that group"
  ],
  "motion": "The survivors' share rises from the bottom class by class; switching groups slides the columns to their new widths and heights.",
  "sound": "A chime on the group buttons; a pop on hover. Quiet while it draws and between steps; mute it from its card.",
  "annotations": [
    {
      "type": "underline",
      "words": "Six in ten",
      "in": "title"
    }
  ],
  "tags": [
    "spine plot",
    "mosaic",
    "two-way",
    "rates",
    "history",
    "titanic",
    "survival",
    "part to whole"
  ],
  "mobile": "adapts",
  "mobileNote": "Draws its own phone layout below 520px",
  "mobileChecked": "2026-12-02",
  "ratios": [
    "16:9",
    "9:16"
  ],
  "bestRatio": "9:16",
  "source": {
    "title": "Titanic: survival of passengers on the Titanic (R datasets)",
    "publisher": "Rdatasets (British Board of Trade inquiry report, 1912, via Dawson 1995)",
    "url": "https://vincentarelbundock.github.io/Rdatasets/doc/datasets/Titanic.html",
    "license": "Public domain (1912 inquiry figures)",
    "retrieved": "2026-12-01"
  },
  "hints": {
    "groupNames": {
      "1st": "First class",
      "2nd": "Second class",
      "3rd": "Third class"
    },
    "sexNames": {
      "Female": "Women and girls",
      "Male": "Men and boys"
    },
    "outcomes": [
      "survived",
      "died"
    ],
    "everyone": "Everyone"
  },
  "note": "The 1912 Board of Trade counts; later research revises some numbers slightly."
}