‹‹‹ Blog Overview

Earthquakes 2010-2019
10 years of earthquakes visualized

I got inspired to visualize and animate 10 years of earthquakes in 3D and documented how the video was made, enabling its relatively easy reproduction.

  • OpenStreetMap
  • Python
  • USGS
  • animation
  • earthquake
  • geophysics
  • globe
  • open data
  • rendering
  • scientific-visualization
  • video
  • visualization
Video 1: Earthquakes 2010-2019, 1356502 events, depth exaggerated by a factor of 6

Source code

This complete source code is hosted on Github.

Open Data

  • earthquakes: United States Geological Survey (USGS)
  • contours: Copyright © OpenStreetMap contributors / Open Database License 1.0

Open Source Software (dependencies)

  • pycairo: 2D rendering
  • custom ray-tracer: 3D to 2D
  • numpy & numba: acceleration
  • zarr: data handling & storage
  • ffmpeg: video encoding

Rendering the video yourself

Ensure that you have the following software installed, ideally on Linux:

  • python (3.6 or newer)
  • cairo (plus header / development files)
  • zlib (plus header / development files)
  • ffmpeg
  • gcc
  • git

Clone this repository from Github and change into its directory:

git clone https://github.com/pleiszenburg/earthquakes_youtube01.git
cd earthquakes_youtube01/
Source code 1: Cloning the repository from Github

Create a new virtual environment if desired and activate it:

python3 -m venv env
source env/bin/activate
pip install -U pip setuptools
Source code 2: Creating a virtual environment and subsequently updating pip and setuptools

Now you can install the dependencies, fetch the data and render the video:

pip install -r requirements.txt
Source code 3: Installing dependencies and going through all further steps to create the video

‹‹‹ Blog Overview