🌍 Public
Viewing a saved revision (read-only)
ce84fafd80e6413899a901e4f75f7d8e
Fork of Fork of Pie_chart_Us_states_density
This example renders a pie chart of the top 10 U.S. states by population density, using D3.js v5 with SVG elements. The visualization presents each state as a colored slice, with a legend listing state names and density values in thousands. The code loads CSV data from a GitHub gist via `d3.csv`, then applies the `d3.pie` layout and `d3.arc` to generate the chart, while `d3.scaleOrdinal` assigns a distinct color palette and `d3.format` styles the density labels.
AI-generated description