Activity 7 Tutorial 1 - Question 1
✓ Published0🌍 Public
This interactive D3 pie chart visualizes the percentage distribution of US population by state, displaying slices with distinct colors and a scrollable legend for identification. The code loads data from a remote CSV file using `d3.csv`, converts the percentage values to numbers, and uses `d3.pie()` and `d3.arc()` to generate the chart geometry. A `d3.scaleOrdinal` with `d3.schemeCategory10` assigns colors to each state, while SVG text elements render the title and legend labels.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed