Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Financial Crime Detection Pipeline & Tableau Integration

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.

🎯 Overview

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.

Key Features

  • 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 .hyper files 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.

🏗️ Architecture

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]
Loading

📁 Project Structure

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

🚀 Quick Start

Prerequisites

  • Python 3.10+
  • Git LFS (Large File Storage) installed
  • Tableau Desktop (for viewing results)

1. Installation

# 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 version

2. Configuration

Create a .env file from the example:

cp .env.example .env

Edit .env to configure thresholds:

  • RISK_SCORE_THRESHOLD_HIGH=80
  • CRIME_RING_MIN_SIZE=3
  • TABLEAU_DATA_DIR=./data/hyper_files

3. Running the Pipeline

Place your raw data files in data/raw/ and run:

python process_v4.py

This will:

  1. Ingest all CSVs in data/raw/.
  2. Build the transaction graph.
  3. Detect fraud rings and calculate risk scores.
  4. Output .hyper files to data/hyper_files/.

📊 Tableau Integration

  1. Run the pipeline to generate transactions.hyper.
  2. Open Tableau Desktop.
  3. Connect to a file -> More... -> Select data/hyper_files/transactions.hyper.
  4. Drag Risk Score to colors and Source Account to details to visualize the network.

🛡️ Security & Privacy

  • 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).

🏆 Hackathon Metrics

  • 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages