Skip to content

This project walks through a full customer shopping behavior analysis using real transactional data. It combines Python for data cleaning and exploration, SQL for deeper business queries, and Power BI for an interactive dashboard. The goal is to uncover purchase patterns, customer segments, revenue trends, and actionable insights from raw data.

Notifications You must be signed in to change notification settings

MayankAgrawal099/Customer_Shopping_Behavior_Analysis

Repository files navigation

📊 Customer Shopping Behavior Analysis

Overview

This project demonstrates an end-to-end data analytics workflow — from raw customer transaction data to meaningful business insights. It includes data loading and cleaning in Python, exploratory data analysis (EDA), SQL-based analysis, and interactive visualization using Power BI.

The objective is to analyze customer shopping behavior and highlight key trends in spending, subscriptions, and product performance.


Dataset

The dataset contains customer shopping and transaction data, including:

  • Customer demographics (age, gender, location)
  • Purchase details (product, category, amount, season)
  • Shopping behavior (discounts, reviews, frequency, subscriptions)

The dataset is used to study purchasing patterns and customer segmentation.


Tools & Technologies

  • Python – Pandas, NumPy, Matplotlib, Seaborn
  • SQL – PostgreSQL / MySQL / SQL Server
  • Power BI – Dashboard and data visualization
  • Excel – Supporting analysis
  • Jupyter Notebook / VS Code – Development environment

Project Workflow

1. Data Loading & Cleaning (Python)

  • Loaded dataset using Pandas
  • Handled missing values and inconsistent data
  • Renamed columns for clarity
  • Performed feature engineering (age groups, purchase frequency)
  • Prepared cleaned data for database storage

2. Exploratory Data Analysis (EDA)

  • Distribution of purchase amounts
  • Customer segmentation analysis
  • Category-wise and product-wise sales analysis
  • Subscription behavior comparison
  • Review rating trends

3. SQL Analysis

The cleaned data was loaded into a SQL database and analyzed using queries such as:

  • Revenue by gender
  • High-spending customers
  • Top-rated products
  • Shipping type comparison
  • Subscribers vs non-subscribers analysis
  • Repeat customer behavior

4. Power BI Dashboard

An interactive Power BI dashboard was created to visualize:

  • Total customers and average purchase value
  • Revenue by category and age group
  • Subscription distribution
  • Sales trends and customer segments

Users can filter insights by category, gender, shipping type, and subscription status.

📸 Dashboard Preview

🔷 Customer Shopping Behavior Dashboard


Results & Insights

  • Identified high-value customer segments
  • Highlighted top-performing and top-rated products
  • Compared subscriber and non-subscriber purchasing behavior
  • Found age groups contributing most to total revenue
  • Identified discount-dependent products

Project Deliverables

  • Python notebooks for EDA and data cleaning
  • SQL queries for analysis
  • Power BI dashboard (.pbix)
  • Project report
  • Presentation (PPT)

How to Run This Project

Step 1: Clone the Repository

git clone https://github.com/your-username/customer-shopping-behavior-analysis.git
cd customer-shopping-behavior-analysis

Step 2: Install Python Dependencies

pip install pandas numpy matplotlib seaborn sqlalchemy psycopg2

Step 3: Run Exploratory Data Analysis

Open Jupyter Notebook or VS Code and run:

customer_behavior_analysis.ipynb

Step 4: Load Data into SQL

  • Create a database in PostgreSQL/MySQL/SQL Server
  • Run the provided SQL schema
  • Use Python script to insert cleaned data

Step 5: Open Power BI Dashboard

  • Open the .pbix file in Power BI Desktop
  • Update database credentials if needed
  • Refresh data

About

This project walks through a full customer shopping behavior analysis using real transactional data. It combines Python for data cleaning and exploration, SQL for deeper business queries, and Power BI for an interactive dashboard. The goal is to uncover purchase patterns, customer segments, revenue trends, and actionable insights from raw data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published