Skip to main content
100%

SDA HW2-1

✓ Published0🌍 Public
Vvits.18731a0539@gmail.com
Last edited Mar 26, 2025
Created on Mar 26, 2025
Forked from assigment-2

This example shows the survival outcomes of Titanic passengers as a pie chart, separating the data into two categories: those who survived and those who died. The chart uses D3 v6 to load a CSV dataset from a GitHub gist, then computes aggregate counts for each outcome. The visualization is rendered as SVG using D3’s `pie` and `arc` generators, with a categorical color scale assigning green to survivors and red to non-survivors. A custom HTML legend is built alongside the chart to label each slice with its corresponding count, and extra elements like the initial heading are removed for a clean presentation.

AI-generated description
MIT Licensed

Similar vizzes