Skip to main content
100%

Fork of ICE 7 - Pie Chart

✓ Published0🌍 Public
Ccharanchand9
Last edited Jul 3, 2022
Created on Jul 3, 2022
Forked from ICE 7 - Pie Chart

This visualization presents a pie chart ranking the top 10 countries by deaths attributed to air pollution in 2020, with each slice labeled in thousands and a matching legend that pairs country names with their death counts. Using D3 v5, the code fetches CSV data via `d3.csv`, computes a pie layout with `d3.pie()`, and draws arcs with `d3.arc()`. Slice colors come from a `d3.scaleOrdinal` palette, and text labels are positioned using the arc generator’s `centroid` method. The SVG rendering includes custom legend groups and formatted tick labels via `d3.format`.

AI-generated description
MIT Licensed

Similar vizzes