Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

idabella/tourism_morocco_etl

Domain:

socioeconomic

Record type:

software
Creator:
ida
Host:
Python ETL pipeline for a Morocco tourism # Morocco Tourism ETL Pipeline > ETL pipeline for Morocco's tourism data warehouse. Collects data from HCP.ma, Data.gov.ma, and ObservatoireDuTourisme.ma. **Version:** 1.0.0 | **Python:** 3.8+ | **PostgreSQL:** 12+ ## 🚀 Quick Start ```bash # Setup environment python -m venv venv source venv/bin/activate # Linux/macOS: venv\Scripts\activate (Windows) pip install -r requirements.txt # Create database psql -U postgres -c "CREATE DATABASE morocco_tourism;" psql -U postgres -d morocco_tourism -f sql/schema.sql # Configure connection in config/config.json # Add CSV files to data/raw/ # Run pipeline python scripts/main.py ``` ## 📁 Project Structure ``` morocco-tourism-etl/ ├── data/ │ ├── raw/ # Source CSV files │ ├── processed/ # Cleaned data │ └── logs/ # Logs & reports ├── scripts/ │ ├── main.py # Pipeline orchestrator │ ├── transform.py # Data transformation │ ├── validate.py # Quality validation │ └── load.py # Database loader ├── sql/ │ └── schema.sql # Database schema └── config/ └── config.json # Configuration ``` ## 🗂️ Data Warehouse Schema ### Star Schema Architecture ``` ┌─────────────────┐ │ dim_temps │ │ (Time) │ └────────┬────────┘ │ ┌────────────────────┼────────────────────┐ │ │ │ v v v ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │fact_arrivees │ │ fact_nuitees │ │fact_recettes │ │(Arrivals) │ │(Stays) │ │(Revenues) │ └──────┬───────┘ └──────┬───────┘ └──────────────┘ │ │ v v ┌──────────────────┐ ┌──────────────────┐ │dim_nationalites │ │dim_destinations │ │(Countries) │ │(Locations) │ └──────────────────┘ └──────────────────┘ │ v ┌──────────────────┐ │dim_categories_ │ │hotel (Categories)│ └──────────────────┘ ``` ### Dimension Tables | Table | Descripti …

Visit

github.com