How pramodrajsubedi/seismic-event-risk-intelligence-system works
This repository is a seismic-risk intelligence dashboard backed by a USGS-fed SQLite catalogue and an aftershock-risk classifier. The principal workflow is dashboard access, optional data setup, earthquake ingestion and regional/sequence enrichment, model training, then live prediction and historical analysis. The graph preserves the documented live map, predictor, analytics, SQL, EDA, and SHAP capabilities. Some dashboard and training excerpts are partial, so uncertain query execution and internal wiring are omitted.
Main entry points: app.py Streamlit dashboard · database.py SQLite database · setup_data.py Data setup · train.py Model training
Components 14
Earthquake data
- Data setup
src/setup_data.py - Catalog ingestion
src/ingest.py - Region assignment
src/seed_region.py - SQLite database
src/database.py
Seismic analysis
- Sequence builder
src/aftershock.py - SQL analyses
queiries/gutenberg.sql - EDA notebook
notebooks/eda.ipynb
Risk modeling
- Model training
src/train.py - Model artifacts
models/model.pkl - Feature scaler
models/scaler.pkl - Feature names
models/feature_names.pkl
Dashboard
- Streamlit dashboard
src/app.py
Other components
- Dashboard user
- USGS catalog
Connections 19
- Dashboard user → Streamlit dashboard: uses
- Streamlit dashboard → Data setup: initializes if needed
- Data setup → Catalog ingestion: fetches events
- Catalog ingestion → USGS catalog: requests catalog
- Data setup → SQLite database: initializes and writes
- Data setup → Region assignment: assigns regions
- Data setup → Sequence builder: builds sequences
- Region assignment → SQLite database: updates regions
- Sequence builder → SQLite database: reads events; writes sequences
- Catalog ingestion → SQLite database: inserts events
- Streamlit dashboard → USGS catalog: fetches live events
- Streamlit dashboard → SQLite database: reads historical data
- Streamlit dashboard → Model artifacts: loads classifier
- Streamlit dashboard → Feature scaler: loads scaler
- Streamlit dashboard → Feature names: loads feature order
- Model training → SQLite database: reads training data
- Model training → Model artifacts: saves classifier
- Model training → Feature scaler: saves scaler
- Model training → Feature names: saves feature order