Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Viz_PieChartforQuestion1

Public visualization

Viz_PieChartforQuestion1

0 stars1🌍 Public
RRamanarayana Bhavirisetty
Last edited Mar 26, 2025
Created on Mar 26, 2025
Forked from Activity-7_Q1

This pie chart visualizes air pollution deaths across countries, displaying each country’s share as a percentage of the total deaths. The code uses D3 v5 APIs including `d3.pie`, `d3.arc`, `d3.scaleOrdinal`, and `d3.csv`, rendering the chart as an SVG. Death values are loaded from a remote CSV, converted to numbers, and used to compute slices and legend labels, with tooltip-free text labels placed via `arc.centroid()`. A legend to the right shows country names and death counts formatted in thousands.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed