Fork of Aggregated, Interactive Common Cocktail Ingredient Pairings
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 descriptionThis 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.