Earthquake watch
earthquakes.py loads a fixed USGS weekly feed with Polars, a dataframe library for Python. It computes daily activity, a logarithmic magnitude comparison, a descriptive frequency–magnitude fit, filtered event membership, and one shared seismic_analysis value.
Compare the views
Earthquake watch
A seismic story, operations map, and interactive lesson share one weekly USGS model.
Scroll Story to move through the map sequence. In Operations, raise the minimum magnitude. The map, priority list, and summary resolve from 138 states prepared from the notebook's magnitude and review-status controls.
In Interactive lesson, use the comparison slider to recompute the amplitude and energy ratios. Then change the catalog filter and watch the selected count and epicenter map update inside the Reveal.js presentation. On the frequency slide, move the magnitude threshold to compare the observed cumulative count with the descriptive fit. The two lesson sliders select notebook-computed rows in the browser, while the catalog controls filter the projected weekly records. Press Esc to open the Reveal overview.
Open Notebook to inspect the equations, fitted values, and reactive controls that supply the three views.
Run locally
From the repository root:
uv run marimo edit examples/earthquakes.py --sandboxOpen Studio from the marimo editor, then switch among story, operations, and briefing. The notebook fetches the pinned GeoJSON map-data feed from raw.githubusercontent.com. MapLibre renders the maps, Observable Plot renders the charts, and Reveal.js supplies the presentation. Those libraries, fonts, and map styles can add browser network requests.
Read the source
Reveal.js supplies navigation, fragments, Auto-Animate, overview mode, slide numbers, and keyboard controls inside the presentation.