Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 7.1 Question 1

Public visualization

Viewing a saved revision (read-only)

cbe164cd22f3455f8e1bc8f403d0aad9

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

piechart on literacy rates of different countries