knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
CraftCans
is a tiny R package to get and play with the data from Craft Cans. It contains, among other things, the quite wonderful beer_me()
function, which will 'serve' you a random beer from Craft Cans lovely stock. Sláinte!
edit: Looks like the API is out. Pity. beers
and beer_me()
still work, though.
devtools::install_github("RobertMyles/CraftCans") library(CraftCans)
You can get a complete list of all the canned beers Craft Cans have with beer_table()
. Since this function downloads and parses data, a faster alternative is data("beers")
, which returns a dataframe of these canned beers, taken from Craft Cans at the end of May 2017. beer_table()
will return up-to-date information, however.
data("beers") beers
beer_me()
beer_me(number = 4)
I'm working on plotting the cans as images (from this page), so that may or may not be done soon. Withering criticisms/lovely suggestions always welcome.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.