Skip to main content
100%

Activity 7 Tutorial 1 - Question 1

✓ Published0🌍 Public
RRishithaGarnepudi@my.unt.edu
Last edited Nov 2, 2024
Created on Oct 30, 2024
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes