The Use of Python in the Prompt Assessment of Global Earthquake Response (PAGER) System

Authors: Hearne, Michael, US Geological Survey

Track: Posters

At the US Geological Survey's National Earthquake Information Center (NEIC), the Prompt Assessment of Global Earthquakes for Response (PAGER) system operates in a real-time, 24x7 environment to deliver information about human impact from earthquakes to a list of critical customers and the general public. This system is implemented almost completely in Python, using a variety of built-in and publicly available libraries. I will provide an overview of PAGER and how some core Python libraries made its development possible with limited resources.

At its core, PAGER is a set of models that calculate population exposure, fatalities, and economic losses due to shaking. These calculations are optimized by using Numpy and Scipy libraries for efficient array operations and specialized algorithms (2-D interpolation, filtering, error functions, etc.).

In any complex software system, input/output (IO) and data storage become a significant portion of the source code. PAGER is no exception, and a number of libraries make this easier. The Scipy NetCDF module provides easy access to multi-dimensional scientific data sets. SQLAlchemy, an Object Relational Mapper (ORM) allows for vendor-independent database access (e.g., switching from MySQL to Postgres with a configuration change).

Any system that calculates information intended for decision makers must provide tools for visualization and communication of its results. PAGER uses standard libraries to deliver email and text messages, and also to package up content and send it to the NEIC web servers. I make substantial use of the Matplotlib and Basemap modules for creating data visualizations and maps of shaking intensity and affected population.

With a programming staff limited primarily to one developer, the use of an interpreted and dynamically-typed language for PAGER was a prerequisite. Python fits that definition, and also provides a vast array of robust libraries for scientific computing, advanced IO, database access, and data visualization.