# haiviet7012/2627-ltxldl-airbnb-nhom1 architecture

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

- Interactive diagram: https://gitdiagram.com/haiviet7012/2627-ltxldl-airbnb-nhom1
- Repository: https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1

## Overview

This repository is a reproducible Bangkok Airbnb market-analysis pipeline for an investment decision-maker: download city snapshots, check and clean them, calculate market KPIs, analyze review sentiment and aspects, evaluate predictions, then visualize results. `run_pipeline.py` explicitly dispatches these stages; the README documents their order and capabilities. The graph preserves the documented QA, KPI, LLM, VADER baseline, evaluation, and visualization branches. Some modules (QA, evaluation, visualization) were not sampled, so their internal calls are not inferred; links use documented orchestration and capabilities.

Main entry points: [`run_pipeline.py`](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/run_pipeline.py) (Pipeline runner), [`src/llm.py`](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/llm.py) (LLM review analysis), [`src/evaluate.py`](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/evaluate.py) (Model evaluation), [`data/processed`](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/tree/main/data/processed) (Analysis outputs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Pipeline orchestration"]
  node_runner["Pipeline runner<br/>[run_pipeline.py]"]
  node_config["City configuration<br/>[bangkok.yaml]"]
end

subgraph group_market["Market data and KPIs"]
  node_download["Snapshot download<br/>[download.py]"]
  node_qa["QA and cleaning<br/>[qa.py]"]
  node_kpi["Market KPIs<br/>[kpi.py]"]
end

subgraph group_reviews["Review analysis"]
  node_llm["LLM review analysis<br/>[llm.py]"]
  node_baseline["VADER baseline<br/>[baseline.py]"]
  node_handlabels["Hand-labeled reviews<br/>[hand_labels.csv]"]
  node_llmkpi["Review KPIs<br/>[kpi.py]"]
end

subgraph group_results["Evaluation and results"]
  node_evaluation["Model evaluation<br/>[evaluate.py]"]
  node_viz["Visualizations<br/>[viz.py]"]
  node_outputs["Analysis outputs"]
  node_figures["Charts"]
end

node_investor(("Investment analyst"))
node_insideairbnb["Inside Airbnb"]
node_gemini["Gemini API"]

node_investor -->|"starts"| node_runner
node_runner -->|"loads"| node_config
node_runner -->|"dispatches"| node_download
node_runner -->|"dispatches"| node_qa
node_runner -->|"dispatches"| node_kpi
node_runner -->|"dispatches"| node_llm
node_runner -->|"dispatches"| node_baseline
node_runner -->|"dispatches"| node_evaluation
node_runner -->|"dispatches"| node_llmkpi
node_runner -->|"dispatches"| node_viz
node_insideairbnb -->|"provides snapshots"| node_download
node_download -->|"supplies raw data"| node_qa
node_qa -->|"supplies cleaned data"| node_kpi
node_qa -->|"supplies reviews"| node_llm
node_llm -->|"requests analysis"| node_gemini
node_llm -->|"shares targets"| node_baseline
node_llm -->|"provides predictions"| node_llmkpi
node_baseline -->|"provides baseline"| node_evaluation
node_llm -->|"provides predictions"| node_evaluation
node_handlabels -->|"provides reference labels"| node_evaluation
node_kpi -->|"writes KPIs"| node_outputs
node_llm -->|"writes review results"| node_outputs
node_evaluation -->|"writes metrics"| node_outputs
node_llmkpi -->|"writes review KPIs"| node_outputs
node_outputs -->|"supplies charts"| node_viz
node_viz -->|"writes charts"| node_figures

click node_runner "https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/run_pipeline.py"
click node_config "https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/configs/bangkok.yaml"
click node_download "https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/download.py"
click node_qa "https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/qa.py"
click node_kpi "https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/kpi.py"
click node_llm "https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/llm.py"
click node_baseline "https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/baseline.py"
click node_handlabels "https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/data/samples/hand_labels.csv"
click node_evaluation "https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/evaluate.py"
click node_llmkpi "https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/kpi.py"
click node_viz "https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/viz.py"
click node_outputs "https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/tree/main/data/processed"
click node_figures "https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/tree/main/figures"

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_runner,node_config toneBlue
class node_download,node_qa,node_kpi toneAmber
class node_llm,node_baseline,node_handlabels,node_llmkpi,node_gemini toneMint
class node_evaluation,node_viz,node_outputs,node_figures toneRose
class node_investor,node_insideairbnb toneIndigo
```

## Components

### Pipeline orchestration

- [Pipeline runner](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/run_pipeline.py): `run_pipeline.py`
- [City configuration](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/configs/bangkok.yaml): `configs/bangkok.yaml`

### Market data and KPIs

- [Snapshot download](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/download.py): `src/download.py`
- [QA and cleaning](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/qa.py): `src/qa.py`
- [Market KPIs](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/kpi.py): `src/kpi.py`

### Review analysis

- [LLM review analysis](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/llm.py): `src/llm.py`
- [VADER baseline](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/baseline.py): `src/baseline.py`
- [Hand-labeled reviews](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/data/samples/hand_labels.csv): `data/samples/hand_labels.csv`
- [Review KPIs](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/kpi.py): `src/kpi.py`

### Evaluation and results

- [Model evaluation](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/evaluate.py): `src/evaluate.py`
- [Visualizations](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/blob/main/src/viz.py): `src/viz.py`
- [Analysis outputs](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/tree/main/data/processed): `data/processed`
- [Charts](https://github.com/haiviet7012/2627-ltxldl-airbnb-nhom1/tree/main/figures): `figures`

### Other components

- **Investment analyst**
- **Inside Airbnb**
- **Gemini API**

## Connections

- Investment analyst → Pipeline runner: starts (evidence: `README.md`)
- Pipeline runner → City configuration: loads (evidence: `run_pipeline.py`)
- Pipeline runner → Snapshot download: dispatches (evidence: `run_pipeline.py`)
- Pipeline runner → QA and cleaning: dispatches (evidence: `run_pipeline.py`)
- Pipeline runner → Market KPIs: dispatches (evidence: `run_pipeline.py`)
- Pipeline runner → LLM review analysis: dispatches (evidence: `run_pipeline.py`)
- Pipeline runner → VADER baseline: dispatches (evidence: `run_pipeline.py`)
- Pipeline runner → Model evaluation: dispatches (evidence: `run_pipeline.py`)
- Pipeline runner → Review KPIs: dispatches (evidence: `run_pipeline.py`)
- Pipeline runner → Visualizations: dispatches (evidence: `run_pipeline.py`)
- Inside Airbnb → Snapshot download: provides snapshots (evidence: `src/download.py`)
- Snapshot download → QA and cleaning: supplies raw data (evidence: `README.md`)
- QA and cleaning → Market KPIs: supplies cleaned data (evidence: `README.md`)
- QA and cleaning → LLM review analysis: supplies reviews (evidence: `README.md`)
- LLM review analysis → Gemini API: requests analysis (evidence: `src/llm.py`)
- LLM review analysis → VADER baseline: shares targets (evidence: `src/baseline.py`)
- LLM review analysis → Review KPIs: provides predictions (evidence: `README.md`)
- VADER baseline → Model evaluation: provides baseline (evidence: `README.md`)
- LLM review analysis → Model evaluation: provides predictions (evidence: `README.md`)
- Hand-labeled reviews → Model evaluation: provides reference labels (evidence: `README.md`)
- Market KPIs → Analysis outputs: writes KPIs (evidence: `src/kpi.py`)
- LLM review analysis → Analysis outputs: writes review results (evidence: `README.md`)
- Model evaluation → Analysis outputs: writes metrics (evidence: `README.md`)
- Review KPIs → Analysis outputs: writes review KPIs (evidence: `src/kpi.py`)
- Analysis outputs → Visualizations: supplies charts (evidence: `README.md`)
- Visualizations → Charts: writes charts (evidence: `README.md`)
