> A Manhattan is a Martini but you replace dry vermouth with bitters, replace gin with sweet vermouth, and add whiskey.<p>No, it's not.<p>What's missing is a sense of "role". Spirits should map to spirits, liqueurs to liqueurs etc.<p>There's usually only a few "slots" with cocktails: one (or sometimes a few) base spirits, something aromatic such as bitters or a vermouth, a sweet thing and/or a citrus.<p>(I once made a spreadsheet that I dubbed "the period table of cocktails - turns out the gaps usually lead you to an obscure variation you'd never heard of)
Death & Co's second book, "Cocktail Codex" [0], has a somewhat similar approach. The thrust of the book is that there are six root cocktails, and everything else is just a variation on them.<p>That book, and Death & Co's first book, "Modern Classic Cocktails" [1], are good reads for the person who is a fan of quality cocktails and wants to make something at home that's really good, and frequently better than what you get when you're dining out.<p>You will likely need to invest in some booze and stuff to be able to fully enjoy them, but just pick a drink a week, buy what you need, and pretty soon you'll have a collection that will allow you to make most of the things in the books.<p>[0] <a href="https://www.amazon.com/Cocktail-Codex-Fundamentals-Formulas-Evolutions/dp/160774970X" rel="nofollow">https://www.amazon.com/Cocktail-Codex-Fundamentals-Formulas-...</a><p>[1] <a href="https://www.amazon.com/Death-Co-Modern-Classic-Cocktails/dp/1607745259/" rel="nofollow">https://www.amazon.com/Death-Co-Modern-Classic-Cocktails/dp/...</a>
So I got:<p>“A Manhattan is a Martini but you replace dry vermouth with bitters, replace gin with sweet vermouth, and add whiskey.”<p>This is the wrong way to think about it. The rye (aka “whiskey”) in a Manhattan is conceptually and functionally equivalent to the gin in the martini.<p>The graph doesn’t seem to understand the concept of base liquor, which makes it a really cool exercise, but not functional.<p>Still, I love the idea.
"A Manhattan is a Screwdriver but you replace orange juice with bitters, replace vodka with sweet vermouth, and add whiskey."<p>Can't wait to explain this one to my bartender tonight!
I use Levenshtein matching for a small business. We take in orders, and some of them end up being ordered from a partner that ships them out. They often change the shipping address in small ways, and don't provide a nice api for us to match orders to tracking numbers. Instead, we just get an email from Fedex or UPS.<p>So, we trawl IMAP to extract the addresses and find close matches for open orders with Levenshtein. Not perfect, especially when one customer places more than one order, but saves us a lot of time.
Since order and ingredient category does matter for some cocktails, you could really geek out on this a lot farther, and take it way off the deep end... categorize by liquor base, by mixers, by sweet or savory flavorings, by solidity, by acidity, by temperature, by water/ice content, by garnishes, etc., etc., and then use edit distance on trees rather that on sets.
> Cocktail edit distance is a bit different - primarily because order doesn’t matter. It’s just set difference, or set distance.<p>Well, no, quantity matters for cocktails, which puts it in the opposite direction of set distance from a comparison where only order matters in terms of complexity.
The problem with this analysis is lack of depth. Changing any step of the recipe (the ingredients, measurements, temperatures, cooking vessels, order of operations, even presentation) can result in vastly different products.<p>Firstly, you need similar measurements. Second, replacing one ingredient for another affects the chemical composition that directly influences the perceived flavor (sweet, bitter, sour, salt, fat). Third, the physical acts of stirring vs shaking affect texture, temperature, and dilution all at once.<p>All this would need to be added to the model to begin to approximate actually similar cocktails, and not just a comparison like <i>"Hey, you can take the sugar and eggs out of cake and make bread!"</i><p>(The fact that the author conflates sweet and dry vermouth is also not great; that's like confusing a Riesling with Extra Brut Champagne)
I spotted an interesting data standardization anomaly:<p>"A The Last Word is a Gin Gimlet but you replace simple syrup with green chartreuse, replace lime juice with maraschino, and add lime."<p>It appears that "lime juice" and "lime" exist as separate ingredients in the ingredient lists, even though they're exactly the same thing. It looks like this is causing a false separation of the Last Word cluster (drinks containing "lime") from the Gimlet cluster (drinks containing "lime juice") in the 2D plots.
It was explained to me that cocktails are a combination of flavors. That is, for example, sweet + dry + sour + ... you get the point. Making a good cocktail is about balancing those various attributes, based on the characteristics of the base ingredients.
I think this project would've benefitted from consulting a good bartender -- or at least a barfly - to identify the key dimensions and the scaling vectors.<p>As other commenters pointed out, there's a whole science behind how the ingredients associate.