Final - Earthquake Scatter Plot
This scatter plot visualizes earthquakes from the past week using USGS GeoJSON data, showing the relationship between earthquake depth and magnitude on a time-based x-axis. The circles are colored by depth category (shallow, intermediate, deep), and hovering over the legend highlights one category while dimming the others. Built with D3 v7, it uses `scaleTime`, `scaleLinear`, `scaleOrdinal`, and `axisLeft`/`axisBottom` to render axes and a custom color legend, with a `ResizeObserver` for responsiveness. The plot reveals that shallow earthquakes span the widest magnitude range, while deep earthquakes all exceed M4.0.
AI-generated descriptionThis scatter plot demonstates the relationship in between the depth and the magnitude of the earthquakes. All the circles are categorized into three colors. Each color represents a depth range: shallow, imtermediate, and deep.
Interaction:
Hover onto legend to highlight one of the depth categoties in the scatter plot.
Findings:
- The earthquakes at shallow depths cover the widest range of magnitudes. The majority of the earthquakes that occurred in the past 7 days were at this depth range. Among these shallow depth earthquakes, most are under M3.5, which is too minor to cause damage.
- Earthquakes at deep depths were all above M4.0.
Why there are negative magnitude? Check here