🌍 Public
Viewing a saved revision (read-only)
38be7be619534601a60aad70e92b990c
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