Skip to main content
100%

ICE7-2

✓ Published0🌍 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
MIT Licensed

Similar vizzes