Data Scientist & AI Engineer, Nexus
An old notebook said 3–5% repeat rate. The tested model said 0.48%.
I rebuilt the public Olist marketplace data (99,441 orders) into a tested order-grain dbt model. It runs locally on DuckDB, with BigQuery as the warehouse target.
The first useful result was a correction. An earlier notebook figure put the month-1 repeat rate at 3–5%. The tested model says 0.48%. Same data, but a clearer grain and definition.
A few other results:
- 90-day repeat-purchase probability: about 1.3% across 86,950 customers
- Late delivered orders rose from 3.63% to 7.94% year over year, January to July
- My seven-day order forecast did not beat a seasonal naive baseline (MAE 41.19 vs 40.50), so I report that instead of hiding it
Most of the work was defining things before calculating them: what counts as a repeat, a late order or a fully observed customer. Missing review ratings were the hardest part. Late orders had a rating only 27% of the time, against 98% for on-time ones, so the link between late delivery and poor ratings is fragile.
How do you report a metric when the missing data clearly isn't random?
Analytics EngineeringdbtData Quality






Comments
0 comments