# gaurab-kharal/weather-etl-pipeline architecture

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

- Interactive diagram: https://gitdiagram.com/gaurab-kharal/weather-etl-pipeline
- Repository: https://github.com/gaurab-kharal/weather-etl-pipeline

## Overview

This repository is a weather ETL and analysis application. A user starts the pipeline from `main.py`; it fetches forecasts for configured Nepali cities, transforms and aggregates them, and loads the data into SQLite. The README also describes notebook-based trend, correlation, and anomaly analysis. The extractor, loader, pipeline, and notebook are represented from README descriptions because their source contents were not excerpted; those links are documented relationships, not independently verified calls.

Main entry points: [`src/transformer.py`](https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/src/transformer.py) (Weather transformer), [`src/pipeline.py`](https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/src/pipeline.py) (Weather pipeline), [`src/extractor.py`](https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/src/extractor.py) (Weather extractor), [`notebooks/eda.ipynb`](https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/notebooks/eda.ipynb) (EDA notebook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Pipeline orchestration"]
  node_main["Pipeline entry<br/>[main.py]"]
  node_pipeline["Weather pipeline<br/>[pipeline.py]"]
  node_config["Pipeline config<br/>[config.py]"]
end

subgraph group_acquisition["Forecast acquisition"]
  node_extractor["Weather extractor<br/>[extractor.py]"]
  node_openmeteo["Open-Meteo"]
  node_rawcsv["Raw forecast CSV"]
end

subgraph group_transformation["Data transformation"]
  node_transformer["Weather transformer<br/>[transformer.py]"]
  node_processedcsv["Processed forecast CSV"]
end

subgraph group_persistence["Data persistence"]
  node_loader["Weather loader<br/>[loader.py]"]
  node_sqlite[("Weather database")]
end

subgraph group_analysis["Weather analysis"]
  node_notebook["EDA notebook<br/>[eda.ipynb]"]
  node_analysisresults["Weather findings<br/>[eda.ipynb]"]
end

node_user(("User"))

node_user -->|"runs"| node_main
node_main -->|"builds and runs"| node_pipeline
node_pipeline -->|"runs"| node_extractor
node_pipeline -->|"runs"| node_transformer
node_pipeline -->|"runs"| node_loader
node_config -->|"configures"| node_extractor
node_config -->|"provides paths"| node_transformer
node_extractor -->|"fetches forecasts"| node_openmeteo
node_extractor -->|"writes raw data"| node_rawcsv
node_rawcsv -->|"reads"| node_transformer
node_transformer -->|"saves processed data"| node_processedcsv
node_transformer -->|"aggregates daily humidity"| node_transformer
node_processedcsv -->|"loads CSV"| node_loader
node_loader -->|"writes table"| node_sqlite
node_user -->|"explores results"| node_notebook
node_notebook -.->|"analyzes loaded data"| node_sqlite
node_notebook -->|"produces findings"| node_analysisresults

click node_main "https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/main.py"
click node_pipeline "https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/src/pipeline.py"
click node_config "https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/config.py"
click node_extractor "https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/src/extractor.py"
click node_transformer "https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/src/transformer.py"
click node_loader "https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/src/loader.py"
click node_notebook "https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/notebooks/eda.ipynb"
click node_analysisresults "https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/notebooks/eda.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_main,node_pipeline,node_config,node_user toneBlue
class node_extractor,node_openmeteo,node_rawcsv toneAmber
class node_transformer,node_processedcsv toneMint
class node_loader,node_sqlite toneRose
class node_notebook,node_analysisresults toneIndigo
```

## Components

### Pipeline orchestration

- [Pipeline entry](https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/main.py): `main.py`
- [Weather pipeline](https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/src/pipeline.py): `src/pipeline.py`
- [Pipeline config](https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/config.py): `config.py`

### Forecast acquisition

- [Weather extractor](https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/src/extractor.py): `src/extractor.py`
- **Open-Meteo**
- **Raw forecast CSV**

### Data transformation

- [Weather transformer](https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/src/transformer.py): `src/transformer.py`
- **Processed forecast CSV**

### Data persistence

- [Weather loader](https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/src/loader.py): `src/loader.py`
- **Weather database**

### Weather analysis

- [EDA notebook](https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/notebooks/eda.ipynb): `notebooks/eda.ipynb`
- [Weather findings](https://github.com/gaurab-kharal/weather-etl-pipeline/blob/main/notebooks/eda.ipynb): `notebooks/eda.ipynb`

### Other components

- **User**

## Connections

- User → Pipeline entry: runs (evidence: `README.md`)
- Pipeline entry → Weather pipeline: builds and runs (evidence: `README.md`)
- Weather pipeline → Weather extractor: runs (evidence: `README.md`)
- Weather pipeline → Weather transformer: runs (evidence: `README.md`)
- Weather pipeline → Weather loader: runs (evidence: `README.md`)
- Pipeline config → Weather extractor: configures (evidence: `README.md`)
- Pipeline config → Weather transformer: provides paths (evidence: `src/transformer.py`)
- Weather extractor → Open-Meteo: fetches forecasts (evidence: `README.md`)
- Weather extractor → Raw forecast CSV: writes raw data (evidence: `README.md`)
- Raw forecast CSV → Weather transformer: reads (evidence: `src/transformer.py`)
- Weather transformer → Processed forecast CSV: saves processed data (evidence: `src/transformer.py`)
- Weather transformer → Weather transformer: aggregates daily humidity (evidence: `src/transformer.py`)
- Processed forecast CSV → Weather loader: loads CSV (evidence: `README.md`)
- Weather loader → Weather database: writes table (evidence: `README.md`)
- User → EDA notebook: explores results (evidence: `README.md`)
- EDA notebook → Weather database: analyzes loaded data
- EDA notebook → Weather findings: produces findings (evidence: `README.md`)
