Interactive visualization of earthquake using R and Highcharter
According to Wikipedia:
An earthquake is the shaking of the surface of the Earth, resulting from the sudden release of energy in the Earth’s lithosphere that creates seismic waves.
Earthquake size can be very weak which can’t be felt to those which can destroy cities. The size of the earthquake is deterind by the magnitude of the earthquake in seismic scale.
In this blog, I will create an interactive visualization of the 20 largest earthquakes in the world. I am using the data from Earthquake.usgs.gov, US government website about geological research. The data is extracted using rvest package(web scraping package). I will use highcharter package to create the visualization.
Here is the look of data that i will use to create the visualization of the earthquake.It has Name of the earthquake,magnitude,location,time,date,logitude and latitude of the earthquake.
Mag | Location | Alternative Name | Date (UTC) | Time (UTC) | lat | lon | References |
---|---|---|---|---|---|---|---|
9.5 | Bio-Bio, Chile | Valdivia Earthquake | 1960-05-22 | 19:11 | -38 | -73 | Kanamori & Anderson, 1975 |
9.2 | Southern Alaska | 1964 Great Alaska Earthquake, Prince William Sound Earthquake, Good Friday Earthquake | 1964-03-28 | 03:36 | 60 | -147 | Kanamori & Anderson, 1975 |
9.1 | Off the West Coast of Northern Sumatra | Sumatra-Andaman Islands Earthquake, 2004 Sumatra Earthquake and Tsunami, Indian Ocean Earthquake | 2004-12-26 | 00:58 | 3 | 95 | Duputel et al., 2012 |
9.1 | Near the East Coast of Honshu, Japan | Tohoku Earthquake | 2011-03-11 | 05:46 | 38 | 142 | Duputel et al., 2012 |
9.0 | Off the East Coast of the Kamchatka Peninsula, Russia | Kamchatka, Russia | 1952-11-04 | 16:58 | 52 | 159 | Kanamori, 1976 |
8.8 | Offshore Bio-Bio, Chile | Maule Earthquake | 2010-02-27 | 06:34 | -36 | -72 | Duputel et al., 2012 |
In this visualization i will also use data of the tectonic plates of the earth.I am using geojson of the earthmap and the tectonic to create the map.The data baout the tectonic plates and the world map i am taking from highcharter example.
The earthquake dataframe also need to be changed to geojson which is done using the geojson_json() from geojsonio package.
Finally we will use the follwing code to create interactive visualization of the 20 largest earthquake in the world.
In this visualization we can see almost all of the earthquake occurs on the intersection of two tectonic plates. We can use mouse to hover over the point and get details about the earthquake through tooltips.