Skip to content

Repository files navigation

🛒 Customer Shopping Behavior Analysis

📌 Project Overview

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

🎯 Business Problem

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.


📂 Dataset Description

The dataset contains:

  • 3,900 customer purchase records
  • 18 attributes
  • Customer demographics
  • Purchase information
  • Product details
  • Shopping preferences

Data Cleaning & Preparation

The following preprocessing steps were performed:

✔ Handled missing values in the Review Rating column
✔ Cleaned and transformed raw data
✔ Created additional features:

  • age_group
  • purchase_frequency_days

The cleaned dataset was imported into PostgreSQL for SQL-based analysis.


🛠️ Tools & Technologies

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

🔄 Project Workflow

1️⃣ Data Preparation (Python)

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

2️⃣ Exploratory Data Analysis (SQL)

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

3️⃣ Dashboard Development (Power BI)

Created an interactive dashboard containing:

📊 Key Performance Indicators

  • Total Customers
  • Average Purchase Amount
  • Average Review Rating
  • Subscription Rate

📈 Business Visualizations

  • Revenue by Gender
  • Revenue by Age Group
  • Customer Segmentation
  • Product Performance
  • Product Ratings
  • Discount Analysis

🔎 Interactive Filters

Users can analyze data using:

  • Gender
  • Age Group
  • Product Category
  • Shipping Type

📑 Reporting

Key findings and recommendations were summarized through a stakeholder presentation to communicate business insights effectively.


📊 Dashboard Highlights

The Power BI dashboard provides:

✨ Customer overview
✨ Revenue insights
✨ Loyalty segmentation
✨ Subscription analysis
✨ Product performance tracking
✨ Discount effectiveness analysis


💡 Key Insights

👥 Customer Revenue

  • Male customers generated higher overall revenue compared to female customers.

⭐ Customer Loyalty

  • Approximately 80% of customers belong to the Loyal segment, showing strong repeat purchase behavior.

🔔 Subscription Opportunity

  • Only 27% of customers are subscribers, creating an opportunity to increase subscription adoption.

👤 Age Group Analysis

  • Revenue is balanced across different age groups, showing broad customer appeal.

🛍️ Product Insights

  • Gloves received the highest average customer rating.
  • Hats received the largest average discount.

🚀 Business Recommendations

✅ 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.


📌 Project Outcome

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.


👨‍💻 Author

Ajit Moses Chaparla

⭐ If you found this project useful, consider giving it a star!

About

Customer Shopping Behavior Analysis project using Python, PostgreSQL, SQL, and Power BI. Analyzed 3,900 customer transactions to uncover spending patterns, customer segments, product preferences, and revenue trends. Built interactive dashboards and delivered actionable business insights for data-driven decision-making

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages