# amnanaeem123-coder/smog-prediction-backend architecture

> Architecture diagram of the GitHub repository amnanaeem123-coder/smog-prediction-backend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/amnanaeem123-coder/smog-prediction-backend
- Repository: https://github.com/amnanaeem123-coder/smog-prediction-backend

## Overview

This repository is presented as an ML backend for smog-risk prediction, represented by a collection of notebooks rather than sampled application source. Notebook names indicate activities spanning data preparation, analysis, model training, forecasting, risk classification, and mapping. The README does not describe how these activities are wired together, and source excerpts are unavailable, so the graph shows the evidenced components without asserting runtime calls or data flows. The API-test notebook is excluded as test activity.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data Preparation"]
  node_preprocessing["Preprocessing"]
  node_eda["Exploratory Analysis"]
  node_features["Feature Engineering"]
end

subgraph group_models["Modeling"]
  node_training["Model Training"]
  node_forecastfix["Forecast Fix"]
  node_merge["Merge and Retrain"]
  node_retrain["Merged Retraining"]
end

subgraph group_outputs["Prediction Outputs"]
  node_risk["Risk Classification"]
  node_map["Folium Map"]
end

click node_preprocessing "https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week2_Preprocessing.ipynb"
click node_eda "https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week3_EDA.ipynb"
click node_features "https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week4_FeatureEngineering.ipynb"
click node_training "https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week5_ModelTraining.ipynb"
click node_forecastfix "https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week5b_ForecastFix.ipynb"
click node_risk "https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week7_RiskClassification.ipynb"
click node_map "https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week8_FoliumMap.ipynb"
click node_merge "https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Pollution_Merge.ipynb"
click node_retrain "https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week10_PollutionMerge_Retrain.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_preprocessing,node_eda,node_features toneBlue
class node_training,node_forecastfix,node_merge,node_retrain toneAmber
class node_risk,node_map toneMint
```

## Components

### Data Preparation

- [Preprocessing](https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week2_Preprocessing.ipynb): `FYP_Week2_Preprocessing.ipynb`
- [Exploratory Analysis](https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week3_EDA.ipynb): `FYP_Week3_EDA.ipynb`
- [Feature Engineering](https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week4_FeatureEngineering.ipynb): `FYP_Week4_FeatureEngineering.ipynb`

### Modeling

- [Model Training](https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week5_ModelTraining.ipynb): `FYP_Week5_ModelTraining.ipynb`
- [Forecast Fix](https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week5b_ForecastFix.ipynb): `FYP_Week5b_ForecastFix.ipynb`
- [Merge and Retrain](https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Pollution_Merge.ipynb): `FYP_Pollution_Merge.ipynb`
- [Merged Retraining](https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week10_PollutionMerge_Retrain.ipynb): `FYP_Week10_PollutionMerge_Retrain.ipynb`

### Prediction Outputs

- [Risk Classification](https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week7_RiskClassification.ipynb): `FYP_Week7_RiskClassification.ipynb`
- [Folium Map](https://github.com/amnanaeem123-coder/smog-prediction-backend/blob/main/FYP_Week8_FoliumMap.ipynb): `FYP_Week8_FoliumMap.ipynb`
