Skip to content

This project analyzes customer shopping behavior using transactional data from 3,900 purchases across various product categories. The goal is to uncover insights into spending patterns, customer segments, product preferences, and subscription behavior to guide strategic business decisions.

Notifications You must be signed in to change notification settings

Itspukke/Customer-Behavior-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Customer Behavior Analysis Project

Customer Behavior Dashboard

πŸ“Œ Project Overview

This project analyzes customer shopping behavior to uncover purchasing patterns, revenue drivers, and customer segments. It demonstrates an end-to-end data analytics workflow using Python, SQL, and Power BI, transforming raw data into actionable business insights.


🧩 Problem Statement

The business lacked a clear understanding of which customer segments and purchasing behaviors were driving revenue growth.
Despite offering subscriptions, discounts, and multiple shipping options, there was limited visibility into how these strategies influenced customer spending, loyalty, and retention.

As a result, marketing and promotional efforts were not fully optimized, leading to missed opportunities to increase subscription adoption, strengthen customer loyalty, and improve overall profitability.
This project aims to use data-driven analysis to identify high-value customer segments, evaluate the impact of discounts and shipping preferences, and support more effective business decision-making.


πŸ›  Tools & Technologies

  • Python: Pandas, SQLAlchemy, PyMySQL
  • SQL: MySQL
  • Power BI: Interactive dashboards & KPIs

πŸ”„ Project Workflow

Project Workflow

Data Source β†’ Python Cleaning β†’ MySQL Analysis β†’ Power BI Visualization


🐍 Python – Data Cleaning & Preparation

Python was used to clean, transform, and prepare the dataset for analysis.

Key steps included:

  • Loading and exploring the dataset
  • Handling missing values using median imputation
  • Standardizing column names
  • Creating age group segments using quantile binning
  • Removing redundant columns
  • Uploading cleaned data into MySQL using SQLAlchemy

Python Data Cleaning

πŸ“ Code location: python/customer_shopping_behavior.ipynb


πŸ—„ SQL – Business Analysis

SQL queries were written to answer real business questions such as:

  • What is the revenue split by gender?
  • Do subscribed customers spend more than non-subscribers?
  • Which products receive the highest customer ratings?
  • How do discounts affect purchasing behavior?
  • How are customers segmented (New, Returning, Loyal)?
  • Which age groups contribute the most revenue?

SQL Analysis Output

πŸ“ Queries available in: sql/customer_shopping_behavior.sql


πŸ“ˆ Power BI – Interactive Dashboard

An interactive Power BI dashboard was developed to visualize key metrics and trends, including:

  • Total customers, average purchase amount, and average review rating
  • Revenue and sales by product category
  • Subscription status distribution
  • Revenue and sales by age group
  • Dynamic filtering by gender, category, subscription status, and shipping type

Key Dashboard Insights

Revenue by Category Revenue by Category

Subscription Analysis Subscription Analysis

πŸ“ Dashboard screenshots available in: power_bi


πŸ” Business Recomendations

  • Boost Subscriptions – Promote exclusive benefits for subscribers
  • Customer Loyalty Programs – Reward repeat buyers to move them into the β€œLoyal” segment.
  • Review Discount Policy – Balance sales boosts with margin control
  • Product Positioning – Highlight top-rated and best-selling products in campaigns.
  • Targeted Marketing – Focus efforts on high-revenue age groups and express-shipping users

πŸ“¬ Contact

Tshedza Tshipuke
Aspiring Data Analyst

About

This project analyzes customer shopping behavior using transactional data from 3,900 purchases across various product categories. The goal is to uncover insights into spending patterns, customer segments, product preferences, and subscription behavior to guide strategic business decisions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published