Skip to main content
100%

D3 Scatter Plot With Brush - Earthquakes

✓ Published1🌍 Public
JJunying Li
Last edited Oct 21, 2021
Created on Oct 19, 2021

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 description

A D3 scatter plot shows the Richter of earthquakes occured from 1900 to 1999.

Brush:

  1. Select:

In selected area, circles become red.

  1. 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

MIT Licensed

Similar vizzes