pie chart
This pie chart visualizes country populations using D3.js v6, rendering each slice as an SVG path with a categorical color scale. The code loads CSV data from a GitHub gist, processes population values, and uses d3.pie() and d3.arc() to generate the chart geometry. Each slice is labeled with its country name positioned at the arc centroid, while a custom legend built from SVG rectangles and text elements displays the color assignments alongside the chart.