pie chart
✓ Published0🌍 Public
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 descriptionMIT Licensed