The map below displays earthquakes with magnitudes greater than or equal to 3.
Use the dropdown selector left of the map to select the year. The map is fully interactive:
you can zoom in/out, and hovering over the earthquake markers will display the magnitude and
a description of the location.
Prior to working in the environmental consulting industry and right after I graduated with my MS,
I worked for the Oklahoma Geological Survey where I was involved in a project related to the
increase in seismic events in Oklahoma. As this was back in 2016, I thought it would be neat
to revisit the problem and look at the abundance of new data with my new analytical and programming
skill set.
This map is part of a larger analyical project involving modeling the relationship between
wastewater injection and seismicity.
Naturally, this map starts with the collection of data: the earthquake data was collected from
the United States Geological Survey (USGS) using their API (
USGS Earthquake API).
The returned GeoJSON files (multiple files were required as the API only allows for a max of 20,000
items per request) were cleaned using a python script to remove errors (e.g., entries with NULL
coordiantes or descriptions). The cleaned data were then combined into one file and imported into
a PostgreSQL database using PGAdmin.
After querying for earthquakes with magnitude greater than or equal to 3, the data were exported
to a CSV file and imported into a Jupyter Notebook for Plotly testing: the Plotly documentation
is pretty sparce for more complicated maps involving multiple traces and dropdown menus.
After the proof-of-concept map was completed, further reduction of the CSV data was completed to
reduce the memory burden for constructing the map via the internet and to reduce runtime of the
Python script. Lastly, the script was refactored from the Jupyter Notebook to function within
the Django framework.
As you can see from the map, the increase in earthquakes occured around 2010,
which correlates with the increase in wastewater injection in the Arbuckle Fomation in Oklahoma.
Seismic activity peaked in 2016 with a corresponding peak in injection volumes; however, following
the increase in earthquakes, and the notable large M5.8 earthquake near Pawnee, injection rates were
decreased. Since the peak in 2016, earthquake rates have been decreasing.
I hope it's informative; it was fun to make.