# skarshad1928/teleco_customer_churn architecture

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

- Interactive diagram: https://gitdiagram.com/skarshad1928/teleco_customer_churn
- Repository: https://github.com/skarshad1928/teleco_customer_churn

## Overview

This repository is a Streamlit telecom-customer churn application. Users can explore customer data, train and evaluate Logistic Regression or Random Forest models, predict churn for an entered customer, view a Power BI analysis dashboard, and review churn-factor summaries. The main workflow runs through pages in one Python file: training reads cleaned data and saves model artifacts; prediction loads the Logistic Regression artifacts. Source excerpts show these paths, but do not expose every preprocessing detail or all artifact-writing logic.

Main entry points: [`Deployment_1.py`](https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py) (Streamlit app), [`Telco_customer_churn.xlsx`](https://github.com/skarshad1928/teleco_customer_churn/blob/main/Telco_customer_churn.xlsx) (Customer churn data), [`Final_Complete_cleaned.xlsx`](https://github.com/skarshad1928/teleco_customer_churn/blob/main/Final_Complete_cleaned.xlsx) (Cleaned training data), [`best_logistic_model.pkl`](https://github.com/skarshad1928/teleco_customer_churn/blob/main/best_logistic_model.pkl) (Logistic model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Streamlit application"]
  node_app["Streamlit app<br/>[Deployment_1.py]"]
end

subgraph group_data["Customer data"]
  node_explore["Data exploration<br/>[Deployment_1.py]"]
  node_rawdata["Customer churn data"]
  node_cleaned["Cleaned training data"]
end

subgraph group_modeling["Modeling and prediction"]
  node_train["Model training<br/>[Deployment_1.py]"]
  node_evaluate["Model evaluation<br/>[Deployment_1.py]"]
  node_logistic["Logistic model"]
  node_scaler["Feature scaler<br/>[scaler.pkl]"]
  node_predict["Customer prediction<br/>[Deployment_1.py]"]
end

subgraph group_insights["Analysis and insights"]
  node_dashboard["Churn dashboard<br/>[Deployment_1.py]"]
  node_summary["Churn summary<br/>[Deployment_1.py]"]
end

node_user(("User"))
node_powerbi["Power BI report"]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_explore
node_explore -->|"reads"| node_rawdata
node_app -->|"routes to"| node_train
node_train -->|"reads"| node_cleaned
node_app -->|"routes to"| node_evaluate
node_train -->|"evaluates"| node_evaluate
node_app -->|"routes to"| node_predict
node_predict -->|"loads"| node_logistic
node_predict -->|"loads"| node_scaler
node_app -->|"routes to"| node_dashboard
node_dashboard -->|"embeds"| node_powerbi
node_app -->|"routes to"| node_summary
node_summary -->|"reads"| node_rawdata

click node_app "https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py"
click node_explore "https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py"
click node_rawdata "https://github.com/skarshad1928/teleco_customer_churn/blob/main/Telco_customer_churn.xlsx"
click node_train "https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py"
click node_cleaned "https://github.com/skarshad1928/teleco_customer_churn/blob/main/Final_Complete_cleaned.xlsx"
click node_evaluate "https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py"
click node_logistic "https://github.com/skarshad1928/teleco_customer_churn/blob/main/best_logistic_model.pkl"
click node_scaler "https://github.com/skarshad1928/teleco_customer_churn/blob/main/scaler.pkl"
click node_predict "https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py"
click node_dashboard "https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py"
click node_summary "https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py"

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_app,node_user toneBlue
class node_explore,node_rawdata,node_cleaned toneAmber
class node_train,node_evaluate,node_logistic,node_scaler,node_predict toneMint
class node_dashboard,node_summary toneRose
class node_powerbi toneIndigo
```

## Components

### Streamlit application

- [Streamlit app](https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py): `Deployment_1.py`

### Customer data

- [Data exploration](https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py): `Deployment_1.py`
- [Customer churn data](https://github.com/skarshad1928/teleco_customer_churn/blob/main/Telco_customer_churn.xlsx): `Telco_customer_churn.xlsx`
- [Cleaned training data](https://github.com/skarshad1928/teleco_customer_churn/blob/main/Final_Complete_cleaned.xlsx): `Final_Complete_cleaned.xlsx`

### Modeling and prediction

- [Model training](https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py): `Deployment_1.py`
- [Model evaluation](https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py): `Deployment_1.py`
- [Logistic model](https://github.com/skarshad1928/teleco_customer_churn/blob/main/best_logistic_model.pkl): `best_logistic_model.pkl`
- [Feature scaler](https://github.com/skarshad1928/teleco_customer_churn/blob/main/scaler.pkl): `scaler.pkl`
- [Customer prediction](https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py): `Deployment_1.py`

### Analysis and insights

- [Churn dashboard](https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py): `Deployment_1.py`
- [Churn summary](https://github.com/skarshad1928/teleco_customer_churn/blob/main/Deployment_1.py): `Deployment_1.py`

### Other components

- **User**
- **Power BI report**

## Connections

- User → Streamlit app: uses (evidence: `Deployment_1.py`)
- Streamlit app → Data exploration: routes to (evidence: `Deployment_1.py`)
- Data exploration → Customer churn data: reads (evidence: `Deployment_1.py`)
- Streamlit app → Model training: routes to (evidence: `Deployment_1.py`)
- Model training → Cleaned training data: reads (evidence: `Deployment_1.py`)
- Streamlit app → Model evaluation: routes to (evidence: `Deployment_1.py`)
- Model training → Model evaluation: evaluates (evidence: `Deployment_1.py`)
- Streamlit app → Customer prediction: routes to (evidence: `Deployment_1.py`)
- Customer prediction → Logistic model: loads (evidence: `Deployment_1.py`)
- Customer prediction → Feature scaler: loads (evidence: `Deployment_1.py`)
- Streamlit app → Churn dashboard: routes to (evidence: `Deployment_1.py`)
- Churn dashboard → Power BI report: embeds (evidence: `Deployment_1.py`)
- Streamlit app → Churn summary: routes to (evidence: `Deployment_1.py`)
- Churn summary → Customer churn data: reads (evidence: `Deployment_1.py`)
