---
title: "Titanic: class, sex and survival"
styles: [scientific]
---

[Back to the chart gallery](https://richview.ai/docs/charts)

The 1912 Titanic disaster is recorded here as aggregated class, sex and survival counts. Ribbons show contingency-table counts rather than the paths of individual people.

```chart
{
  "axes": {
    "y": {
      "label": "People"
    }
  },
  "data": {
    "csv": "gallery/titanic/data/titanic.csv"
  },
  "encoding": {
    "dimensions": [
      "class",
      "sex",
      "survived"
    ],
    "y": "people"
  },
  "title": "Survival differed across class and sex",
  "type": "alluvial"
}
```

## Source

````rmd
---
title: "Titanic: class, sex and survival"
styles: [brutalist]
---

```chart
{
  "axes": {
    "y": {
      "label": "People"
    }
  },
  "data": {
    "csv": "data.csv"
  },
  "encoding": {
    "dimensions": [
      "class",
      "sex",
      "survived"
    ],
    "y": "people"
  },
  "title": "Survival differed across class and sex",
  "type": "alluvial"
}
```

````

## Data and credits

[Complete report and provenance](https://richview.ai/docs/gallery/titanic/) · [Rich Markdown source](https://richview.ai/examples/charts/titanic/report.rmd) · [CSV observations](https://richview.ai/docs/gallery/titanic/data/titanic.csv).
