Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

SDA HW2-1

Public visualization

SDA HW2-1

0 stars0🌍 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

Comments

Sign in to join the discussion.

MIT Licensed