Skip to main content
100%

Fork of SDV Activity 7

✓ Published0🌍 Public
Aabjalshaik02@gmail.com
Last edited Nov 5, 2024
Created on Nov 5, 2024
Forked from SDV Activity 7

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 description

Activity 7 question one - Pie chart demonstration

MIT Licensed

Similar vizzes