Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity - 7.1 Pie Chart

Public visualization

Activity - 7.1 Pie Chart

0 stars0🌍 Public
AAbhinay Peeta
Last edited Apr 10, 2025
Created on Apr 10, 2025

This pie chart shows the top 10 countries by deaths from air pollution in 2020, with each slice sized proportionally to death counts and labeled with values in thousands. A legend on the right pairs country names with their corresponding color swatches and death totals. The chart uses D3 v5 APIs including `pie()`, `arc()`, and `scaleOrdinal()` to compute slice geometry and assign colors, rendering as SVG with imported CSV data from a GitHub gist. Text labels are positioned using `arcGenerator.centroid()` for each segment.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed