Not just charts. A decision-support system for Swiggy's growth team.
This project is a full-stack data analytics solution built on 197,430 real Swiggy food delivery orders across India. It goes beyond surface-level charts to answer the kind of strategic questions a growth analyst or product manager at Swiggy would actually care about.
The project combines exploratory data analysis, statistical testing, machine learning scoring models, SQL pipelines, and revenue forecasting into a single cohesive system β delivered through an interactive Streamlit dashboard, a 66-cell Jupyter notebook, and a downloadable 20-sheet Excel KPI report.
Three original analytical frameworks sit at the core:
- City Expansion Opportunity Index β a composite model that ranks every city by growth potential
- Menu Intelligence Matrix β a BCG-style quadrant chart classifying food categories by revenue and satisfaction
- Restaurant Health Score β a viability index that flags at-risk restaurants before they churn
Whether you're exploring the data, running SQL queries, or reviewing the forecasting model, everything is connected through a single source of truth: swiggy_data.xlsx.
| # | Question | Framework / Method |
|---|---|---|
| 1 | Which cities should Swiggy expand into next? | City Expansion Opportunity Index |
| 2 | Which restaurants are at risk of churning off the platform? | Restaurant Health Score |
| 3 | Which food categories are Stars vs Dogs in our portfolio? | Menu Intelligence Matrix |
| 4 | When is peak demand, and how should ops scale? | Synthetic demand modelling + time-of-day analysis |
| 5 | What does revenue look like in the next 3 months? | ARIMA forecasting with train/test validation |
Most Swiggy analysis projects produce the same bar charts. This project builds three proprietary analytical frameworks modelled on consulting methodology:
A 4-signal composite model that scores every city 0β100:
- Revenue Growth Rate (30%) β Is the market accelerating?
- Weighted Customer Rating (25%) β Does the market have satisfied customers?
- Order Density / restaurant (25%) β How efficient is the market?
- Category Diversity (20%) β How sticky is the platform?
Produces a strategic 4-quadrant scatter: Stars / Untapped / Emerging / Low Priority.
Classifies food categories into four strategic quadrants:
- β Stars β High revenue share + high rating β Promote aggressively
- π Hidden Gems β Low revenue + high rating β Invest in discovery
- π° Cash Cows β High revenue + lower rating β Maintain and improve
β οΈ Review Needed β Low revenue + low rating β Revamp or discontinue
Assigns each restaurant a Health Score (0β100):
- Revenue contribution (40%) + Customer satisfaction (30%) + Order volume (20%) + Recency (10%)
- Tiered output: Champion / Healthy / At Risk / Critical
| Attribute | Value |
|---|---|
| Source | Swiggy platform orders |
| Rows | 197,430 |
| Columns | 10 |
| Key Fields | State, City, Order Date, Restaurant Name, Category, Dish Name, Price (INR), Rating, Rating Count |
SwiggyAnalysis/
β
βββ app.py # Streamlit dashboard entrypoint
βββ dashboard_ui.py # Page layout, sidebar filters, KPIs, footer
βββ dashboard_tabs.py # 9 dashboard tab renderers
βββ analytics_models.py # RFM, cohorts, statistical tests, forecast validation
βββ export_tableau_extracts.py # Tableau-ready CSV export layer
βββ swiggy_sales_analysis.ipynb # Main analysis notebook
βββ sql_pipeline.py # SQLite DB + 12 analytics queries
βββ generate_excel_report.py # 20-sheet formatted Excel KPI report
βββ next-dashboard/ # Next.js analytics dashboard
βββ tests/ # Pytest suite
βββ tableau_extracts/ # Tableau workbook + extract docs
βββ swiggy_data.xlsx # Source dataset
βββ requirements.txt # Runtime dependencies
βββ README.md
| Tab | Content |
|---|---|
| π Overview | Revenue KPIs, quarterly performance, day-of-week patterns |
| πΊοΈ Geographic | State/city heatmaps, revenue vs rating scatter |
| π― Segments | Order-value segments, food preference heatmap, frequency tiers |
| π Trends | Monthly trend + 3-month moving average, MoM growth rate |
| π‘ Insights | Pareto 80-20 analysis, price-rating correlation, Menu Intelligence Matrix |
| π§ Modeled Demand | Clearly separated synthetic time-of-day / peak-hour scenario |
| π§ͺ Advanced Analytics | RFM, cohort retention, Mann-Whitney U, ANOVA, ARIMA validation |
| ποΈ SQL Pipeline | 12 SQL queries running against a live SQLite database |
| π Expansion Strategy | City Expansion Opportunity Index + Restaurant Health Score |
Β§ 0 Executive Summary
Β§ 1 Data Loading & Quality Audit
Β§ 2 Weighted Rating Analysis
Β§ 3 Revenue Overview
Β§ 4 Monthly Trend & MoM Growth
Β§ 5 Category & Geographic Analysis
β³ A3: Menu Intelligence Matrix (BCG Framework)
β³ A1: City Expansion Opportunity Index
Β§ 6 Quarterly Performance
Β§ 7 Customer Segmentation
β³ A2: Restaurant Health Score
β³ 7.1 RFM Analysis
β³ 7.2 Peak Hours (synthetic demand)
β³ 7.3 Cohort Retention
β³ 7.4 Hypothesis Testing (Mann-Whitney U, ANOVA)
Β§ 8 Correlation & Price Analysis
Β§ 9 Geographic Visualisations
Β§10 Predictive Forecasting (ARIMA with MAPE vs naive baseline)
Β§11 SQL Integration Demo
Β§12 Excel Report Generation
Streamlit is the engineering layer for live Python analytics. Tableau is intended as a focused executive BI layer, using flat CSV extracts generated from the same tested Python functions:
python export_tableau_extracts.pyThis writes tableau_extracts/ with:
orders_enriched.csvβ order rows plusValue_Segment,Food Category,Year-Month,Quarter, andDayNamecity_expansion_index.csvβ city opportunity score, inputs, and tierrestaurant_health_score.csvβ restaurant health score, inputs, and tierrfm_summary.csv/rfm_detail.csvβ restaurant-partner RFM outputscohort_retention.csvβ monthly restaurant-partner retention matrix
Use these files in Tableau instead of rebuilding RFM, cohort, ARIMA, statistical tests, or composite indices as Tableau calculated fields.
12 queries run against a SQLite database built from swiggy_data.xlsx β replicating a real data-engineering pipeline:
- Monthly Revenue Trend
- Revenue by State
- Revenue by Category
- Quarterly Performance
- Top Dishes by Revenue
- Top Restaurants
- Day-of-Week Patterns
- Customer Basket Segmentation
- Restaurant Frequency Tiers
- Pareto 80% Cities
- Restaurant RFM Segmentation
- Restaurant Cohort Retention
Generated on-demand from the dashboard (Download button in sidebar):
Summary KPIs Β· Monthly Trend Β· Quarterly Performance Β· Top States Β· Top Cities Β· Top Dishes Β· Category Mix Β· Customer Segments Β· Pareto Analysis Β· Day of Week Β· Time of Day Β· Price-Rating Β· Restaurant Frequency Β· RFM Summary Β· RFM Detail Β· Cohort Retention Β· Statistical Tests Β· Forecast Validation Β· Forecast Metrics Β· Revenue Forecast
| Layer | Tools |
|---|---|
| Data Wrangling | Python, Pandas, NumPy |
| Visualisation | Plotly (interactive), Matplotlib, Seaborn |
| Statistics | SciPy (Mann-Whitney U, ANOVA), Statsmodels (ARIMA) |
| ML / Scoring | scikit-learn (MinMaxScaler for composite indices) |
| Database | SQLite (via Python stdlib) |
| Dashboard | Streamlit |
| Reporting | openpyxl (20-sheet Excel) |
# 1. Clone and install
git clone https://github.com/Brijesh03032001/SwiggyAnalysis.git
cd SwiggyAnalysis
pip install -r requirements.txt
# 2. Launch the dashboard
streamlit run app.py
# 3. Open the notebook
jupyter notebook swiggy_sales_analysis.ipynb
β οΈ Placeswiggy_data.xlsxin the project root before running.
Automated tests use small synthetic fixtures, so they run quickly without the full swiggy_data.xlsx file:
pip install -r requirements-dev.txt
pytestThe suite covers food classification edge cases, shared data preparation, RFM segmentation, cohort retention, and all SQL queries. GitHub Actions runs the same tests on every push and pull request via .github/workflows/tests.yml.
- Revenue concentration measured: Pareto analysis identifies the exact city set needed to reach 80% of revenue
- Untapped markets identified: Several tier-2 cities score high on the Expansion Index despite low current revenue
- Critical restaurants flagged: Restaurant Health Score surfaces partners below the intervention threshold
- Star categories: A small number of food categories drive disproportionate revenue with high satisfaction β clear marketing priorities
- Modeled demand peaks: Lunch (11β13h) and Dinner (19β22h) dominate in the separated synthetic time-of-day scenario; weekends slightly outperform weekdays
The dataset does not include a Customer ID or real order timestamp. To keep the analysis honest and reproducible:
- RFM analysis is implemented as restaurant-partner RFM using
Restaurant Nameas the entity. - Cohort retention is implemented as restaurant-partner monthly cohort retention.
- Peak-hour analysis uses a clearly labelled synthetic demand distribution because only
Order Dateis available. - Forecasting validates ARIMA against naive and 3-month moving-average baselines using holdout months, with MAPE/RMSE shown in the dashboard and Excel report.
- Statistical testing uses SciPy Mann-Whitney U tests for Veg vs Non-Veg distributions and ANOVA across value tiers/cities.
- β Analytical Frameworks β BCG-style matrix, composite scoring models (consulting methodology)
- β Data Analysis β Pandas, NumPy, exploratory analysis, outlier detection
- β Statistical Methods β Mann-Whitney U, ANOVA, correlation analysis
- β Visualisation β Interactive Plotly dashboards, storytelling with data
- β Forecasting β ARIMA with train/test split, MAPE vs naive baseline comparison
- β SQL β 12 production-style queries, SQLite pipeline, window functions
- β Business Intelligence β KPI design, customer segmentation, Pareto analysis
- β Software Engineering β Modular Python, Streamlit app, downloadable Excel reports
Brijesh Kumar
- π Phone: 623-666-2665
- π§ Email: bkumar25@asu.edu
- πΌ LinkedIn: linkedin.com/in/brijeshkumar03
- π» GitHub: github.com/Brijesh03032001
- π Location: Tempe, AZ
- π’ Open to CPT / OPT
