# isabel6198/weather-data-platform architecture

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

- Interactive diagram: https://gitdiagram.com/isabel6198/weather-data-platform
- Repository: https://github.com/isabel6198/weather-data-platform

## Overview

Weather Data Platform collecte les observations d’Open-Meteo, les écrit dans PostgreSQL, puis Airflow orchestre les contrôles et les transformations dbt. Les transformations produisent des faits horaires, un mart quotidien et une dimension de villes historisée. Le graphe suit les étapes et capacités explicitement documentées ; les détails internes des modèles dbt non échantillonnés sont limités à ce que précise le README.

Main entry points: [`airflow/dags/weather_pipeline.py`](https://github.com/isabel6198/weather-data-platform/blob/main/airflow/dags/weather_pipeline.py) (Pipeline météo), [`dbt/models/marts/fct_weather_hourly.sql`](https://github.com/isabel6198/weather-data-platform/blob/main/dbt/models/marts/fct_weather_hourly.sql) (Faits horaires), [`dbt/models/intermediate/int_weather_enriched.sql`](https://github.com/isabel6198/weather-data-platform/blob/main/dbt/models/intermediate/int_weather_enriched.sql) (Enrichissement météo), [`dbt/snapshots/city_metadata_snapshot.sql`](https://github.com/isabel6198/weather-data-platform/blob/main/dbt/snapshots/city_metadata_snapshot.sql) (Snapshot villes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Orchestration Airflow"]
  node_airflow_pipeline["Pipeline météo"]
  node_source_freshness["Fraîcheur source"]
  node_dbt_build["Build dbt"]
  node_failure_callback["Callback échec"]
end

subgraph group_storage["Stockage brut"]
  node_raw_postgres[("PostgreSQL raw")]
end

subgraph group_transform["Transformations dbt"]
  node_staging["Staging météo"]
  node_intermediate["Enrichissement météo"]
  node_weather_macro["Macro météo"]
  node_hourly_fact[("Faits horaires")]
  node_daily_mart[("Mart quotidien")]
  node_city_snapshot[("Snapshot villes")]
  node_city_dimension[("Dimension villes")]
end

subgraph group_quality["Qualité et documentation"]
  node_raw_validation["Contrôle raw"]
  node_dbt_tests["Tests qualité"]
  node_docs_lineage["Docs et lineage"]
end

node_open_meteo(("Open-Meteo"))

node_open_meteo -->|"fournit observations"| node_airflow_pipeline
node_airflow_pipeline -->|"ingère données"| node_raw_postgres
node_airflow_pipeline -->|"valide raw"| node_raw_validation
node_airflow_pipeline -->|"lance fraîcheur"| node_source_freshness
node_airflow_pipeline -->|"lance build"| node_dbt_build
node_airflow_pipeline -->|"signale échec"| node_failure_callback
node_raw_postgres -->|"alimente source"| node_staging
node_staging -->|"alimente"| node_intermediate
node_weather_macro -->|"normalise codes"| node_intermediate
node_intermediate -->|"alimente"| node_hourly_fact
node_hourly_fact -->|"agrège par jour"| node_daily_mart
node_raw_postgres -->|"historise métadonnées"| node_city_snapshot
node_city_snapshot -->|"alimente version courante"| node_city_dimension
node_dbt_build -->|"exécute tests"| node_dbt_tests
node_dbt_build -->|"produit modèles"| node_hourly_fact
node_dbt_build -->|"produit modèles"| node_daily_mart
node_dbt_build -->|"exécute snapshot"| node_city_snapshot
node_dbt_build -->|"produit modèle"| node_city_dimension
node_dbt_build -->|"documente lineage"| node_docs_lineage
node_airflow_pipeline -->|"contrôle résultat"| node_hourly_fact
node_airflow_pipeline -->|"contrôle résultat"| node_daily_mart

click node_airflow_pipeline "https://github.com/isabel6198/weather-data-platform/blob/main/airflow/dags/weather_pipeline.py"
click node_source_freshness "https://github.com/isabel6198/weather-data-platform/blob/main/airflow/dags/weather_pipeline.py"
click node_dbt_build "https://github.com/isabel6198/weather-data-platform/blob/main/airflow/dags/weather_pipeline.py"
click node_staging "https://github.com/isabel6198/weather-data-platform/blob/main/dbt/models/staging/stg_weather_snapshots.sql"
click node_intermediate "https://github.com/isabel6198/weather-data-platform/blob/main/dbt/models/intermediate/int_weather_enriched.sql"
click node_weather_macro "https://github.com/isabel6198/weather-data-platform/blob/main/dbt/macros/weather_condition.sql"
click node_hourly_fact "https://github.com/isabel6198/weather-data-platform/blob/main/dbt/models/marts/fct_weather_hourly.sql"
click node_daily_mart "https://github.com/isabel6198/weather-data-platform/blob/main/dbt/models/marts/mart_weather_daily.sql"
click node_city_snapshot "https://github.com/isabel6198/weather-data-platform/blob/main/dbt/snapshots/city_metadata_snapshot.sql"
click node_city_dimension "https://github.com/isabel6198/weather-data-platform/blob/main/dbt/models/marts/dim_city_current.sql"
click node_raw_validation "https://github.com/isabel6198/weather-data-platform/blob/main/airflow/dags/weather_pipeline.py"
click node_dbt_tests "https://github.com/isabel6198/weather-data-platform/tree/main/dbt/tests"
click node_docs_lineage "https://github.com/isabel6198/weather-data-platform/tree/main/dbt"
click node_failure_callback "https://github.com/isabel6198/weather-data-platform/blob/main/airflow/dags/weather_pipeline.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_airflow_pipeline,node_source_freshness,node_dbt_build,node_failure_callback toneBlue
class node_raw_postgres toneAmber
class node_staging,node_intermediate,node_weather_macro,node_hourly_fact,node_daily_mart,node_city_snapshot,node_city_dimension toneMint
class node_raw_validation,node_dbt_tests,node_docs_lineage toneRose
class node_open_meteo toneIndigo
```

## Components

### Orchestration Airflow

- [Pipeline météo](https://github.com/isabel6198/weather-data-platform/blob/main/airflow/dags/weather_pipeline.py): `airflow/dags/weather_pipeline.py`
- [Fraîcheur source](https://github.com/isabel6198/weather-data-platform/blob/main/airflow/dags/weather_pipeline.py): `airflow/dags/weather_pipeline.py`
- [Build dbt](https://github.com/isabel6198/weather-data-platform/blob/main/airflow/dags/weather_pipeline.py): `airflow/dags/weather_pipeline.py`
- [Callback échec](https://github.com/isabel6198/weather-data-platform/blob/main/airflow/dags/weather_pipeline.py): `airflow/dags/weather_pipeline.py`

### Stockage brut

- **PostgreSQL raw**

### Transformations dbt

- [Staging météo](https://github.com/isabel6198/weather-data-platform/blob/main/dbt/models/staging/stg_weather_snapshots.sql): `dbt/models/staging/stg_weather_snapshots.sql`
- [Enrichissement météo](https://github.com/isabel6198/weather-data-platform/blob/main/dbt/models/intermediate/int_weather_enriched.sql): `dbt/models/intermediate/int_weather_enriched.sql`
- [Macro météo](https://github.com/isabel6198/weather-data-platform/blob/main/dbt/macros/weather_condition.sql): `dbt/macros/weather_condition.sql`
- [Faits horaires](https://github.com/isabel6198/weather-data-platform/blob/main/dbt/models/marts/fct_weather_hourly.sql): `dbt/models/marts/fct_weather_hourly.sql`
- [Mart quotidien](https://github.com/isabel6198/weather-data-platform/blob/main/dbt/models/marts/mart_weather_daily.sql): `dbt/models/marts/mart_weather_daily.sql`
- [Snapshot villes](https://github.com/isabel6198/weather-data-platform/blob/main/dbt/snapshots/city_metadata_snapshot.sql): `dbt/snapshots/city_metadata_snapshot.sql`
- [Dimension villes](https://github.com/isabel6198/weather-data-platform/blob/main/dbt/models/marts/dim_city_current.sql): `dbt/models/marts/dim_city_current.sql`

### Qualité et documentation

- [Contrôle raw](https://github.com/isabel6198/weather-data-platform/blob/main/airflow/dags/weather_pipeline.py): `airflow/dags/weather_pipeline.py`
- [Tests qualité](https://github.com/isabel6198/weather-data-platform/tree/main/dbt/tests): `dbt/tests`
- [Docs et lineage](https://github.com/isabel6198/weather-data-platform/tree/main/dbt): `dbt`

### Other components

- **Open-Meteo**

## Connections

- Open-Meteo → Pipeline météo: fournit observations (evidence: `README.md`)
- Pipeline météo → PostgreSQL raw: ingère données (evidence: `airflow/dags/weather_pipeline.py`)
- Pipeline météo → Contrôle raw: valide raw (evidence: `airflow/dags/weather_pipeline.py`)
- Pipeline météo → Fraîcheur source: lance fraîcheur (evidence: `README.md`)
- Pipeline météo → Build dbt: lance build (evidence: `README.md`)
- Pipeline météo → Callback échec: signale échec (evidence: `airflow/dags/weather_pipeline.py`)
- PostgreSQL raw → Staging météo: alimente source (evidence: `README.md`)
- Staging météo → Enrichissement météo: alimente (evidence: `README.md`)
- Macro météo → Enrichissement météo: normalise codes (evidence: `README.md`)
- Enrichissement météo → Faits horaires: alimente (evidence: `README.md`)
- Faits horaires → Mart quotidien: agrège par jour (evidence: `README.md`)
- PostgreSQL raw → Snapshot villes: historise métadonnées (evidence: `README.md`)
- Snapshot villes → Dimension villes: alimente version courante (evidence: `README.md`)
- Build dbt → Tests qualité: exécute tests (evidence: `README.md`)
- Build dbt → Faits horaires: produit modèles (evidence: `README.md`)
- Build dbt → Mart quotidien: produit modèles (evidence: `README.md`)
- Build dbt → Snapshot villes: exécute snapshot (evidence: `README.md`)
- Build dbt → Dimension villes: produit modèle (evidence: `README.md`)
- Build dbt → Docs et lineage: documente lineage (evidence: `README.md`)
- Pipeline météo → Faits horaires: contrôle résultat (evidence: `airflow/dags/weather_pipeline.py`)
- Pipeline météo → Mart quotidien: contrôle résultat (evidence: `airflow/dags/weather_pipeline.py`)
