🌍 Public
Viewing a saved revision (read-only)
055afabcb11943b585a7fbbdf38000f0
D3 Scatter Plot Template
This D3 scatter plot template visualizes the relationship between horsepower and weight for a set of automobiles, with each point representing a vehicle. The code loads CSV data from a remote URL and renders circles using D3’s scales (`d3.scaleLinear`), axes (`d3.axisLeft`, `d3.axisBottom`), and selection methods. It imports modules such as `d3-selection`, `d3-scale`, `d3-array`, and `d3-axis`, and uses the `create` function to build an SVG with margins and responsive dimensions based on the window size.
AI-generated descriptionScatter plot with D3.
Makes use of Rollup so that we can author the code using ES modules.
Inspired by the patterns found in Observable: D3 Charts