cocktailApp {cocktailApp}R Documentation

cocktailApp .

Description

A shiny app to explore cocktails. The app allows you to enter ingredients that a cocktail must have, or ingredients that it must not have. One can filter by number of ingredients, minimum rating, minimum ‘t stat’ (computed as the rating minus the T stat zero all multiplied by the square root of the number of ratings). One can also search for cocktail by regex.

In the main tab, titled “drinks”, one can find a table with the summaries of matching cocktails. Selecting rows of this table will cause the cocktail table below to be populated with more details on each selected cocktail. Selecting rows will also populate the bar chart in the “plots” tab.

If two or more ingredients are selected, drinks with non-zero quantities of both of these will be shown in a ternary plot in the “tern” tab.

In the “other” tab is a table with common co-ingredients of the selected ingredients. A co-ingredient is an ingredient that commonly occurs with the selected ingredient, as measured by the number of cocktails, and by ‘rho’, which is like a correlation based on the proportion.

A checkbox labelled, “Hobson's Choice” allows you to populate the cocktail table with five random cocktails that meet the numerical filters on number of ingredients, rating, and so on, but which do not meet the ingredient selections. Unselecting and re-selecting the checkbox selects a new set of random cocktails. Note that the random selection is not responsive to changes in the numerical filters.

Usage

cocktailApp(page_title = "Drink Schnauzer", enableBookmarking = "url")

Arguments

page_title

an optional page title for the app. A NULL value causes no page title to be used.

enableBookmarking

Can be one of "url", "server", or "disable". The default value, NULL, will respect the setting from any previous calls to enableBookmarking(). See enableBookmarking() for more information on bookmarking your app.

Value

Runs the shiny app.

Screenshots

The main page looks as follows. In this case the user has selected two ingredients, ‘Benedictine’ and ‘Bourbon’. The user has modified some of the numeric filters resulting in only six cocktails in the cocktail table on the right in the main tab.

Screenshot: landing page of app

In the next screenshot, the user has selected two of the rows of the cocktail table, which causes the ingredients table on the lower right to be populated with the recipes of the selected cocktails. Instead one could click on the linked cocktail names to be taken to the upstream source of the recipe, which is recommended since those pages typically have better instructions.

Screenshot: landing page of app, with selected cocktails

In the following screenshot, the user has selected two ingredients, ‘Benedictine’ and ‘bourbon’, then clicked on the the main table, then selected the ‘plots’ tab. This shows a bar plot of the proportions of all ingredients in all the selected cocktails.

Screenshot: bar plot of ingredients

In this screenshot, the user has selected two ingredients, ‘Benedictine’ and ‘bourbon’, then clicked on the ‘ternary’ tab, which shows a ternary plot of the proportions of cocktails with non-zero proportions of the first two selected ingredients. The third dimension of the ternary plot is ‘other’ ingredients.

Screenshot: ternary plot of ingredients

In this screenshot, the user has checked the “Hobson's Choice” box, which adds 5 random cocktails to the cocktail table.

Screenshot: main page with Hobsons choice

Author(s)

Steven E. Pav shabbychef@gmail.com

Examples

## Not run: 
cocktailApp()

## End(Not run)

[Package cocktailApp version 0.2.3 Index]