Online Retail: Customer Sales Are Highly Concentrated
customer value · customer concentration · sales analysis · python
Project snapshot
- Built: Cleaned invoice-line data and measured customer sales concentration, monthly totals, and recorded market mix.
- Stack: Python, pandas, Matplotlib
- Result: The top 10% of 4,338 identifiable customers generated 61.4% of eligible sales value; the top 20% generated 74.6%.
- Recommendation: Prioritize a contribution and service-dependency review for top-value customer groups, then validate the concentration on a later period before changing retention investment.
- Code: Metric validation and chart script
Business question
More than half a million invoice lines show activity, but not how concentrated their eligible sales value is. The decision is which customer and market segments deserve a closer contribution review before allocating retention or expansion budget.
Data and preparation
The UCI Online Retail dataset covers 1 December 2010 to 9 December 2011. Each row is an invoice line. The 541,909-row file includes 135,080 rows without customer IDs.
The analysis removes cancelled invoices, non-positive quantities and prices, and rows without customer IDs. It groups line items by invoice number, then invoices by customer. A repeat-order customer has at least two distinct eligible invoice numbers. The 65.6% customer share and 93.1% sales-value share use that definition; neither is a cohort-retention measure. The measures describe positive sales lines from identifiable customers, not net realized sales or profit. The source snapshot and checks are recorded in the evidence manifest.
Findings
The top 20% of customers generated 74.6% of eligible sales value
The cleaned data contains 4,338 identifiable customers, 18,532 orders, and £8.91 million in eligible sales value. Ranked by customer sales value, the top 1% generated 32.0%, top 5% 50.4%, top 10% 61.4%, and top 20% 74.6%. Repeat-order customers were 65.6% of customers and generated 93.1% of eligible sales value.

This is concentration in recorded sales value, not contribution or profit. Use it to prioritize a margin and service-dependency review; do not infer that a retention offer would change customer behavior.
Monthly sales provide historical context
Eligible sales value varied across the observed months and peaked in November. December contains only nine days, so it is not a full-month comparison.

The UK is the main recorded market
The UK generated £7.31 million, about 82% of eligible sales value. The Netherlands, Ireland, Germany, and France were the next largest markets, each far smaller than the UK.

Historical sales identify where the retailer already sold products. They do not measure reachable demand, competition, acquisition cost, shipping cost, or contribution in those countries.
Customer identity limits the concentration denominator
The raw file also contains 9,288 cancellation rows. The filters keep the sales-value and repeat-order calculations on positive, identifiable transactions. The analysis does not include customers without an ID.
Result
The historical data supports a customer-concentration, repeat-order-customer, and country-mix assessment. It does not measure profit, current demand, or causal retention effects. December is observed only through 9 December and should not be compared with a complete month.
Recommendation: prioritize a contribution and service-dependency review for the top-value customer groups, then validate the concentration on a later period. Require margin, order cadence, support cost, and customer-level exposure before changing retention investment. Treat non-UK markets as historical sales locations; evaluate any expansion opportunity only after demand, margin, acquisition and shipping costs, competition, and regulation are assessed.
What this can't tell you
The source lacks margin, shipping cost, marketing exposure, inventory, and complete customer identity. It shows historical sales value, not current demand, profit, or causal retention effects; December data ends on the 9th.
Read technical details
Technical appendix
Eligible sales value is quantity multiplied by unit price after the stated filters. Customer sales values are summed across eligible invoice lines, ranked, and cumulatively compared with an equal-share reference. The analysis uses a locally validated workbook snapshot retrieved on 20 August 2026. Its evidence manifest records the file hash and data boundary. The source is licensed CC BY 4.0. Validation workflow · Metric validation and chart code