🌍 Public
Viewing a saved revision (read-only)
0260f4810ee14840a11653cafb1d0c21
Fork of Pie Chart
This visualization displays the top 10 countries in the world for 2022, showing each country’s population as a slice of a pie chart with a corresponding color-coded legend. The data is loaded from a CSV file hosted on GitHub Gist. The code uses d3.pie, d3.arc, d3.scaleOrdinal, and d3.format to compute the pie segments, assign colors, and format population values in thousands. It renders the chart and legend as SVG elements, with the pie centered on a 960×500 canvas.
AI-generated description