This project analyzes transactional e-commerce data to uncover revenue drivers, customer purchasing behavior, operational revenue leakage, and customer retention patterns.
The project combines:
- Python-based exploratory data analysis
- Data quality auditing
- Revenue intelligence analysis
- Customer segmentation
- Tableau dashboard development
The goal was to simulate a real-world business intelligence workflow rather than a basic visualization project.
The business needs to:
- Identify major revenue-driving products and customers
- Detect operational revenue leakage through returns
- Understand customer purchasing behavior
- Analyze customer concentration risk
- Improve retention and revenue strategy
- Perform transaction-level data cleaning and auditing
- Build a transaction classification framework
- Analyze revenue concentration using Pareto analysis
- Segment customers based on purchasing behavior
- Identify operational return-risk products
- Build executive-level Tableau dashboards
- Total Revenue
- Total Orders
- Average Order Value (AOV)
- Return Loss %
- Revenue Concentration %
- Customer Concentration %
- Repeat Customer Rate
- VIP Customer Revenue
- Operational Return Revenue Loss
- Python
- Pandas
- NumPy
- Matplotlib
- Seaborn
- Tableau
- Jupyter Notebook
Dataset Used: Online Retail Dataset (UCI Machine Learning Repository)
Dataset Characteristics:
- ~541K transactional records
- UK-based online retail transactions
- Data period: Dec 2010 – Dec 2011
- Includes invoices, products, quantities, pricing, customers, and countries
Dataset Features:
- Invoice-level transactional data
- Customer purchasing behavior
- Product-level revenue data
- Return/cancellation transactions
- International sales records
Dataset Challenges:
- Missing customer IDs
- Negative quantities (returns/cancellations)
- Financial adjustment transactions
- Duplicate records
- Zero-value operational transactions
- Total Revenue
- Total Orders
- Average Order Value (AOV)
- Return Loss %
- Revenue Concentration %
- Customer Concentration %
- Repeat Customer Rate
- VIP Customer Revenue
- Operational Return Revenue Loss
Key data quality issues identified:
- Missing Customer IDs (~25% of transactions)
- Negative quantities representing returns/cancellations
- Financial adjustment transactions
- Zero-value operational transactions
- Duplicate transaction rows
- Unspecified country values
A transaction classification framework was created to separate:
- Valid Sales
- Cancellation / Returns
- Financial Adjustments
- Non-Revenue Transactions
- Unknown Customer Transactions
- Monthly revenue trends
- Revenue concentration analysis
- Product Pareto analysis
- Country-wise revenue analysis
- Customer segmentation
- VIP customer analysis
- Repeat customer behavior
- Order frequency distribution
- Customer revenue concentration
- Return revenue leakage analysis
- High-risk products
- Revenue vs operational risk analysis
- Country-level filtering
- Product-level operational risk exploration
- Customer segment drill-down analysis
- Interactive KPI storytelling
- Revenue concentration exploration
- Customer retention analysis
View Interactive Dashboards on Tableau Public:
-
~20% of products contributed nearly 80% of total revenue, revealing strong product concentration dependency.
-
~26% of customers generated 80% of total revenue, indicating significant reliance on high-value customer groups.
-
VIP Loyal Customers contributed the majority of customer revenue, emphasizing the importance of customer retention strategies.
-
Customer purchasing behavior showed a highly right-skewed distribution, with most customers placing only a small number of orders.
-
Operational return revenue leakage was highly concentrated among a small subset of products.
-
Returns and cancellations represented a meaningful source of revenue erosion requiring operational monitoring.
- Implement retention-focused loyalty strategies for VIP customers.
- Monitor high-return-risk products operationally.
- Reduce dependency on a small subset of revenue-driving products.
- Improve customer conversion from low-engagement to repeat purchasing behavior.
- Establish operational controls around return-heavy products.
- Clone the repository
- Install dependencies
- Open Jupyter Notebook
- Run the analysis notebook
- Open Tableau dashboards
ecommerce-sales-analysis/
│
├── data/
│ ├── raw/
│ └── cleaned/
│
├── notebooks/
│
├── dashboards/
│
├── images/
│
├── README.md
├── requirements.txt
└── .gitignore
- Build SQL warehouse pipeline
- Develop Power BI version
- Add forecasting models
- Build customer lifetime value prediction
- Develop automated KPI reporting pipeline
- Deploy dashboards to Tableau Public
- Add RFM customer segmentation
- Build churn prediction models
This project demonstrates a business-oriented analytics workflow focused on transforming raw transactional data into strategic business intelligence.
The analysis combined:
- data cleaning
- operational auditing
- revenue intelligence
- customer analytics
- dashboard storytelling
to simulate a real-world analytics and business intelligence environment using Python and Tableau.


