An end-to-end machine learning system that predicts daily typhoon risk across the Western Pacific Ocean using NOAA OISST, ERA5, and IBTrACS datasets. The project integrates data preprocessing, feature engineering, XGBoost-based risk prediction, explainable AI (SHAP), and an interactive Streamlit dashboard.
π Live Demo: https://typhoon-risk-analyser.streamlit.app/
π GitHub Repository: https://github.com/Bharanikumar55/Typhoon-Risk-Analysis
Typhoons are among the most destructive natural disasters in the world, forming over warm ocean waters in the Western Pacific. This project builds an end-to-end data science pipeline β from raw scientific datasets to a deployed interactive web application β that predicts daily typhoon risk for any location in the Western Pacific region.
Unlike typical ML projects that use pre-cleaned Kaggle datasets, this project works with raw scientific reanalysis and satellite data used by actual climate researchers, requiring significant domain knowledge and data engineering effort.
- Multi-source data fusion β integrates 3 independent scientific datasets (NOAA OISST, ERA5, IBTrACS) with different spatial resolutions and time frequencies
- Custom spatiotemporal label generation β typhoon presence labels generated using Haversine distance formula applied to storm track coordinates
- 10 years of data β trained on 2011β2019, tested on completely unseen year 2020 (genuine temporal generalization)
- Physically meaningful results β SHAP analysis confirms the model learned real meteorological patterns (low pressure = typhoon)
- Interactive deployment β Streamlit app allows exploration of any date from 2011β2020
| Parameter | Value |
|---|---|
| Region | Western Pacific Ocean |
| Latitude | 5Β°N β 45Β°N |
| Longitude | 120Β°E β 160Β°E |
| Time Period | 2011 β 2020 (JuneβNovember) |
| Spatial Resolution | 1Β° Γ 1Β° |
| Temporal Resolution | Daily |
This region covers the Philippine Sea, East China Sea, and waters surrounding Japan β the most active typhoon basin in the world.
| Dataset | Source | Variables | Resolution |
|---|---|---|---|
| NOAA OISST v2.1 | https://www.ncei.noaa.gov/products/optimum-interpolation-sst | Sea Surface Temperature (SST) | 0.25Β° Γ Daily |
| ERA5 Reanalysis (ECMWF) | https://cds.climate.copernicus.eu/ | Mean Sea Level Pressure (MSL), 10 m U-Wind, 10 m V-Wind | 0.25Β° Γ Hourly |
| IBTrACS v4 | https://www.ncei.noaa.gov/products/international-best-track-archive | Tropical Cyclone Tracks | 6-hourly |
Study Period: 2011β2020 (JuneβNovember)
Study Region: Western Pacific (5Β°Nβ45Β°N, 120Β°Eβ160Β°E)
Raw Data (NetCDF)
β
βΌ
βββββββββββββββββββββββββββββββββββββββ
β Phase 1: Data Preprocessing β
β β’ SST: crop region, filter months β
β β’ ERA5: PaβhPa, compute wind speed β
β β’ ERA5: hourly β daily averages β
βββββββββββββββββββ¬ββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββ
β Phase 2: Dataset Alignment β
β β’ Coarsen SST: 0.25Β° β 1Β° β
β β’ Interpolate ERA5 onto SST grid β
β β’ Merge into unified env dataset β
βββββββββββββββββββ¬ββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββ
β Phase 3: Label Generation β
β β’ Filter IBTrACS: WP basin β
β β’ Haversine distance per grid cell β
β β’ Label = 1 if storm within 300km β
βββββββββββββββββββ¬ββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββ
β Phase 4: ML Training β
β β’ Logistic Regression β
β β’ Random Forest β
β β’ XGBoost (best model) β
β β’ Temporal train/test split β
βββββββββββββββββββ¬ββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββ
β Phase 5: Deployment β
β β’ Streamlit interactive app β
β β’ Daily risk maps β
β β’ Predicted vs actual comparison β
βββββββββββββββββββββββββββββββββββββββ
| Model | AUC-ROC |
|---|---|
| Logistic Regression | 0.9145 |
| Random Forest | 0.8924 |
| XGBoost | 0.9350 β |
| Metric | Value |
|---|---|
| AUC-ROC | 0.86 |
| Typhoon Recall | 0.64 |
| Training Period | 2011β2019 |
| Test Period | 2020 (unseen) |
The model was deliberately tested on a completely unseen year (2020) rather than a random split β this demonstrates genuine temporal generalization, a much stronger evaluation than standard cross-validation.
All three models significantly outperform random guessing. XGBoost (green) achieves the best performance, hugging the top-left corner most closely.
Typhoon-present cells represent only ~2.4% of all data β a severe class imbalance. This was addressed using scale_pos_weight in XGBoost and class_weight='balanced' in other models, combined with stratified splitting.
Both XGBoost and Random Forest consistently rank Sea Level Pressure as the dominant predictor (~65% importance in XGBoost). This aligns with meteorological theory β typhoons are extreme low-pressure systems.
SHAP values confirm the model learned physically meaningful patterns:
- Low pressure (blue dots, left) β strong positive typhoon signal
- High wind speed (red dots, right) β positive typhoon signal
- High SST (red dots) β weak positive signal
The pressure dependence plot reveals a clear threshold around 1010 hPa β below this, typhoon risk increases sharply. This is consistent with known meteorology.
Daily predicted risk vs actual typhoon labels:
The model successfully identifies the circular low-pressure structure of a typhoon β a pattern it learned purely from data, without being explicitly programmed with any meteorological rules.
Average risk across the entire 2011 typhoon season:
The highest average risk zone (deep red) is centered around 15β30Β°N, 120β130Β°E β the Philippine Sea β which is the most active typhoon genesis region in the Western Pacific. The model correctly learned this spatial pattern from historical data.
typhoon_project/
β
βββ data_raw/
β βββ sst/ # NOAA OISST NetCDF files (2011β2020)
β βββ era5/ # ERA5 reanalysis NetCDF files (2011β2020)
β βββ ibtracs/ # IBTrACS storm track data
β
βββ data_processed/
β βββ environmental_YYYY_jun_nov.nc # Combined SST+MSL+Wind (per year)
β βββ labels_YYYY_jun_nov.nc # Typhoon labels (per year)
β βββ X_multiyear.npy # Final ML feature matrix
β βββ y_multiyear.npy # Final ML labels
β βββ xgb_final_model.pkl # Trained XGBoost model
β
βββ notebooks/
β βββ era5.ipynb # ERA5 preprocessing
β βββ sst.ipynb # SST preprocessing
β βββ align_sst_era5.ipynb # Dataset alignment
β βββ labels_ibtracs.ipynb # Label generation
β βββ 05_dataset_construction.ipynb
β βββ 06_baseline_models.ipynb
β βββ 07_shap.ipynb
β βββ 08_risk_map.ipynb
β βββ 09_multiyear_pipeline.ipynb
β
βββ app.py # Streamlit deployment
βββ requirements.txt
βββ README.md
git clone https://github.com/bharanikumar55/typhoon-risk-analyzer
cd typhoon-risk-analyzerpip install -r requirements.txtDownload the following datasets and place in data_raw/:
- NOAA OISST SST: PSL NOAA
- ERA5 Reanalysis: Copernicus CDS β variables:
u10,v10,msl; region: 5Β°Nβ45Β°N, 120Β°Eβ160Β°E - IBTrACS: NCEI IBTrACS
era5.ipynb β sst.ipynb β align_sst_era5.ipynb β labels_ibtracs.ipynb
β 05_dataset_construction.ipynb β 06_baseline_models.ipynb
β 07_shap.ipynb β 08_risk_map.ipynb β 09_multiyear_pipeline.ipynb
streamlit run app.pyxarray
numpy
pandas
matplotlib
cartopy
scikit-learn
xgboost
shap
streamlit
joblib
netCDF4
| Aspect | This Project | Typical Student Project |
|---|---|---|
| Data source | Raw scientific NetCDF (ERA5, NOAA, IBTrACS) | Pre-cleaned Kaggle CSV |
| Label generation | Custom Haversine-based spatial labeling | Pre-made labels |
| Train/test split | By year (temporal) | Random shuffle |
| Evaluation | AUC-ROC, F1, temporal generalization | Accuracy only |
| Explainability | SHAP values with physical validation | None |
| Deployment | Live Streamlit app | None |
Bharani Kumar Madisetty
This project is licensed under the MIT License.






