# abdulrahman2005-prog/egypt-weather-data-pipeline architecture

> Architecture diagram of the GitHub repository abdulrahman2005-prog/egypt-weather-data-pipeline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abdulrahman2005-prog/egypt-weather-data-pipeline
- Repository: https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline

## Overview

This is an end-to-end Cairo weather analytics pipeline: a scheduled Airflow DAG extracts historical observations, loads them into Snowflake, and runs dbt; a Streamlit dashboard presents daily and monthly insights from the analytical mart. The repository also contains a separate extraction script and an unrelated Airflow astronaut example. The DAG, extractor, loader, and dashboard excerpts establish their runtime behavior; dbt model relationships and the dashboard’s mart query are documented in the README, while dbt SQL was not sampled.

Main entry points: [`airflow/dags/weather_pipeline.py`](https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/dags/weather_pipeline.py) (Scheduled weather DAG), [`airflow/include/load_to_snowflake.py`](https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/include/load_to_snowflake.py) (Snowflake loader), [`airflow/include/extraction/extract_weather.py`](https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/include/extraction/extract_weather.py) (Weather extraction), [`airflow/include/weather_analytics/models/staging/stg_cairo_weather.sql`](https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/include/weather_analytics/models/staging/stg_cairo_weather.sql) (Staging model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Orchestration"]
  node_scheduled_dag["Scheduled weather DAG"]
end

subgraph group_ingestion["Weather ingestion"]
  node_airflow_extractor["Weather extraction<br/>[extract_weather.py]"]
  node_raw_csv["Raw weather CSV"]
  node_snowflake_loader["Snowflake loader"]
  node_staging_table[("Staging table")]
  node_raw_table[("Raw weather table")]
  node_standalone_extractor["Standalone extractor<br/>[extract_weather.py]"]
end

subgraph group_analytics["Analytics modeling"]
  node_dbt_staging["Staging model"]
  node_daily_mart[("Daily weather mart")]
end

subgraph group_presentation["Dashboard"]
  node_dashboard["Weather dashboard<br/>[app.py]"]
end

node_operator(("Pipeline operator"))
node_open_meteo["Open-Meteo API"]

node_operator -->|"triggers"| node_scheduled_dag
node_scheduled_dag -->|"runs"| node_airflow_extractor
node_scheduled_dag -->|"runs"| node_snowflake_loader
node_scheduled_dag -->|"builds models"| node_dbt_staging
node_airflow_extractor -->|"requests weather"| node_open_meteo
node_airflow_extractor -->|"writes"| node_raw_csv
node_snowflake_loader -->|"reads"| node_raw_csv
node_snowflake_loader -->|"loads rows"| node_staging_table
node_snowflake_loader -->|"merges rows"| node_raw_table
node_dbt_staging -.->|"transforms from"| node_raw_table
node_daily_mart -.->|"builds on"| node_dbt_staging
node_dashboard -->|"queries"| node_daily_mart
node_operator -->|"views insights"| node_dashboard

click node_scheduled_dag "https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/dags/weather_pipeline.py"
click node_airflow_extractor "https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/include/extraction/extract_weather.py"
click node_snowflake_loader "https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/include/load_to_snowflake.py"
click node_dbt_staging "https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/include/weather_analytics/models/staging/stg_cairo_weather.sql"
click node_daily_mart "https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/include/weather_analytics/models/marts/mart_cairo_weather_daily.sql"
click node_dashboard "https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/dags/dashboard/app.py"
click node_standalone_extractor "https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/src/extraction/extract_weather.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_scheduled_dag toneBlue
class node_airflow_extractor,node_raw_csv,node_snowflake_loader,node_staging_table,node_raw_table,node_standalone_extractor toneAmber
class node_dbt_staging,node_daily_mart,node_open_meteo toneMint
class node_dashboard toneRose
class node_operator toneIndigo
```

## Components

### Orchestration

- [Scheduled weather DAG](https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/dags/weather_pipeline.py): `airflow/dags/weather_pipeline.py`

### Weather ingestion

- [Weather extraction](https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/include/extraction/extract_weather.py): `airflow/include/extraction/extract_weather.py`
- **Raw weather CSV**
- [Snowflake loader](https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/include/load_to_snowflake.py): `airflow/include/load_to_snowflake.py`
- **Staging table**
- **Raw weather table**
- [Standalone extractor](https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/src/extraction/extract_weather.py): `src/extraction/extract_weather.py`

### Analytics modeling

- [Staging model](https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/include/weather_analytics/models/staging/stg_cairo_weather.sql): `airflow/include/weather_analytics/models/staging/stg_cairo_weather.sql`
- [Daily weather mart](https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/include/weather_analytics/models/marts/mart_cairo_weather_daily.sql): `airflow/include/weather_analytics/models/marts/mart_cairo_weather_daily.sql`

### Dashboard

- [Weather dashboard](https://github.com/abdulrahman2005-prog/egypt-weather-data-pipeline/blob/main/airflow/dags/dashboard/app.py): `airflow/dags/dashboard/app.py`

### Other components

- **Pipeline operator**
- **Open-Meteo API**

## Connections

- Pipeline operator → Scheduled weather DAG: triggers (evidence: `README.md`)
- Scheduled weather DAG → Weather extraction: runs (evidence: `airflow/dags/weather_pipeline.py`)
- Scheduled weather DAG → Snowflake loader: runs (evidence: `airflow/dags/weather_pipeline.py`)
- Scheduled weather DAG → Staging model: builds models (evidence: `airflow/dags/weather_pipeline.py`)
- Weather extraction → Open-Meteo API: requests weather (evidence: `airflow/include/extraction/extract_weather.py`)
- Weather extraction → Raw weather CSV: writes (evidence: `airflow/include/extraction/extract_weather.py`)
- Snowflake loader → Raw weather CSV: reads (evidence: `airflow/include/load_to_snowflake.py`)
- Snowflake loader → Staging table: loads rows (evidence: `airflow/include/load_to_snowflake.py`)
- Snowflake loader → Raw weather table: merges rows (evidence: `airflow/include/load_to_snowflake.py`)
- Staging model → Raw weather table: transforms from (evidence: `README.md`)
- Daily weather mart → Staging model: builds on (evidence: `README.md`)
- Weather dashboard → Daily weather mart: queries (evidence: `README.md`)
- Pipeline operator → Weather dashboard: views insights (evidence: `README.md`)
