A data analysis case study examining 1,200 retail transactions across two years to identify profit leakages and growth opportunities across product categories, regions, and customer segments.
| KPI | Value |
|---|---|
| Total Revenue | $1.09M |
| Net Profit | $104K |
| Profit Margin | 9.5% |
| Total Orders | 1,200 |
| Avg Order Value | $912 |
Furniture generates $329K in revenue but posts a net loss of -$35,401 (-10.8% margin). Every single Furniture sub-category operates at a loss:
| Sub-Category | Revenue | Profit | Margin |
|---|---|---|---|
| Tables | $93,588 | -$11,425 | -12.2% |
| Chairs | $82,842 | -$9,392 | -11.3% |
| Bookcases | $89,300 | -$8,280 | -9.3% |
| Furnishings | $63,561 | -$6,304 | -9.9% |
Root cause: Furniture carries a structurally low gross margin (~8%) combined with heavy average discounting (~28%), resulting in guaranteed losses on nearly every transaction.
| Discount Level | Avg Profit per Order |
|---|---|
| No Discount | +$208 |
| Low (up to 15%) | +$122 |
| Mid (16-30%) | -$22 |
| High (above 30%) | -$315 |
Orders discounted above 15% become loss-making in aggregate. A 15% discount cap could recover an estimated $20K+ annually.
Technology delivers 19%+ margins across all four sub-categories (Copiers, Phones, Computers, Accessories) and accounts for 127% of total business profit -- the excess is offset by Furniture losses.
All four regions operate at similar margins (9.3% - 10.0%), confirming that profitability issues are driven by product mix and discount policy, not geography.
| Region | Revenue | Profit | Margin |
|---|---|---|---|
| East | $336,130 | $31,392 | 9.3% |
| North | $280,573 | $26,182 | 9.3% |
| West | $279,875 | $26,993 | 9.6% |
| South | $198,083 | $19,817 | 10.0% |
- Fix or Exit Furniture -- Review supplier costs and retail pricing starting with Tables (-12.2% margin). If costs cannot be restructured, reduce or exit the Furniture category entirely.
- Cap Discounts at 15% -- Implement a formal discount ceiling with management approval required for exceptions. This single policy change could recover $20K+ in annual profit.
- Double Down on Technology -- Shift marketing budget, sales focus, and inventory investment toward Technology, especially targeting Corporate and Home Office segments.
.
├── sales_analysis.py # Python analysis script (8 steps: load, clean, analyze, visualize)
├── superstore_data.csv # Source dataset (1,200 transactions, 9 columns)
├── dashboard.html # Interactive HTML dashboard with Chart.js visualizations
├── retail_sales_analysis_2022_2023.pdf # Full PDF report with charts and findings
└── README.md
sales_analysis.py-- End-to-end analysis pipeline: data loading, cleaning, KPI computation, category/region/discount breakdowns, and chart generation (4 Matplotlib visualizations with dark-themed styling).superstore_data.csv-- Raw dataset with columns:Order Date,Region,Segment,Category,Sub-Category,Sales,Quantity,Discount,Profit.dashboard.html-- Self-contained interactive dashboard built with Chart.js featuring: KPI cards, monthly revenue trend (2022 vs 2023), category profitability, regional performance, discount impact analysis, sub-category leaderboard, and strategic recommendations.retail_sales_analysis_2022_2023.pdf-- 7-page PDF report summarizing all findings with embedded charts and data tables.
- Python 3 -- Core analysis language
- Pandas -- Data manipulation and aggregation
- Matplotlib & Seaborn -- Static chart generation
- ReportLab -- PDF report generation
- Chart.js -- Interactive browser-based visualizations
- HTML/CSS -- Dashboard layout and styling
# Install dependencies
pip install pandas matplotlib seaborn
# Run the analysis (generates charts and prints findings to console)
python sales_analysis.py
# View the interactive dashboard
open dashboard.html # macOS
xdg-open dashboard.html # Linux- Period: January 2022 -- December 2023
- Records: 1,200 transactions
- Categories: Technology, Furniture, Office Supplies
- Regions: East, North, West, South
- Segments: Consumer, Corporate, Home Office
Gbolahan Akande -- Data Analyst
Portfolio case study | Data Analysis