This project analyzes customer shopping behavior using Python, PostgreSQL, SQL, and Power BI to uncover purchasing patterns, customer segments, and product preferences.
The objective is to transform raw retail transaction data into actionable business insights that help improve:
- Customer engagement
- Marketing strategies
- Product decisions
- Customer retention
The analysis is based on 3,900 customer transactions containing 18 features covering:
- Customer demographics
- Purchase history
- Subscription details
- Discounts
- Product categories
- Shopping behavior
A retail company wants to understand customer purchasing behavior to improve:
✅ Sales performance
✅ Customer satisfaction
✅ Customer loyalty
✅ Marketing effectiveness
The goal is to identify factors influencing:
- Customer purchase decisions
- Repeat purchases
- Subscription adoption
- Customer engagement
Using data-driven insights, businesses can create better marketing campaigns and improve customer experiences.
The dataset contains:
- 3,900 customer purchase records
- 18 attributes
- Customer demographics
- Purchase information
- Product details
- Shopping preferences
The following preprocessing steps were performed:
✔ Handled missing values in the Review Rating column
✔ Cleaned and transformed raw data
✔ Created additional features:
age_grouppurchase_frequency_days
The cleaned dataset was imported into PostgreSQL for SQL-based analysis.
| Technology | Purpose |
|---|---|
| 🐍 Python (Pandas, NumPy) | Data cleaning & feature engineering |
| 🐘 PostgreSQL | Data storage and analysis |
| 🔎 SQL | Exploratory data analysis & business queries |
| 📊 Power BI | Interactive dashboard development |
| 📓 Jupyter Notebook | Development environment |
| 🌐 Git & GitHub | Version control |
| 🎨 Gamma | Project presentation |
Tasks performed:
- Imported and explored the dataset
- Checked data quality
- Handled missing values
- Performed data transformation
- Created new analytical features
- Loaded cleaned data into PostgreSQL
Business questions analyzed:
📌 Revenue analysis:
- Revenue by gender
- Revenue by age group
📌 Customer analysis:
- Customer segmentation:
- New Customers
- Returning Customers
- Loyal Customers
📌 Product analysis:
- Product ratings
- Category performance
- Discount analysis
📌 Subscription analysis:
- Subscriber vs Non-subscriber comparison
📌 Purchasing trends:
- Customer buying behavior patterns
Created an interactive dashboard containing:
- Total Customers
- Average Purchase Amount
- Average Review Rating
- Subscription Rate
- Revenue by Gender
- Revenue by Age Group
- Customer Segmentation
- Product Performance
- Product Ratings
- Discount Analysis
Users can analyze data using:
- Gender
- Age Group
- Product Category
- Shipping Type
Key findings and recommendations were summarized through a stakeholder presentation to communicate business insights effectively.
The Power BI dashboard provides:
✨ Customer overview
✨ Revenue insights
✨ Loyalty segmentation
✨ Subscription analysis
✨ Product performance tracking
✨ Discount effectiveness analysis
- Male customers generated higher overall revenue compared to female customers.
- Approximately 80% of customers belong to the Loyal segment, showing strong repeat purchase behavior.
- Only 27% of customers are subscribers, creating an opportunity to increase subscription adoption.
- Revenue is balanced across different age groups, showing broad customer appeal.
- Gloves received the highest average customer rating.
- Hats received the largest average discount.
✅ Introduce exclusive subscription benefits to increase customer retention.
✅ Expand loyalty programs to reward frequent customers.
✅ Optimize discount strategies to improve profitability.
✅ Create targeted marketing campaigns for high-value customer segments.
✅ Use customer behavior insights to improve product recommendations.
This project demonstrates an end-to-end data analytics workflow:
Data Cleaning → SQL Analysis → Business Insights → Power BI Dashboard → Recommendations
The analysis helps businesses make smarter decisions by understanding customer behavior and improving engagement strategies.
Ajit Moses Chaparla
⭐ If you found this project useful, consider giving it a star!