This is a preliminary, strictly for-fun foray into beer data. Pairs well with most session IPAs.
You can find the main report in
compile/compile.md, read an interview about the project, or flip through the presentation slides for a talk given at RLadies Chicago. (The code behind those slides is in the
The overarching question I went into the analysis with was: how well do beer styles actually describe the characteristics of beers within each style? In other words, do natural clusters in beer align well with style boundaries?
I set about answering this with a mix of clustering (k-means) and classification (neural net and random forest) methods. If you want to play around with clustering interactively, there's a small Shiny app that'll let you do that.
- Markdown report in
- .Rpres code behind RLadies Oktoberfest meetup presentation in
- Shiny app code in
- Step-by-step scripts for getting and munging data in
All beer data was grabbed from the BreweryDB API, converted from JSON into a dataframe, and dumped into a MySQL database. To grab the data yourself, you can create an API key on BreweryDB run the
run_it.R script inside the
run_it directory. For a quicker but less up-to-date solution (the BreweryDB database is updated pretty frequently) you might consider stashing the data in a CSV or .feather file.
This analysis deals mainly with beer and its consituent components like ingredients (hops, malts) and other characteristics like bitterness and alcohol content. However, you can easily construct your own function for grabbing other things like breweries, glassware, locations, etc. by running the function generator in
Any and all feedback is more than welcome. Cheers!