What's for dinner?

Ariani Herrera
Posted on Aug 13, 2018

Like most busy people, we spend a lot of time wondering what we are going to make for dinner.

I wanted to scrape a website that helped me with this decision.

Using scrapy and beautiful soup I scraped over 1900 recipes from chowhound.com. Among the most important factors to consider from this website are the ingredients that are absolutely necessary to prepare for any recipe. I used natural language processing and came up with the most frequently used ingredients through out all 1900 recipes.

The word cloud and graph illustrate the most frequently used words, and how often these ingredients are used throughout all recipes. From a practical perspective anyone will more likely cook if they have the ingredients for that recipe.

 

A lot of cooking also stems down to how any ingredients a cook wants to use and how much effort or how many steps they are willing to put into their cooking efforts. I wanted to break down where most recipes fall with a histogram of where most recipes fall in terms of amount of steps their recipes entail.

 

Turns out more recipes fall in the 10 to 15 step category!

I wanted to do the same to show the reader the amount of ingredients needs to cook their meal, so I wanted to show a histogram of ingredients needs for their recipes.

I wanted to then show the relationship between the words. K means clustering allowed for me to do . K means clustering is a type of unsupervised learning machine learning task commonly used for clustering text and articles.  I counted all the recipes instructions and ingredients and used k means clustering to categorize the by cluster.

These clusters demonstrate by the distance from data points  the machines learning algorithm demonstrates the relationship of clustering points nearby with similar quantity of ingredients and number of instructions. I wanted to illustrate a simple example before illustrating attempting to cluster the recipes by ingredients used in the recipes.

I took the top 100 most used ingredients and performed k means clustering by determining whether or not the ingredient is in a recipe.

By using k mean clustering the algorithm by via Euclidean distance developed the following clustering.

The clusters did a pretty good job job in breaking down the most utilized ingredients per cluster based on the distance of the clusters.

 

 

 

 

 

 

About Author

Ariani Herrera

Ariani Herrera

Demonstrated passion for learning and developing solutions to complex business problems. Skilled in Sales, Business Development, Finance, Alternative Investments, and Equities. Strong analytical professional with a Bachelor’s Degree in Applied Mathematics from Columbia University in the City of...
View all posts by Ariani Herrera >

Leave a Comment

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

#python #trainwithnycdsa 2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python python machine learning python scrapy python web scraping python webscraping Python Workshop R R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp