Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Question 1 Pie Chart

Public visualization

Viewing a saved revision (read-only)

8a13f34600e04204bd8a553b13e9c7c5

Question 1 Pie Chart

0 stars0🌍 Public
Mmeghna.reddy700@gmail.com
Last edited Apr 12, 2024
Created on Apr 10, 2024

This pie chart visualizes the top 10 countries with the most air pollution-related deaths in 2022. It uses D3.js (v5) with the `d3.pie` and `d3.arc` APIs to generate SVG paths, displaying death counts as labels formatted in thousands. Data is loaded asynchronously from a CSV file via `d3.csv`. A legend, positioned to the right, pairs each country with a colored rectangle and corresponding value, using `d3.scaleOrdinal` for color assignment.

AI-generated description

Displaying pie chart