Determining ABV to IBU Ratios in Beer

David Alvaro
INST414: Data Science Techniques
3 min readOct 17, 2023

The allure of beer lies not just in its alcoholic content but also in flavors. Among these flavors, bitterness, often originating from the use of hops, plays a pivotal role in defining a beer’s character and balance. Yet, as the alcohol by volume (ABV) rises, one might wonder how this bitterness adjusts in response. This post embarks on a journey through various popular beer styles, quantifying the relationship between bitterness and ABV, and deciphering patterns that underscore the brewmaster’s art and science. A beer is typically considered to be bitter if it has an international bitterness unit (IBU) of over 50.0.

In order to find data on the ABV and IBU of popular beers in the United States, I wrote some code in order to access one of the free APIs on the course Github with data on popular types of beer. I decided to parse the file into a JSON file and then convert that into a data frame in python using Pandas libraries, allowing the data to be easily viewed and cleaned. This data includes Name, ABV, IBU, Volume, Boil Volume, Method, Ingredients, etc. In this exploration I am really only cornered with ABV and IBU. In order to clean / filter this data frame, I specified I only wanted certain columns (ABV, Name and IBU), then removed columns that had null values. In order to determine the Alcohol to bitterness ratio I divided ABV by IBU. This new column gives me an idea of how bitter a beer is in relation to its alcohol content. I added this new column to the existing data frame.

The goal of this procedure is to determine which beers have an abv_to_ibu ratio greater than 0.10. Anything greater than that signifies to me that the beer is relatively bitter for the level of alcohol it contains. I personally do not like bitter beer, and this statistics lets me know which ones to avoid. Using the NetworkX, Numpy and Matplotlib libraries, I was able to create the following graph:

In this exploration, the different kinds of beer are considered to be the nodes, and the edges are the connections between nodes. In this case, the beers with an abv_to_ibu ratio of greater than 0.10. What I really wanted to determine in this analysis is to find three important nodes. For me an important node is a beer with a high abv_to_ibu ratio as I want to identify these beers (nodes). Below is the following code used to identify these important nodes.

I can conclude that Berliner Weisse, AB:07 and Rabiator are the nodes with the highest abv_to_ibu ratio. These are good beers to avoid according to my analysis and personal preference surrounding beer.

The limitations of this analysis are that the list of beers provided in the dataset is not a comprehensive list of every single beer in the United States. There are many local breweries that I’m sure, if they were to be added, could alter my findings and convulsions. This analysis is also subjective as many people may prefer a more bitter beer. These people may not find my conclusions to be very useful.

Link to code in Github:

https://github.com/dav1dalvaro/INST414/blob/main/assigment22.ipynb

--

--