E-commerce · Delivery & reviews · SQL + statistics
Olist E-commerce Analytics
About 100,000 real orders from Olist, a Brazilian marketplace: what drives 1-star reviews, which part of delivery fails, and what each fix is worth, from a hash-verified download to a ranked, sized action list.
- −1.94★per late order, after controls and seller fixed effects
- 36.8%of 1-star reviews come from the 6.7% of orders that arrive late
- 58.9%of late orders removable with three levers
- 1,6091-star reviews a year avoided
The problem
Olist lets small Brazilian sellers sell on the big marketplaces through one contract and handles payments and logistics partners. Between January 2017 and August 2018 monthly orders grew from 800 to more than 6,000. The Head of Marketplace Operations wanted to know whether the customer experience kept up, what really drives bad reviews, and which fix to fund first.
The data
The public Olist dataset (CC BY-NC-SA 4.0): nine related tables with 99,441 orders, 112,650 items, payments, 99,224 reviews, products, sellers and 1 M geolocation rows. A pinned download checks every file against a SHA-256 hash. 32 logged cleaning rules flag rather than drop bad rows (for example 166 orders handed to the carrier before they were placed), and 23 validation checks pass.
Approach
Logged cleaning pipeline
32 rules with row counts, a quarantine table and 23 validation checks; key counts re-derived in DuckDB SQL; a complete-months window (Jan 2017 – Aug 2018, 99,092 orders).
EDA
Growth was volume (orders +135%, average order value flat at R$137). On-time orders average 4.29★; 8–14 days late average 1.67★. Lateness peaks in Nov 2017 and Feb–Mar 2018 and in states far from São Paulo.
SQL deep-dive in DuckDB
Delivery split into three legs (87% of the extra time on late orders is carrier transit), a lane matrix (SP → RJ: 8.5% of orders, 17.6% of late ones), a seller scorecard with Wilson and Bayesian guards (78 sellers flagged), cohorts and split-basket detection.
Statistics
The 2-star gap tested against confounding: controls for month, geography, category, basket and promised time, seller fixed effects with clustered errors, a matched comparison, dose-response, a negative control and a power check on repeat purchases.
Interactive report
A hand-built d3 report: brush the timeline, click a state on a Brazil tile map or a route, and every number recalculates from an additive cube. 9 tie-out checks must pass before the page is written.
Impact and recommendations
Three levers sized per month × lane × handoff cell on the last 12 months with targets taken from Olist's own data, 1-star reviews from the refit model, 300 bootstrap draws, sensitivity checks and a carrier break-even; 6 ranked actions with owners.
What I found
- A late delivery costs 1.94 stars (95% CI 1.89–1.99) even when each seller is compared with itself: 96% of the raw gap survives the controls. Lateness accounts for 2,984 of 9,313 1-star reviews.
- 74.5% of late orders are reviewed before the parcel arrives, because the survey goes out around the promised date. Most of the damage is done while the customer is waiting.
- In the last 12 months, sellers handing over by the shipping limit, SP → RJ at the median São Paulo lane and peak months at off-peak reliability would remove 3,392 of 5,762 late orders (58.9%) and 1,609 1-star reviews. The late rate would fall from 7.76% to 3.19% and the rating rise from 4.134 to 4.221.
- Repeat revenue is not the business case: with a ~2% return rate the levers keep about R$1,579 of repeat GMV a year. The case rests on the rating every future buyer sees.
| Lever | Late orders avoided | 1-star reviews avoided |
|---|---|---|
| A · Sellers hand over by the shipping limit | 1,182 (1,124–1,278) | 522 (492–563) |
| B · SP → RJ at the median SP lane (17.59% → 8.30%) | 574 (480–646) | 294 (244–331) |
| C · Peak months at off-peak reliability (ceiling) | 2,152 (2,070–2,291) | 1,056 (999–1,130) |
| A + B + C, overlap removed | 3,392 (3,270–3,540) | 1,609 (1,530–1,690) |
Charts




Live dashboard
Interactive: filter by segment and hover any chart. Open full screen ↗
The key insight
Late orders look different before they ship (more peak months, more Rio and North-East), so the raw 2-star gap could have been about where and when people buy. It wasn't: the penalty survives every control. The surprise was timing. Three in four late orders are reviewed before the parcel arrives, so a revised-date message before the survey is the cheapest thing to test first. After that: a call list of 69 sellers who cause half of the missed shipping limits, a longer promise in peak months, and a re-tender of the SP → RJ lane, where each R$1 of premium per parcel costs about R$21 per 1-star review avoided.
Limitations & next steps
- The public data has no margins, carrier prices or support costs, so value is given in late orders, 1-star reviews and GMV, with the carrier choice as a break-even.
- Lever targets are observational. Lever C (peak capacity) is a ceiling; with half the peak gap closed, the three levers remove 44.2% of late orders.
- The revised-date message's ceiling (675 1-star reviews a year) is observational and needs an A/B test before it counts.
- The data covers 2017–2018. The method transfers to current data; the reais figures do not.