Walkthrough · Dashboard design
Build a dashboard with me
Grocery sales grew 10.5% across 2017. Where did it come from, and what should the category team do? Seven tiles, one decision at a time, on real household data. At each step, try picking the chart yourself.
- STEP 1 / 7
Start with four numbers
- The question
- How big is the business, and is it growing?
- Why this chart
- KPI cards answer "how are we doing?" in one glance. I picked the four that multiply into sales, so the rest of the dashboard can explain them.
- What it says
- Sales are up +10.5% from January to December. Households are up +2.9%, trips per household changed −2.0%, and spend per trip is up +9.6%.
Which chart would you pick?
The business at a glance
Latest 4-week period (Dec 2017) vs the first (Jan 2017)
Sales ex-fuel
$351.8k
▲ +10.5% vs Jan
Active households
2,004
▲ +2.9% vs Jan
Trips per household
5.39
▼ −2.0% vs Jan
Spend per trip
$32.54
▲ +9.6% vs Jan
Design note Four numbers only: the ones the bridge explains. Each shows change vs January so nobody has to do math.
KPIs, period 1 vs period 13 Metric Jan 2017 Dec 2017 Change Sales ex-fuel $318.2k $351.8k +10.5% Active households 1,947 2,004 +2.9% Trips per household 5.50 5.39 −2.0% Spend per trip $29.70 $32.54 +9.6% - STEP 2 / 7
Check the shape of the year
- The question
- Is that growth steady, or did it all happen at once?
- Why this chart
- A line over time is the only honest way to show trend and noise together. The 4-week average stops one odd week from steering the story.
- What it says
- A typical week sold about $80.8k. Sales rose from October, and the week of Dec 18 hit $107.1k: the holidays. With one year of data, December vs January mixes real growth with seasonality, so I say so.
Which chart would you pick?
Weekly sales, ex-fuel
Each week of 2017 (thin line) and the 4-week average (bold)
Design note Thin weekly line keeps the noise honest; the 4-week average carries the story. Month labels, not week numbers.
Weekly sales ex-fuel, 2017 Week starting Sales 2017-01-02 $88.4k 2017-01-09 $78.2k 2017-01-16 $77.6k 2017-01-23 $74.0k 2017-01-30 $91.0k 2017-02-06 $84.4k 2017-02-13 $76.1k 2017-02-20 $80.7k 2017-02-27 $85.1k 2017-03-06 $79.2k 2017-03-13 $79.6k 2017-03-20 $77.4k 2017-03-27 $81.2k 2017-04-03 $80.8k 2017-04-10 $83.3k 2017-04-17 $75.0k 2017-04-24 $75.8k 2017-05-01 $89.8k 2017-05-08 $84.0k 2017-05-15 $83.0k 2017-05-22 $80.8k 2017-05-29 $86.0k 2017-06-05 $84.8k 2017-06-12 $80.2k 2017-06-19 $71.2k 2017-06-26 $83.2k 2017-07-03 $91.0k 2017-07-10 $77.8k 2017-07-17 $77.2k 2017-07-24 $75.3k 2017-07-31 $89.6k 2017-08-07 $79.8k 2017-08-14 $77.7k 2017-08-21 $76.0k 2017-08-28 $81.4k 2017-09-04 $86.1k 2017-09-11 $75.4k 2017-09-18 $76.6k 2017-09-25 $77.6k 2017-10-02 $84.6k 2017-10-09 $80.7k 2017-10-16 $77.5k 2017-10-23 $79.9k 2017-10-30 $92.3k 2017-11-06 $80.8k 2017-11-13 $85.6k 2017-11-20 $86.5k 2017-11-27 $84.5k 2017-12-04 $87.0k 2017-12-11 $81.6k 2017-12-18 $107.1k - STEP 3 / 7
Break the growth apart
- The question
- Was it more shoppers, more trips, or bigger baskets?
- Why this chart
- Sales = households × trips per household × spend per trip. In log points those three add up exactly, so a bridge shows how each one moved the total.
- What it says
- Of 10 points of growth, bigger baskets added +9.1. More households added +2.9, and fewer trips each took away −2.0. Nearly all of the growth came from spend per trip.
Which chart would you pick?
What drove the growth
Sales grew 10.5% Jan → Dec 2017; 10 log points split into three drivers
Design note A bridge, because the question is 'what adds up to +10?'. Log points are used so the parts sum exactly.
Growth bridge, log points Driver Log points More households +2.9 Fewer trips each −2.0 Bigger baskets +9.1 Total growth +10.0 - STEP 4 / 7
Find where the basket grew
- The question
- Which departments drove the bigger baskets?
- Why this chart
- Each department's share of the total change, sorted biggest first and diverging from zero, so losers are as easy to spot as winners.
- What it says
- Grocery (+3.8 pts) and Drug/GM (+3.5 pts, itself up +27%) did most of the work, which fits holiday shopping. Fresh slipped: Produce −5.4%, packaged meat −5.7%.
Which chart would you pick?
Which departments grew
Points of the total sales change, Jan → Dec (label: department's own % change)
Design note Sorted by contribution, not alphabetically; diverging from zero so declines read as declines.
Department contribution to sales change Department Points of change Own change Grocery +3.83 +6.9% Drug GM +3.55 +26.5% Miscellaneous +1.31 +95.3% Other +0.91 +32.8% Deli +0.81 +25.0% Meat +0.66 +9.2% Pastry +0.31 +21.3% Nutrition −0.09 −6.6% Meat (packaged) −0.32 −5.7% Produce −0.42 −5.4% - STEP 5 / 7
Know when they shop
- The question
- When should a promotion or a staffing change land?
- Why this chart
- Two categories (weekday, hour) and one value: a heatmap shows the whole week at once, and the pattern jumps out.
- What it says
- Weekends carry 32% of trips, and 36% of all trips happen between 3 and 7pm. The busiest hours are Sunday 4pm and Monday 5pm.
Which chart would you pick?
When people shop
Share of all 2017 trips by weekday and hour (darker = busier)
Design note One colour, light to dark, so it works for colour-blind readers; the busiest hour is outlined.
Share of trips by weekday Day Share of trips Mon 14.1% Tue 13.4% Wed 13.2% Thu 13.4% Fri 13.8% Sat 15.9% Sun 16.3% Busiest hour Sun 4pm (1.53%) - STEP 6 / 7
Ask what is in the basket
- The question
- Are baskets bigger because of discounts, or a different mix?
- Why this chart
- Three ratios that move by a point or two. Small multiples give each its own scale, so small moves stay visible.
- What it says
- The discount rate fell from 19.4% to 18.4%, so bigger baskets were not bought with deeper discounts. Private label held steady (29.8% → 29.3%), and fresh share slipped from 27% to 25.6%.
Which chart would you pick?
Is the basket changing?
Share of sales by 4-week period, Jan → Dec 2017
Fresh share
25.6% −1.4 pts
Private label share
29.3% −0.5 pts
Discount rate
18.4% −1.0 pts
Design note Small multiples with their own scales: these move by a point or two, which a shared axis would flatten.
Basket mix, period 1 vs 13 Measure Jan Dec Fresh share 27% 25.6% Private label share 29.8% 29.3% Discount rate 19.4% 18.4% - STEP 7 / 7
Leave room for the follow-up
- The question
- "OK, but what about Deli?"
- Why this chart
- Every good dashboard ends with the detail behind the charts. A sortable table with a sparkline per row answers the next question without a new request.
- What it says
- Sort by any column. The default order matches the bar chart above, so the table and the chart tell the same story.
Which chart would you pick?
Department drill-down
4-week sales by department; click a column to sort
Trend Grocery $177.6k $189.8k +6.9% +3.83 Drug GM $42.5k $53.8k +26.5% +3.55 Miscellaneous $4.4k $8.5k +95.3% +1.31 Other $8.9k $11.8k +32.8% +0.91 Deli $10.3k $12.8k +25.0% +0.81 Meat $22.9k $25.0k +9.2% +0.66 Pastry $4.7k $5.7k +21.3% +0.31 Nutrition $4.4k $4.1k −6.6% −0.09 Meat (packaged) $18.2k $17.2k −5.7% −0.32 Produce $24.4k $23.0k −5.4% −0.42 Design note For the person who asks 'but what about Deli?'. The default sort matches the bar chart.
The finished dashboard
Grocery growth, 2017
The business at a glance
Latest 4-week period (Dec 2017) vs the first (Jan 2017)
Sales ex-fuel
$351.8k
▲ +10.5% vs Jan
Active households
2,004
▲ +2.9% vs Jan
Trips per household
5.39
▼ −2.0% vs Jan
Spend per trip
$32.54
▲ +9.6% vs Jan
Design note Four numbers only: the ones the bridge explains. Each shows change vs January so nobody has to do math.
| Metric | Jan 2017 | Dec 2017 | Change |
|---|---|---|---|
| Sales ex-fuel | $318.2k | $351.8k | +10.5% |
| Active households | 1,947 | 2,004 | +2.9% |
| Trips per household | 5.50 | 5.39 | −2.0% |
| Spend per trip | $29.70 | $32.54 | +9.6% |
Weekly sales, ex-fuel
Each week of 2017 (thin line) and the 4-week average (bold)
Design note Thin weekly line keeps the noise honest; the 4-week average carries the story. Month labels, not week numbers.
| Week starting | Sales |
|---|---|
| 2017-01-02 | $88.4k |
| 2017-01-09 | $78.2k |
| 2017-01-16 | $77.6k |
| 2017-01-23 | $74.0k |
| 2017-01-30 | $91.0k |
| 2017-02-06 | $84.4k |
| 2017-02-13 | $76.1k |
| 2017-02-20 | $80.7k |
| 2017-02-27 | $85.1k |
| 2017-03-06 | $79.2k |
| 2017-03-13 | $79.6k |
| 2017-03-20 | $77.4k |
| 2017-03-27 | $81.2k |
| 2017-04-03 | $80.8k |
| 2017-04-10 | $83.3k |
| 2017-04-17 | $75.0k |
| 2017-04-24 | $75.8k |
| 2017-05-01 | $89.8k |
| 2017-05-08 | $84.0k |
| 2017-05-15 | $83.0k |
| 2017-05-22 | $80.8k |
| 2017-05-29 | $86.0k |
| 2017-06-05 | $84.8k |
| 2017-06-12 | $80.2k |
| 2017-06-19 | $71.2k |
| 2017-06-26 | $83.2k |
| 2017-07-03 | $91.0k |
| 2017-07-10 | $77.8k |
| 2017-07-17 | $77.2k |
| 2017-07-24 | $75.3k |
| 2017-07-31 | $89.6k |
| 2017-08-07 | $79.8k |
| 2017-08-14 | $77.7k |
| 2017-08-21 | $76.0k |
| 2017-08-28 | $81.4k |
| 2017-09-04 | $86.1k |
| 2017-09-11 | $75.4k |
| 2017-09-18 | $76.6k |
| 2017-09-25 | $77.6k |
| 2017-10-02 | $84.6k |
| 2017-10-09 | $80.7k |
| 2017-10-16 | $77.5k |
| 2017-10-23 | $79.9k |
| 2017-10-30 | $92.3k |
| 2017-11-06 | $80.8k |
| 2017-11-13 | $85.6k |
| 2017-11-20 | $86.5k |
| 2017-11-27 | $84.5k |
| 2017-12-04 | $87.0k |
| 2017-12-11 | $81.6k |
| 2017-12-18 | $107.1k |
What drove the growth
Sales grew 10.5% Jan → Dec 2017; 10 log points split into three drivers
Design note A bridge, because the question is 'what adds up to +10?'. Log points are used so the parts sum exactly.
| Driver | Log points |
|---|---|
| More households | +2.9 |
| Fewer trips each | −2.0 |
| Bigger baskets | +9.1 |
| Total growth | +10.0 |
Which departments grew
Points of the total sales change, Jan → Dec (label: department's own % change)
Design note Sorted by contribution, not alphabetically; diverging from zero so declines read as declines.
| Department | Points of change | Own change |
|---|---|---|
| Grocery | +3.83 | +6.9% |
| Drug GM | +3.55 | +26.5% |
| Miscellaneous | +1.31 | +95.3% |
| Other | +0.91 | +32.8% |
| Deli | +0.81 | +25.0% |
| Meat | +0.66 | +9.2% |
| Pastry | +0.31 | +21.3% |
| Nutrition | −0.09 | −6.6% |
| Meat (packaged) | −0.32 | −5.7% |
| Produce | −0.42 | −5.4% |
When people shop
Share of all 2017 trips by weekday and hour (darker = busier)
Design note One colour, light to dark, so it works for colour-blind readers; the busiest hour is outlined.
| Day | Share of trips |
|---|---|
| Mon | 14.1% |
| Tue | 13.4% |
| Wed | 13.2% |
| Thu | 13.4% |
| Fri | 13.8% |
| Sat | 15.9% |
| Sun | 16.3% |
| Busiest hour | Sun 4pm (1.53%) |
Is the basket changing?
Share of sales by 4-week period, Jan → Dec 2017
Fresh share
25.6% −1.4 pts
Private label share
29.3% −0.5 pts
Discount rate
18.4% −1.0 pts
Design note Small multiples with their own scales: these move by a point or two, which a shared axis would flatten.
| Measure | Jan | Dec |
|---|---|---|
| Fresh share | 27% | 25.6% |
| Private label share | 29.8% | 29.3% |
| Discount rate | 19.4% | 18.4% |
Department drill-down
4-week sales by department; click a column to sort
| Trend | |||||
|---|---|---|---|---|---|
| Grocery | $177.6k | $189.8k | +6.9% | +3.83 | |
| Drug GM | $42.5k | $53.8k | +26.5% | +3.55 | |
| Miscellaneous | $4.4k | $8.5k | +95.3% | +1.31 | |
| Other | $8.9k | $11.8k | +32.8% | +0.91 | |
| Deli | $10.3k | $12.8k | +25.0% | +0.81 | |
| Meat | $22.9k | $25.0k | +9.2% | +0.66 | |
| Pastry | $4.7k | $5.7k | +21.3% | +0.31 | |
| Nutrition | $4.4k | $4.1k | −6.6% | −0.09 | |
| Meat (packaged) | $18.2k | $17.2k | −5.7% | −0.32 | |
| Produce | $24.4k | $23.0k | −5.4% | −0.42 |
Design note For the person who asks 'but what about Deli?'. The default sort matches the bar chart.
84.51° The Complete Journey (2,469 households, 2017); aggregates from the Grocery Growth Drivers dbt models. Grouped totals only, built with a Python + DuckDB script.
So what
Hypotheses to take to the category team, not conclusions: this is one year of data.
- Grow the basket, not the traffic. +9.1 of 10 points came from spend per trip. Promotions aimed at adding one more item likely beat ones aimed at new shoppers.
- Look hard at fresh. Produce and packaged meat shrank while general merchandise grew; fresh share fell 1.4 pts. Worth checking price, quality and availability.
- Time it for late afternoon. 36% of trips land between 3 and 7pm, and weekends carry 32%. That's where promos and staff do the most.
Next: add a second year to separate growth from seasonality. That work lives in the Grocery Growth Drivers case study (in progress).
How it's built
- dbt star schema over the 84.51° Complete Journey data (from the Grocery Growth Drivers project).
- DuckDB + Python: one script turns the models into grouped totals; department sales add back to total sales to the dollar.
- Hand-built SVG: every tile is drawn at build time, with no chart library, and has a hidden data table for screen readers.
Component ideas inspired by Josh Tapley'sAI Driven Dashboard Component Library. 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 · Grocery Growth Drivers · dbt open source
- DuckDBFast in-process analytical database; runs SQL on local files with no server.
- 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 · Grocery Growth Drivers · Lead Scoring
- SQLThe language for querying relational databases; the core of most analysis work.Also in: VirtueSoft · Jabil · NextSquare · Senior · NextSquare · Analyst · Query Guard · Grocery Growth Drivers · Lead Scoring
- Data visualizationChoosing and building the chart that answers the question honestly.