Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pie chart-ice-7

Public visualization

Viewing a saved revision (read-only)

f3c5becdfe004a2bab326b2ef8e60c91

Pie chart-ice-7

0 stars1🌍 Public
SSaiipriiya
Last edited Mar 12, 2023
Created on Mar 10, 2023
Forked from HTML Starter

This example uses a D3 pie chart to show the top 10 countries by prisoner count, with each slice labeled in thousands and a legend listing country names beside their values. The chart is rendered as SVG using the `d3.pie()` and `d3.arc()` functions, with colors assigned via `d3.scaleOrdinal()`. Data is loaded asynchronously from a CSV file using `d3.csv`, and text labels are positioned with `arc.centroid()`. The visualization highlights the relative share of prisoners per country using a simple categorical color scheme.

AI-generated description