Fork of spandhana
✓ Published0🌍 Public
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 descriptionMIT Licensed