Coffee Data Science

Coffee Flow Analysis By Shot Type

More analysis on layered espresso

Robert McKeon Aloe
Towards Data Science
5 min readJun 11, 2021

--

Previously, I’ve looked a flow parameters in how they are correlated to a good espresso shot. I didn’t find anything new, but then I did a breakdown on shot type, and I started to see some interesting variables. One of the confounding variables in my data in multiple types of layered shots, and they have a difference in flow.

Espresso Variants:

  1. Regular Espresso Shot
  2. Staccato Tamped
  3. Sudo-Staccato
  4. Double-Double

Metrics of Performance

I use two metrics for evaluating the differences between techniques: Final Score and Coffee Extraction.

Final score is the average of a scorecard of 7 metrics (Sharp, Rich, Syrup, Sweet, Sour, Bitter, and Aftertaste). These scores were subjective, of course, but they were calibrated to my tastes and helped me improve my shots. There is some variation in the scores. My aim was to be consistent for each metric, but some times the granularity was difficult.

Total Dissolved Solids (TDS) is measured using a refractometer, and this number combined with the output weight of the shot and the input weight of the coffee is used to determine the percentage of coffee extracted into the cup.

Flow Metrics

I have made up some metrics that I thought might be interesting for flow. I split pre-infusion (PI) and infusion. I didn’t look at pressure pulsing but rather the smoothed flow.

For pre-infusion, I cut it in half because typically, PI starts slow and then speeds up. For infusion, I looked at the upward and then downward trends as seen below as for my lever machine, I am actively adjusting flow throughout the shot.

Additionally, I looked at the time to get to 1g of coffee as well as 2, 3, 4, 5, 6, 7, and 8 grams.

Time to Cover Filter (TCF) and T10 (time to 10ml) are two variables I’ve been using for almost a year to help track differences in flow at a higher level. There is a good correlation between them and a good espresso shot.

Data Analysis

In my previous work, I explained the variables that I derived from flow logs. The main metric used in this work is correlation.

Correlation is a metric to say how similar two variables are to each other. High correlation doesn’t mean one variable causes another variable, but that both variables go up or down the same when things change. Correlation could be positive (trend the same) or negative (trend inverse to each other). 0 means there is no correlation.

Here is the first break-down by shot type:

It seems clear that for regular shots, there are some flow metrics related to the percent of time to the first chunk of output weight.

So let’s break-down these graphs into smaller bites.

PI/TCF is a great metric for regular shots and Double-Doubles, but maybe not as much for the others. The number of pumps for pressure pulsing also didn’t seem to matter. For regular shots, the slope of Pre-infusion seems to have a large impact.

If we focus on the time to different weights and the percent of shot time to get to those weights, some interesting trends emerge. For taste, the faster a shot goes, the better it tastes for a Double-Double, but this is not true for the sudo-staccato. While there is a similar trend for EY.

However, the percent of time that it takes to get to a certain weight is highly correlated to high extraction yield for regular shots. This means the higher the fraction of time spent in pre-infusion (PI) the better because the first 8 to 10g were usually during pre-infusion for these shots.

The best conclusion I’ve gained from these breakdowns is that the picture is still unclear. It also seems that these different types of layered shots fundamentally work different from one another, so modifying parameters for each can be challenging.

I thought more data would reveal easy patterns or maybe something new, but the challenge with espresso is multiple, interconnected variable problem. I suspect it would be disappointing to find something simple and straight-forward give all the effort to improve espresso in multiple ways.

--

--

I’m in love with my Wife, my Kids, Espresso, Data Science, tomatoes, cooking, engineering, talking, family, Paris, and Italy, not necessarily in that order.