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.

Solo project · end to endDec 2026

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

  1. 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).

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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

What each lever is worth (Sep 2017 – Aug 2018, 95% intervals)
LeverLate orders avoided1-star reviews avoided
A · Sellers hand over by the shipping limit1,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 removed3,392 (3,270–3,540)1,609 (1,530–1,690)

Charts

Late orders and 1-star reviews avoided a year, by lever
Late orders and 1-star reviews avoided a year, by lever
Monthly late rate, actual vs with the three levers
Monthly late rate, actual vs with the three levers
Each extra week late costs more stars, after controls and seller fixed effects
Each extra week late costs more stars, after controls and seller fixed effects
SP → RJ carrier premium vs cost per 1-star review avoided
SP → RJ carrier premium vs cost per 1-star review avoided

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

Tools