# vbluuiza/pipeline_etl_weather_data_tutorial_youtube architecture

> Architecture diagram of the GitHub repository vbluuiza/pipeline_etl_weather_data_tutorial_youtube, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube
- Repository: https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube

## Overview

Este repositório implementa um pipeline horário de dados meteorológicos de São Paulo: a DAG do Airflow dispara extração, transformação e carga. A extração consulta o OpenWeatherMap e grava JSON; a transformação estrutura os dados e a DAG os transfere por Parquet para a carga no PostgreSQL. O README também descreve análise exploratória, mas o notebook não foi amostrado; por isso, essa capacidade não é detalhada. As ligações abaixo refletem chamadas e transferências documentadas ou visíveis nos trechos.

Main entry points: [`dags/weather_dag.py`](https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/dags/weather_dag.py) (DAG meteorológica), [`src/extract_data.py`](https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/src/extract_data.py) (Extração meteorológica), [`src/transform_data.py`](https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/src/transform_data.py) (Transformação), [`src/load_data.py`](https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/src/load_data.py) (Carga meteorológica)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Orquestração"]
  node_airflow(("Airflow"))
  node_weather_dag["DAG meteorológica<br/>[weather_dag.py]"]
end

subgraph group_etl["Etapas ETL"]
  node_extract["Extração meteorológica<br/>[extract_data.py]"]
  node_raw_json["JSON bruto<br/>[extract_data.py]"]
  node_transform["Transformação<br/>[transform_data.py]"]
  node_parquet["Parquet intermediário<br/>[weather_dag.py]"]
end

subgraph group_persistence["Armazenamento"]
  node_load["Carga meteorológica<br/>[load_data.py]"]
  node_postgres[("PostgreSQL")]
end

node_openweather["OpenWeatherMap"]
node_notebook["Análise exploratória"]

node_airflow -->|"aciona DAG"| node_weather_dag
node_weather_dag -->|"chama extração"| node_extract
node_extract -->|"consulta clima"| node_openweather
node_extract -->|"grava JSON"| node_raw_json
node_weather_dag -->|"chama transformação"| node_transform
node_transform -->|"lê JSON"| node_raw_json
node_weather_dag -->|"grava e lê"| node_parquet
node_weather_dag -->|"chama carga"| node_load
node_load -->|"insere e consulta"| node_postgres

click node_weather_dag "https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/dags/weather_dag.py"
click node_extract "https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/src/extract_data.py"
click node_raw_json "https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/src/extract_data.py"
click node_transform "https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/src/transform_data.py"
click node_parquet "https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/dags/weather_dag.py"
click node_load "https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/src/load_data.py"
click node_notebook "https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/notebooks/analysis_data.ipynb"

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,node_weather_dag toneBlue
class node_extract,node_raw_json,node_transform,node_parquet toneAmber
class node_load,node_postgres toneMint
class node_openweather toneIndigo
class node_notebook toneTeal
```

## Components

### Orquestração

- **Airflow**
- [DAG meteorológica](https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/dags/weather_dag.py): `dags/weather_dag.py`

### Etapas ETL

- [Extração meteorológica](https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/src/extract_data.py): `src/extract_data.py`
- [JSON bruto](https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/src/extract_data.py): `src/extract_data.py`
- [Transformação](https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/src/transform_data.py): `src/transform_data.py`
- [Parquet intermediário](https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/dags/weather_dag.py): `dags/weather_dag.py`

### Armazenamento

- [Carga meteorológica](https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/src/load_data.py): `src/load_data.py`
- **PostgreSQL**

### Other components

- **OpenWeatherMap**
- [Análise exploratória](https://github.com/vbluuiza/pipeline_etl_weather_data_tutorial_youtube/blob/main/notebooks/analysis_data.ipynb): `notebooks/analysis_data.ipynb`

## Connections

- Airflow → DAG meteorológica: aciona DAG (evidence: `README.md`)
- DAG meteorológica → Extração meteorológica: chama extração (evidence: `dags/weather_dag.py`)
- Extração meteorológica → OpenWeatherMap: consulta clima (evidence: `README.md`)
- Extração meteorológica → JSON bruto: grava JSON (evidence: `src/extract_data.py`)
- DAG meteorológica → Transformação: chama transformação (evidence: `dags/weather_dag.py`)
- Transformação → JSON bruto: lê JSON (evidence: `README.md`)
- DAG meteorológica → Parquet intermediário: grava e lê (evidence: `dags/weather_dag.py`)
- DAG meteorológica → Carga meteorológica: chama carga (evidence: `dags/weather_dag.py`)
- Carga meteorológica → PostgreSQL: insere e consulta (evidence: `src/load_data.py`)
