The International Bartenders Association (IBA) cocktails in csv and json format
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
I find it fascinating that the International Bartenders Association (IBA) keeps a list of “official” cocktails. Like, it’s not like the World Association of Chefs’ Societies keeps a list of official dishes. But yet the IBA keeps a list of official cocktails and keeps this up to date (!), as well. For example, I have sad news for all you vodka and orange juice fans out there: As of 2020 the Screwdriver is not an official cocktail anymore.
While a list of official cocktails is a bit silly, it’s also a nice dataset that I’ve now scraped and put into an
iba-cocktails
repo. This includes all the International Bartenders Association (IBA) Official Cocktails in CSV and JSON format as of 2023, from two different sources:
The IBA website and
Wikipedia’s list of IBA cocktails. My take on the difference between these sources is that the IBA website is more “official” (it’s their list, after all), but the Wikipedia recipes are easier to follow.
Here are files scraped from
The IBA website that you’ll find in the
iba-web
folder:
-
iba-cocktails-web.csv
: A CSV file with one row per cocktail. This means the ingredients are all smushed into a single column as a comma-separated list. -
iba-cocktails-ingredients-web.csv
: A CSV file with one row per cocktail ingredient. For example, there are three rows for the Margarita’s (1) tequila, (2) triple sec, and (3) lime juice. Here each ingredient description has also been lightly parsed into itsquantity
,unit
, andingredient
. For example,15 ml Freshly Squeezed Lime Juice
hasquantity
:15
,unit
:ml
, andingredient
:Freshly Squeezed Lime Juice
. -
iba-cocktails-web.json
: A JSON list with one dictionary/object per cocktail. This JSON includes the combined information fromiba-cocktails-web.csv
andiba-cocktails-ingredients-web.csv
.
Here are the files scraped from
Wikipedia’s list of IBA cocktails that you’ll find in the
wikipedia
folder:
-
iba-cocktails-wiki.csv
: A CSV file with one row per cocktail. The ingredients are smushed into a single column as a comma-separated list. -
iba-cocktails-ingredients-wiki.csv
: A CSV file with one row per cocktail ingredient. As Wikipedia has more “varying” ingredient descriptions than the IBA website, I wasn’t able to parse these ingredient descriptions further. -
iba-cocktails-wiki.json
: A JSON list with one dictionary/object per cocktail. This JSON includes the combined information fromiba-cocktails-wiki.csv
andiba-cocktails-ingredients-wiki.csv
.
Included in the
iba-cocktails
repo are also the R scripts I used to scrape this data. These scripts are guaranteed to work on my computer, on the 5th of Match 2023, at least once. Alas, as both the data on the IBA website and on Wikipedia was messier than I first anticipated, these scripts are correspondingly messy.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.