Visual Exploration of Earthquake Data

Matheus Schmitz
LinkedIn
Github Portfolio

Data Source
USGS worldwide earthquake report: https://earthquake.usgs.gov/earthquakes/feed/

Goals
R has lots of very powerful and interesting visualization tools, I want to learn them and have fun all the while! I figured earthquakes are a pretty exciting thing, and I'm hopy they'll make for some nice plots, so let's go!

Reminder For Jupyter to be able to handle all plots, this notebook must be ran with:
jupyter notebook --NotebookApp.iopub_data_rate_limit=1.0e10

Setup R Environment

Loading Data

United States Geological Services (USGS) updates their earthquake dataset daily, and provides an easily accesible file containing all earthquakes worldwide within the last week, so it is possible to keep the script always updated by fetchign the file directly from the source prior to loading it!

Dataset dictionary: https://earthquake.usgs.gov/data/comcat/index.php#event-terms

Fix Data Types

Data Exploration

Static Maps

Starting off slow with simpler static maps.

ggplot2

tmap

World Map

California Map

ggmap

Interactive Maps

Now we're talking!

leaflet

View the interactive map here: Leaflet Interactive Map

tmap

View the interactive map here: Tmap Interactive Map

mapview

View the interactive map here: Mapview Interactive Map

plotly

View the interactive map here: Plotly Interactive Map

Animated Maps

Can we do even better than interactive maps? Yes!

Animated maps with timelapses can be pretty cool.

animation

View the GIF here: animation GIF

gganimate

View the GIF here: gganimate GIF

tmap

View the GIF here: tmap GIF

End

Matheus Schmitz
LinkedIn
Github Portfolio