Pie chart Visualization
✓ Published1🌍 Public
This pie chart visualizes the top 10 countries by deaths in 2020 attributed to air pollution, using a dataset fetched from a GitHub gist via the d3.csv API. Each slice is colored using d3.scaleOrdinal, with the country and death count displayed directly on the chart and in a legend. The code generates SVG arcs with d3.arc and d3.pie, centering the chart within a fixed 960x500 SVG canvas. Death values are formatted in thousands (e.g., “123K”) using d3.format.
AI-generated descriptionMIT Licensed