Data Analysis on NY State Restaurants

Posted on Jun 18, 2019
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Find the code to this project here

Project Motivation:

With thousands of restaurants all over NY state, it’s hard to use pure data to find good quality food and good experiences guided only by prices. You don’t necessarily know that the high price guarantees a high level of quality. It’s possible that good quality food is hidden among medium or low priced restaurants.

  • Doe restaurants in higher-end neighborhoods deliver higher quality or better experiences?
  • Is there a predominance of cuisine type by neighborhood or area?
  • What neighborhoods in NY or towns around the state are worth visiting in order to have a good culinary experience?

Web Scraping DataΒ 

Tripadvisor.com with Β Scrappy

Data Analysis on NY State Restaurants

First, I had to obtain the URL from the first page’s β€œnext” button and created a loop to iterate over all subsequent pages. At 30 restaurants per page, 12446 restaurants were scraped from 415 pages, resulting in six different features, including cuisine, restaurant’s name, price, rank, and number of reviews. Below, it’s possible to visualize the raw data as just scraped from Trip Advisor.

 

Data Analysis on NY State Restaurants

The next step is visualizing the data to gain a better idea of the content.

Data Analysis on NY State Restaurants

Data Cleaning:

In the first place, the column Cuisine was cleaned, and only the first type of cuisine classification was kept. Β The process also included converting the column price from one, two, three or four dollar signs into numbers where one means cheap, two means medium, three means expensive, and four means very expensive.. Then, the rank column was cleaned to keep only the rank’s number without additional information that came with the scraping process.

Finally, the columns reviews and avg were kept as is but making sure that they are numerical columns, making available for further analysis.

Β 

Data Analysis:

The most popular type of cuisine in NY state seems to be American, followed by Italian, Japanese and Mexican.

This could be cautiously understood as a parameter for ethnicity segmentation in the city of NY.

 

From all restaurants’ reviews, the Russian cuisine seems to be the most reviewed with an average of over 500 reviews per restaurant, although this result could be biased due to the existence of outliers.

But does more expensive mean better?

In general, gluten-free options seem to be more expensive options, less likely to be rated but with a higher average rating.

On one hand, due to being a rare option, gluten-free food is higher priced than the average.

On the other hand, the high prices of fusion cuisine barely reflect the high quality of food It’s important to remember that customers who t pay more money tend to have a sensation of a better experience even if the food is not as good.

 

Manhattan

With 1.122.396 reviews, Manhattan seems to be the area with the highest concentration of restaurants and reviews. Β They also seem to have the highest ratings.

 

Manhattan seems to have a lower correlation between prices and average rates compared to the rest of neighborhoods

However, on average, the highest concentration of reviews, low prices, and the best ratings are away from Manhattan.

 

 

Conclusion:

  • Vegan or gluten-free options are an important part of the market, probably due to being these categories becoming more popular among people who choose to limit what they eat due to health or other concerns.
  • Higher prices do not guarantee a better quality of food.
  • There are better chances of finding a better culinary experience if headed to areas like East Newark, Newark, and Howard Beach, where prices stay in the mid-range and the average is higher.

About Author

Leave a Comment

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans 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 boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis 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 seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI