GS
← All work

Case study · Retail analyticsIn progress

Where does a grocer's growth actually come from?

Real household-level data from 84.51° (Kroger's data science company): 2,469 households, a full year of purchases, coupons, campaigns and demographics. First question: is growth more shoppers, more trips, or bigger baskets?

Sales growth, decomposed

vs the first 4-week period of 2017 · log points, which add up exactly

Active households

Trips per household

Spend per trip

Sales (ex fuel)

The pipeline

The real dbt project behind this page, read from its manifest. Pick a model to trace what feeds it and what it feeds.

  1. Raw files · Python extract

  2. Staging · clean and type

  3. Marts · star schema

  4. Reporting · answers

Pick a model to see its tests and where it sits in the flow.

15 models · 28 tests · all passing · last run Nov 4, 2026 on DuckDB, moving to Snowflake

The first result

Across 2017, sales without fuel grew about 10% from the first period to the last. Almost all of it came from bigger baskets (+9.1 pts). Slightly more households were active (+2.9), and they shopped a little less often (−2.0). So growth came from spend per trip. That points promotions at bigger baskets, more than at new shoppers.

How it's built

  • dbt: staging → star schema (dim_date, dim_product, dim_household, dim_campaign, fct_sales_line, fct_basket) → reporting.
  • 28 tests, including a check that households × trips × spend adds back to sales exactly.
  • Python extract and Snowflake RAW load with row-count checks; moving the models from DuckDB to Snowflake next.

The questions

  1. Is sales change driven by more households, more trips, or bigger baskets?

    Answered

  2. Which household segments are growing or shrinking?

    In progress

  3. Did the 27 campaigns cause extra spending? (difference-in-differences)

    In progress

  4. Who actually gets value from coupons?

    In progress

  5. Where should the next promotion dollar go?

    In progress

Data: 84.51° The Complete Journey (CC0). Independent project; not affiliated with Kroger or 84.51°.

Connections

Linked tools & methods

  • dbtTransforms raw warehouse tables into tested, documented models with SQL.Also in: VirtueSoft · Ad Creative Pretest Lab · Query Guard · Dashboard walkthrough · dbt open source
  • SnowflakeCloud data warehouse that stores and queries data at scale.Also in: VirtueSoft · Ad Creative Pretest Lab
  • PythonGeneral-purpose language used for data cleaning, analysis, automation and modeling.Also in: VirtueSoft · University of Cincinnati · NextSquare · Analyst · Kroger coupon leak · Ad Creative Pretest Lab · Dashboard walkthrough · Lead Scoring
  • SQLThe language for querying relational databases; the core of most analysis work.Also in: VirtueSoft · Jabil · NextSquare · Senior · NextSquare · Analyst · Query Guard · Dashboard walkthrough · Lead Scoring

Linked from 11 other items

Open the full graph →