Analysis 01 of 10E-commerce
Which customers and products earn the money?
Which customers and products actually drive revenue, and where is money leaking to returns and one-time buyers?
The short answer A small share of products earns most of the money. The top 20% of products bring 78.5% of net revenue and the bottom 30% bring 0.9%. 27.6% of identified customers bought only once, and the cohorts that return settle near 23.3% at month three. Cancellations touch 15.8% of orders but only 3.6% of gross revenue, so the leak is handling cost more than lost revenue.
- Public data, not my business
- Last month partial: data ends Dec 9, 2011
- Source
- UCI Online Retail II, Chen, D. (2012), UCI Machine Learning Repository
- Period
- Dec 2009 to Dec 2011
- Licence
- CC BY 4.0
- Charts
- 5, each with its data table and CSV
- Data file
- data/ecom.json
Key figures
- £18.9MTotal net revenuenet of cancellations, Dec 2009 to Dec 2011
- 15.8%Cancellation rateof orders (3.6% of gross revenue)
- 27.6%One-time buyersof 5,852 identified customers bought only once
- 78.5%Top 20% of productsshare of total net revenue
The charts
Chart 1Lead chart · trend
Monthly net revenue peaks in November, both years.
When does the money come in, and from where?
UCI Online Retail II · public data, not my business
| Month | UK (£) | International (£) | Total (£) |
|---|---|---|---|
| 2009-12 | 709,523.81 | 68,819.27 | 778,343.08 |
| 2010-01 | 476,901.60 | 127,930.19 | 604,831.79 |
| 2010-02 | 438,359.56 | 86,974.67 | 525,334.23 |
| 2010-03 | 660,101.68 | 92,000.45 | 752,102.13 |
| 2010-04 | 546,198.47 | 90,117.20 | 636,315.67 |
| 2010-05 | 515,043.85 | 91,255.29 | 606,299.14 |
| 2010-06 | 575,530.05 | 94,716.28 | 670,246.33 |
| 2010-07 | 535,657.64 | 80,203.95 | 615,861.59 |
| 2010-08 | 568,740.25 | 92,899.87 | 661,640.12 |
| 2010-09 | 716,277.26 | 125,279.44 | 841,556.70 |
| 2010-10 | 925,064.91 | 143,920.00 | 1,068,984.91 |
| 2010-11 | 1,220,153.09 | 174,448.71 | 1,394,601.80 |
| 2010-12 | 690,929.75 | 67,160.75 | 758,090.50 |
| 2011-01 | 455,725.18 | 123,130.01 | 578,855.19 |
| 2011-02 | 412,904.11 | 86,560.24 | 499,464.35 |
| 2011-03 | 561,903.15 | 117,426.06 | 679,329.21 |
| 2011-04 | 434,752.85 | 47,309.08 | 482,061.93 |
| 2011-05 | 609,620.06 | 121,384.71 | 731,004.77 |
| 2011-06 | 593,144.35 | 130,700.79 | 723,845.14 |
| 2011-07 | 566,586.40 | 110,225.68 | 676,812.08 |
| 2011-08 | 561,424.68 | 139,865.25 | 701,289.93 |
| 2011-09 | 860,218.97 | 151,120.77 | 1,011,339.74 |
| 2011-10 | 876,926.44 | 184,774.78 | 1,061,701.22 |
| 2011-11 | 1,258,907.88 | 168,216.66 | 1,427,124.54 |
| 2011-12 | 398,346.54 | 42,053.02 | 440,399.56 |
Chart 2Seasonality
Both years climb from September to a November peak.
Is the November peak a one-off?
UCI Online Retail II · public data, not my business
| Month | 2010 total (£) | 2011 total (£) |
|---|---|---|
| Jan | 604,831.79 | 578,855.19 |
| Feb | 525,334.23 | 499,464.35 |
| Mar | 752,102.13 | 679,329.21 |
| Apr | 636,315.67 | 482,061.93 |
| May | 606,299.14 | 731,004.77 |
| Jun | 670,246.33 | 723,845.14 |
| Jul | 615,861.59 | 676,812.08 |
| Aug | 661,640.12 | 701,289.93 |
| Sep | 841,556.70 | 1,011,339.74 |
| Oct | 1,068,984.91 | 1,061,701.22 |
| Nov | 1,394,601.80 | 1,427,124.54 |
| Dec | 758,090.50 | 440,399.56 |
Chart 3Breakdown by segment
Most new customers do not come back the next month.
Of the customers who first bought in a given month, how many keep buying?
UCI Online Retail II · public data, not my business
| First purchase | Cohort size | Month 0 | Month 1 | Month 2 | Month 3 | Month 4 | Month 5 | Month 6 | Month 7 | Month 8 | Month 9 | Month 10 | Month 11 | Month 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009-12 | 951 | 100 | 35 | 33.3 | 42.5 | 37.9 | 36 | 37.6 | 34.4 | 33.8 | 36.2 | 42.2 | 49.6 | 37.6 |
| 2010-01 | 368 | 100 | 21.5 | 32.1 | 31.5 | 27.2 | 31 | 26.9 | 23.4 | 28.5 | 32.6 | 31 | 17.9 | 22.8 |
| 2010-02 | 375 | 100 | 23.5 | 22.7 | 29.3 | 24.5 | 19.7 | 19.2 | 28.8 | 25.6 | 27.7 | 11.5 | 12.5 | 15.2 |
| 2010-03 | 441 | 100 | 19 | 23.1 | 24.3 | 23.1 | 20.4 | 24.7 | 30.6 | 27.7 | 10.9 | 11.6 | 14.5 | 20 |
| 2010-04 | 294 | 100 | 19 | 19 | 16 | 18.4 | 22.1 | 27.6 | 26.5 | 10.5 | 10.9 | 7.5 | 13.9 | 14.3 |
| 2010-05 | 255 | 100 | 15.7 | 16.9 | 17.6 | 17.6 | 25.5 | 21.2 | 12.5 | 5.9 | 8.2 | 11.4 | 13.3 | 15.3 |
| 2010-06 | 267 | 100 | 17.6 | 18.7 | 20.6 | 23.2 | 28.5 | 12.7 | 9 | 8.2 | 11.2 | 10.5 | 13.9 | 15 |
| 2010-07 | 185 | 100 | 15.7 | 18.4 | 29.7 | 29.2 | 14.1 | 11.4 | 14.6 | 14.6 | 11.4 | 13.5 | 14.6 | 13 |
| 2010-08 | 163 | 100 | 19.6 | 28.8 | 32.5 | 16.6 | 11.7 | 9.8 | 12.9 | 13.5 | 12.9 | 12.9 | 11.7 | 14.7 |
| 2010-09 | 239 | 100 | 23 | 23.4 | 13 | 8.8 | 10.5 | 13.8 | 9.6 | 13 | 13 | 12.1 | 10 | 22.6 |
| 2010-10 | 375 | 100 | 25.9 | 14.7 | 12.5 | 8.8 | 8.3 | 13.1 | 13.9 | 10.7 | 9.3 | 10.7 | 12.8 | 19.2 |
| 2010-11 | 326 | 100 | 17.5 | 9.5 | 9.5 | 7.7 | 8.9 | 12.9 | 10.1 | 8.6 | 9.2 | 11 | 14.7 | 25.2 |
Chart 4Ranking
The top 10% of products earn 62.3% of net revenue.
How concentrated is revenue across the catalog?
UCI Online Retail II · public data, not my business
| Products (by revenue rank) | Net revenue in this tenth (£) | Cumulative share of revenue (%) |
|---|---|---|
| Top 10% | 11,792,519.42 | 62.3 |
| 11 to 20% | 3,072,605.95 | 78.5 |
| 21 to 30% | 1,640,235.62 | 87.2 |
| 31 to 40% | 991,813.90 | 92.4 |
| 41 to 50% | 623,835.74 | 95.7 |
| 51 to 60% | 400,582.40 | 97.9 |
| 61 to 70% | 240,647.66 | 99.1 |
| 71 to 80% | 115,863.44 | 99.7 |
| 81 to 90% | 42,385.52 | 100 |
| 91 to 100% | 6,946.00 | 100 |
Chart 5Breakdown by segment
Cancellations touch many orders but little revenue.
Is the money leaking out through cancellations?
UCI Online Retail II · public data, not my business
| Country group | Share of orders cancelled (%) | Share of gross revenue cancelled (%) |
|---|---|---|
| UK | 15.4 | 3.8 |
| International | 19.6 | 3 |
01Findings
What the charts say.
Revenue peaks in November in both years, and the shape repeats from one year to the next.
The top 20% of products bring 78.5% of net revenue (the top 10% alone, 62.3%); the bottom 30% bring 0.9%.
27.6% of 5,852 identified customers bought only once. Across the 12 cohorts, an average of 23.3% are still buying at month three and 19.6% at month twelve.
Cancellations hit 15.8% of orders but only 3.6% of gross revenue, and the pattern holds for the UK and international groups.
02Method
How the figures were built.
Steps
- Dropped non-product stock codes (POST, DOT, M, m, D, BANK CHARGES, AMAZONFEE, C2, PADS, CRUK, ADJUST, ADJUST2, S, B, TEST001/002, gift card vouchers) that represent postage, fees, manual adjustments, and test rows rather than real merchandise.
- Dropped rows with price <= 0 (6,207 rows); nearly all of these have no Customer ID and are internal stock corrections, not customer sales.
- Dropped negative-quantity rows on invoices that do not start with 'C' (3,457 rows); a true return in this dataset is a cancellation invoice (prefix 'C'), and these unlabeled negative-quantity rows all have null Customer ID and mostly null description, so they read as inventory write-offs rather than customer returns.
- Removed 34,035 exact duplicate line items (after the rules above).
- Kept rows with missing Customer ID (22.2% of clean rows) for revenue and product analysis since they are real sales; excluded them from the cohort retention analysis, which requires a known customer.
- Published table covers Dec 2010 to Dec 2011 (13 months) at invoice-line level to stay under the file size cap; the monthly revenue and cohort retention charts use the full Dec 2009 to Dec 2011 history, computed in the prep script and pre-aggregated into the chart data.
1,067,371 rows in the source file, 1,021,254 after cleaning. Every derived figure on this page (changes, indexes, averages, counts) is computed from the published rows, and the table under each chart says how.
Checks
- Revenue nets out cancellations: a cancellation invoice (prefix C) carries negative revenue.
- The charts use the full Dec 2009 to Dec 2011 history, aggregated in the prep script; the Live SQL table holds Dec 2010 to Dec 2011 at line level to stay under the file size cap, so queries there cover 13 months.
- Each table on this page is the published chart data in ecom.json, shown row for row.
The queries
The query runs on the table retail_orders (531,205 order lines, Dec 2010 to Dec 2011). Open it in Live SQL, which runs DuckDB in your browser on the same public tables; the query loads ready to run.
Revenue by product quintile (the Pareto check)
Open in Live SQLWITH prod_rev AS (
SELECT stock_code, sum(line_revenue) AS rev
FROM retail_orders
GROUP BY 1
),
ranked AS (
SELECT rev, ntile(5) OVER (ORDER BY rev DESC) AS quintile
FROM prod_rev
)
SELECT quintile, count(*) AS n_products, round(sum(rev), 2) AS revenue,
round(100.0 * sum(rev) / sum(sum(rev)) OVER (), 1) AS pct_of_total_revenue
FROM ranked
GROUP BY 1
ORDER BY 1
Monthly net revenue
Open in Live SQLSELECT strftime(date_trunc('month', invoice_date), '%Y-%m') AS month, round(sum(line_revenue),2) AS net_revenue FROM retail_orders GROUP BY 1 ORDER BY 1
Top 10 products by net revenue
Open in Live SQLSELECT stock_code, round(sum(line_revenue),2) AS net_revenue, count(*) AS line_items FROM retail_orders GROUP BY 1 ORDER BY 2 DESC LIMIT 10
Order cancellation rate, top 10 countries
Open in Live SQLSELECT country, round(100.0*count(distinct CASE WHEN is_cancelled THEN invoice END)/count(distinct invoice),1) AS pct_orders_cancelled, count(distinct invoice) AS n_invoices FROM retail_orders GROUP BY 1 ORDER BY n_invoices DESC LIMIT 10
Caveats
- This is a real UK-based online gift retailer selling mostly to wholesale customers, not a typical consumer DTC shop, so basket sizes and repeat-purchase patterns skew larger and more B2B than a typical online store.
- The last month is partial: the data ends Dec 9, 2011.
- Customers without a Customer ID (22.2% of clean rows) count toward revenue and products but not toward cohorts.
Releases and revisions
- This is a fixed historical dataset (as of December 2011); it is not revised.
03Sources
Sources and licence.
- UCI Online Retail II Chen, D. (2012), UCI Machine Learning Repository. Licence CC BY 4.0.
Licence: CC BY 4.0. Public data, not my business.
Download the chart data
Each CSV is made in your browser from the rows in that chart's table.
04Contact
Want this kind of breakdown on your own data?
Open to e-commerce, data and operations roles. Los Angeles or remote.