🌍 Public
Viewing a saved revision (read-only)
d5ed8e4e57504ddc998dac12578d4a24
Fork of Pie Chart
This visualization displays a pie chart comparing the pollution levels across 10 US states, with each slice labeled by its population value and accompanied by a color-coded legend. It uses D3.js (v5) to fetch CSV data from a GitHub gist, then renders the chart as SVG elements. The code employs D3's `pie` layout, `arc` for generating the pie segments, `scaleOrdinal` for assigning categorical colors, and `format` for tick label formatting. A legend group is constructed with rectangles and text elements to identify each state and its corresponding population.
AI-generated description