Skip to content

About

End-to-end customer behavior analysis using Python, SQL, and Power BI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Customer Behavior Analysis

Data analytics project that analyzes customer purchasing behavior using Python, PostgreSQL, and Power BI. The project follows a complete analytics workflow—from data cleaning and SQL-based analysis to building an interactive dashboard for business insights.


Project Overview

The objective of this project is to analyze customer purchasing patterns and identify trends across demographics, product categories, subscriptions, discounts, and shipping preferences.

The project demonstrates the complete data analytics pipeline:

  • Data Cleaning using Python
  • Data Analysis using PostgreSQL
  • Dashboard Development using Power BI

Project Workflow

Workflow

Technologies Used

  • Python

    • Pandas
    • Jupyter Notebook
  • PostgreSQL

    • SQL
    • Window Functions
    • Common Table Expressions (CTEs)
    • Aggregate Functions
    • CASE Statements
    • Subqueries
  • Power BI

    • Interactive Dashboard
    • KPI Cards
    • Slicers
    • Bar Charts
    • Donut Charts

Data Cleaning (Python)

The dataset was cleaned and prepared before analysis.

Tasks Performed

  • Handled missing values
  • Standardized column names
  • Checked for inconsistencies
  • Exported the cleaned dataset for SQL analysis

Data Analysis (PostgreSQL)

Business questions were answered using SQL queries.

Analyses Performed

  • Total revenue generated by male vs. female customers
  • Customers who used discounts but spent above the average purchase amount
  • Top 5 products with the highest average review rating
  • Comparison of purchase amounts between Standard and Express shipping
  • Revenue and average spending of subscribers vs. non-subsscribers
  • Products with the highest percentage of discounted purchases
  • Customer segmentation into New, Returning, and Loyal customers
  • Top 3 most purchased products within each category
  • Subscription behavior of repeat buyers
  • Revenue contribution of each age group

SQL Concepts Demonstrated

  • GROUP BY
  • ORDER BY
  • Aggregate Functions
  • CASE Statements
  • Subqueries
  • Common Table Expressions (CTEs)
  • Window Functions (ROW_NUMBER)
  • Conditional Aggregation

Power BI Dashboard

The cleaned and analyzed data was visualized through an interactive dashboard.

Dashboard Features

  • KPI Cards

    • Total Customers
    • Average Purchase Amount
    • Average Review Rating
  • Interactive Filters

    • Subscription Status
    • Gender
    • Product Category
    • Shipping Type
  • Visualizations

    • Subscription Distribution
    • Total Sales by Category
    • Total Revenue by Category
    • Revenue by Age Group
    • Sales by Age Group

Key Insights

  • Clothing generated the highest sales and revenue.
  • Young Adult customers contributed the highest revenue.
  • Nearly three-quarters of customers were non-subsscribers, highlighting opportunities for subscription growth.
  • Subscribers exhibited different spending patterns compared to non-subscribers.
  • Discount campaigns influenced purchasing behavior across several product categories.
  • Repeat customers represented a significant portion of subscribers.

Business Recommendations

  • Increase subscription adoption through targeted promotions.
  • Prioritize inventory planning for high-performing product categories.
  • Design marketing campaigns targeting Young Adult customers.
  • Improve customer satisfaction to increase review ratings.
  • Optimize discount strategies based on product performance.

Dashboard Preview

Dashboard


📄 License

This project is intended for learning and portfolio purposes.

About

End-to-end customer behavior analysis using Python, SQL, and Power BI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages