Filterable Cocktail Ingredient Bar Chart
This interactive bar chart displays the top 20 cocktail ingredients, ranked by the number of cocktails containing each ingredient. A dropdown menu filters the dataset by main alcohol type, updating the bar lengths to show ingredient frequencies within cocktails that include the selected spirit. Built with React and D3 v5, the visualization uses `d3.nest()` for aggregation, `scaleBand` and `scaleLinear` for positioning, and SVG rectangles for rendering. Data comes from Hotaling & Co.’s parsed cocktail ingredient dataset.
AI-generated descriptionDisplays a bar chart including the top 20 ingredients found in the cocktails data set. Selecting an alcohol in the dropdown will filter the cocktails data and return ingredients found in cocktails containing the selected alcohol. Based on the dataset of cocktails collected by alcohol importer and distiller Hotaling & Co.