Breaking: SF Tsunami Risk—We built a real-time tracking app in minutes with Preswald

Breaking: SF Tsunami Risk—We built a real-time tracking app in minutes with Preswald

Amrutha GujjarAmrutha Gujjar5 min read

Category: Use Case


Tsunami warnings have cast a shadow over San Francisco’s coastline following recent earthquakes, reminding us all of how fragile the boundary between calm and chaos can be.

img

To address this need, we quickly built a custom data app using the USGS Earthquake Hazards Program API and Preswald

Here’s how it came together:

🌐 Step 1: Plugging into the Pulse of the Earth

With a few lines of comment-driven code, Preswald seamlessly connected to the USGS Earthquake Hazards Program API. Python scripts were auto-generated to fetch live seismic and tsunami risk data through dlt, depositing it safely into a local Postgres instance.

The result? A steady stream of up-to-the-minute data ready to be explored.


🧠 Step 2: Making Sense of the Chaos

Preswald made it easy to define schemas and apply SQL transformations to the data. Want to identify seismic hotspots or analyze trends by region and time? Preswald pre-suggested queries that got us there in a few clicks.


🔄 Step 3: Keeping it Fresh

Earthquake data can be overwhelming—but Preswald thrives in complexity. By surfacing schema definitions and suggesting SQL transformations, it let us dive into trends, like identifying seismic hotspots and analyzing activity by time and region.

What once took hours of SQL wrangling was done in minutes.


📊 Step 4: Seeing the Big Picture

Preswald transformed raw data into a visual story, generating Python code for an interactive app complete with a map to track seismic and tsunami activity. Whether running in VSCode or on a localhost, the app gave us instant insights with minimal setup.

San Francisco, stay alert and stay safe. The waves may rise, but with the right tools, so can we. 🌐

Try Preswald today!

https://github.com/StructuredLabs/preswald