Fork of SDV Activity 7
✓ Published0🌍 Public
This visualization displays the top 10 countries by population in 2020 using a pie chart. Each slice represents a country’s population, with values labeled in thousands and a corresponding legend listing country names and population figures. The code uses d3.pie and d3.arc to generate the chart, d3.scaleOrdinal for slice colors, and d3.csv to load the dataset from a GitHub Gist. Text labels are positioned using arc.centroid, and the legend is built manually with appended SVG rectangles and text elements.
AI-generated descriptionActivity 7 question one - Pie chart demonstration
MIT Licensed