Interactive Visualization (Brush) - Earthquake Data
This interactive dashboard visualizes earthquake data with three synchronized views: a bar plot of regional death tolls, a world map showing earthquake locations with circle radii scaled by Richter magnitude, and a line chart depicting global deaths by year. The code uses d3.geoPath with a Mercator projection to render the map, while d3.brush enables year selection that updates all views. Hovering over map regions triggers tooltips via mouseover events, and a legend explains the Richter scale. Data is loaded via d3.csv from an external gist URL, with d3.scaleLinear and d3.scaleBand managing the axes.
AI-generated descriptionData: https://gist.github.com/Junying-Li/72ef4641efd6b4abf371f5d9f4267a56
What's new?
- Added line chart.
- Added brush (select year).
- Added legend for world map.
- Added tooltips for world map.
Todo:
Bar plot:
X-axis: region that earthquake occured.
Y-axis: Deaths in earthquake.
World map:
Circle: positions where earthquake occured.
Radius: richter of earthquake.
Line chart:
X-axis: year.
Y-axis: global total deaths.
The bar plot shows the deaths caused by earchquakes in mutiple regions in different period of 19 century. The world map shows the positions where earthquakes occured and how strong they were (richter scale). The line char shows global total deaths of earthquakes in different years.