Twine

Retail Sales Analysis

Inam Alee Mangi
Published

0
  • Project creator

This project combines sales analysis with machine learning. It shows what sells, how sales moved through the year, and which customers bring in the most value.

What I did?
Cleaned the transaction data (duplicates, missing values, dates)
Built customer-level features: total spend, average purchase, recency, and age
Tested 2 to 10 segments (Elbow and Silhouette methods) and chose the best fit
Applied K-Means clustering to create 2 customer segments
Profiled each segment by spending, age, gender, and recent activity
Analyzed top product categories and daily sales trends

Key results:
High-value segment (26% of customers): spend about $900 to $2,000 per purchase
Standard segment (74% of customers): spend about $25 to $600 per purchase
Age and gender are spread evenly across both segments, so spending, not demographics, separates them
Top categories: Electronics, Clothing, Beauty (close in sales)
Sales are spiky, with a few big peaks around May and June

Visuals included (8 charts):
Cluster selection charts
Top product categories
Sales trend over time
Segment size chart
Segment comparison box plots
Scatter plot and heatmap of segments
Gender breakdown by segment

Tools used:
Python, Pandas, NumPy, Scikit-learn, Matplotlib, Seaborn

Deliverables;
Full Python script
8 charts (PNG)
Documentation

Business use:
Targeted offers for high spenders, upsell plans for the standard group, and better budget planning by product category.