Donut Multiples
✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Oct 14, 2012
Donut multiples display age-group population proportions for each U.S. state as small pie charts, with a legend mapping seven age brackets to distinct colors. The charts are generated from a CSV file parsed via d3.csv, with d3.scale.ordinal assigning colors, d3.layout.pie computing arc angles, and d3.svg.arc rendering the donut segments as SVG paths. Each state’s label appears centered within its donut, highlighting proportional differences across regions.
AI-generated descriptionThese donut charts are constructed from a CSV file storing the populations of various age groups in different states. (As a practical note, a normalized stacked area chart facilitates easier comparison of values.) The chart employs a number of D3 features:
- d3.csv - load and parse data
- d3.scale.ordinal - color encoding
- d3.keys - compute column names
- d3.svg.arc - display arcs
- d3.layout.pie - compute arc angles from data
gpl-3.0 Licensed