Supporting project P3 · Retail analytics · Public data (FreshRetailNet-50K, China 2024)
The day ends early: what 4.5 million perishable store-product-days actually show
50,000 store-SKU series over 90 days from the open FreshRetailNet-50K dataset: a sell-through clock that runs out by mid-morning, a measurable weekend effect, and a forecast bake-off where the honest interval matters more than the accuracy trophy.
What is real and what isn't — on this page
Real
- All numbers computed from the authentic train split (
…/resolve/main/data/train.parquet; pulled 2026-10-24). - Grid verified: exactly 50,000 series × 90 days = 4.5M rows, 898 stores, 18 cities, 865 SKUs.
- Forecast test set never touched during calibration (PIs from days 15–76; tests on 77–90).
- 5 real build mistakes in
AI_GOT_IT_WRONG.md— including one OOM crash.
Not claimed here
- No absolute units:
sale_amountis globally normalised by the provider; we report relative magnitudes only. - Sales are not treated as true demand where stockouts truncate observation — censoring is diagnosed, not silently "corrected".
- Calendar/holiday deltas are descriptive associations, not causal effects.
00 The two-minute version
Headline: 61.8% of store-SKU-days are sold through within 2 trading hours; only 4.0% stay stocked to close — replenishment must start from the sell-through clock, not the daily total.
- Business question
- When does the day actually end for fast perishables — and can daily store demand be forecast with intervals that keep their promise?
- Data
- FreshRetailNet-50K train split (4.5M rows, CC BY 4.0, attribution Dingdong-Inc). REAL
- Method
- Streaming audit → store-day & SKU-day aggregates → comparable per-store index → deterministic forecast bake-off with pre-test-calibrated 80% PIs. REAL
- Result
- Sell-through 61.8% ≤2h; weekend +20%; holiday +30.0%; mean-7 WAPE 0.131; naive PI coverage 80.4% vs seasonal-naive's 69.2% (calibration failure, disclosed). REAL
- Recommendation
- Clock-first replenishment review; mean-7 point + naive-calibrated interval until per-store recalibration ships.
- Limitations
- Normalised units; sales ≠ demand under censoring; 90 days, one platform; deltas associative.
- Next steps
- Per-store interval recalibration, latent-demand model on censored hours, local retail pilot.
01 The problem
Perishables die twice: once when they expire on the shelf, once when the shelf is empty by 9 a.m. and every lost sale is invisible in the data — because sales records silently truncate when stock hits zero. Classic demand-forecasting teaches models on exactly these biased series and calls the result "demand".
This project separates the two honest tasks: (1) describe the sell-through clock as its own operational signal, using the dataset's in-stock hour counter as the source of truth; (2) run a forecast bake-off for sales (not "demand") with prediction intervals calibrated and graded out-of-sample. Everything is reproducible from a public CC BY dataset.
02 The data
| Item | Detail | Verified | Status / limit |
|---|---|---|---|
| Dataset | FreshRetailNet-50K (train split) — Hugging Face Dingdong-Inc/FreshRetailNet-50K | 2026-10-24 | REAL — public |
| Licence | CC BY 4.0; attribution: Dingdong-Inc | repo card | Attribution carried on every derived artifact |
| Size | 4,500,000 rows = 50,000 store-SKU series × 90 days (2024-03-28 → 2024-06-25) | streamed audit, exact | eval split is one eval week only — procurement found via audit (ledger #1) |
| Coverage | 898 stores · 18 cities · 865 SKUs · 20 fields incl. hourly sales & stock flags, discount, holiday, weather | audit prints | one grocery platform, China |
| Key convention | stock_hour6_22_cnt = in-stock trading hours, window 06:00–22:00 (16 slots) — verified against hours_stock_status arrays | 3-row manual check | never assumed; always verified |
| Units | sale_amount globally normalised by provider | repo card | relative magnitudes only; disclosed on every chart |
03 The process
- Stream, don't slurp. 4.5M rows × 17 cols (two of them 24-slot arrays) OOM-killed the first naive load — the final pipeline streams 250k-row batches, array columns never materialised (ledger #3).
- Audit before selection. Exact grid check (50,000 × 90), dup keys, field ranges, the stock-hour convention verified against its own arrays — all printed in the run log.
- Two grains, both documented. store×day (forecasting) and binned SKU×day (sell-through clock) — nothing hand-typed into pages.
- Comparability without leakage: weekday/holiday effects measured on a per-store sale index (each store vs its own 90-day mean) — descriptive, so train-period normalisation is explicitly labelled.
- Temporal honesty in the bake-off: PI quantiles from days 15–76 only; graded on days 77–90. The test period was never seen by calibration.
- Censoring is diagnosed, not repaired: we forecast sales and say so; the demand-recovery problem is named as future work rather than silently assumed away.
04 What the data showed
05 The forecast bake-off
06 Limitations
- Normalised units — no naira/yuan/units conversion exists in the data; every number reported is relative.
- Censoring: sales truncate at stock-out; the "recovered demand" problem is explicitly future work, not assumed solved.
- Coverage is pooled across 898 stores — smooths store-level calibration gaps (documented in the model card).
- 90 days, one platform, one country — magnitudes are not portable; the methods are.
- Discount-depth correlation (−0.614) is store-ecological — deeper-discount stores also differ in mix; no causal claim.
07 Impact & recommendation
- Replenishment by clock: rank SKUs by first stock-out hour, not only units sold — the 61.8% ≤2h cohort is where morning allocation is won or lost.
- Forecast stack: mean-7 point (WAPE 0.131) wrapped in naive-calibrated 80% bands (80.4% coverage) until per-store recalibration ships.
- Holiday playbook: +30% sale-index days warrant pre-open allocation review; activity-flag-only days (+0.5%) do not.
Next steps: per-store PI recalibration; latent-demand model for censored hours; a licenced Nigerian retail pilot to re-derive magnitudes locally.
08 Tools used
Python/pyarrow (streaming extraction — memory-safe by design) · base R (descriptives, forecast bake-off, interval calibration) · Python/matplotlib (charts) · hand-coded HTML/CSS. AI-assisted with the published 5-entry bug ledger.
Named paths (R/…, AI_GOT_IT_WRONG.md, SOLUTIONS_LOG.md) are relative to this project's repo folder — browse the files on GitHub ↗ (verified live 2026-10-25).