-> Please see this doc for images
TWIST Alpha Overview - LIVE
What is TWIST?
Twist is an attempt to visualize interactions of ingredients in the “cocktail flavor space”. It does this by parsing a live database of cocktails to gather data about ingredient relationships.
This helps in achieving a few primary goals.
- Understand what ingredients are frequently paired with what
- Understand what pairings might be making up the “core” of a certain drink.
- Give suggestions for pairing in the event of making a drink that might not already exist
The end goal of TWIST is to provide an engine for understanding how ingredients tend to be used and to suggest how they might be able to be used further.
The current alpha version provides 4 basic features to try to achieve the listed goals.
Types keywords such as ingredients or cocktail names into the bar to get back ingredients or cocktails. You might need to scroll down to see the ingredients as they’re listed after cocktails. Click on an item to add it to the visualization.
Once added, the item will be added to the list and can be removed later by clicking the trash icon. It’s important to note here that ingredients can only appear once, so if you add duplicates it won’t change the visualization.
For reference:
Drinks -> a collection of ingredients
Ingredients -> a single ingredient represented as a point on the visualization.
The app will attempt to suggest related ingredients based off of the ones currently present in the simulation. Think of these results as search engine results; the results show how often two appear close to each other, not necessarily that they’re always in the same drink.
The number is just the behind the scenes score and doesn’t represent anything other than an arbitrary score used by the code so that you can compare scores to each other to see what the results of the algorithm are.
The visualization is simply a collection of the ingredients with lines between them representing their “strength” together or how often they’re used together. Wider lines pull ingredients closer representing two ingredients that are paired more frequently.
Let’s take our Mojito visualization for example. We can see that Soda water is located far from the primary grouping of sugar, lime, rum, and mint. Generally what this shows is that the grouping makes up the “core” of the drink and the weaker ingredient is more of an additive. This stays true for most popular drinks but holds up less when looking at more obscure drinks due to the lack of data.
In some cases we might want to see the interaction of multiple drinks together. In this case we have added Tom Collins to our Mojito simulation so we add only a few more ingredients. Notice that the core of the visualization is still present.
High density between multiple ingredients in more than one drink tends to imply interchangeability between ingredients.
In the above picture we have visualized a Negroni and Martini which share Gin as a common ingredient. We can see that the visualization branches off in two directions (Olive or Campari) which implies that these two drinks deviate from each other.
Contact me with feedback at gabespersonal@gmail.com
- Do you feel the visualization adequately shows interactions between ingredients? Why or why not (examples if possible)?
- Do you feel the suggestions make sense in general? Why or why not (examples if possible)?
- What features do you think could be added to improve your understanding of the visualization, data, etc.?
- (For bartenders or those in industry) Would you use this product professionally, personally, or both? Why?
API is still under construction but technically there. If you would like to use the graph data or would like a custom endpoint email me at gabespersonal@gmail.com
Raw Data - https://www.thecocktaildb.com/
Backend Python - Flask, Networkx (and a few other data processing libraries)
Frontend Javascript - React, D3, MaterialUI
Please contact me through email at gabespersonal@gmail.com if additional issues are found
- Data not clean - causes weird search results such as upper/lowercase ingredients that are different
- Similar ingredients aren’t merged - club soda versus soda water for example
- Certain (common) ingredients aren’t appearing on search even though they should be
- Duplicate items can be added to no effect - no effect is intended, showing twice is not