🌍 Public
Viewing a saved revision (read-only)
1b2d51521a9045629673236b5920a6fd
ver2 Earthquake Scatter Plot
This example visualizes earthquake data from the USGS all-week GeoJSON feed, plotting magnitude against time in a scatter plot. Dots are colored by depth category (shallow, intermediate, deep) using `scaleOrdinal`, with a custom color legend that dims non-hovered categories on mouseover. A `brushX` interaction highlights earthquakes within a selected time range, stroking the brushed marks in black. The chart uses D3’s `scaleLinear` for axes, `axisBottom` and `axisLeft` for ticks, and a ResizeObserver for responsive resizing.
AI-generated description