Global E-Commerce Analysis
Python | SQL | Power BI
Project Summary
Where should an e-commerce business focus its efforts to grow profit?
I analysed product performance, regional profitability and order outcomes across $3.20M in revenue and $743.66K in profit. The overall profit margin of 23.2% exceeded the dashboard’s 20% target, but performance varied considerably beneath that headline.
The analysis identified clear commercial priorities: protect Electronics as the largest revenue contributor, test growth in higher-margin clothing, address Germany’s margin shortfall, and prioritise returns within order-outcome improvements.
This project uses synthetic data with selected patterns adjusted for analysis. The findings and recommendations demonstrate how I would support business decisions.
Interactive Power BI Dashboard:
Why this project?
I built this project to simulate how a modern business tracks financial health and catches operational mistakes. When looking at raw sales data, it's easy to see total revenue, but much harder to see where money is slipping through the cracks. This project builds a complete data pipeline to calculate true profit margins and pinpoint exactly where the business is losing money across a variety of possible sources.
Methodology
Dataset Aquisition: Dataset was aquired form Kaggle, a free open source data provider. This particular dataset was not a real-world dataset, but was designed to look and feel like one, simulating various formatting and data normalisation issues which are common place in real world datasets. Click here to see dataset.
Data Cleaning (Python): Used Pandas to import, clean, and format the raw, messy e-commerce datasets to ensure consistent dates, numeric values, and column structures.
Database & Modeling (PostgreSQL): Loaded the cleaned data into Postgres and designed a structured Star Schema (Fact and Dimension tables). Authored SQL scripts to update records and maintained strict database relationships, successfully handling data integrity issues like case-sensitivity. Python and SQL code can be seen on my GitHub page here.
Visualization & Analysis (Power BI): Connected Power BI directly to the Postgres database. Wrote DAX measures to calculate key business metrics (like Clean Profit Margin % and Revenue Leakage) and designed a cohesive, 5-page interactive and cross-filtering dashboard covering executive summaries, product and regional deep-dives, trends, and risk audits.
Buissness Insights
1. Protect the revenue base in Electronics while addressing weaker margins.
Electronics accounts for 60.9% of revenue and contributes the largest total profit, making its performance central to the business. However, Smartphones generate approximately $510K in revenue at a 19.3% margin, below the dashboard’s 20% target.
Prioritise availability of the strongest-selling Electronics products and review Smartphone pricing, discounts and supplier costs to identify ways to improve margin while protecting sales.
2. Test growth in Women's Wear to improve the sales mix.
Women's Wear delivers the highest subcategory margin at 37.3%, compared with 23.2% overall, but contributes only around $74K in revenue. This makes it a candidate for a focused growth test.
Trial greater website visibility or a small targeted promotion, then assess additional profit after campaign costs and discounts before committing more budget.
3. Make Germany a priority for margin improvement.
Germany records the lowest country margin at 17.4%, trailing the overall margin by 5.8 percentage points and falling below the 20% target.
Focus a commercial review on Germany's product mix, pricing, discounts and fulfilment costs. Use the results to select targeted changes that bring sales above the margin target.
4. Put returns first in the order-outcome improvement plan.
The dashboard records approximately 2.1K returned orders, almost twice the 1.1K cancellations. Returns are therefore the largest completed adverse order outcome by count.
Start a return-reduction initiative with the products contributing the greatest returned value. Match interventions to the reasons identified, such as improving product descriptions, sizing information or quality checks.
Personal Development
This project completely changed how I view data analytics by showing me how important a proper, interconnected data pipeline is. The biggest thing I learned was how to design a structured star schema and write precise SQL joins to connect my fact table with key business dimensions.