🌍 Public
Viewing a saved revision (read-only)
af3bef6716c64934b6b2cc8bb1be95a3
Cars
This example shows the relationship between horsepower and weight for a dataset of cars, with each car represented as a red, semi-transparent circle. The scatterplot uses D3 v5’s `scaleLinear` to map the data to SVG coordinates, with axes generated by `axisBottom` and `axisLeft`. It loads CSV data from a remote URL, parses numeric fields, and renders circles positioned via `xScale` and `yScale`. The chart includes custom axis labels, a title, and tick formatting using D3’s `format` with a custom unit replacement.
AI-generated description