GitHunt

banner

Open in Colab
Python
Apache Spark
Flask
JavaScript
Chart.js
License: MIT

A powerful web-based analytics platform for retail transaction analysis using Apache Spark and real-time visualizations

Dashboard Preview


Analytics Capabilities

Feature Description
Sales Trends Time-series analysis with daily revenue tracking
Top Products Identify best-selling items by revenue
Geographic Analysis Sales distribution across countries
Basket Analysis Discover frequently bought together items
KPI Metrics Real-time revenue, orders, customers, items

Tech Stack

Backend

Spark
PySpark
Spark
PySpark
Flask
Flask
FP-Growth
FP-Growth
Ngrok
Ngrok

Frontend

HTML5
HTML5
CSS3
CSS3
JavaScript
JavaScript
Chart.js
Chart.js
Glassmorphism
Glassmorphism

Dataset

UCI Online Retail II — 540K+ transactions from a UK-based online retailer

Dataset


Quick Start

1. Start the Backend (Google Colab)

# Upload retail_analysis_spark.ipynb to Google Colab
# Run all cells
# Copy the ngrok URL (e.g., http://xxxx.ngrok-free.app)

2. Start the Frontend (Local)

cd "a:\My project\final"
python app.py

3. Access Dashboard

Open: http://127.0.0.1:3000
Paste your ngrok URL and click "Connect"
Upload your CSV dataset

Basket Analysis Parameters:

  • Min Support: Minimum frequency threshold (default: 0.01)
  • Min Confidence: Minimum rule confidence (default: 0.1)

Recommended for large datasets: Increase min_support to 0.05+ to reduce memory usage.


Screenshots

Market Basket Analysis

Market Basket

Sales Trends


Architecture

┌─────────────────┐         ┌──────────────────┐
│  Local Browser  │ ◄─────► │  Flask Frontend  │
│   (Dashboard)   │         │   (Port 3000)    │
└─────────────────┘         └──────────────────┘
                                     │
                                     │ HTTP
                                     ▼
                            ┌──────────────────┐
                            │  Ngrok Tunnel    │
                            └──────────────────┘
                                     │
                                     ▼
                            ┌──────────────────┐
                            │  Google Colab    │
                            │  ┌────────────┐  │
                            │  │   Spark    │  │
                            │  │   Engine   │  │
                            │  └────────────┘  │
                            │  Flask API (5000)│
                            └──────────────────┘


⭐ If this project helped you, please consider giving it a star!

Made by ARUNAGIRINATHAN K

Built with ❤️ using PySpark & Colab

GitHub
LinkedIn