Ver03 of Magnitude of Earthquakes - Added Responsiveness
A responsive scatter plot visualizes earthquake magnitude over time from the past seven days, using a USGS-derived dataset loaded via the `@Ljz2018/earthquake` data module. Circles are colored by depth category—red for shallow, blue for intermediate, and green for deep—through a `d3.scaleOrdinal` color scale. The chart employs `d3.scaleTime` and `d3.scaleLinear` for axes, with layout managed by `observeResize` from `@Ljz2018/axis-labels` to adapt width and height dynamically, while `d3.select` and `.join` handle SVG element updates.
AI-generated descriptionA scatter plot shows both magnitude and depth of the earthquakes happened in the past 7 days.
This plot was integrated with responsive viz container and responsive axes.
Data can be found here: Earthquake Dataset.
The depth of the earthquake is categorized into 3 levels:
- RED: Shallow: depth < 70km
- BLUE: Intermediate: 70km <= depth < 300km
- GREEN: Deep: depth >= 300km