A powerful web-based analytics platform for retail transaction analysis using Apache Spark and real-time visualizations
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
|
PySpark |
PySpark |
Flask |
FP-Growth |
Ngrok |
Frontend
|
HTML5 |
CSS3 |
JavaScript |
Chart.js |
Glassmorphism |
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.py3. 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
Sales Trends
Architecture
┌─────────────────┐ ┌──────────────────┐
│ Local Browser │ ◄─────► │ Flask Frontend │
│ (Dashboard) │ │ (Port 3000) │
└─────────────────┘ └──────────────────┘
│
│ HTTP
▼
┌──────────────────┐
│ Ngrok Tunnel │
└──────────────────┘
│
▼
┌──────────────────┐
│ Google Colab │
│ ┌────────────┐ │
│ │ Spark │ │
│ │ Engine │ │
│ └────────────┘ │
│ Flask API (5000)│
└──────────────────┘
On this page
Contributors
Created July 28, 2025
Updated December 23, 2025


