A Data Analytics Project using Python, PostgreSQL, and Power BI
This project investigates customer shopping behavior using 3,900 transactional records. The goal is to extract insights about spending patterns, product preferences, customer segmentation, and subscription trends to support business decision-making.
-
Rows: 3,900
-
Columns: 18
-
Key Features:
- Customer demographics (Age, Gender, Location, Subscription Status)
- Purchase details (Item Purchased, Category, Purchase Amount, Season, Size, Color)
- Behavioral attributes (Discount Applied, Promo Code Used, Previous Purchases, Frequency of Purchases, Review Rating, Shipping Type)
-
Missing Data: Review Rating column had 37 missing values
Steps performed during preprocessing:
-
Loaded dataset and explored structure using pandas
-
Handled missing values by imputing category-wise median ratings
-
Standardized all column names to snake_case
-
Created new engineered features:
age_group(binned age ranges)purchase_frequency_days
-
Checked redundancy between discount-related fields and removed unnecessary columns
-
Loaded cleaned dataset into PostgreSQL for deeper analytics
SQL queries were used to answer key business questions, including:
Analyzed which gender contributes more to overall revenue.
Identified customers who used discounts but still spent above the average purchase amount.
Ranked products based on average customer review scores.
Compared average purchase amounts between standard and express shipping.
Compared total customers, average spend, and total revenue of subscription vs non-subscription users.
Listed products most frequently bought with applied discounts.
Classified customers into:
- New
- Returning
- Loyal
Ranked the most purchased products in each category.
Checked correlation between repeat purchase behavior and subscription likelihood.
Calculated revenue contribution of each age group.
A fully interactive Power BI dashboard was built to visualize:
- Number of customers
- Average purchase amount
- Average rating
- Revenue by category
- Revenue by subscription status
- Sales by age group
- Shipping preferences
Promote exclusive benefits to increase subscriber count.
Offer targeted rewards to convert returning customers into loyal customers.
Optimize discount rules to maintain margin while boosting sales.
Use them in marketing campaigns for improved conversion.
Focus on high-spending age groups and express-shipping customers.
- Python (Pandas)
- PostgreSQL
- Power BI
- Kaggle Notebook