Skip to main content
100%

Interactive Visualization (button) - Earthquake Data

✓ Published1🌍 Public
JJunying Li
Last edited Oct 11, 2021
Created on Oct 10, 2021

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 description

Data: https://gist.github.com/Junying-Li/72ef4641efd6b4abf371f5d9f4267a56

Iterated from last week's visualization.

What's new?

  1. Added latitude and longitude to data.
  2. Added interactive world map with circles showing where earthquakes occured, and the radius of circle shows richter of earthquake.
  3. Changed the layout. Now all visualizations are in the same page.

Todo:

  1. Change buttons to menu.
  2. 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).

MIT Licensed

Similar vizzes