# diwas524/weather-prediction-using-machine-learning architecture

> Architecture diagram of the GitHub repository diwas524/weather-prediction-using-machine-learning, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/diwas524/weather-prediction-using-machine-learning
- Repository: https://github.com/diwas524/weather-prediction-using-machine-learning

## Overview

This repository combines a weather-prediction research project with a small Tkinter app. The app’s workflow is user-entered weather measurements → input validation → CSV-backed preprocessing and decision-tree training → prediction displayed in the interface. The README also describes research experiments with decision trees, logistic regression, and k-nearest neighbors; notebook details are not sampled, so those capabilities are represented without inferring their internal flow.

Main entry points: [`tkinter-app/calculation.py`](https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/calculation.py) (Prediction calculation), [`tkinter-app/main.py`](https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/main.py) (Prediction interface), [`Weather Prediction Using Machine Learning.ipynb`](https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/Weather%20Prediction%20Using%20Machine%20Learning.ipynb) (Model experiments), [`tkinter-app/dataset.csv`](https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/dataset.csv) (App weather data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_tkinter_app["Prediction interface<br/>[main.py]"]
  node_input_validation["Input validation<br/>[main.py]"]
end

subgraph group_prediction["Prediction runtime"]
  node_runtime_calculation["Prediction calculation<br/>[calculation.py]"]
  node_runtime_data[("App weather data<br/>[dataset.csv]")]
  node_preprocessing["Data preprocessing<br/>[calculation.py]"]
  node_tree_training["Decision-tree training<br/>[calculation.py]"]
  node_weather_prediction["Weather prediction<br/>[calculation.py]"]
end

subgraph group_research["ML research"]
  node_research_notebook["Model experiments"]
  node_research_data[("Research dataset<br/>[dataset.csv]")]
end

node_user(("User"))

node_user -->|"enters inputs"| node_tkinter_app
node_tkinter_app -->|"validates inputs"| node_input_validation
node_tkinter_app -->|"calls process_inputs"| node_runtime_calculation
node_runtime_calculation -->|"reads CSV"| node_runtime_data
node_runtime_calculation -->|"preprocesses data"| node_preprocessing
node_preprocessing -->|"prepares training data"| node_tree_training
node_tree_training -->|"predicts labels"| node_weather_prediction
node_runtime_calculation -->|"returns weather result"| node_tkinter_app
node_research_notebook -.->|"uses weather data"| node_research_data

click node_tkinter_app "https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/main.py"
click node_input_validation "https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/main.py"
click node_runtime_calculation "https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/calculation.py"
click node_runtime_data "https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/dataset.csv"
click node_preprocessing "https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/calculation.py"
click node_tree_training "https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/calculation.py"
click node_weather_prediction "https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/calculation.py"
click node_research_notebook "https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/Weather%20Prediction%20Using%20Machine%20Learning.ipynb"
click node_research_data "https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/dataset.csv"

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_tkinter_app,node_input_validation,node_user toneBlue
class node_runtime_calculation,node_runtime_data,node_preprocessing,node_tree_training,node_weather_prediction toneAmber
class node_research_notebook,node_research_data toneMint
```

## Components

### User interface

- [Prediction interface](https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/main.py): `tkinter-app/main.py`
- [Input validation](https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/main.py): `tkinter-app/main.py`

### Prediction runtime

- [Prediction calculation](https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/calculation.py): `tkinter-app/calculation.py`
- [App weather data](https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/dataset.csv): `tkinter-app/dataset.csv`
- [Data preprocessing](https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/calculation.py): `tkinter-app/calculation.py`
- [Decision-tree training](https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/calculation.py): `tkinter-app/calculation.py`
- [Weather prediction](https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/tkinter-app/calculation.py): `tkinter-app/calculation.py`

### ML research

- [Model experiments](https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/Weather%20Prediction%20Using%20Machine%20Learning.ipynb): `Weather Prediction Using Machine Learning.ipynb`
- [Research dataset](https://github.com/diwas524/weather-prediction-using-machine-learning/blob/main/dataset.csv): `dataset.csv`

### Other components

- **User**

## Connections

- User → Prediction interface: enters inputs (evidence: `tkinter-app/main.py`)
- Prediction interface → Input validation: validates inputs (evidence: `tkinter-app/main.py`)
- Prediction interface → Prediction calculation: calls process_inputs (evidence: `tkinter-app/main.py`)
- Prediction calculation → App weather data: reads CSV (evidence: `tkinter-app/calculation.py`)
- Prediction calculation → Data preprocessing: preprocesses data (evidence: `tkinter-app/calculation.py`)
- Data preprocessing → Decision-tree training: prepares training data (evidence: `tkinter-app/calculation.py`)
- Decision-tree training → Weather prediction: predicts labels (evidence: `tkinter-app/calculation.py`)
- Prediction calculation → Prediction interface: returns weather result (evidence: `tkinter-app/main.py`)
- Model experiments → Research dataset: uses weather data (evidence: `README.md`)
