Skip to content

sorol25/SQLPythonPowerBI-customer-trendAnalysis

Repository files navigation


🧭 Project Overview

Transforming raw customer data into strategic business intelligence β€” this project mirrors the complete workflow of a professional data analyst, from messy raw data to boardroom-ready insights.

This end-to-end portfolio project demonstrates mastery across the full analytics stack: data wrangling in Python, business querying in SQL, and executive dashboards in Power BI β€” capped with a professional report and stakeholder presentation.



πŸ—ΊοΈ Workflow Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     PROJECT PIPELINE                            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   🐍 PYTHON  β”‚   πŸ—„οΈ  SQL    β”‚  πŸ“Š POWER BI β”‚  πŸ“ REPORTING      β”‚
β”‚              β”‚              β”‚              β”‚                    β”‚
β”‚  Data Import β”‚  DB Simulate β”‚  Dashboard   β”‚  Insight Report    β”‚
β”‚  Exploration β”‚  Segments    β”‚  KPI Cards   β”‚  Presentation      β”‚
β”‚  Cleaning    β”‚  Loyalty     β”‚  Trend Lines β”‚  Recommendations   β”‚
β”‚  Modeling    β”‚  Purchase    β”‚  Filters     β”‚                    β”‚
β”‚  EDA         β”‚  Drivers     β”‚  Drill-down  β”‚                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜


βœ… Deliverables at a Glance

Stage Tool What's Delivered
01 Data ingestion, cleaning, transformation, and exploratory data analysis via Jupyter Notebook
02 Business transaction simulation, customer segmentation, loyalty analysis, and purchase driver queries
03 Interactive dashboard with KPI tiles, trend charts, demographic breakdowns, and drill-through filters
04 Executive-grade written report + stakeholder-ready presentation deck (Gamma AI)


πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

Python 3.8+   |   MySQL / PostgreSQL / MS SQL Server   |   Power BI Desktop   |   Jupyter Notebook

Step 1 β€” Clone the Repository

git clone https://github.com/sorol25/SQLPythonPowerBI-customer-trendAnalysis.git
cd SQLPythonPowerBI-customer-trendAnalysis

Step 2 β€” Python: Data Preparation & EDA

Open the Jupyter Notebook:

πŸ““ Customer_Shopping_Behavior_Analysis.ipynb

This notebook covers:

  • Data Import β€” Load raw CSV/Excel data
  • Data Exploration β€” Shape, types, null checks, distributions
  • Data Cleaning β€” Handle missing values, outliers, encoding
  • SQL Connection β€” Bridge Python β†’ Database via SQLAlchemy / pyodbc

Step 3 β€” SQL: Business Intelligence Queries

-- Create your database
CREATE DATABASE customer_behavior_db;

-- Then run the provided query file:
-- πŸ“„ customer_behavior_sql_queries.sql

Queries answer key business questions around:

  • 🎯 Customer Segmentation (RFM Analysis)
  • πŸ’Ž Loyalty Tier Breakdowns
  • πŸ›’ Top Purchase Drivers & Product Categories
  • πŸ“… Seasonal & Temporal Trends

Step 4 β€” Power BI: Interactive Dashboard

πŸ“Š customer_behavior_dashboard.pbix
  1. Open the .pbix file in Power BI Desktop
  2. Update your SQL Server connection string
  3. Refresh data and explore:
    • KPI Summary Cards
    • Revenue by Segment Visuals
    • Customer Cohort Heatmaps
    • Dynamic Slicers & Drill-throughs

Step 5 β€” Report & Presentation

  • πŸ“ Write your Project Report β€” findings, methodology, and strategic recommendations
  • 🎨 Build your Presentation Deck using Gamma AI for a polished stakeholder pitch



πŸ“ Repository Structure

SQLPythonPowerBI-customer-trendAnalysis/
β”‚
β”œβ”€β”€ πŸ““ Customer_Shopping_Behavior_Analysis.ipynb   # Python EDA & Data Prep
β”œβ”€β”€ πŸ—„οΈ  customer_behavior_sql_queries.sql          # SQL Business Queries
β”œβ”€β”€ πŸ“Š customer_behavior_dashboard.pbix            # Power BI Dashboard
β”œβ”€β”€ πŸ“‚ data/
β”‚   └── raw_customer_data.csv                      # Source Dataset
β”œβ”€β”€ πŸ“ project_report.pdf                          # Final Report
└── πŸ“– README.md


πŸ”‘ Key Business Questions Answered

# Business Question Tool Used
1 Which customer segments drive the most revenue? SQL + Power BI
2 What factors most influence repeat purchases? Python + SQL
3 How does customer loyalty correlate with spend? SQL
4 What are the peak buying seasons and categories? SQL + Power BI
5 Which demographics are most valuable long-term? Python + Power BI


πŸ“œ License

MIT License β€” Copyright (c) 2026 Yeamine Alam Sorol

Permission is hereby granted, free of chargeβ€” fork it, star it.


πŸ‘¨β€πŸ’» About the Author



Yeamine Alam Sorol Data Analyst & Web Developer

I break down complex data topics into simple, practical content that actually helps you land a job. I regularly share around SQL, analytics workflows, portfolio projects, and career growth.


Β 


πŸ’‘ If this project helped you, consider starring ⭐ the repo or sharing it with someone on their data analytics journey.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors