Earthquake Analysis

Setup

Libraries

library(tidyverse)
Registered S3 method overwritten by 'dplyr':
  method           from
  print.rowwise_df     
── Attaching packages ────────────────────────────────────────────── tidyverse 1.2.1 ──
✔ ggplot2 3.2.0     ✔ purrr   0.3.2
✔ tibble  2.1.3     ✔ dplyr   0.8.3
✔ tidyr   0.8.3     ✔ stringr 1.4.0
✔ ggplot2 3.2.0     ✔ forcats 0.4.0
── Conflicts ───────────────────────────────────────────────── tidyverse_conflicts() ──
✖ tidyr::complete() masks RCurl::complete()
✖ dplyr::filter()   masks stats::filter()
✖ dplyr::lag()      masks stats::lag()

Datasets

gEQdata <- read.csv(file = url)
Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
  'file' must be a character string or connection

Explore Data

summary(gEQdata)
      time                        latitude        longitude          depth       
 Min.   :2017-12-26 21:19:32   Min.   :-62.51   Min.   :-180.0   Min.   : -3.26  
 1st Qu.:2018-01-03 04:26:26   1st Qu.: 35.66   1st Qu.:-149.5   1st Qu.:  3.82  
 Median :2018-01-10 07:10:53   Median : 38.82   Median :-121.1   Median :  8.30  
 Mean   :2018-01-10 05:05:26   Mean   : 42.27   Mean   :-118.0   Mean   : 23.61  
 3rd Qu.:2018-01-17 01:01:44   3rd Qu.: 58.19   3rd Qu.:-116.8   3rd Qu.: 17.30  
 Max.   :2018-01-25 21:02:41   Max.   : 84.66   Max.   : 180.0   Max.   :666.46  
                                                                                 
      mag           magType               nst              gap       
 Min.   :-0.820   Length:9243        Min.   :  0.00   Min.   : 13.0  
 1st Qu.: 0.700   Class :character   1st Qu.:  8.00   1st Qu.: 73.0  
 Median : 1.200   Mode  :character   Median : 14.00   Median :109.0  
 Mean   : 1.486                      Mean   : 18.74   Mean   :124.8  
 3rd Qu.: 1.900                      3rd Qu.: 23.00   3rd Qu.:163.0  
 Max.   : 7.900                      Max.   :289.00   Max.   :356.0  
 NA's   :1                           NA's   :3743     NA's   :2901   
      dmin              rms             net                 id           
 Min.   : 0.0001   Min.   :0.0000   Length:9243        Length:9243       
 1st Qu.: 0.0184   1st Qu.:0.0900   Class :character   Class :character  
 Median : 0.0556   Median :0.1800   Mode  :character   Mode  :character  
 Mean   : 0.4992   Mean   :0.2973                                        
 3rd Qu.: 0.1500   3rd Qu.:0.4600                                        
 Max.   :37.2230   Max.   :4.1200                                        
 NA's   :2953      NA's   :3                                             
    updated                       place               type           horizontalError
 Min.   :2017-12-26 22:20:20   Length:9243        Length:9243        Min.   : 0.00  
 1st Qu.:2018-01-08 17:59:25   Class :character   Class :character   1st Qu.: 0.25  
 Median :2018-01-13 02:32:21   Mode  :character   Mode  :character   Median : 0.42  
 Mean   :2018-01-13 17:03:22                                         Mean   : 1.75  
 3rd Qu.:2018-01-19 23:05:28                                         3rd Qu.: 1.10  
 Max.   :2018-01-25 21:15:05                                         Max.   :42.52  
                                                                     NA's   :3974   
   depthError          magError          magNst         status         
 Min.   :    0.00   Min.   :0.0000   Min.   :  0.0   Length:9243       
 1st Qu.:    0.42   1st Qu.:0.0990   1st Qu.:  4.0   Class :character  
 Median :    0.78   Median :0.1560   Median :  8.0   Mode  :character  
 Mean   :   12.46   Mean   :0.1881   Mean   : 16.4                     
 3rd Qu.:    1.90   3rd Qu.:0.2330   3rd Qu.: 18.0                     
 Max.   :45969.50   Max.   :4.4500   Max.   :551.0                     
 NA's   :3          NA's   :3127     NA's   :2971                      
 locationSource      magSource        
 Length:9243        Length:9243       
 Class :character   Class :character  
 Mode  :character   Mode  :character  
                                      
                                      
                                      
                                      
max(gEQdata$mag, rm.na = TRUE)
[1] NA

Interesting findings

Magnitude maximum is max(gEQdata$mag)

LS0tCnRpdGxlOiAiRWFydGhxdWFrZSBOb3RlYm9vayIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKCiMgRWFydGhxdWFrZSBBbmFseXNpcwoKIyMgU2V0dXAKCiMjIyBMaWJyYXJpZXMKCmBgYHtyIGxpYnJhcmllc30KbGlicmFyeSh0aWR5dmVyc2UpCmxpYnJhcnkocmVhZHIpICNzaG91bGQgYmUgaW4gdGlkeXZlcnNlCmxpYnJhcnkoUkN1cmwpCmBgYAoKIyMjIERhdGFzZXRzCgpgYGB7ciBnbG9iYWwgZWFydGhxdWFrZSBkYXRhfQpkbCA8LSBnZXRVUkwoJ2h0dHBzOi8vd3d3LmVuZ2luZWVyaW5nYmlnZGF0YS5jb20vd3AtY29udGVudC91cGxvYWRzL2VhcnRocXVha2VfYWxsLmNzdicpCmdFUWRhdGEgPC0gcmVhZF9jc3YoZmlsZSA9IGRsKQpgYGAKCiMjIyBFeHBsb3JlIERhdGEKCmBgYHtyfQpzdW1tYXJ5KGdFUWRhdGEpCmBgYAoKYGBge3J9Cm1heChnRVFkYXRhJG1hZywgcm0ubmEgPSBUUlVFKQpgYGAKCgojIyMjIEludGVyZXN0aW5nIGZpbmRpbmdzCgoqKk1hZ25pdHVkZSoqIG1heGltdW0gaXMgYG1heChnRVFkYXRhJG1hZylgCg==