# nguyenkhang310/climate-lab architecture

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

- Interactive diagram: https://gitdiagram.com/nguyenkhang310/climate-lab
- Repository: https://github.com/nguyenkhang310/climate-lab

## Overview

Climate Lab is a climate-data exploration dashboard and temperature-scenario simulator. Users enter the Dash application, explore temperature and CO₂ by time and geography, compare renewable energy and sector emissions, inspect filtered data and insights, and simulate CO₂ assumptions through 2050. Supporting analysis branches clean temperature and emissions sources; their outputs are joined by country ISO3 and year, while global series feed the regression model. The README documents these pipeline relationships and dashboard capabilities; some dashboard callbacks and analysis artifacts were not sampled, so uncertain internal links are omitted.

Main entry points: [`phan_tich_co2/quan/lam_sach_du_lieu.py`](https://github.com/nguyenkhang310/climate-lab/blob/main/phan_tich_co2/quan/lam_sach_du_lieu.py) (CO₂ cleaning), [`mo_hinh_du_doan/nguyen_khang/ghep_du_lieu.py`](https://github.com/nguyenkhang310/climate-lab/blob/main/mo_hinh_du_doan/nguyen_khang/ghep_du_lieu.py) (Country-year join), [`phan_tich_nhiet_do/duc/lam_sach_du_lieu.py`](https://github.com/nguyenkhang310/climate-lab/blob/main/phan_tich_nhiet_do/duc/lam_sach_du_lieu.py) (Temperature cleaning), [`bang_dieu_khien/nguyen_khang/ung_dung.py`](https://github.com/nguyenkhang310/climate-lab/blob/main/bang_dieu_khien/nguyen_khang/ung_dung.py) (Climate dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_entry["App entry<br/>[app.py]"]
  node_webapp["Climate dashboard<br/>[ung_dung.py]"]
  node_dashboard_data["Dashboard data<br/>[du_lieu.py]"]
  node_charts["Interactive charts<br/>[bieu_do.py]"]
end

subgraph group_temperature["Temperature analysis"]
  node_temperature_clean["Temperature cleaning"]
  node_temperature_analysis["Temperature analysis"]
  node_temperature_artifacts["Temperature visualizations"]
end

subgraph group_emissions["CO₂ analysis"]
  node_co2_clean["CO₂ cleaning"]
  node_co2_eda["CO₂ exploration<br/>[tao_eda.py]"]
  node_co2_visuals["CO₂ visualizations"]
  node_co2_artifacts["CO₂ visualizations"]
end

subgraph group_modeling["Data and modeling"]
  node_cleaned_temperature[("Clean temperature data")]
  node_cleaned_co2[("Clean emissions data")]
  node_join["Country-year join<br/>[ghep_du_lieu.py]"]
  node_dashboard_tables[("Joined dashboard data")]
  node_global_series[("Global climate series")]
  node_regression["Temperature regression"]
  node_scenario_results[("2050 scenarios")]
end

node_user(("Dashboard user"))

node_user -->|"opens dashboard"| node_entry
node_entry -->|"imports app"| node_webapp
node_webapp -->|"uses data"| node_dashboard_data
node_webapp -->|"uses charts"| node_charts
node_dashboard_data -->|"uses scenarios"| node_regression
node_temperature_clean -->|"writes cleaned data"| node_cleaned_temperature
node_co2_clean -->|"writes cleaned data"| node_cleaned_co2
node_temperature_clean -->|"provides inputs"| node_join
node_co2_clean -->|"provides inputs"| node_join
node_join -->|"writes joined data"| node_dashboard_tables
node_join -->|"writes global series"| node_global_series
node_global_series -->|"fits and simulates"| node_regression
node_regression -->|"writes scenarios"| node_scenario_results
node_temperature_clean -->|"supplies cleaned data"| node_temperature_analysis
node_temperature_analysis -->|"exports charts"| node_temperature_artifacts
node_co2_clean -->|"supplies cleaned data"| node_co2_eda
node_co2_clean -.->|"supplies cleaned data"| node_co2_visuals
node_co2_eda -->|"exports charts"| node_co2_artifacts
node_co2_visuals -->|"exports charts"| node_co2_artifacts

click node_entry "https://github.com/nguyenkhang310/climate-lab/blob/main/app.py"
click node_webapp "https://github.com/nguyenkhang310/climate-lab/blob/main/bang_dieu_khien/nguyen_khang/ung_dung.py"
click node_dashboard_data "https://github.com/nguyenkhang310/climate-lab/blob/main/bang_dieu_khien/nguyen_khang/du_lieu.py"
click node_charts "https://github.com/nguyenkhang310/climate-lab/blob/main/bang_dieu_khien/nguyen_khang/bieu_do.py"
click node_temperature_clean "https://github.com/nguyenkhang310/climate-lab/blob/main/phan_tich_nhiet_do/duc/lam_sach_du_lieu.py"
click node_temperature_analysis "https://github.com/nguyenkhang310/climate-lab/blob/main/phan_tich_nhiet_do/duc/tao_bieu_do_plotly.py"
click node_temperature_artifacts "https://github.com/nguyenkhang310/climate-lab/tree/main/phan_tich_nhiet_do/duc/bieu_do/tuong_tac"
click node_co2_clean "https://github.com/nguyenkhang310/climate-lab/blob/main/phan_tich_co2/quan/lam_sach_du_lieu.py"
click node_co2_eda "https://github.com/nguyenkhang310/climate-lab/blob/main/phan_tich_co2/quan/tao_eda.py"
click node_co2_visuals "https://github.com/nguyenkhang310/climate-lab/blob/main/phan_tich_co2/quan/tao_bieu_do_plotly.py"
click node_co2_artifacts "https://github.com/nguyenkhang310/climate-lab/tree/main/phan_tich_co2/quan/bieu_do/tuong_tac"
click node_cleaned_temperature "https://github.com/nguyenkhang310/climate-lab/tree/main/phan_tich_nhiet_do/duc/du_lieu_sach"
click node_cleaned_co2 "https://github.com/nguyenkhang310/climate-lab/tree/main/phan_tich_co2/quan/du_lieu_sach"
click node_join "https://github.com/nguyenkhang310/climate-lab/blob/main/mo_hinh_du_doan/nguyen_khang/ghep_du_lieu.py"
click node_dashboard_tables "https://github.com/nguyenkhang310/climate-lab/tree/main/mo_hinh_du_doan/nguyen_khang/du_lieu"
click node_global_series "https://github.com/nguyenkhang310/climate-lab/tree/main/mo_hinh_du_doan/nguyen_khang/du_lieu"
click node_regression "https://github.com/nguyenkhang310/climate-lab/blob/main/mo_hinh_du_doan/nguyen_khang/mo_hinh_nhiet_do.py"
click node_scenario_results "https://github.com/nguyenkhang310/climate-lab/tree/main/mo_hinh_du_doan/nguyen_khang/ket_qua"

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_entry,node_webapp,node_dashboard_data,node_charts,node_user toneBlue
class node_temperature_clean,node_temperature_analysis,node_temperature_artifacts toneAmber
class node_co2_clean,node_co2_eda,node_co2_visuals,node_co2_artifacts toneMint
class node_cleaned_temperature,node_cleaned_co2,node_join,node_dashboard_tables,node_global_series,node_regression,node_scenario_results toneRose
```

## Components

### Dashboard

- [App entry](https://github.com/nguyenkhang310/climate-lab/blob/main/app.py): `app.py`
- [Climate dashboard](https://github.com/nguyenkhang310/climate-lab/blob/main/bang_dieu_khien/nguyen_khang/ung_dung.py): `bang_dieu_khien/nguyen_khang/ung_dung.py`
- [Dashboard data](https://github.com/nguyenkhang310/climate-lab/blob/main/bang_dieu_khien/nguyen_khang/du_lieu.py): `bang_dieu_khien/nguyen_khang/du_lieu.py`
- [Interactive charts](https://github.com/nguyenkhang310/climate-lab/blob/main/bang_dieu_khien/nguyen_khang/bieu_do.py): `bang_dieu_khien/nguyen_khang/bieu_do.py`

### Temperature analysis

- [Temperature cleaning](https://github.com/nguyenkhang310/climate-lab/blob/main/phan_tich_nhiet_do/duc/lam_sach_du_lieu.py): `phan_tich_nhiet_do/duc/lam_sach_du_lieu.py`
- [Temperature analysis](https://github.com/nguyenkhang310/climate-lab/blob/main/phan_tich_nhiet_do/duc/tao_bieu_do_plotly.py): `phan_tich_nhiet_do/duc/tao_bieu_do_plotly.py`
- [Temperature visualizations](https://github.com/nguyenkhang310/climate-lab/tree/main/phan_tich_nhiet_do/duc/bieu_do/tuong_tac): `phan_tich_nhiet_do/duc/bieu_do/tuong_tac`

### CO₂ analysis

- [CO₂ cleaning](https://github.com/nguyenkhang310/climate-lab/blob/main/phan_tich_co2/quan/lam_sach_du_lieu.py): `phan_tich_co2/quan/lam_sach_du_lieu.py`
- [CO₂ exploration](https://github.com/nguyenkhang310/climate-lab/blob/main/phan_tich_co2/quan/tao_eda.py): `phan_tich_co2/quan/tao_eda.py`
- [CO₂ visualizations](https://github.com/nguyenkhang310/climate-lab/blob/main/phan_tich_co2/quan/tao_bieu_do_plotly.py): `phan_tich_co2/quan/tao_bieu_do_plotly.py`
- [CO₂ visualizations](https://github.com/nguyenkhang310/climate-lab/tree/main/phan_tich_co2/quan/bieu_do/tuong_tac): `phan_tich_co2/quan/bieu_do/tuong_tac`

### Data and modeling

- [Clean temperature data](https://github.com/nguyenkhang310/climate-lab/tree/main/phan_tich_nhiet_do/duc/du_lieu_sach): `phan_tich_nhiet_do/duc/du_lieu_sach`
- [Clean emissions data](https://github.com/nguyenkhang310/climate-lab/tree/main/phan_tich_co2/quan/du_lieu_sach): `phan_tich_co2/quan/du_lieu_sach`
- [Country-year join](https://github.com/nguyenkhang310/climate-lab/blob/main/mo_hinh_du_doan/nguyen_khang/ghep_du_lieu.py): `mo_hinh_du_doan/nguyen_khang/ghep_du_lieu.py`
- [Joined dashboard data](https://github.com/nguyenkhang310/climate-lab/tree/main/mo_hinh_du_doan/nguyen_khang/du_lieu): `mo_hinh_du_doan/nguyen_khang/du_lieu`
- [Global climate series](https://github.com/nguyenkhang310/climate-lab/tree/main/mo_hinh_du_doan/nguyen_khang/du_lieu): `mo_hinh_du_doan/nguyen_khang/du_lieu`
- [Temperature regression](https://github.com/nguyenkhang310/climate-lab/blob/main/mo_hinh_du_doan/nguyen_khang/mo_hinh_nhiet_do.py): `mo_hinh_du_doan/nguyen_khang/mo_hinh_nhiet_do.py`
- [2050 scenarios](https://github.com/nguyenkhang310/climate-lab/tree/main/mo_hinh_du_doan/nguyen_khang/ket_qua): `mo_hinh_du_doan/nguyen_khang/ket_qua`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → App entry: opens dashboard (evidence: `README.md`)
- App entry → Climate dashboard: imports app (evidence: `app.py`)
- Climate dashboard → Dashboard data: uses data (evidence: `bang_dieu_khien/nguyen_khang/ung_dung.py`)
- Climate dashboard → Interactive charts: uses charts (evidence: `bang_dieu_khien/nguyen_khang/ung_dung.py`)
- Dashboard data → Temperature regression: uses scenarios (evidence: `bang_dieu_khien/nguyen_khang/du_lieu.py`)
- Temperature cleaning → Clean temperature data: writes cleaned data (evidence: `phan_tich_nhiet_do/duc/lam_sach_du_lieu.py`)
- CO₂ cleaning → Clean emissions data: writes cleaned data (evidence: `phan_tich_co2/quan/lam_sach_du_lieu.py`)
- Temperature cleaning → Country-year join: provides inputs (evidence: `README.md`)
- CO₂ cleaning → Country-year join: provides inputs (evidence: `README.md`)
- Country-year join → Joined dashboard data: writes joined data (evidence: `mo_hinh_du_doan/nguyen_khang/ghep_du_lieu.py`)
- Country-year join → Global climate series: writes global series (evidence: `mo_hinh_du_doan/nguyen_khang/ghep_du_lieu.py`)
- Global climate series → Temperature regression: fits and simulates (evidence: `mo_hinh_du_doan/nguyen_khang/mo_hinh_nhiet_do.py`)
- Temperature regression → 2050 scenarios: writes scenarios (evidence: `mo_hinh_du_doan/nguyen_khang/mo_hinh_nhiet_do.py`)
- Temperature cleaning → Temperature analysis: supplies cleaned data (evidence: `phan_tich_nhiet_do/duc/tao_bieu_do_plotly.py`)
- Temperature analysis → Temperature visualizations: exports charts (evidence: `README.md`)
- CO₂ cleaning → CO₂ exploration: supplies cleaned data (evidence: `phan_tich_co2/quan/tao_eda.py`)
- CO₂ cleaning → CO₂ visualizations: supplies cleaned data
- CO₂ exploration → CO₂ visualizations: exports charts (evidence: `README.md`)
- CO₂ visualizations → CO₂ visualizations: exports charts (evidence: `README.md`)
