# dhinakaran311/food_delivery_time_prediction architecture

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

- Interactive diagram: https://gitdiagram.com/dhinakaran311/food_delivery_time_prediction
- Repository: https://github.com/dhinakaran311/food_delivery_time_prediction

## Overview

This is a Streamlit food-delivery-time prediction app. Its main workflow takes order details from a user, maps them into model features, loads a saved Linear Regression model, and presents an estimated duration and expected arrival time. The README also describes an upstream data-analysis and model-training workflow. Those stages are represented from documentation and repository files; their implementation details are not shown in the sampled source.

Main entry points: [`index.py`](https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/index.py) (Order inputs), [`Food_Delivery_Times.csv`](https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/Food_Delivery_Times.csv) (Delivery dataset), [`Dhinakaran_EDA.ipynb`](https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/Dhinakaran_EDA.ipynb) (EDA and insights), [`cleaned_dataset.csv`](https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/cleaned_dataset.csv) (Data cleaning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Prediction app"]
  node_inputs["Order inputs<br/>[index.py]"]
  node_encoding["Feature mapping<br/>[index.py]"]
  node_inference["Model inference<br/>[index.py]"]
  node_results["Estimate and ETA<br/>[index.py]"]
  node_feedback["Delivery conditions<br/>[index.py]"]
end

subgraph group_model["Model workflow"]
  node_artifact["Saved model<br/>[modellinear.pkl]"]
  node_training["Training and evaluation"]
end

subgraph group_analysis["Data analysis"]
  node_rawdata["Delivery dataset"]
  node_eda["EDA and insights"]
  node_cleaning["Data cleaning"]
end

node_user(("Order user"))

node_user -->|"enters details"| node_inputs
node_inputs -->|"maps inputs"| node_encoding
node_encoding -->|"supplies features"| node_inference
node_inference -->|"loads model"| node_artifact
node_inference -->|"returns estimate"| node_results
node_results -->|"displays estimate"| node_user
node_inputs -->|"selects messages"| node_feedback
node_feedback -->|"shows guidance"| node_user
node_rawdata -.->|"analyzes data"| node_eda
node_rawdata -.->|"cleans data"| node_cleaning
node_cleaning -.->|"prepares features"| node_training
node_training -.->|"saves model"| node_artifact
node_eda -.->|"informs insights"| node_user

click node_inputs "https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/index.py"
click node_encoding "https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/index.py"
click node_inference "https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/index.py"
click node_artifact "https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/modellinear.pkl"
click node_results "https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/index.py"
click node_feedback "https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/index.py"
click node_rawdata "https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/Food_Delivery_Times.csv"
click node_eda "https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/Dhinakaran_EDA.ipynb"
click node_cleaning "https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/cleaned_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_inputs,node_encoding,node_inference,node_results,node_feedback,node_user toneBlue
class node_artifact,node_training toneAmber
class node_rawdata,node_eda,node_cleaning toneMint
```

## Components

### Prediction app

- [Order inputs](https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/index.py): `index.py`
- [Feature mapping](https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/index.py): `index.py`
- [Model inference](https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/index.py): `index.py`
- [Estimate and ETA](https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/index.py): `index.py`
- [Delivery conditions](https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/index.py): `index.py`

### Model workflow

- [Saved model](https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/modellinear.pkl): `modellinear.pkl`
- **Training and evaluation**

### Data analysis

- [Delivery dataset](https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/Food_Delivery_Times.csv): `Food_Delivery_Times.csv`
- [EDA and insights](https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/Dhinakaran_EDA.ipynb): `Dhinakaran_EDA.ipynb`
- [Data cleaning](https://github.com/dhinakaran311/food_delivery_time_prediction/blob/main/cleaned_dataset.csv): `cleaned_dataset.csv`

### Other components

- **Order user**

## Connections

- Order user → Order inputs: enters details (evidence: `index.py`)
- Order inputs → Feature mapping: maps inputs (evidence: `index.py`)
- Feature mapping → Model inference: supplies features (evidence: `index.py`)
- Model inference → Saved model: loads model (evidence: `index.py`)
- Model inference → Estimate and ETA: returns estimate (evidence: `index.py`)
- Estimate and ETA → Order user: displays estimate (evidence: `index.py`)
- Order inputs → Delivery conditions: selects messages (evidence: `index.py`)
- Delivery conditions → Order user: shows guidance (evidence: `index.py`)
- Delivery dataset → EDA and insights: analyzes data (evidence: `README.md`)
- Delivery dataset → Data cleaning: cleans data (evidence: `README.md`)
- Data cleaning → Training and evaluation: prepares features (evidence: `README.md`)
- Training and evaluation → Saved model: saves model (evidence: `README.md`)
- EDA and insights → Order user: informs insights (evidence: `README.md`)
