01 · The challenge
A forecasting input that only got refreshed a few times a year.
Sales curves describe how a new title’s sales spread across its first weeks on shelf, by retail chain and product segment. They feed demand forecasting directly.
The curves were built by hand. Each refresh took hours to days, so it only happened a few times a year, and adding finer subject-level segments wasn’t feasible manually.
02 · What I did
What I owned and built.
- Designed a statistical (deliberately not AI) method: pool POS units across qualifying titles per segment and week, normalize to the 26-week total, and use the median to limit bestseller outliers.
- Built the 26-week pipeline to a Delta table with CSV exports to a Unity Catalog Volume, and fixed an off-by-one launch-week date bug.
- Designed the 52-week calendar-seasonal curve: three build years, per-year normalization, recency weights of 0.5 / 0.3 / 0.2, the latest year held out for validation, and launch-spike trimming.
- Built the Streamlit app: a curve editor with live charts and renormalization, a two-person approval flow for overrides, a flagged-curves page, and a forecast preview that handles uploads to the forecasting platform through Blob Storage.
- Ran user testing and organized team coverage so the 52-week work kept moving while I was out.
03 · Architecture
How it fits together.
By chain × segment × launch week
PySpark
Live charts · two-person approval
04 · Key decisions
The judgment behind the build.
Why statistics instead of AI?
Planners need curves they can explain and defend. A transparent, pooled-median method is stable, auditable, and good enough to beat the manual baseline.
Why the median?
A single breakout bestseller can drag a mean-based curve away from what a typical title does. The median keeps the shape representative.
Why recency weights and a holdout year?
Recent years reflect current buying behavior better, and holding out the latest year means the curves get validated on data they never saw.
Why two-person approval?
Manual overrides are where forecasting risk lives. A second approver adds governance without slowing the automated path.
05 · Impact
What changed because of the work.
- A manual process that took hours to days is now an automated, repeatable pipeline that can refresh far more often.
- Subject-level segmentation gives planners finer, more relevant curves.
- Every manual override is reviewed before it reaches forecasting.
06 · What’s next
Where it goes from here.
Validate the 52-week curves against holdout data, find the launch-spike decay point empirically, and extend beyond the three-chain proof of concept.
This case study is a sanitized reconstruction. Organization names, proprietary code, data, and internal schemas are intentionally left out.