2023-04-30

Introduction

  • On 6. February 2023, a moment magnitude (\(\sf{M_{w}}\)) 7.8 earthquake occurred in southern and central Turkey and northern and western Syria. This earthquake was shortly followed by a \(\sf{M_{w}}\) 7.7 earthquake, located 95 km north-northeast from the first event.

  • Large earthquakes tend to produce aftershocks in the surrounding area for long periods of time. For magnitudes as large as those considered in this case, aftershocks can even occur for years after the main event.

  • In this assignment, I create a simple visualization of earthquakes that have occurred in the vicinity of the two major events during the past 30 days, to show recent aftershock occurrence over time. The interactive plot is created using the plotly package in R.

Acquiring the Data

The United States Geological Survey (USGS) provides continuously-updated datasets with earthquake data (location, time, magnitude, etc.) during recent time periods:

https://earthquake.usgs.gov/earthquakes/feed/v1.0/csv.php

First, I downloaded a dataset providing all earthquakes with magnitudes of at least 2.5 that have occurred globally over the past 30 days:

URL <- "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_month.csv"
global.quake.data <- read.table(URL, sep = ",", header = TRUE)
head(global.quake.data)
##                       time latitude  longitude  depth  mag magType nst gap
## 1 2023-05-01T07:59:37.624Z 25.93560  128.54660 10.000 5.40     mww  89  62
## 2 2023-05-01T07:54:05.629Z -9.42880  148.63740 10.000 4.90      mb  47 117
## 3 2023-05-01T05:28:23.530Z 19.40800 -155.26183  0.170 2.56      md  21  85
## 4 2023-05-01T05:18:12.647Z -6.12820  -81.38310 18.864 4.90      mb  58 135
## 5 2023-05-01T04:28:48.050Z 18.09483  -67.01317 21.210 3.02      md  22  61
## 6 2023-05-01T04:15:33.120Z 18.82933  -67.28850 52.980 3.00      md   9 282
##      dmin  rms net         id                  updated
## 1 0.93000 0.43  us us7000jxba 2023-05-01T08:45:23.137Z
## 2 1.45800 0.64  us us7000jxb8 2023-05-01T08:40:09.040Z
## 3      NA 0.09  hv hv73385282 2023-05-01T05:47:18.730Z
## 4 2.87900 0.98  us us7000jxax 2023-05-01T05:32:27.040Z
## 5 0.01665 0.15  pr pr71407408 2023-05-01T05:07:07.350Z
## 6 0.47800 0.18  pr pr71407403 2023-05-01T05:58:07.220Z
##                                         place       type horizontalError
## 1        80 km ESE of Katsuren-haebaru, Japan earthquake            4.98
## 2 eastern New Guinea region, Papua New Guinea earthquake            8.10
## 3                       Hawaii region, Hawaii earthquake            0.15
## 4                   88 km SW of Sechura, Peru earthquake            8.35
## 5         3 km ENE of San Germán, Puerto Rico earthquake            0.34
## 6                                Mona Passage earthquake            1.86
##   depthError   magError magNst   status locationSource magSource
## 1      1.775 0.08600000     13 reviewed             us        us
## 2      1.892 0.06500000     74 reviewed             us        us
## 3      0.200 0.08025229      4 reviewed             hv        hv
## 4      5.181 0.04200000    181 reviewed             us        us
## 5      0.570 0.01793368      5 reviewed             pr        pr
## 6      2.650 0.19080496      5 reviewed             pr        pr

Location Filtering

The data were filtered to only include earthquakes within a specified rectangular region surrounding the mainshocks:

  • longitude: 34.8 deg E to 42.6 E
  • latitude: 35.7 deg N to 39.8 deg N
minLon <- 34.8
maxLon <- 42.6
minLat <- 35.7
maxLat <- 39.8
subset.quake.data <- global.quake.data[global.quake.data$longitude >= minLon & 
                                           global.quake.data$longitude <= maxLon & 
                                           global.quake.data$latitude >= minLat & 
                                           global.quake.data <= maxLat, ]

Time Formatting

Next, the “time” column of the dataframe was formatted to only include the year, month and day (for clearer plotting).

subset.quake.data$time <- substr(subset.quake.data$time, 0, 10)
subset.quake.data$time <- as.Date(subset.quake.data$time)
head(subset.quake.data)
##           time latitude longitude  depth mag magType nst gap  dmin  rms net
## 36  2023-04-30  38.3404   37.6774 10.000 4.1      mb  30  60 0.911 1.16  us
## 121 2023-04-29  38.0984   36.4408 10.000 4.5      mb  42 100 0.309 1.09  us
## 163 2023-04-28  36.0905   36.0515 10.000 4.1      mb  32 110 1.426 1.12  us
## 194 2023-04-27  38.7706   37.1214  9.062 4.2      mb  26  67 0.660 0.87  us
## 230 2023-04-26  38.0109   36.4600  2.121 4.3      mb  37  49 0.397 0.65  us
## 256 2023-04-26  37.8797   36.3949 10.000 4.2      mb  27  51 0.302 0.62  us
##             id                  updated                       place       type
## 36  us7000jx6j 2023-05-01T06:11:24.246Z  25 km W of Akçadağ, Turkey earthquake
## 121 us7000jwv7 2023-04-29T02:14:38.040Z  9 km NNW of Göksun, Turkey earthquake
## 163 us7000jwk7 2023-04-28T05:31:32.040Z 3 km SW of Büyükçat, Turkey earthquake
## 194 us7000jwav 2023-04-27T16:16:15.040Z  14 km WNW of Gürün, Turkey earthquake
## 230 us7000jw1g 2023-04-26T23:09:24.040Z  3 km WSW of Göksun, Turkey earthquake
## 256 us7000jvy7 2023-04-27T03:08:07.040Z 18 km SSW of Göksun, Turkey earthquake
##     horizontalError depthError magError magNst   status locationSource
## 36             2.69      1.934    0.120     19 reviewed             us
## 121            3.65      1.917    0.075     52 reviewed             us
## 163            6.02      1.958    0.120     19 reviewed             us
## 194            3.36      0.514    0.235      6 reviewed             us
## 230            3.58      6.768    0.122     19 reviewed             us
## 256            2.26      1.967    0.263      4 reviewed             us
##     magSource
## 36         us
## 121        us
## 163        us
## 194        us
## 230        us
## 256        us

Magnitude Formatting

Then, earthquakes without a specified magnitude type are removed.

subset.quake.data <- drop_na(subset.quake.data, magType)

Plotting Earthquakes vs. Time

eq.time.plot <- ggplot(data = subset.quake.data, aes(x = time, y = mag, color = magType)) + geom_point()
ggplotly(eq.time.plot)