A data science pipeline and Scikit-learn Gradient Boosting model for 15-minute forecasting of geomagnetic storm risk from NASA/NOAA datasets.
Live Deployments:
- Interactive Streamlit App: solarwind-forecaster.streamlit.app
SolarWind Forecaster is a space weather analytics system designed to predict short-term geomagnetic storm disturbances (
graph TD
subgraph "Data Ingestion"
A[NASA OMNIWeb 1-min Data] -->|Download & Clean| B(omni.csv)
C[NOAA XRS Flare Data] -->|Parse Reports| D(flare_reports.csv)
end
subgraph "Feature Engineering"
B --> E{Generate Rolling Windows}
D --> E
E --> F[dataset.csv]
end
subgraph "Model Training"
F --> G(Train/Test Split)
G --> H{Gradient Boosting Regressor}
H -->|Hyperparameter Tuning| I[models/symh_model.joblib]
end
subgraph "Inference & UI"
I --> J[Streamlit Dashboard]
J -->|Real-Time Predictions| K[Geomagnetic Storm Risk %]
end
classDef io fill:#f9f0ff,stroke:#8a2be2,stroke-width:2px,color:#000;
classDef core fill:#e1f5fe,stroke:#0288d1,stroke-width:2px,color:#000;
classDef logic fill:#e8f5e9,stroke:#388e3c,stroke-width:2px,color:#000;
class A,C,K io;
class B,D,F,G,I core;
class E,H,J logic;
| Feature | Description |
|---|---|
| Space Weather Ingestion | Automated parsers for high-cadence 1-minute NASA OMNI interplanetary magnetic field (IMF) and plasma datasets |
| Temporal Lag Engineering | Generates 15-minute and 60-minute rolling window statistics (mean, variance, min/max) capturing solar shock wave transitions |
| Gradient Boosting Core | Scikit-learn ensemble regression tuned against multi-decade solar cycle historical records |
| Exploratory Visualizations | Interactive Streamlit interface displaying real-time predictions, historical storm distributions, and feature importance rankings |
| Pipeline Automation | Automated Makefile workflows and continuous integration suites via GitHub Actions |
| Component | Technologies |
|---|---|
| Machine Learning | Scikit-learn (GradientBoostingRegressor), Joblib |
| Data Engineering | Pandas, NumPy, SciPy |
| Visualizations | Matplotlib, Seaborn, Streamlit |
| Automation & CI | Makefile, pytest, ruff, GitHub Actions CI |
SolarWind-Forecaster/
├── configs/ # Pipeline configuration files
├── models_deploy/ # Serialized model weights and training metadata
├── notebooks/ # Exploratory Data Analysis and evaluation notebooks
├── reports/ # Model validation reports and plots
├── scripts/ # Space weather data fetchers and mock generators
├── src/ # Production pipeline modules
│ ├── data_ingestion.py # NASA/NOAA dataset download and parsing
│ ├── feature_engineering.py # Rolling windows and temporal lag computation
│ ├── data_sharding.py # Time-series cross-validation sharding
│ ├── model_training.py # Model training loop and hyperparameter optimization
│ ├── model_inference.py # Real-time inference wrappers
│ └── experiments/ # Exploratory research experiments
├── tests/ # Automated test suite
├── app.py # Streamlit interactive dashboard
├── Makefile # Automation targets (data, features, train, dashboard)
├── requirements.txt # Python dependencies
├── ruff.toml # Code linting configuration
└── README.md
- Python 3.11+
makeutility (optional, for automation shortcuts)
git clone https://github.com/Shashank17singh/SolarWind-Forecaster.git
cd SolarWind-Forecasterpip install -r requirements.txtExecute the end-to-end data pipeline using the Makefile:
# 1. Download and parse raw NASA/NOAA telemetry
make data
# 2. Extract rolling time-series features and lags
make features
# 3. Shard dataset and train Gradient Boosting model
make trainLaunch the Streamlit visualization interface:
make dashboard
# Or directly:
streamlit run app.pyOpen http://localhost:8501 in your browser.
Execute automated unit tests with pytest:
pytest tests/Run static code analysis and linting:
ruff check .Live deployment is hosted on Streamlit Community Cloud at solarwind-forecaster.streamlit.app.
Continuous Integration is enforced via .github/workflows/ci.yml, running automated unit tests and code validation on every push.
- Satellite Telemetry Dependency: Real-time geomagnetic predictions rely on continuous solar wind feeds from upstream satellites (ACE / DSCOVR); network dropouts trigger fallback forward-fill imputation.
- Forecasting Horizons: The 15-minute prediction horizon provides tactical operational warning for geomagnetically induced currents; extended multi-hour forecasting requires assimilating coronal mass ejection (CME) kinematic models.
This project is licensed under the MIT License. See LICENSE for details.