Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python License: MIT Jupyter Notebook

📊 E-commerce Revenue & Customer Analysis (RFM)

🔹 Overview

This project presents an end-to-end data analysis workflow focused on understanding revenue performance and customer behavior in an e-commerce dataset.

The analysis integrates Python (data processing), SQL (data querying), and Power BI (visualization) to deliver business insights through an interactive dashboard.


🎯 Objectives

  • Analyze revenue trends over time
  • Identify key geographic markets
  • Understand customer purchasing behavior
  • Segment customers using RFM (Recency, Frequency, Monetary)
  • Build an executive-level dashboard for decision-making

🛠️ Tech Stack

  • Python: Pandas, NumPy, Matplotlib
  • SQL: SQLite
  • Visualization: Power BI

📂 Project Structure

project/
│
├── data/
│   ├── raw/
│   └── processed/
│
├── notebooks/
│   ├── 01_data_cleaning.ipynb
│   ├── 02_eda.ipynb
│   ├── 03_sql_analysis.ipynb
│   ├── 04_exports.ipynb
│
├── models/
│   └── transactions.db
│
├── outputs/
│   ├── kpi_monthly.csv
│   ├── revenue_by_country.csv
│   ├── top_customers.csv
│   └── rfm_table.csv
│
└── dashboard/
    └── powerbi_dashboard.pbix

🔄 Data Processing

The dataset was cleaned and prepared to ensure analytical accuracy:

  • Removed missing CustomerID values
  • Excluded cancelled transactions (InvoiceNo starting with "C")
  • Filtered invalid quantities and prices (≤ 0)
  • Converted date fields to datetime format
  • Created a Revenue metric (Quantity × UnitPrice)

📊 Analysis

The analysis was conducted in two stages:

Python (EDA)

  • Revenue distribution and skewness
  • Monthly revenue trends
  • Customer purchasing patterns
  • Orders per customer distribution

SQL (Validation & Aggregation)

  • Revenue KPIs
  • Revenue by country
  • Monthly performance
  • Customer-level aggregation

This ensured consistency and reproducibility across different analytical layers.


👥 Customer Segmentation (RFM)

Customers were segmented based on:

  • Recency → Days since last purchase
  • Frequency → Number of transactions
  • Monetary → Total revenue generated

Key Findings

  • Most customers exhibit low purchase frequency
  • Revenue is highly concentrated in a small group of high-value customers
  • A segment of customers shows inactivity, indicating potential churn risk

📈 Dashboard (Power BI)

The final solution is an interactive dashboard with two pages:

1️⃣ Executive Overview

  • Revenue KPIs
  • Monthly revenue trend
  • Revenue by country
  • Key business insights

2️⃣ Customer Analysis (RFM)

  • Customer segmentation
  • Revenue by segment
  • Distribution of customer groups
  • Identification of high-value and at-risk customers

🔍 Key Business Insights

  • Revenue is highly concentrated in the UK (>80%), indicating geographic dependency
  • Strong upward trend towards Q4 suggests seasonal demand patterns
  • Customer base is dominated by low-frequency buyers
  • A small segment of high-value customers drives the majority of revenue
  • At-risk customers highlight opportunities for retention strategies

🚀 Conclusion

This project demonstrates the ability to:

  • Build an end-to-end data pipeline (Python → SQL → Power BI)
  • Translate raw data into business insights
  • Design executive dashboards for decision-making
  • Apply customer segmentation techniques (RFM)

📸 Dashboard Preview

Executive Revenue Overview

Dashboard_analysis

Customer Analysis

Dashboard_RFM

📦 Dataset

Due to file size limitations, the dataset is not included in this repository.

You can download it from:

About

End-to-end Power BI sales analysis project including data cleaning, feature engineering and interactive dashboard.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages