How ahmedshaban0/californiawildfire-prediction-digitaltwin works
This is a Streamlit wildfire-risk intelligence application: users navigate to a forecast, map, or digital-twin view; the app presents 24-hour risk estimates and environmental context on California’s grid. The principal forecast path combines regional or manual inputs with weather and cached geographic data, then uses the trained model and feature schema for risk outputs. Separate product branches provide 2D/3D visualization, performance evaluation, methodology, and system information. Relationships below are limited to excerpted imports/calls or README statements; unsampled implementation details are not inferred.
Main entry points: app.py Page router · data_loader.py Grid data access · prediction.py Prediction workflows · model_loader.py Inference and schema
Components 20
Application
- Page router
app.py - Shared design system
src/theme.py - Overview
pages_impl/overview.py
Risk forecasting
- Prediction workflows
pages_impl/prediction.py - Grid data access
src/data_loader.py - Inference and schema
src/model_loader.py - Trained pipeline
wildfire_model_pipeline.joblib - Feature schema
feature_schema.json - Curated snapshots
assets/curated_snapshots.parquet - Static grid cache
assets/california_grid_static.parquet
Geospatial views
- Interactive map
pages_impl/interactive_map.py - Leaflet renderer
src/leaflet_map.py - Digital twin page
pages_impl/digital_twin.py - 2D/3D renderer
src/twin_3d.py
Model and context
- Performance evaluation
pages_impl/performance.py - Methodology
pages_impl/methodology.py - About and governance
pages_impl/about.py
Other components
- App user
- Open-Meteo weather
- NASA FIRMS detections
Connections 27
- App user → Page router: navigates
app.py - Page router → Shared design system: applies
app.py - Page router → Overview: routes to
app.py - Page router → Prediction workflows: routes to
app.py - Page router → Interactive map: routes to
app.py - Page router → Digital twin page: routes to
app.py - Page router → Performance evaluation: routes to
app.py - Page router → Methodology: routes to
app.py - Page router → About and governance: routes to
app.py - Overview → Grid data access: loads grid data
pages_impl/overview.py - Overview → Inference and schema: loads inference
pages_impl/overview.py - Overview → 2D/3D renderer: renders view
pages_impl/overview.py - Prediction workflows → Grid data access: loads spatial data
pages_impl/prediction.py - Prediction workflows → Inference and schema: uses inference
pages_impl/prediction.py - Prediction workflows → Leaflet renderer: renders map
pages_impl/prediction.py - Prediction workflows → Open-Meteo weather: requests forecast
README.md - Inference and schema → Trained pipeline: loads pipeline
- Inference and schema → Feature schema: loads schema
- Grid data access → Curated snapshots: reads snapshots
README.md - Grid data access → Static grid cache: reads cache
README.md - Interactive map → Grid data access: loads grid data
pages_impl/interactive_map.py - Interactive map → Leaflet renderer: renders map
pages_impl/interactive_map.py - Leaflet renderer → NASA FIRMS detections: displays detections
README.md - Digital twin page → Grid data access: loads grid data
pages_impl/digital_twin.py - Digital twin page → 2D/3D renderer: renders twin
pages_impl/digital_twin.py - 2D/3D renderer → NASA FIRMS detections: visualizes detections
README.md - Performance evaluation → Inference and schema: loads pipeline
pages_impl/performance.py