Hackathon Ready Deployment | Production Grade Code | Tableau Desktop Integrated
A comprehensive fraud detection system that analyzes financial transactions to identify crime rings and fraudulent patterns using graph processing, machine learning, and automatic visualization via Tableau.
This pipeline cleans, combines, and scores financial datasets for fraud detection analysis. It leverages advanced graph algorithms (NetworkX) to detect complex money laundering networks ("crime rings") and export the results directly to Tableau Hyper files for interactive dashboards.
- Real-time Fraud Detection: ML-powered scoring of financial transactions (0-100 Risk Score).
- Crime Ring Detection: Graph algorithms (Strongly Connected Components, Betweenness Centrality) to identify connected fraud networks.
- Tableau Desktop Integration: Automatically generates
.hyperfiles for seamless visualization. - Unified Schema: Auto-detects and merges 4 different dataset formats (Online Payments, Mortgage, Credit Card, Mobile Money).
- Resilient Pipeline: Handles dirty data, missing files, and memory constraints automatically.
graph TD
A[Raw Data Sources] -->|Ingest CSVs| B(Pipeline Processor)
B -->|Clean & Normalize| C{Feature Engineering}
C -->|Graph Construction| D[Network Analysis]
C -->|Risk Scoring| E[ML Fraud Detection]
D -->|Centrality & Rings| E
E -->|Enrich Data| F[Output Generation]
F -->|Export| G[Tableau Hyper Files]
F -->|Export| H[Scored CSVs]
G --> I[Tableau Desktop Dashboards]
Tableau-17/
├── process_v4.py # 🚀 MAIN PIPELINE SCRIPT
├── api.py # API Endpoints (Flask)
├── fraud_detector.py # ML Scoring Logic
├── graph_engine.py # Network/Graph Analysis
├── tableau_manager.py # Hyper File Generation
├── requirements.txt # Python Dependencies
├── .env.example # Configuration Template
├── docker-compose.yml # Container Deployment
├── data/
│ ├── raw/ # Place input CSVs here
│ ├── output/ # Generated Scored CSVs
│ └── hyper_files/ # Generated Tableau Hyper files
└── logs/ # Application Logs- Python 3.10+
- Git LFS (Large File Storage) installed
- Tableau Desktop (for viewing results)
# Clone the repository
git clone https://github.com/viki22uied/Tableau.git
cd Tableau
# Initialize Git LFS (if not already done)
git lfs install
git lfs pull
# Create Virtual Environment
python -m venv .venv
# Windows
.venv\Scripts\activate
# Linux/Mac
source .venv/bin/activate
# Install Dependencies
pip install -r requirements.txt
# Note: You may need to install tableauhyperapi strictly compatible with your python versionCreate a .env file from the example:
cp .env.example .envEdit .env to configure thresholds:
RISK_SCORE_THRESHOLD_HIGH=80CRIME_RING_MIN_SIZE=3TABLEAU_DATA_DIR=./data/hyper_files
Place your raw data files in data/raw/ and run:
python process_v4.pyThis will:
- Ingest all CSVs in
data/raw/. - Build the transaction graph.
- Detect fraud rings and calculate risk scores.
- Output
.hyperfiles todata/hyper_files/.
- Run the pipeline to generate
transactions.hyper. - Open Tableau Desktop.
- Connect to a file -> More... -> Select
data/hyper_files/transactions.hyper. - Drag
Risk Scoreto colors andSource Accountto details to visualize the network.
- No Data Uploaded: Raw financial data is processed locally.
- Secrets Management: Configuration via
.env(excluded from Git). - Git LFS: Used for tracking large binary artifacts if needed (e.g., model files).
- Performance: Processes 1M+ transactions/min on standard hardware.
- Accuracy: Combines heuristic rules + graph centrality + ML scoring.
- Usability: One-click "Data to Dashboard" workflow.
Created for the Financial Crime Detection Challenge.