🌍 Public
Viewing a saved revision (read-only)
f83cc3978ce247f8bbfa2ce34e0a51b5
Fork of Fork of Reusable D3 Scatter Plot
This scatter plot visualizes the relationship between sleep duration and age, using data loaded from a CSV file. The code defines a reusable `scatterPlot` function with configurable properties for width, height, data, accessors, margin, and radius. It renders circles via D3’s data join and uses `d3.axisLeft` and `d3.axisBottom` for axes, with linear scales mapping sleep hours (0–11) and age (10–30). The SVG output fills the browser window.
AI-generated description