Earthquake Analysis

  • To Study the behavior of earthquake around the world (year 2000 - 2020) and perform statistical and exploratory analysis based on data from http://earthquake.usgs.gov
  • Different factors will be analyzed
  •       1. What geographical regions have the most magnitude of earthquakes?
          2. Earthquake timeline analysis?
          3. Trend Analysis of earthquake bases on month/zone
          4. Countries most affected by earthquake
          5. Other Events causing quakes
          6. Exploring the earthquake using shiny app

    Data Sources

  • Earthquake data obtained from United States Geological Survey using API services
  • API - The primary data will be obtained from http://earthquake.usgs.gov using webservice API (https://earthquake.usgs.gov/fdsnws/event/1/query?)
  • CSV - Some of the supporting data files are fetched from github
  • Approach and libraries

  • This project follows the data science workflow, the data is first fetched from API and from github location and then it got transformed in order to present in the form the dataframe or graphs
  • The following libraries are used
  •       ggmap - map the world
          RColorBrewer - color coding of graphs
          tidyverse - data cleansing and transformation
          knitr - table visvulizations
          ggplot2 - plot graphs
          GGally - Advanced graphs
          sqldf - SQL operations
          shiny - to build the shiny app
          leaflet - generating maps
          treemap - generating treemaps
          lubridate - date manipulation
          plotly - generating graphs

    Analysis

    Earthquake data from the year 2000 to 2020 has been used for this analysis

    Data from API

  • USGS has web serive to pull the data using API (example : https://earthquake.usgs.gov/fdsnws/event/1/query?format=csv&starttime=2018-01-01&endtime=2018-02-20")
  • There is an limiatation to fetch 20000 records on each request, Written a code to loop through from year 2000 to 2020 and saved in a single csv file format for faster performance

  • seq date latitude longitude type locationSource depth mag nst rms
    1 2000-01-30 36.81467 -121.4258 earthquake nc 5.047 1.13 8 0.090
    2 2000-01-30 13.21400 -87.5460 earthquake us 186.400 4.30 0 1.020
    3 2000-01-30 34.68200 -116.2910 earthquake ci 0.269 1.70 0 0.212
    4 2000-01-30 34.85000 -116.4110 earthquake ci 2.628 1.30 0 0.111
    5 2000-01-30 6.31700 -73.1560 earthquake us 210.800 0.00 0 0.630
    6 2000-01-30 35.31100 -119.3680 earthquake ci 5.040 2.31 0 0.266
    7 2000-01-30 44.76083 -111.0898 earthquake uu 7.300 0.67 10 0.090
    8 2000-01-30 19.38200 -155.2620 otherevent hv 30.267 0.00 8 0.080
    9 2000-01-30 34.88033 -116.4118 earthquake ci 3.856 1.30 4 0.110
    10 2000-01-30 39.79000 20.7500 earthquake ath 7.000 3.10 0 0.000
    11 2000-01-30 33.63500 -116.6850 earthquake ci 4.916 1.20 0 0.095
    12 2000-01-30 32.45400 -115.8290 earthquake ci -0.364 0.00 0 0.142
    13 2000-01-30 12.68600 142.9670 earthquake us 142.700 4.90 0 0.960
    14 2000-01-30 36.83933 -121.4300 earthquake nc 4.912 0.88 7 0.540
    15 2000-01-30 39.29150 -111.2077 earthquake uu 5.950 1.58 8 0.060
    16 2000-01-30 34.79500 -116.3700 earthquake ci 1.126 1.60 0 0.108
    17 2000-01-30 10.37600 125.9250 earthquake us 33.000 4.70 0 1.000
    18 2000-01-30 19.40083 -155.4877 earthquake hv 7.861 1.40 23 0.110
    19 2000-01-30 41.11100 -8.8790 earthquake mdd 0.000 2.80 0 0.000
    20 2000-01-30 33.96900 -117.2280 earthquake ci 12.556 1.53 0 0.120

    Geographical Impact

  • Magnitude is a number that characterizes the relative size of an earthquake, which is based on measurement of the maximum motion recorded by a seismograph
  • A Magnitude of 4.5 or higher is considered as dangerous may cause more damage

  • Timeline Analysis

    Trend Analysis

    Earthquake Explorer

    Shiny link:     https://mohamedthasleem.shinyapps.io/DATA608_Final_Project


    Tectonics Plate

    Tectonic earthquakes occur at plate tectonic boundaries. Tectonic plates are constantly moving slowly, but sometimes friction between them causes them lock together and become unable to move. The rest of the plates carry on moving, which leads to increased pressure on the locked section. Eventually, the locked section succumbs to the pressure, and the plates move past each other rapidly. This movement causes a tectonic earthquake. The waves of released energy move through the Earth’s crust and cause the shaking we feel at an earthquake site
    Some study says that mountains are the results of tectonic earthquakes

    Challenges

    1. The data was taken from API, it has limitation of getting 20000 records at a time, so i have split the records by doing multiple API calls to bind the together
    2. Initially the shiny app was designed to fetch data directly from API, but due to limitation (20000 records), and interactive parameter changes in the shiny app will drastically slowdown the performance, then I have redesigned the shiny app to pull data from R dataframe instead of directly from API

    Conclusion

    1. Earthquakes are mostly occurring on temperate regions and high on summer season on tropical regions
    2. Asia is most targeted on earthquake
    3. Climate Change and Tectonics plate movement may change the earthquake behavior

    References

    1.https://earthquake.usgs.gov/fdsnws/event/1/
    2.https://earthquake.usgs.gov/
    3.http://www.lat34north.com/cities/CitiesLatitude.cfm
    4.https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6033417/
    5.https://earthquake.usgs.gov/fdsnws/event/1/#parameters
    6.https://earthquake.usgs.gov/earthquakes/feed/v1.0/csv.php