ver2 Earthquake Scatter Plot
✓ Published6🌍 Public
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 descriptionMIT Licensed