Skip to main content
Public

Share visualization

Loading preview…

Fork of Aggregated, Interactive Common Cocktail Ingredient Pairings

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fork of Aggregated, Interactive Common Cocktail Ingredient Pairings

0
SSamir Nandardhane
Last edited May 16, 2023
Created on May 16, 2023

This interactive bar chart shows the 20 most common ingredients found in cocktails that contain a selected main alcohol, with bars representing the number of cocktails each ingredient appears in. Users choose the main alcohol from a dropdown menu, which filters the underlying dataset of cocktails collected by Hotaling & Co. The visualization is built with React and D3 v5, using `scaleBand` and `scaleLinear` for positioning, `nest()` and `rollup()` for aggregation, and SVG `rect` elements with native `title` tooltips for each bar.

AI-generated description

This visualization is based on the dataset of cocktails collected by alcohol importer and distiller Hotaling & Co. The original dataset was modified to parse out and clean up the ingredients into rows.

The chart can be interactive using the ingredient drop down. The user can enter an ingredient to filter on. The chart will return all of the ingredients included in cocktails containing the selected ingredients.

Comments

Sign in to join the discussion.

MIT Licensed