Investigating California’s Seismic Record with Mathematica

Dan Bridges
Parallel Thinking
Published in
3 min readSep 10, 2019
The final result of our investigation, a time lapse movie showing how earthquakes initiate and propagate throughout California.

While deciding whether to purchase or forgo earthquake insurance, I became curious about California’s seismic record. We’ve heard of the big urban earthquakes: 1906 San Francisco, 1989 Loma Prieta, 1994’s Northridge quake, but what about large earthquakes away from populated areas, or moderate earthquakes near smaller cities? Fortunately it was pretty easy to put together some charts, and even a movie, with Mathematica to get a sense of where earthquakes commonly strike in California.

We will use Mathematica’s builtin function EarthquakeData to load information for earthquakes occurring in California since 1850 which had a magnitude of 4.5 or greater.

With this data it is easy to plot a bubble chart to get a quick sense of the geographic distribution of the earthquakes.

California earthquakes since 1850 M4.5+

We can immediately see that earthquakes are not uniformly distributed across the state. A number of fault lines are readily distinguishable, especially the San Andreas fault, running alongside the coastline before turning slightly inland near the San Francisco Bay, and the Garlock fault, which runs in a more east-west direction at the bottom of the Central Valley.

We can cluster these to make the regional events more distinguishable.

The Map[Association...] is needed because FindClusters oddly transforms each result to a list of rules, rather than an association.

The same earthquakes, but clustered by region.

Earthquakes along the San Andreas fault are in red, as well as the cluster of purple at the top, and some of the orange at the bottom. The Garlock Fault is in green. It is notable that activity along the San Andreas fault is not uniform, there are certain areas which are much more active, separated by sections with low activity.

We can view the activity of each region over time with another bubble chart:

The distribution of earthquakes in time shows some regions with consistent activity (see red), while the activity in other regions is more clustered (dark purple, green).

We can also visualize the historical activity as a point cloud. This allows us to see with finer detail how earthquakes cluster together in space and time.

Finally, to create the video at the top, we use our original bubble chart, but apply an opacity to all events so that they gradually fade out over 25 years. This lets us really get a sense of how earthquakes propagate. Interestingly some earthquakes appear out of nowhere—the 1906 San Francisco earthquake rocks the Bay Area, but another earthquake does not occur nearby for the next 100 years. Other regions, such as near San Jose and Santa Cruz, have consistent ongoing activity. The build up to Loma Prieta (slightly south of San Jose) in 1989 is especially interesting as you see foreshocks and aftershocks initiate and propagate along the fault lines.

The full notebook is available here: https://gist.github.com/dbridges/835e7729908446746cf189b115896650/archive/7d4011fe0fc3e0a020d2dc05d15df52bbf1ed90c.zip

--

--

Dan Bridges
Parallel Thinking

Software developer at Beezwax Datatools and former researcher in Physics & Neuroscience.