Skip to main content
100%

pie chart

✓ Published1🌍 Public
KKOLLIPATI NIKHIL
Last edited Oct 28, 2025
Created on Oct 28, 2025
Forked from D3 Starter

A pie chart visualizes the average miles per gallon (MPG) for cars grouped by their region of origin within the Auto-MPG dataset. Three slices—colored blue, orange, and teal—represent the USA, Europe, and Japan, with labels and a legend identifying each category. The code loads the CSV with `d3.csv`, cleans missing values, and aggregates the data using `d3.rollups` to compute mean MPG per origin. It then renders the chart with `d3.pie` and `d3.arc` in an SVG, styled by a `d3.scaleOrdinal` color scale.

AI-generated description
MIT Licensed

Similar vizzes