Skip to main content
100%

HorsePower vs Weight

✓ Published1🌍 Public
YYoung Song
Last edited Jun 24, 2022
Created on Jun 24, 2022
Forked from A Face with D3.js!

This scatterplot shows the relationship between horsepower and weight for a set of cars, with each point representing a vehicle. The chart uses D3.js v5 to render an SVG with axes, gridlines via tick marks, and semi-transparent circles. Data is loaded from a CSV file using the `csv` function, then processed and scaled with `scaleLinear` and `extent`. Axis functions `axisBottom` and `axisLeft` create the labeled scales, while text elements add a title, axis labels, and a legend indicating a "Target range" with a green rectangle.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes