Project 3 of the Warehouse Logistics Suite by Iyad Belkadi. Production-grade demand forecasting for warehouse operations โ Prophet, ARIMA, ensemble models, stock alerts, and reorder recommendations across 45 real French SKUs.
- 45 real French SKUs across 4 warehouse zones (Frozen, Fresh, Ambient, Heavy)
- 2 years of synthetic daily history with realistic seasonality, weekly patterns, French holidays, stockouts, and promotional spikes
- 4 forecasting models:
- Simple & weighted moving average (baselines)
- Prophet (Meta) with French holidays as regressors
- SARIMA with automatic AIC-based parameter selection
- Ensemble with dynamic inverse-MAE weighting per SKU
- Full accuracy suite โ MAE, RMSE, MAPE, bias, CI coverage
- Smart stock alerts โ CRITICAL ยท WARNING ยท WATCH ยท OK with safety-stock logic
- Reorder recommendations with priority scoring, supplier grouping, and PDF / Excel purchase-order exports
- Anomaly detection โ statistical z-score + tracked stockouts, promos, delivery surges
- Cross-SKU heatmaps & correlation matrix
- 10 interactive tabs in a polished dark-themed Streamlit UI
| Layer | Tool |
|---|---|
| UI | Streamlit + streamlit-extras + Plotly |
| Forecasting | Prophet ยท statsmodels (SARIMAX) ยท scikit-learn |
| Data | pandas ยท numpy |
| Exports | openpyxl (Excel) ยท reportlab (PDF) |
| Holidays | holidays (France) |
git clone https://github.com/iyadbelkadi/demand-forecasting-engine.git cd demand-forecasting-engine python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt streamlit run app.py
The first launch generates 2 years ร 45 SKUs โ 33,000 daily demand rows and caches them to data/sample_data.csv. Subsequent launches load instantly.
demand-forecasting-engine/
โโโ app.py # Streamlit application (10 tabs)
โโโ requirements.txt
โโโ README.md
โ
โโโ core/
โ โโโ preprocessor.py # Series extraction, train/test split
โ โโโ moving_avg.py # Simple + weighted MA baselines
โ โโโ prophet_model.py # Prophet wrapper + French holidays
โ โโโ arima_model.py # SARIMA with auto-AIC selection
โ โโโ ensemble.py # Inverse-MAE weighted ensemble
โ โโโ metrics.py # MAE, RMSE, MAPE, bias, coverage
โ โโโ alerts.py # Stock alert classification
โ โโโ recommender.py # Reorder priority + PDF/Excel export
โ โโโ orchestrator.py # Cached forecasting pipeline
โ
โโโ data/
โ โโโ catalog.py # 45 French SKUs (shared with Project 2)
โ โโโ generator.py # Synthetic 2-year history generator
โ โโโ sample_data.csv # Auto-generated cache
โ
โโโ assets/
โโโ style.css # Dark theme
| # | Tab | What it shows |
|---|---|---|
| 1 | Overview | KPI cards, top-10 urgent SKUs, zone health heatmap |
| 2 | Forecast | Deep-dive on one SKU with all 4 models + CI bands |
| 3 | Multi-SKU | Grid of Prophet forecasts (up to 10 SKUs) |
| 4 | Model Comparison | All 4 models on one chart + residual histograms |
| 5 | Seasonality | Prophet trend, weekly, yearly, holiday components |
| 6 | Alert Center | Filterable table of all 45 SKUs with alert levels |
| 7 | Reorder | Ranked reorder list + supplier grouping + PDF/Excel |
| 8 | Anomaly Detection | Statistical anomalies + event log w/ impact |
| 9 | Heatmap & Patterns | SKU ร day-of-week / month heatmaps, correlations |
| 10 | History & Performance | Backtest, cumulative error, best model per SKU |
https://demand-forecasting-engine.streamlit.app/
This is the third project in the warehouse logistics series:
- Warehouse KPI Dashboard โ real-time operational KPIs (Project 1)
- Picking Route Optimizer โ pick-path optimization (Project 2)
- Demand Forecasting Engine โ this project (Project 3)
Iyad Belkadi Data & operations enthusiast โ supply-chain analytics, optimization, forecasting.
MIT
