# prasanna-4278/rainfall-methodology-recommender architecture

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

- Interactive diagram: https://gitdiagram.com/prasanna-4278/rainfall-methodology-recommender
- Repository: https://github.com/prasanna-4278/rainfall-methodology-recommender

## Overview

The product is a rainfall-methodology recommendation system, exposed through both a web interface and a command-line workflow. Its principal path accepts an unseen weather dataset, loads and cleans it, profiles its characteristics, matches that profile against the knowledge base of four published methodologies, then trains the selected methodology to produce rainfall predictions and probabilities. A separate benchmark path compares the four adaptations and builds the knowledge base. The graph includes all indexed core modules; unsampled module behavior and relationships are limited to documented or indexed references.

Main entry points: [`main.py`](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/main.py) (CLI Workflow), [`app.py`](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/app.py) (API Backend), [`src/prediction.py`](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/prediction.py) (Prediction Pipeline), [`src/comparison.py`](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/comparison.py) (Benchmark Comparison)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User Interfaces"]
  node_web_ui["Web Interface<br/>[index.html]"]
  node_web_backend["API Backend<br/>[app.py]"]
  node_cli["CLI Workflow<br/>[main.py]"]
end

subgraph group_data["Dataset Preparation"]
  node_data_loader["Dataset Loader<br/>[data_loader.py]"]
  node_data_cleaning["Cleaning and Target<br/>[data_cleaning.py]"]
  node_profiler["Dataset Profiler"]
end

subgraph group_recommendation["Methodology Recommendation"]
  node_recommender["Suitability Recommender"]
end

subgraph group_modeling["Modeling and Evaluation"]
  node_prediction["Prediction Pipeline<br/>[prediction.py]"]
  node_paper1["Paper 1 Adaptation"]
  node_paper2["Paper 2 Adaptation"]
  node_paper3["Paper 3 Adaptation"]
  node_paper4["Paper 4 Adaptation"]
  node_features["Temporal Features"]
  node_evaluation["Rainfall Metrics<br/>[evaluation.py]"]
end

subgraph group_research["Benchmark Knowledge"]
  node_knowledge_base["Methodology Knowledge Base<br/>[knowledge_base.py]"]
  node_profiles["Methodology Profiles"]
  node_comparison["Benchmark Comparison<br/>[comparison.py]"]
end

node_user(("Researcher"))
node_browser(("Web Browser"))
node_uploaded_data["Weather Dataset"]
node_predictions["Prediction Output"]

node_user -->|"uses"| node_browser
node_browser -->|"opens"| node_web_ui
node_web_ui -.->|"requests analysis"| node_web_backend
node_user -->|"runs workflow"| node_cli
node_uploaded_data -->|"uploads to"| node_web_backend
node_uploaded_data -->|"provides data"| node_cli
node_web_backend -->|"loads dataset"| node_data_loader
node_web_backend -->|"cleans dataset"| node_data_cleaning
node_web_backend -->|"profiles dataset"| node_profiler
node_web_backend -->|"requests recommendation"| node_recommender
node_web_backend -->|"runs prediction"| node_prediction
node_cli -->|"loads dataset"| node_data_loader
node_cli -->|"cleans dataset"| node_data_cleaning
node_cli -->|"profiles dataset"| node_profiler
node_cli -->|"runs benchmark"| node_comparison
node_cli -->|"builds profiles"| node_knowledge_base
node_cli -->|"requests recommendation"| node_recommender
node_cli -->|"runs prediction"| node_prediction
node_recommender -->|"uses profile"| node_profiler
node_recommender -->|"reads"| node_profiles
node_knowledge_base -.->|"writes"| node_profiles
node_prediction -->|"dispatches to"| node_paper1
node_prediction -->|"dispatches to"| node_paper2
node_prediction -->|"dispatches to"| node_paper3
node_prediction -->|"dispatches to"| node_paper4
node_prediction -->|"writes"| node_predictions
node_comparison -->|"benchmarks"| node_paper1
node_comparison -->|"benchmarks"| node_paper2
node_comparison -->|"benchmarks"| node_paper3
node_comparison -->|"benchmarks"| node_paper4
node_paper1 -->|"uses"| node_features
node_paper4 -->|"uses"| node_features
node_paper1 -.->|"evaluates with"| node_evaluation
node_paper2 -.->|"evaluates with"| node_evaluation
node_paper3 -.->|"evaluates with"| node_evaluation
node_paper4 -.->|"evaluates with"| node_evaluation

click node_web_ui "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/templates/index.html"
click node_web_backend "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/app.py"
click node_cli "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/main.py"
click node_data_loader "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/data_loader.py"
click node_data_cleaning "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/data_cleaning.py"
click node_profiler "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/dataset_profiler.py"
click node_recommender "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/methodology_recommender.py"
click node_knowledge_base "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/knowledge_base.py"
click node_profiles "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/methodology_profiles.csv"
click node_prediction "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/prediction.py"
click node_paper1 "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/methodology_paper1.py"
click node_paper2 "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/methodology_paper2.py"
click node_paper3 "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/methodology_paper3.py"
click node_paper4 "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/methodology_paper4.py"
click node_features "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/feature_engineering.py"
click node_evaluation "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/evaluation.py"
click node_comparison "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/comparison.py"
click node_predictions "https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/results/predictions/rainfall_predictions.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_web_ui,node_web_backend,node_cli,node_browser toneBlue
class node_data_loader,node_data_cleaning,node_profiler toneAmber
class node_recommender toneMint
class node_prediction,node_paper1,node_paper2,node_paper3,node_paper4,node_features,node_evaluation toneRose
class node_knowledge_base,node_profiles,node_comparison,node_user,node_uploaded_data toneIndigo
class node_predictions toneTeal
```

## Components

### User Interfaces

- [Web Interface](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/templates/index.html): `templates/index.html`
- [API Backend](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/app.py): `app.py`
- [CLI Workflow](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/main.py): `main.py`

### Dataset Preparation

- [Dataset Loader](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/data_loader.py): `src/data_loader.py`
- [Cleaning and Target](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/data_cleaning.py): `src/data_cleaning.py`
- [Dataset Profiler](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/dataset_profiler.py): `src/dataset_profiler.py`

### Methodology Recommendation

- [Suitability Recommender](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/methodology_recommender.py): `src/methodology_recommender.py`

### Modeling and Evaluation

- [Prediction Pipeline](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/prediction.py): `src/prediction.py`
- [Paper 1 Adaptation](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/methodology_paper1.py): `src/methodology_paper1.py`
- [Paper 2 Adaptation](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/methodology_paper2.py): `src/methodology_paper2.py`
- [Paper 3 Adaptation](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/methodology_paper3.py): `src/methodology_paper3.py`
- [Paper 4 Adaptation](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/methodology_paper4.py): `src/methodology_paper4.py`
- [Temporal Features](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/feature_engineering.py): `src/feature_engineering.py`
- [Rainfall Metrics](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/evaluation.py): `src/evaluation.py`

### Benchmark Knowledge

- [Methodology Knowledge Base](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/knowledge_base.py): `src/knowledge_base.py`
- [Methodology Profiles](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/methodology_profiles.csv): `methodology_profiles.csv`
- [Benchmark Comparison](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/src/comparison.py): `src/comparison.py`

### Other components

- **Researcher**
- **Web Browser**
- **Weather Dataset**
- [Prediction Output](https://github.com/prasanna-4278/rainfall-methodology-recommender/blob/main/results/predictions/rainfall_predictions.csv): `results/predictions/rainfall_predictions.csv`

## Connections

- Researcher → Web Browser: uses
- Web Browser → Web Interface: opens
- Web Interface → API Backend: requests analysis
- Researcher → CLI Workflow: runs workflow (evidence: `main.py`)
- Weather Dataset → API Backend: uploads to (evidence: `app.py`)
- Weather Dataset → CLI Workflow: provides data (evidence: `main.py`)
- API Backend → Dataset Loader: loads dataset (evidence: `app.py`)
- API Backend → Cleaning and Target: cleans dataset (evidence: `app.py`)
- API Backend → Dataset Profiler: profiles dataset (evidence: `app.py`)
- API Backend → Suitability Recommender: requests recommendation (evidence: `app.py`)
- API Backend → Prediction Pipeline: runs prediction (evidence: `app.py`)
- CLI Workflow → Dataset Loader: loads dataset (evidence: `main.py`)
- CLI Workflow → Cleaning and Target: cleans dataset (evidence: `main.py`)
- CLI Workflow → Dataset Profiler: profiles dataset (evidence: `main.py`)
- CLI Workflow → Benchmark Comparison: runs benchmark (evidence: `main.py`)
- CLI Workflow → Methodology Knowledge Base: builds profiles (evidence: `main.py`)
- CLI Workflow → Suitability Recommender: requests recommendation (evidence: `main.py`)
- CLI Workflow → Prediction Pipeline: runs prediction (evidence: `main.py`)
- Suitability Recommender → Dataset Profiler: uses profile (evidence: `src/methodology_recommender.py`)
- Suitability Recommender → Methodology Profiles: reads (evidence: `src/methodology_recommender.py`)
- Methodology Knowledge Base → Methodology Profiles: writes
- Prediction Pipeline → Paper 1 Adaptation: dispatches to (evidence: `src/prediction.py`)
- Prediction Pipeline → Paper 2 Adaptation: dispatches to (evidence: `src/prediction.py`)
- Prediction Pipeline → Paper 3 Adaptation: dispatches to (evidence: `src/prediction.py`)
- Prediction Pipeline → Paper 4 Adaptation: dispatches to (evidence: `src/prediction.py`)
- Prediction Pipeline → Prediction Output: writes (evidence: `src/prediction.py`)
- Benchmark Comparison → Paper 1 Adaptation: benchmarks (evidence: `src/comparison.py`)
- Benchmark Comparison → Paper 2 Adaptation: benchmarks (evidence: `src/comparison.py`)
- Benchmark Comparison → Paper 3 Adaptation: benchmarks (evidence: `src/comparison.py`)
- Benchmark Comparison → Paper 4 Adaptation: benchmarks (evidence: `src/comparison.py`)
- Paper 1 Adaptation → Temporal Features: uses (evidence: `src/methodology_paper1.py`)
- Paper 4 Adaptation → Temporal Features: uses (evidence: `src/methodology_paper4.py`)
- Paper 1 Adaptation → Rainfall Metrics: evaluates with (evidence: `src/methodology_paper1.py`)
- Paper 2 Adaptation → Rainfall Metrics: evaluates with (evidence: `src/methodology_paper2.py`)
- Paper 3 Adaptation → Rainfall Metrics: evaluates with (evidence: `src/methodology_paper3.py`)
- Paper 4 Adaptation → Rainfall Metrics: evaluates with (evidence: `src/methodology_paper4.py`)
