Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 7.1 Question 1

Public visualization

Activity 7.1 Question 1

0 stars0🌍 Public
UUday Vandanapu
Last edited Nov 4, 2024
Created on Nov 4, 2024

This pie chart displays literacy rates for 10 countries, with each slice labeled by its rate divided by 1000 and suffixed with "K," alongside a legend mapping colors to country names. The visualization uses D3 v5’s `pie` and `arc` generators to compute and draw the SVG paths, with `scaleOrdinal` assigning colors from a hardcoded array. Data is loaded asynchronously via `d3.csv` from a GitHub-hosted CSV file, and slice labels are positioned using the arc generator’s `centroid` method. The chart includes both slice text and a separate legend group, with formatted numbers via `d3.format`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed