Last active
February 9, 2021 21:29
Cocktail graph visualization - Old Fashioned ingredients 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
# import dependancies | |
import numpy as np | |
import os | |
import pandas as pd | |
from string import ascii_lowercase | |
import sys | |
import igraph as ig | |
import plotly | |
import chart_studio.plotly as py | |
import plotly.graph_objs as go | |
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot | |
from plotly import tools | |
import chart_studio; chart_studio.tools.set_config_file(plotly_domain="https://plotly.com",\ | |
plotly_api_domain="https://api.plotly.com") | |
print(plotly.__version__) # should be 3.10.0 | |
# For convenience, we added the recepie data to the notebook | |
# drinks linked to ingredients | |
result_sugar = ['creme de menthe', 'caribbean orange liqueur', 'frozen daiquiri', 'limeade', 'mojito', 'mulled wine', 'nuked hot chocolate', 'amaretto liqueur', 'caipirissima', 'irish coffee', 'pisco sour', 'sazerac', 'sangria #1', 'adam sunrise', 'aloha fruit punch', 'egg nog #4', 'gin swizzle', 'acapulco', 'angelica liqueur', 'cranberry punch', 'brandy cobbler', 'gluehwein', 'coffee liqueur', 'cranberry cordial', 'frozen mint daiquiri', 'frozen pineapple daiquiri', 'old fashioned', 'lassi - sweet', 'rum cobbler', 'new york sour', 'lassi raita', 'masala chai', 'swedish coffee', 'microwave hot cocoa', 'sweet sangria', 'thai coffee', 'thai iced coffee', 'absinthe #2', 'atomic lokade', 'brandy flip', 'classic old-fashioned', 'french 75', 'gin sour', 'homemade kahlua', 'jitterbug', 'jam donut', 'banana daiquiri', 'lemon shot', 'coffee-vodka', "captain kidd's punch", 'egg-nog - classic cooked', 'rum sour', 'egg nog - healthy', 'fruit cooler', 'strawberry lemonade', 'kurant tea', 'lassi - mango', 'spice 75', 'caipirinha', 'gin smash', 'champagne cocktail', "sangria - the world's best", 'tom collins', 'iced coffee', 'john collins', 'bourbon sour', 'bourbon sling', 'frappé', 'castillian hot chocolate', 'gin daisy', 'lemouroudji'] | |
result_angostura_bitters =['old fashioned', 'corn n oil', 'long vodka', 'mojito #3', 'zombie', 'abbey martini', 'manhattan', 'martinez 2', 'brooklyn', "duchamp's punch", 'pegu club'] | |
result_bourbon =['bourbon sour', 'irish curdling cow', 'mississippi planters punch', 'kentucky b and b', 'old fashioned', 'egg nog #4', 'midnight cowboy', 'sazerac', 'allegheny', "brandon and will's coke float", 'john collins', 'kentucky colonel', 'mint julep', 'manhattan', 'bourbon sling', 'classic old-fashioned'] | |
result_water =['castillian hot chocolate', 'lassi khara', 'sweet sangria', 'amaretto liqueur', 'chocolate drink', 'masala chai', 'adios amigos cocktail', 'coffee-vodka', 'mulled wine', 'strawberry lemonade', 'aloha fruit punch', 'angelica liqueur', 'classic old-fashioned', 'bourbon sling', 'kill the cold smoothie', 'homemade kahlua', 'iced coffee', 'jamaican coffee', 'gin toddy', 'lassi - sweet', 'sazerac', 'lassi - mango', 'strawberry shivers', 'thai iced tea', 'adam sunrise', 'creme de menthe', 'lassi - a south indian drink', 'mint julep', 'microwave hot cocoa', 'gin sling', 'gluehwein', 'tia-maria', 'rum toddy', 'old fashioned', 'coffee liqueur', 'rum old-fashioned', 'lemouroudji', 'shark attack', 'jello shots'] | |
# State the focal drink and the drinks linked to its four ingredients | |
focal_drink=['old fashioned'] | |
focal_ingredients = {'angostura_bitters':result_angostura_bitters, | |
'sugar':result_sugar, | |
'bourbon':result_bourbon, | |
'water':result_water} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment