Skip to main content
100%

[A4] MPG vs. Horsepower (Scatter Plot)

✓ Published0🌍 Public
Cctan13@dons.usfca.edu
Last edited Feb 21, 2024
Created on Feb 20, 2024
Forked from HTML Starter

This scatter plot visualizes the relationship between fuel efficiency (MPG) and horsepower for a dataset of vehicles, with each gray circle representing a data point. Hovering over a point highlights it in orange and displays a tooltip showing its exact MPG and horsepower values. The visualization uses D3.js v7’s scaleLinear and axisBottom/axisLeft to map the data and render axes, while the SVG circles respond to mouseover and mouseout events. Data is loaded asynchronously via d3.csv from a remote GitHub gist.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes