🌍 Public
Viewing a saved revision (read-only)
b4da04373d7e42d2933d28782f90546e
Activity7.1_Question1
A pie chart displays the average horsepower for the top 10 car makers, with all remaining makers aggregated into an "Others" slice. Slices and labels are rendered using SVG paths and text elements via D3's `pie` and `arc` APIs, with a color legend on the right. The code loads car data from a CSV file using `d3.csv`, aggregates values with `d3.sum`, and uses `d3.arc` for slice geometry and `d3.scaleOrdinal` for categorical colors. Axis labels are added as text annotations, though the chart itself is circular.
AI-generated description