Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of spandhana

Public visualization

Fork of spandhana

0 stars0🌍 Public
Sspandhanabadekol
Last edited Mar 27, 2022
Created on Mar 27, 2022
Forked from spandhana

This visualization presents a pie chart of the top 10 countries by deaths from air pollution in 2020, using proportional slices labeled with death counts in thousands. The code loads CSV data via d3.csv, computes the pie layout with d3.pie, and renders arcs using d3.arc with an outer radius of 175. A color scale d3.scaleOrdinal assigns colors from a hardcoded array, while SVG text elements display labels positioned with arc.centroid. Legends are appended as SVG groups with rectangles and text. The visualization is rendered entirely in SVG with D3 v5.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed