Skip to content
To news Blog

Data Driven Double IPA

Data Driven Double IPA
Written by
Data Science Lab
Published on
4 May 2021

Data-driven beer?

Brew a data-driven beer? That probably raises a whole host of questions. Is the beer brewed by computers? Is it even drinkable? Brewing beer takes skill and craftsmanship — shouldn’t we leave it to the brewers?

No need to worry. Grab a drink: in this blog, we’ll look at the beer being created through a collaboration between Uiltje Brewing Company and Data Science Lab. We’ll walk you through the process and the mystery surrounding the term ‘data-driven’.

As a young, innovative company, we immediately found a like-minded partner in Uiltje. Brewing a beer based on data — how good is that! It’s a project that fits well within our Lab. But how does an idea like this come about? It won’t surprise anyone that it started on a Friday afternoon. Couldn’t we do something with data and beer? What happened next is clear… Nothing ventured, nothing gained.

A nice idea, but how are we going to do it? In any data project, whether the outcome is a dashboard or a deep learning model, the foundation is data. Nothing surprising there, but what data do we need? How do we get it? And perhaps more importantly, what exactly do we want to do with it? First, we need to ask: how is a beer usually created?

To get a good answer, we spoke to Marko Mihalić, Brewery Manager at Uiltje:

“Uiltje has its Fresh & Fast range, of course, with a new beer delivered every 2 weeks. That means we make a new beer every 2 weeks. We vary the style: one week it might be a DIPA and 2 weeks later, for example, a Session IPA. That gives us variety in what we release. We draw inspiration for this partly from the hop varieties available and their quality. Hops are like grapes in winemaking: the same hop variety tastes slightly different each year. We also do a lot of testing with different hop combinations in our own lab to develop new flavours. And new hop varieties are always coming out of the US for us to work with. In our lab, we brew experimental batches of 20 – 25L and try things out until we arrive at recipes for new beers”

Clearly, brewing beer is a craft. As in almost every sector, data can provide valuable support. It can reveal connections that people might not spot themselves. It is then up to the user to act on the results. After all, computers cannot interpret data. We are approaching this project with that in mind. Ultimately, the brewers will have to work with the result, so they are the logical starting point. What input from data would be useful to you? How could you brew a data-driven beer with our help? And how do you, as a brewery, view the use of data? We put these and many other questions to the brewers at Uiltje. This is what we learned:

Marko: “A flavour profile would be the perfect starting point for us to develop a recipe and brew. If the data and algorithm can provide a set of characteristics for a specific beer style, we can take it from there. Using data to develop a recipe in this way is new to us. Data is playing an increasing role in marketing and sales, much as it does at other commercial companies. But that is not yet the case when we develop a new recipe and brew. Our ‘brew kit’ is fairly manual. We do have computers that regulate the cooling of the brew, and computers control the pumps too. We want to automate more of the process, for example during mashing. That ambition fits with being a craft brewery. Craft brewing is primarily about working with a living product, the brew, without unusual extracts, without hop extracts and without pasteurisation”

Right. As data scientists, we know what to do: collect data! This is familiar territory for us. We need review data: real consumers’ opinions about beer. Even though we have our own bar at the office, our data on this point is still fairly limited. That need not be a problem; a lack of suitable data is common. Fortunately, we live in the 21st century, and external data sources are almost always available, including in this case. People review all sorts of things online, including beer. There are even dedicated websites, apps and forums for it. Perfect! Web scraping is a technique for collecting information from web pages to build a dataset. It makes it easy to collect an external dataset from publicly available data. We’ll keep things light for this blog. We have data — now what?

Now we have the reviews: lots of opinions on lots of different beer styles. How much did people like the beer? What flavours did they taste? What style of beer was it? How much alcohol did it contain? Did they mention anything else worth noting? There is plenty of information to organise. We’re looking for the optimal combination of characteristics for a specific beer style. Some information is readily available, such as alcohol percentages and beer styles. But what exactly people liked about a beer is less obvious. Which flavour combinations appeal to them? To gain more insight into this, we used Natural Language Processing, or NLP.

NLP methods extract valuable information from text. This lets us link flavours and keywords to a review. So far, so good. Someone might taste citrus, grass & creaminess in an IPA, but how do those flavours get into the beer? Which ingredients produce which flavours? How does Uiltje do it?

Marko: “The aromas released in a brew can come from different sources. Each hop variety has its own distinctive flavour. ‘Columbus’ hops, for example, give a grassy flavour, while some yeast varieties produce a ‘hazy’ flavour. We make several beers with fruity notes. Flavours such as pineapple cannot be obtained directly from hops or yeast, so we regularly add fruit purées to the brew. Hop oils & dry hopping can add further flavours. Besides hops, malt is, of course, an ingredient in beer. Flavours such as chocolate and coffee come from the malt. Ageing beer in barrels, or making ‘barrel-aged beer’, can give it other distinctive flavours from the wood or the drink previously held in the barrel.”

There are so many ways to add flavour to beer! It is no surprise that craft beer has grown rapidly in recent years. We often see data science projects in such ‘growing markets’, where there is usually still plenty of scope for development. That bodes well for this project! What’s next? Modelling! We are building a regression model on this dataset to find an optimal set of characteristics. These are the characteristics of the optimal beer. You can read how we approached this technically in the next blog post! By characteristics, we mean things like alcohol percentage, IBU (bitterness from hops), aroma, mouthfeel and, of course, the combination of flavours. Using this regression model, we have arrived at an optimal set of beers within a specific beer style. More precisely, the model shows us the proportions that produce the best possible combination of flavours. We will pass these proportions on to Uiltje.  The brewers can get to work, and we cannot wait.

Blog

You may also find this interesting,

Sign up for our newsletter.

Want to be the first to hear about a new blog post?

Enter a valid email address.