Craft Beer Analysis

Background

One of my projects over the course of this Fall semester was for MadTree Brewing Co., which is a craft brewery in Cincinnati. Working this closely with the industry has led to an increased interest in craft beer for me. However, like most craft beer newbies, the sheer amount of options that exist within the industry can be overwhelming. This analysis is meant to help with understanding what exactly we are looking across the craft beer scene in different areas.

Setting Up the Craft Beer Dataset

There was a dataset on Kaggle that has craft beers and their breweries. It was initially two separate CSV files, but those were easily combineable into one with an inner_join. It is important to note that this is not an exhaustive dataset, but 558 breweries should be enough to get some interesting results. The following is a data dictionary of the combined dataset.

Data Dictionary (* = mutated column)

Variable Description
abv ABV of the beer listed
ibu IBU (bitterness) of the beer listed
brewery_id Brewery ID associated with the beer
ounces Ounces of the pour of the beer
city City the brewery is located in
state State abbreviation the brewery is located in
beername The beer name
breweryname The brewery name
beerid ID# of the beer in the dataset
beertype* Type of beer (lager, ale, IPA, etc.)
region* Full state name (for creation of maps)

Basic Summary Statistics

ABV

   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
0.00100 0.05000 0.05600 0.05977 0.06700 0.12800      62 

That is quite the range of ABVs. I am also intrigued about the minimum being less than 1%.

IBU

   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
   4.00   21.00   35.00   42.71   64.00  138.00    1005 

As I will reiterate in this document, I am not a fan of bitter beer. After a quick search, the typical IBU is from the range of 10-80. Therefore, the 1Q-3Q range is not surprising.

Craft Beer Initial Analysis

The following section will be a basic analysis of the dataset – simple things like finding the number of breweries in a city, state, or even the number of lager options in each city.

Breweries by City

I will start by doing a simple frequency analysis of breweries by city.

# A tibble: 384 × 2
   city              n
   <chr>         <int>
 1 Portland         17
 2 Boulder           9
 3 Chicago           9
 4 Seattle           9
 5 Austin            8
 6 Denver            8
 7 San Diego         8
 8 Bend              6
 9 San Francisco     5
10 Anchorage         4
# ℹ 374 more rows

This is an interesting piece of information, and on some level it does raise the question on how this data was collected. Is the person who published the dataset or the source data from Portland? There is a large discrepancy between Portland and all other cities in the dataset, but yet I know that there were more than 4 breweries in Cincinnati in 2017, when this data was collected.

Lagers by City

I am personally a big fan of lagers. Out of curiosity, I want to see which cities have the most variety of lagers.

`summarise()` has grouped output by 'beertype', 'city'. You can override using
the `.groups` argument.
# A tibble: 88 × 4
   beertype city           state     n
   <chr>    <chr>          <chr> <int>
 1 Lager    Monroe         WI       11
 2 Lager    Stevens Point  WI        8
 3 Lager    Middleton      WI        6
 4 Lager    Airway Heights WA        5
 5 Lager    Fort Collins   CO        5
 6 Lager    Framingham     MA        4
 7 Lager    Kona           HI        4
 8 Lager    St Mary's      PA        4
 9 Lager    Aurora         IN        3
10 Lager    Boston         MA        3
# ℹ 78 more rows

Wisconsin seems to be my type of people! However, it is interesting that in this dataset, the top 3 cities for lager choices are all in Wisconsin. What is it about the state that is conducive to lagers? Is it the market or something else?

Bitterness by State

IBU is a measurement of the bitterness of a beer. I do not like bitter beers. This is a way to see which states have the most bitter beer.

Virginia has some really bitter beer, followed by what seems to be California. See the following link for follow-up analysis: Analysis-Inspired Question

IBU by Beer Type

Those who know beer tend to have knowledge that IPAs are more bitter, as they have more hops, but may not have any further understanding of what beers are more/less bitter. The following boxplot is intended to shed light on the bitterness of different types of beer.

Warning: Removed 1005 rows containing non-finite values (`stat_boxplot()`).

As expected, IPAs have by far the highest IBU, with the 1Q beginning higher than any other beer’s 3Q end. Past that point, Stouts tend to be more bitter, followed by Ales.

ABV by Brewery

The next visualization is to see if there are specific breweries that brew beers with a higher ABV. It will be filtered to include breweries that have a mean ABV of 7.5%, as craft beer tends to run with high ABV ratings in general.

One of the names was cut off, but it is interesting to see a Cincinnati brewery on the high end of this visualization.

ABV by State

Similar to the last visualization, I want to see which states are producing higher ABV craft beers.

It seems as though Kentucky and Connecticut produce the most alcoholic beers.

Analysis-Inspired Question

As I was doing the prior analysis, there was a question that remained in my head: why do Virginia and California have the most bitter beers? This question should be able to be partially answered by discovering what types of beers Virginia and California produce the most. Generally, IPAs have higher bitterness ratings (IBU by Beer Type). If these states produce more IPAs/more bitter beers like a Stouts or Ales, then it makes sense as to why they show up as producing the most bitter beers.

As expected, California produces more Ales and Lagers in this dataset than anything else.

Virginia also produces mostly Ales and IPAs in this dataset. This gives context around why they showed up as some of the most bitter states (in terms of beer. People from CA/VA are actually quite nice!)

New Cincinnati Beer Sentiment Analysis

Keeping with the class theme of comparing MadTree and Rhinegeist (also since I worked on a MadTree project in another class), I want to see how their respective new beers are being recieved by beer enthusiasts on BeerAdvocate. The following analysis is on a handful of reviews scraped off of the BeerAdvocate website for MadTree’s “Gutenbock” and Rhinegeist’s “Lawnchair Hotrod.”

General Positivity and Negativity Around Gutenbock and Lawnchair Hotrod

`summarise()` has grouped output by 'beer'. You can override using the
`.groups` argument.
Joining with `by = join_by(word)`
`summarise()` has grouped output by 'beer'. You can override using the
`.groups` argument.
# A tibble: 4 × 3
  beer      sentiment     n
  <chr>     <chr>     <int>
1 gutenbock positive     27
2 lawnchair positive     21
3 lawnchair negative     20
4 gutenbock negative     10

There seems to be more positivity around Gutenbock over the Lawnchair Hotrod. There is one extra review for Gutenbock than Lawnchair, which may be impacting this, but regardless this is important to take note of. There are also far less negative words about Gutenbock.

Chronological Sentiment

The following visualization is to see whether or not there has been a shift in the sentiment around the two beers over the short time they have existed. This is also filtering out words that would be considered negative, but are actually used in a descriptive way.

Warning: There was 1 warning in `filter()`.
ℹ In argument: `!word == c("smell", "smells", "sour", "dark", "haze")`.
Caused by warning in `word == c("smell", "smells", "sour", "dark", "haze")`:
! longer object length is not a multiple of shorter object length
Joining with `by = join_by(word)`
`summarise()` has grouped output by 'beer', 'rev_date'. You can override using
the `.groups` argument.

This does not reveal much, and there also are not a lot of reviews to work from, however the negative review in July of the Lawnchair Hotrod is something to possibly do a deeper dive into. What exactly did the review(s) say?

text
12oz canned 05/23/23 (6 weeks ago) poured into a perfect pint glass at fridge temp 6% ABV. The beer pours mostly bright with some chill haze and off white head. The head recedes to an uneven ring and leaves a few spots of lacing. The aroma is moderate in strength featuring dank and tropical fruit salad, but no sweetness. The taste is bittersweet dank hops with more vague tropical fruit that I can’t pinpoint. Moderate bitterness. The mouthfeel is medium bodied with average carbonation and a mostly dry finish. Overall, pretty unique. Not a taste profile that I really enjoy, but not sure it’s not what they intended either…
Yellow translucent amber with a very short white head.

Aroma lost on my Covid affected nose. The taste was kinda wild, this may have been my first IPA with thiolized (sp) hops. Had tropical fruit but not specific varieties that I could identify. The bitterness was muted but there. The feel was quite good, crisp and refreshing. It’s not an IPA in the traditional sense, but it’s good. | |07/10/23 draft @ Wild Eagle |

Joining with `by = join_by(word)`
Joining with `by = join_by(word)`
`summarise()` has grouped output by 'word'. You can override using the
`.groups` argument.
# A tibble: 14 × 3
   word       sentiment     n
   <chr>      <chr>     <int>
 1 bitterness negative      2
 2 wild       negative      2
 3 bright     positive      1
 4 chill      negative      1
 5 crisp      positive      1
 6 enjoy      positive      1
 7 haze       negative      1
 8 lost       negative      1
 9 perfect    positive      1
10 pretty     positive      1
11 refreshing positive      1
12 sweetness  positive      1
13 uneven     negative      1
14 vague      negative      1

It seems some of the negative words could be counted as at least neutral, as “bitterness” was rated negatively but is used in context as describing another aspect of the beer. Filtering out that word along with the other ones included in the last visualization:

Warning: There was 1 warning in `filter()`.
ℹ In argument: `!word == c("smell", "smells", "sour", "dark", "haze",
  "bitterness")`.
Caused by warning in `word == c("smell", "smells", "sour", "dark", "haze", "bitterness")`:
! longer object length is not a multiple of shorter object length
Joining with `by = join_by(word)`
`summarise()` has grouped output by 'beer', 'rev_date'. You can override using
the `.groups` argument.

It seems to still be negative, but less so.

Beer Sentiment Emotion Scoring

Warning: There was 1 warning in `filter()`.
ℹ In argument: `!word == c("smell", "smells", "sour", "dark", "haze",
  "bitterness")`.
Caused by warning in `word == c("smell", "smells", "sour", "dark", "haze", "bitterness")`:
! longer object length is not a multiple of shorter object length
`summarise()` has grouped output by 'sentiment'. You can override using the
`.groups` argument.

Filtering out the same words as before, there does not seem to be more “positivity” for either beer, but there is definitely less negativity for Gutenbock. Overall, it seems that Gutenbock has been more positively received by consumers.

Conclusion

As you can see, there is a wide variety in the craft beer industry. Some states, like California and Virginia, produce more bitter beers, like IPAs and Ales, while Kentucky and Connecticut create beers with higher ABVs. Also, in the newer beers in the Cincinnati area, MadTree’s Gutenbock seems to be more popular than Rhinegeist’s Lawnchair Hotrod.