# Morocco GDP Nowcasting 🛰️
**Estimating Morocco's annual GDP in near real time from satellite imagery, search behaviour and economic indicators — months before the official figures are published.**
> 📄 **Full thesis:** `docs/thesis.pdf` — Master's Final Year Project, Université Chouaib Doukkali (2026)
>
> ℹ️ The dashboard is not publicly hosted. It runs locally from the artefacts in this repository (see Getting started).
---
## The problem
Morocco's official GDP is published by the High Commission for Planning (HCP) **months after** the period it measures. That delay is a blind spot: when a shock hits — the 2020 pandemic, a drought year — decision-makers must react *before* any official measure of its magnitude exists.
Meanwhile, the economy emits signals that are available **immediately**: satellites measure vegetation and land surface temperature every month, search queries reflect household economic concerns in real time, and international institutions publish intermediate indicators well ahead of the national accounts.
**Research question:** *to what extent can Morocco's annual GDP be estimated in near real time, ahead of its official publication, by combining satellite, economic and behavioural data through machine learning?*
---
## Results at a glance
| Metric | Value |
|---|---|
| **R² (Leave-One-Year-Out, 30-seed average)** | **0.837 ± 0.008** |
| RMSE | $6.48 B |
| MAE | $5.13 B |
| MAPE | 4.04 % |
| Live nowcast (2024) | $159.97 B vs **$160.61 B official** → **0.4 % deviation** |
**Versus the baselines a decision-maker already has:**
| Predictor | R² | RMSE (B$) |
|---|---|---|
| Random walk (last year's GDP) | 0.553 | 10.08 |
| Linear trend | 0.735 | 8.10 |
| **Tuned Gradient Boosting** | **0.837 ± 0.008** | **6.48** |
> Moroccan GDP in current USD trends strongly upward, so a straight line already explains a lot. The model's genuine contribution is the **~0.10 of explained variance beyond the trend** — the part that captures drought …