Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

task 3.2

Public visualization

task 3.2

0 stars0🌍 Public
GGanesh Gundekarla
Last edited Apr 5, 2025
Created on Apr 5, 2025
Forked from Hello VizHub

This scatter plot visualizes the relationship between horsepower and miles per gallon across cars in the Auto MPG dataset, with each point colored by cylinder count. The code loads data from a CSV file using `d3.csv`, applies `d3.scaleLinear` for both axes, and uses `d3.scaleOrdinal` with `schemeCategory10` for color encoding. Axes are rendered via `d3.axisBottom` and `d3.axisLeft`, while circles are appended with dynamic `cx`, `cy`, and `fill` attributes, rendered in SVG. The visualization includes labeled axes and filters out rows with missing horsepower values.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed