Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

pie chart

Public visualization

pie chart

0 stars0🌍 Public
KKOLLIPATI NIKHIL
Last edited Oct 28, 2025
Created on Oct 28, 2025
Forked from pie chart

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

Comments

Sign in to join the discussion.

MIT Licensed