D3 Scatter Plot With Brush - Earthquakes
A D3 scatter plot displays earthquakes from 1900 to 1999, mapping year on the x-axis, Richter magnitude on the y-axis, and death count to circle radius. The chart uses `d3.brushX` to select a time range, turning selected circles red; double-clicking either clears the selection or selects all circles if none exist. Data comes from a CSV hosted on GitHub Gist. The SVG visualization uses `d3.scaleLinear` for positioning and sizing, with `d3.axisLeft` and `d3.axisBottom` for axes, and is rendered from the `d3.v6` library.
AI-generated descriptionA D3 scatter plot shows the Richter of earthquakes occured from 1900 to 1999.
Brush:
- Select:
In selected area, circles become red.
- Double click:
If user has already selected an area, user can unselect it by double clicking in this area. If user has not selected area, double click will select all circles.
Data: Earthquakes Dataset.
Y-axis:
Richter of earthquakes
X-axis:
Timeline
Radius:
Deaths of earthquakes