A data-science project focused on modeling the unemployment rate in Morocco using advanced time-series techniques (ARIMA, SARIMA...etc). Includes model diagnostics, forecasting, and reproducible code.
## 📘 Project Overview
This project focuses on analyzing and forecasting the **unemployment rate in Morocco** using advanced time series modeling techniques.
The study uses official quarterly data published by the **High Commission for Planning (HCP)** and spans the period **2006–2025**.
The goal is to understand unemployment trends across key socio-economic dimensions:
- Urban vs Rural areas
- Education levels
- Gender
- Age groups
- National total (“Ensemble”)
Several statistical and deep learning models were implemented to assess forecasting performance.
---
## Objectives
- Analyze historical unemployment trends in Morocco.
- Identify disparities between population groups.
- Build forecasting models: **ARIMA, SARIMA, Holt-Winters, RNN, LSTM**.
- Compare the accuracy and performance of each model.
- Develop a **web application** for interactive visualization and forecasting.
---
## Dataset
The dataset comes from **HCP’s quarterly employment surveys** and includes:
- **Period:** 2006 Q1 → 2025 Q4
- **79 observations**
- **Features include:**
- Area: Urban, Rural, National
- Education levels: No diploma, Medium, Higher
- Gender: Male, Female
- Age groups: 15–24, 25–34, 35–44, 45+
The dataset contains **no missing values** and required only minimal preprocessing.
---
## Methodology
### 1. Exploratory Data Analysis (EDA)
- Visualization of time series by category
- 4-quarter moving averages
- Trend and seasonal pattern detection
- Stationarity tests (ADF)
### 2. Forecasting Models
The following models were implemented:
| Model | Type | Strengths |
|-------|------|-----------|
| **ARIMA** | Statistical | Good for differenced series |
| **SARIMA** | Statistical | Handles quarterly seasonality |
| **Holt-Winters** | Exponential smoothing | Trend + seasonality |
| **RNN** | Deep Learning | Learns time dependencies |
| **LSTM** | Deep Learning | Captures long-term patterns |
---
## Results & Model Comparison
### Key Conclusion
> **SARIMA achieved the best f …