← All projects

PROJECT 001 / 102 · Commerce

Retail customer analytics.

Where are invoiced sales concentrated, and which customers should be considered for a retention experiment?

End-to-end case studyRetailExecuted notebook
61.4%of identified gross sales from the top 10% of buyers

THE RESULT

What the data shows

The top 434 identified purchasers—about 10% of the customer base—account for 61.4% of identified gross sales.

Gross invoiced sales total £10.67 million. This is observed historical purchasing value, not profit or a campaign result.

Retail customer analytics — chart from the computed study output
Computed study output. Full values and units are available in the results download.
Computed results · 12 of 13 rows. Values rounded for display; source units and raw column names are retained in the download.
monthgross sales gbpordersnet invoiced gbpcomplete monthaverage order value gbp
2010-12823,746.141,559748,957.02True528.4
2011-01691,364.561,086560,000.26True636.6
2011-02523,631.891,100498,062.65True476
2011-03717,639.361,454683,267.08True493.6
2011-04537,808.621,246493,207.12True431.6
2011-05770,536.021,681723,333.51True458.4
2011-06761,739.901,533691,123.12True496.9
2011-07719,221.191,475681,300.11True487.6
2011-08759,138.381,361704,804.63True557.8
2011-091,058,590.171,8371,019,687.62True576.3
2011-101,154,979.302,0401,070,704.67True566.2
2011-111,509,496.332,7691,461,756.25True545.1
Download the complete result table ↓

Reading repeat purchasing carefully

65.6% of identified purchasers made more than one positive-sales purchase in the observed window. That share depends on customer tenure. Cohort percentages measure purchasing at each month age; future unobserved periods remain missing.

Purchase cohort percentages by observed month age; unobserved future periods are grey
Monthly purchase cohorts. Unobservable periods remain missing.

THE METHOD

From source to answer

Python and SQL reconciliation, a signed sales ledger, purchase cohorts, and explicit customer segmentation rules.

  1. Keep unknown customer IDs in sales totals and show customer-level coverage separately.
  2. Retain credits in a signed ledger; reconcile £10,666,684.54 gross sales less £896,812.49 credits to £9,769,872.05 net invoiced value.
  3. Keep exact repeated lines unless there is evidence of an error. Removing them changes gross sales by only 0.23%.
  4. Build purchase cohorts and transparent customer segments using a fixed 10 December 2011 snapshot.
  5. Reproduce monthly sales, invoice counts, and segments independently in SQL and pandas.

The Python source exposes this study’s transformations. The complete project download includes shared preparation and evaluation routines.

EVALUATION

How the result was checked

541,909 source invoice lines · 19,960 positive-sales invoices · 4,338 identified purchasers. Observations cover 1 December 2010 through 9 December 2011. The last month is incomplete.

THE NEXT DECISION

What follows from the finding

Review high-value repeat purchasers with a commercial owner. Test a targeted reactivation intervention using randomized eligible groups and a predeclared observation period.

Where the conclusion stops

135,080 invoice lines (24.9%) have no customer ID. Identified purchasers account for 83.5% of gross sales. Purchase value is not profit or lifetime value, and repeat-buyer share is affected by different observation windows.

Related studies may reuse observations or holdouts. These are historical analyses; associations and backtests do not demonstrate commercial impact. Further model tuning needs new, untouched evaluation data.