Skip to main content
100%

SDA HW2-2

✓ Published0🌍 Public
Vvits.18731a0539@gmail.com
Last edited Mar 27, 2025
Created on Mar 26, 2025

This area chart visualizes survival outcomes across Titanic passenger classes, comparing counts of survivors and non-survivors for classes 1, 2, and 3. The visualization uses two overlapping filled regions, with green representing survivors and red representing non-survivors. The code loads data from a CSV file using d3.csv, aggregates counts with d3.rollup and d3.sum, and renders the chart as SVG using d3.area generators, d3.scaleBand for the x-axis, and d3.axisBottom and d3.axisLeft for the axes. The chart explicitly includes all three passenger classes even if empty.

AI-generated description
MIT Licensed

Similar vizzes