Saturday 22 February 2014

Cocktail Venn Diagram

Many years ago, I worked on a project that involved creating a nice, clean database of alcoholic cocktails. That project never came to fruition, so the database has been languishing unused ever since. But then, on a Friday evening at work, we were discussing humorous data presentations whilst drinking cocktails. The two topics melded into an obvious question: "Has anyone done a Venn diagram of cocktails?"

The answer, according to Google Images, was "No!"

Then I remembered my under-used dataset, so I set to work coming up with some kind of Venn (or Euler) diagram. It turns out that these little blighters are quite difficult to construct beyond about four overlapping sets. Indeed, it is still a fairly active area of academic research.

I took my database of 289 drinks, and found the most common ingredients:
  1. vermouth (sweet and dry),
  2. gin,
  3. rum (dark and light),
  4. whisky,
  5. vodka,
  6. lemon juice,
  7. bitters (including Angostura),
  8. lime juice,
  9. orange juice, and
  10. brandy (including cognac)
I had planned to draw a diagram of those top ten ingredients, but quickly pruned it down to the six main, base spirits:
  1. vermouth,
  2. gin,
  3. rum,
  4. whisky,
  5. vodka, and
  6. brandy
This still turned out to be frustratingly difficult. But after an evening at the kitchen table with pencils and copious amounts of scrap paper, I came up with this:


It's almost symmetrical with the fortuitous but curious fact that no drink in my database contains both vodka and whisky.

A bit of time spent with Inkscape, JSON, HTML5 canvases and JavaScript allowed my to come up with an interactive web page demonstrating these intersections.