Activity 7.1 Question 1
✓ Published0🌍 Public
This example shows the distribution of car horsepower values as an interactive pie chart. It groups the data into ten horsepower bins using `d3.histogram`, then visualizes each bin’s count with `d3.pie` and `d3.arc` in an SVG. A categorical color scale (`d3.scaleOrdinal` with `d3.schemeCategory10`) colors each slice, and a separate HTML legend displays the bin ranges. The data is loaded asynchronously via `d3.csv` from a GitHub Gist, demonstrating local ES6 module imports and D3’s histogram, pie, and arc APIs.
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