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

This example shows the survival distribution of Titanic passengers with a pie chart comparing the counts of survivors and non-survivors. D3 v5 loads the dataset via `d3.csv` from a GitHub gist, aggregates counts using `d3.rollup`, and renders the chart with `d3.pie` and `d3.arc` into an SVG. The visualization includes labels at each arc’s centroid via `arc.centroid`, a color scale from `d3.schemeSet2`, and an interactive legend built with D3 selections. Axis titles and a chart heading are added as SVG text elements.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed