# Titanic plotting inputs

Original files under `source/` are unchanged from Zenodo record 22983324, version 1.0.1. Run `python3 scripts/prepare-data.py` from the repository root to regenerate the numeric tables, or add `--check` to verify them without writing. All inputs are tab-separated, without headers, so every engine (including MetaPost) reads the same numbers. Columns below are listed in file order; program indexes may start at zero or one. Missing age/class survival rates are `-1` only when n=0. This sentinel must never enter the colour scale as a measured rate.

## classes.tsv

`1: class_index`, `2: aboard`, `3: survived`, `4: died`, `5: survival_pct`, `6: female_n`, `7: female_survived`, `8: female_pct`, `9: male_n`, `10: male_survived`, `11: male_pct`, `12: known_age_n`

## boxes.tsv

`1: class_index`, `2: min`, `3: q1`, `4: median`, `5: q3`, `6: max`, `7: known_age_n`

## ages.tsv

`1: centre_years`, `2: left`, `3: right`, `4: known_n`, `5: survivors`, `6: survival_pct`, `7: first_n`, `8: second_n`, `9: third_n`, `10: crew_n`

## cells.tsv

`1: age_centre`, `2: class_y`, `3: survival_pct_or_minus_one`, `4: known_n`, `5: survivors`, `6: diameter_bp`

## ecdf.tsv

`1: age_years`, `2: cumulative_fraction`

## density.tsv

`1: age_years`, `2: first_density`, `3: second_density`, `4: third_density`, `5: crew_density`

## violin-1.tsv

`1: class_offset`, `2: age_years`

## violin-2.tsv

`1: class_offset`, `2: age_years`

## violin-3.tsv

`1: class_offset`, `2: age_years`

## violin-4.tsv

`1: class_offset`, `2: age_years`

## Statistical conventions

Counts retain all 2,207 people. Age plots exclude only the two missing ages. Crew remains separate. Rows are not deduplicated. Three-year bins are left-closed/right-open and preserve fractional ages. Continuous bin centres are 1.5, 4.5, …, 73.5; these differ from the archived summary’s completed-year midpoint labels 1, 4, …, 73.

Quartiles use linear interpolation at p*(n-1), sometimes called type 7. Whiskers span minimum to maximum. The right-continuous ECDF groups tied ages and contains explicit horizontal and vertical vertices. Gaussian KDE bandwidth is three years, sampled every half year, with one common width factor; densities are normalized per group, not multiplied by group size. Display clipping at 0 and 75 is not a boundary correction. Bubble diameter in bp is 14*sqrt(n/124), so area is proportional to n. The continuous colour scale runs from RGB (232,241,250) at 0% to (0,84,159) at 100%; grey (236,236,237) denotes no observations.

`recipes.json` records the ranges and table schemas. `classes-x.txt` and `classes-y.txt` provide GMT custom axis labels. `survival.cpt` is the same RGB scale used by the other tools. Data and derived tables retain NLPL; see `../LICENSES/TITANIC-DATA-NOTICE.md`.
