Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

ICE7-2

Public visualization

ICE7-2

0 stars0🌍 Public
SSainathreddypotu@gmail.com
Last edited Oct 28, 2025
Created on Oct 28, 2025
Forked from HTML Starter

This pie chart visualizes the average miles per gallon (MPG) for cars, aggregated by their country of origin. It displays the resulting proportions as colored arcs with labels and a legend, using a tooltip to reveal exact average MPG values on hover. The visualization is built with D3.js v7, loading data from a CSV file and using the `d3.pie`, `d3.arc`, and `d3.scaleOrdinal` APIs to compute and render the chart. The code also employs `d3.rollups` to group and calculate the mean MPG per origin. The chart is rendered as an SVG, with interaction handled via mouse events.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed