Skip to main content
100%

Pie chart Visualization

✓ Published1🌍 Public
DDanthalakirankumar
Last edited Mar 28, 2022
Created on Mar 28, 2022

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 description
MIT Licensed

Similar vizzes