π½οΈ Swiggy Customer Behaviour and Sentiment Analysis
A full-stack analytics solution designed to explore customer behavior, delivery performance, and sentiment trends across Bangaloreβs food delivery ecosystem. This project analyzes 200,000+ orders to uncover insights on cuisine preferences, delivery ratings, payment methods, and customer sentimentβempowering operations teams and marketing strategists with predictive insights and interactive dashboards.
π GitHub Project Repository
π Click to view Swiggy-customer-Behaviour-and-Sentiment-analysis
π§ Project Overview
Customer satisfaction in food delivery hinges on speed, quality, and experience. This project delivers an end-to-end analytics platform that enables:
- π Behavioral analysis across demographics and locations
- π Sentiment tracking and prediction
- π Delivery performance benchmarking
- π Cuisine and payment preference mapping
π― Key Objectives
- Clean and preprocess customer order data
- Engineer features for delivery satisfaction modeling
- Build classification models to predict delivery ratings
- Deploy interactive dashboards for stakeholder decision-making
π Project Structure
File Name |
Description |
swiggy_data.csv |
Raw dataset with 200K+ customer orders |
cleaned_swiggy.csv |
Preprocessed dataset with engineered features |
rf_model.pkl |
Trained Random Forest model for delivery rating prediction |
swiggy.sql |
SQL queries for filtering and aggregating customer data |
sqlconnect.py |
Python script for SQL database connection |
app.py |
Streamlit app for dashboard deployment |
swiggy customer behaviour and sentiment analysis.ipynb |
Jupyter notebook with EDA, modeling, and insights |
swiggy customer behaviour and sentiment analysis.pbix |
Power BI dashboard visualizing customer trends and satisfaction metrics |
π§Ή Data Preprocessing
- Converted
Order_Date
to datetime format
- Extracted time-based features (
hour
, day
, month
)
- Encoded categorical variables (
Cuisine_Type
, Payment_Method
, Sentiment
, Gender
)
- Removed duplicates and handled missing values
- Normalized
Order_Value
and Delivery_Time_Min
for modeling
π Exploratory Data Analysis
- π Cuisine popularity across Bangalore areas
- π Delivery time distribution by age and gender
- π³ Sentiment trends by payment method and food rating
- π Correlation between delivery rating and customer satisfaction
- π
Time-of-day impact on delivery performance
π€ Modeling Approach
- Target Variable:
Delivery_Rating
- Algorithms Used: Random Forest, Logistic Regression
- Evaluation Metrics: Accuracy, Precision, Recall, F1 Score
- Top Features:
Delivery_Time_Min
, Order_Value
, Cuisine_Type
, Sentiment
, Customer_Age
π Dashboard Overview
π· Power BI Dashboard
Visualizes customer behavior and delivery performance:
- π Cuisine preference by area
- β±οΈ Delivery time and rating analysis
- π³ Payment method trends
- π Sentiment distribution across demographics
- π
Monthly order volume and satisfaction metrics


π’ Streamlit App
Interactive dashboard for real-time customer insights:
- π Area-wise cuisine preferences
- π Delivery time and rating analysis
- π³ Payment method segmentation
- π Sentiment prediction and visualization



π Deployment
- Model serialized with
joblib
as rf_model.pkl
- Dashboard deployed via Streamlit Cloud
- SQL integration for dynamic customer filtering
- Power BI presentation deck created for stakeholder review
π§ Business Impact
- Identifies key drivers of customer satisfaction
- Optimizes delivery operations and service quality
- Supports targeted marketing based on sentiment and behavior
- Enables data-driven decisions for restaurant partnerships
π οΈ Tech Stack
- Python: Pandas, NumPy, Scikit-learn, Streamlit
- SQL: Data extraction and filtering
- Visualization: Power BI, Matplotlib, Seaborn, Plotly
- Deployment: Streamlit Cloud, GitHub
π Future Enhancements
- Integrate real-time order tracking and feedback
- Add NLP-based sentiment scoring from reviews
- Enable geospatial mapping of delivery hotspots
- Expand dashboard to include loyalty and churn metrics
π€ Author
Anesh Raj
π GitHub Profile