When Albert Einstein visited Beno Gutenberg, a seismologist at Caltech, in 1933, the two strolled around the Pasadena campus while Gutenberg explained earthquake science. Suddenly their wives arrived to inform them there had been a massive earthquake. “We had become so involved in seismology,” recalled Gutenberg later, “that we hadn’t noticed.”
The data included here is provided by GeoNet New Zealand. For more details see https://www.geonet.org.nz/.
eq <- read_csv(url)
The dataset includes details on 260,997 observations between the start of 2010 and the end of 2020, not all of which are relevant to the current analysis. It includes measurements originating from outside New Zealand, as well as seismic events which aren’t strictly earthquake-related, such as volcanic eruptions and quarry blasting1 Somewhat unsettlingly, the dataset also includes ‘nuclear explosion’ as a seismic event - a measurement originating from North Korean underground testing..
eq <- eq %>%
filter(magnitude > 0,
longitude < 180 & longitude > 160,
latitude < -29)
eq$date <- ymd_hms(eq$origintime)
eq$month <- factor(month(eq$date),
labels = c("Jan","Feb","Mar","Apr","May","Jun",
"Jul","Aug","Sep","Oct","Nov","Dec"))
eq$year <- factor(year(eq$date))
After a quick clean to remove rogue data points2 Removed entries include those with less than zero magnitude, or that lie outside of the immediate geographic surroundings of New Zealand., two subsets are created for further analysis - one with all readings that can be directly attributed to earthquakes, and another with only strong earthquakes.
eq_all <- eq %>%
filter(eventtype == "earthquake")
eq_strong <- eq %>%
filter(eventtype == "earthquake",
magnitude >= 6)
What follows is a quick breakdown of the entire dataset by event type, including average magnitude and depth (in kms):
eq$eventtype <- str_to_sentence(eq$eventtype)
eq %>%
group_by(eventtype) %>%
summarise(Count = n(),
Magnitude = round(mean(magnitude),1),
Depth = round(mean(depth),1)) %>%
knitr::kable()
| eventtype | Count | Magnitude | Depth |
|---|---|---|---|
| Debris avalanche | 2 | 2.6 | 0.0 |
| Duplicate | 1 | 2.2 | 12.2 |
| Earthquake | 142178 | 2.4 | 42.6 |
| Experimental explosion | 4 | 1.9 | 0.0 |
| Explosion | 43 | 1.2 | 0.3 |
| Induced earthquake | 1 | 2.2 | 5.0 |
| Landslide | 4 | 2.7 | 0.0 |
| Not locatable | 197 | 1.9 | 56.1 |
| Nuclear explosion | 1 | 1.1 | 50.2 |
| Other | 6 | 1.2 | 4.4 |
| Outside of network interest | 1444 | 3.8 | 189.0 |
| Quarry blast | 575 | 2.2 | 0.3 |
| Snow avalanche | 4 | 2.3 | 0.0 |
| Volcanic eruption | 3 | 1.6 | 0.7 |
| NA | 106011 | 2.0 | 39.8 |
As the table suggests, discarding measurements not directly related to earthquakes will leave us with 142,178 records.
The vast majority of earthquakes will pass by unremarked on by anyone other than seismic specialists. From year to year, the average magnitude of a quake hovers around 2 to 2½, with only outliers breaking through the 5 richter mark.
It’s hard to discern the impact that major earthquakes have on the distributions. Major quakes in 2010, 2011 and 2016 brought large waves of aftershocks in their wake, but don’t seem to have reshaped the plot to a significant degree.
eq_all %>%
ggplot(aes(x = year, y = magnitude)) +
geom_boxplot(outlier.alpha = 0.1) +
theme_minimal() +
labs(x = "", y = "Magnitude (Richter scale)") +
theme(axis.ticks.x = element_blank())
The major earthquakes and their accompanying wave of aftershocks are much more easily discernible when viewed over time. Three jump out of the data: the Darfield quake of 2010, Christchurch in 2011, and Kaikoura in 2016.
The persistence of aftershocks seems to be related to the depth of the initial quake3 Caution should be exercised when leaping to conclusions in light of the range of factors involved - the Kaikoura quake in particular has been described as ‘the most complex quake ever studied,’ involving over twenty-five faults rupturing simultaneously.. The Christchurch earthquake of 2011 was relatively shallow at a depth of 5km, and saw a sustained peak of quakes for two months afterward. 2016’s quake in Kaikoura on the other hand was three times as deep, and saw a strong peak in quake numbers before dropping off quickly.
eq_all_grouped <- eq_all %>%
group_by(month, year) %>%
summarise(total = n())
eq_all_grouped %>%
ggplot(aes(year, month, fill = total)) +
geom_tile() +
theme(panel.background = element_blank()) +
scale_y_discrete(limits = rev(levels(eq_all_grouped$month))) +
scale_fill_viridis(labels=function(x)
format(x, big.mark = ",",
scientific = FALSE)) +
labs(x = "Year", y = "Month", fill = "Quakes")
table(eq_all$month, eq_all$year) %>%
knitr::kable()
| 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Jan | 1839 | 1928 | 890 | 551 | 373 | 582 | 617 | 900 | 449 | 1491 | 1628 |
| Feb | 1914 | 3027 | 320 | 480 | 177 | 394 | 579 | 761 | 457 | 1603 | 1567 |
| Mar | 1789 | 2824 | 349 | 459 | 250 | 613 | 728 | 1393 | 497 | 2012 | 1603 |
| Apr | 1799 | 2070 | 469 | 471 | 313 | 492 | 698 | 1256 | 389 | 1940 | 1653 |
| May | 1898 | 2028 | 396 | 473 | 304 | 599 | 638 | 1370 | 376 | 2229 | 1976 |
| Jun | 1554 | 1976 | 367 | 436 | 330 | 431 | 646 | 1053 | 436 | 2379 | 1773 |
| Jul | 2031 | 1447 | 504 | 1369 | 353 | 502 | 585 | 774 | 422 | 1754 | 1530 |
| Aug | 1618 | 1669 | 424 | 1196 | 379 | 597 | 576 | 714 | 481 | 1574 | 1734 |
| Sep | 3888 | 1636 | 547 | 576 | 394 | 452 | 1391 | 662 | 505 | 1574 | 1381 |
| Oct | 2360 | 1486 | 502 | 539 | 378 | 552 | 670 | 770 | 629 | 1626 | 1588 |
| Nov | 2055 | 1555 | 524 | 457 | 435 | 587 | 4015 | 734 | 450 | 1402 | 1497 |
| Dec | 1752 | 2210 | 567 | 408 | 573 | 533 | 1026 | 574 | 1257 | 1442 | 1524 |
People look upon the natural world as if all motions of the past had set the stage for us and were now frozen. To imagine that the turmoil is in the past and somehow we are now in a more stable time seems to be a psychological need. … [But] the time we’re in is just as active as the past. The time between events is long only with respect to a human lifetime.
Longitude and latitude records for each observation allow them to be projected onto a map of the country, and grouped by location.
The fault systems that run the length of the country can be discerned in the location of these clusters. Large groups of quakes are evident in Fiordland, following the Southern Alps northward, before crossing over into Canterbury, and into Marlborough beyond. Clusters in the North Island follow a more or less direct line from Wellington to the Bay of Plenty.
Centres distant from faultlines experience a comparatively tiny number of events - despite being located on a volcanic field, Auckland saw less than 200 quakes of any size in a decade, and Dunedin little over half that.
nz_long <- 174.8860
nz_lat <- -41.2749
leaflet() %>%
setView(lng = nz_long, lat = nz_lat, zoom = 5) %>%
addProviderTiles("Esri.WorldStreetMap") %>%
addMarkers(data = eq_all, clusterOptions = markerClusterOptions())
The Richter scale defines a strong quake as greater than 6 in magnitude, of which there are approximately 100 to 150 globally each year. In everyday terms, a ‘strong’ earthquake is one expected to cause widespread damage to structures. The Christchurch quake of 2011 measured 6.3, levelling modern buildings and damaging others beyond repair.
The mapping also highlights the largely forgotten 2016 Te Araroa earthquake, which took place more than a hundred kilometers off the coast of the East Cape. Despite a cluster of three major quakes as well as a significant number of strong aftershocks, no injury or major damage was reported.
pal <- colorNumeric(palette = "plasma",
domain = eq_strong$magnitude)
leaflet() %>%
setView(lng = nz_long, lat = nz_lat, zoom = 5) %>%
addProviderTiles("Esri.WorldStreetMap") %>%
addCircles(
data = eq_strong,
radius = sqrt(10 ^ eq_strong$magnitude) * 10,
color = ~ pal(eq_strong$magnitude),
popup = paste0(
"<strong>Date: </strong>",
eq_strong$date, "<br>",
"<strong>Magnitude: </strong>",
round(eq_strong$magnitude, 2), "<br>",
"<strong>Depth (km): </strong>",
round(eq_strong$depth, 0)),
popupOptions = popupOptions(closeonclick = TRUE)) %>%
addLegend(
data = eq_strong, "bottomright",
pal = pal, values = ~ magnitude,
title = "Magnitude", opacity = 0.8)