Fork of ICE - 7 Pie Chart
✓ Published1🌍 Public
This pie chart displays the top 10 countries by air pollution deaths in 2020, using a colorful segmented circle with each slice labeled in thousands and a legend pairing colors with country names. The code loads CSV data via `d3.csv`, converts death counts to numbers, and renders the chart using `d3.pie` and `d3.arc` to compute segment paths, with `d3.scaleOrdinal` assigning colors. Text labels are positioned using `arc.centroid`, and the legend is built manually with appended `rect` and `text` elements. The SVG canvas is selected with `d3.select`, and the visualization is generated asynchronously through an `async` function.
AI-generated descriptionMIT Licensed