Interactive Visualization (button) - Earthquake Data
This interactive visualization displays earthquake deaths by region in a bar plot alongside a world map showing earthquake locations and magnitudes. Users click buttons to filter data across different 20th-century time periods. The bar chart sums deaths per region using d3.csv, d3.filter, and d3.sum, while the map uses d3.geoMercator and d3.geoPath to project earthquake positions as circles sized by Richter scale. Data comes from a CSV containing latitude, longitude, and earthquake details.
AI-generated descriptionData: https://gist.github.com/Junying-Li/72ef4641efd6b4abf371f5d9f4267a56
Iterated from last week's visualization.
What's new?
- Added latitude and longitude to data.
- Added interactive world map with circles showing where earthquakes occured, and the radius of circle shows richter of earthquake.
- Changed the layout. Now all visualizations are in the same page.
Todo:
- Change buttons to menu.
- Add legend for map.
Bar plot:
X-axis: region that earthquake occured.
Y-axis: Deaths in earthquake.
World map:
Circle: positions where earthquake occured.
Radius: richter of earthquake.
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).