# vardhan1627/electricity-fraud-detection architecture

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

- Interactive diagram: https://gitdiagram.com/vardhan1627/electricity-fraud-detection
- Repository: https://github.com/vardhan1627/electricity-fraud-detection

## Overview

This repository presents an electricity-fraud detection and inspection-prioritization project. Its documented workflow runs from SGCC consumption data through preprocessing, feature engineering, fraud modeling, rule evaluation, and risk scoring to a Streamlit app and SQL/Power BI. The tree contains a trained-model notebook, feature and prediction CSVs, and a dashboard HTML file, but no application or pipeline source. Accordingly, the graph follows the README’s documented stages; relationships beyond the available artifacts are documented rather than verified in source.

Main entry points: [`electricity_fraud_predictions.csv`](https://github.com/vardhan1627/electricity-fraud-detection/blob/main/electricity_fraud_predictions.csv) (Fraud predictions), [`SGCC_features.csv`](https://github.com/vardhan1627/electricity-fraud-detection/blob/main/SGCC_features.csv) (Feature engineering), [`Model Trained file.ipynb`](https://github.com/vardhan1627/electricity-fraud-detection/blob/main/Model%20Trained%20file.ipynb) (Fraud model), [`electricity_fraud_detection_dashboard.html`](https://github.com/vardhan1627/electricity-fraud-detection/blob/main/electricity_fraud_detection_dashboard.html) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_preparation["Data preparation"]
  node_preprocessing["Preprocessing"]
  node_features["Feature engineering<br/>[SGCC_features.csv]"]
end

subgraph group_detection["Fraud detection"]
  node_model["Fraud model"]
  node_rules["Rule engine"]
  node_risk["Risk scoring"]
end

subgraph group_delivery["Results and delivery"]
  node_predictions["Fraud predictions"]
  node_dashboard["Dashboard"]
  node_streamlit["Streamlit app"]
  node_sql_powerbi[("SQL / Power BI")]
end

node_sgcc[("SGCC data")]

node_sgcc -->|"provides data"| node_preprocessing
node_preprocessing -->|"engineers features"| node_features
node_features -->|"feeds model"| node_model
node_model -->|"scores fraud"| node_rules
node_rules -->|"informs risk"| node_risk
node_risk -->|"produces results"| node_predictions
node_predictions -->|"displays results"| node_streamlit
node_streamlit -->|"supports reporting"| node_sql_powerbi
node_predictions -.->|"visualizes results"| node_dashboard

click node_features "https://github.com/vardhan1627/electricity-fraud-detection/blob/main/SGCC_features.csv"
click node_model "https://github.com/vardhan1627/electricity-fraud-detection/blob/main/Model%20Trained%20file.ipynb"
click node_predictions "https://github.com/vardhan1627/electricity-fraud-detection/blob/main/electricity_fraud_predictions.csv"
click node_dashboard "https://github.com/vardhan1627/electricity-fraud-detection/blob/main/electricity_fraud_detection_dashboard.html"

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_features toneBlue
class node_model,node_rules,node_risk,node_sgcc toneAmber
class node_predictions,node_dashboard,node_streamlit,node_sql_powerbi toneMint
```

## Components

### Data preparation

- **Preprocessing**
- [Feature engineering](https://github.com/vardhan1627/electricity-fraud-detection/blob/main/SGCC_features.csv): `SGCC_features.csv`

### Fraud detection

- [Fraud model](https://github.com/vardhan1627/electricity-fraud-detection/blob/main/Model%20Trained%20file.ipynb): `Model Trained file.ipynb`
- **Rule engine**
- **Risk scoring**

### Results and delivery

- [Fraud predictions](https://github.com/vardhan1627/electricity-fraud-detection/blob/main/electricity_fraud_predictions.csv): `electricity_fraud_predictions.csv`
- [Dashboard](https://github.com/vardhan1627/electricity-fraud-detection/blob/main/electricity_fraud_detection_dashboard.html): `electricity_fraud_detection_dashboard.html`
- **Streamlit app**
- **SQL / Power BI**

### Other components

- **SGCC data**

## Connections

- SGCC data → Preprocessing: provides data (evidence: `README.md`)
- Preprocessing → Feature engineering: engineers features (evidence: `README.md`)
- Feature engineering → Fraud model: feeds model (evidence: `README.md`)
- Fraud model → Rule engine: scores fraud (evidence: `README.md`)
- Rule engine → Risk scoring: informs risk (evidence: `README.md`)
- Risk scoring → Fraud predictions: produces results (evidence: `README.md`)
- Fraud predictions → Streamlit app: displays results (evidence: `README.md`)
- Streamlit app → SQL / Power BI: supports reporting (evidence: `README.md`)
- Fraud predictions → Dashboard: visualizes results
