Full-stack dashboard analyzing Morocco's labor market — Python ML + Node.js/Express + MongoDB + Chart.js
# 🇲🇦 Morocco Labor Market Analytics Dashboard
Full-stack dashboard analyzing Morocco's unemployment trends (1991-2025) with a
machine learning prediction model, built with Python, Node.js/Express, MongoDB,
and Chart.js.
## Overview
This project combines a data science pipeline with a full-stack web application:
- **Python** cleans World Bank unemployment data and trains a prediction model
- **MongoDB Atlas** stores the historical data and predictions
- **Node.js/Express** exposes a REST API
- **Vanilla JS + Chart.js** renders an interactive dashboard
## Live Demo
- API: ` `
- Frontend: ` `
## Key Insights
- Morocco's unemployment rate dropped from ~13.5% (1991) to ~9% (2025)
- The COVID-19 pandemic caused a sharp spike in 2020 (11.19%), later excluded
from model training as it doesn't reflect the structural trend
- A polynomial regression model (R² = 0.43) projects the rate could fall to
~6.8% by 2028
## Tech Stack
| Layer | Technology |
|---|---|
| Data cleaning / ML | Python, pandas, scikit-learn |
| Database | MongoDB Atlas |
| Backend / API | Node.js, Express |
| Frontend | HTML, CSS, vanilla JavaScript, Chart.js |
## Project Structure
labor-market-dashboard/
├── data-pipeline/ # Python scripts: cleaning + ML model
├── server/ # Node.js/Express REST API
├── client/ # Frontend dashboard
└── reports/ # Methodology and findings
## Installation
### Prerequisites
- Python 3.10+
- Node.js 18+
- A MongoDB Atlas account (free tier)
### 1. Clone the repository
```bash
git clone
github.com
cd Labor-Market-Dashboard
```
### 2. Set up environment variables
Create a `.env` file at the root:
MONGODB_URI=your_mongodb_connection_string
### 3. Run the data pipeline (Python)
```bash
cd data-pipeline
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python clean_and_load.py
python train_model.py
```
### 4. Run the API (Node.js)
```bash
cd ../serv …