NYC Data Science Academy| Blog
Bootcamps
Lifetime Job Support Available Financing Available
Bootcamps
Data Science with Machine Learning Flagship 🏆 Data Analytics Bootcamp Artificial Intelligence Bootcamp New Release 🎉
Free Lesson
Intro to Data Science New Release 🎉
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook Graduate Outcomes Must See 🔥
Alumni
Success Stories Testimonials Alumni Directory Alumni Exclusive Study Program
Courses
View Bundled Courses
Financing Available
Bootcamp Prep Popular 🔥 Data Science Mastery Data Science Launchpad with Python View AI Courses Generative AI for Everyone New 🎉 Generative AI for Finance New 🎉 Generative AI for Marketing New 🎉
Bundle Up
Learn More and Save More
Combination of data science courses.
View Data Science Courses
Beginner
Introductory Python
Intermediate
Data Science Python: Data Analysis and Visualization Popular 🔥 Data Science R: Data Analysis and Visualization
Advanced
Data Science Python: Machine Learning Popular 🔥 Data Science R: Machine Learning Designing and Implementing Production MLOps New 🎉 Natural Language Processing for Production (NLP) New 🎉
Find Inspiration
Get Course Recommendation Must Try 💎 An Ultimate Guide to Become a Data Scientist
For Companies
For Companies
Corporate Offerings Hiring Partners Candidate Portfolio Hire Our Graduates
Students Work
Students Work
All Posts Capstone Data Visualization Machine Learning Python Projects R Projects
Tutorials
About
About
About Us Accreditation Contact Us Join Us FAQ Webinars Subscription An Ultimate Guide to
Become a Data Scientist
    Login
NYC Data Science Acedemy
Bootcamps
Courses
Students Work
About
Bootcamps
Bootcamps
Data Science with Machine Learning Flagship
Data Analytics Bootcamp
Artificial Intelligence Bootcamp New Release 🎉
Free Lessons
Intro to Data Science New Release 🎉
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook
Graduate Outcomes Must See 🔥
Alumni
Success Stories
Testimonials
Alumni Directory
Alumni Exclusive Study Program
Courses
Bundles
financing available
View All Bundles
Bootcamp Prep
Data Science Mastery
Data Science Launchpad with Python NEW!
View AI Courses
Generative AI for Everyone
Generative AI for Finance
Generative AI for Marketing
View Data Science Courses
View All Professional Development Courses
Beginner
Introductory Python
Intermediate
Python: Data Analysis and Visualization
R: Data Analysis and Visualization
Advanced
Python: Machine Learning
R: Machine Learning
Designing and Implementing Production MLOps
Natural Language Processing for Production (NLP)
For Companies
Corporate Offerings
Hiring Partners
Candidate Portfolio
Hire Our Graduates
Students Work
All Posts
Capstone
Data Visualization
Machine Learning
Python Projects
R Projects
About
Accreditation
About Us
Contact Us
Join Us
FAQ
Webinars
Subscription
An Ultimate Guide to Become a Data Scientist
Tutorials
Data Analytics
  • Learn Pandas
  • Learn NumPy
  • Learn SciPy
  • Learn Matplotlib
Machine Learning
  • Boosting
  • Random Forest
  • Linear Regression
  • Decision Tree
  • PCA
Interview by Companies
  • JPMC
  • Google
  • Facebook
Artificial Intelligence
  • Learn Generative AI
  • Learn ChatGPT-3.5
  • Learn ChatGPT-4
  • Learn Google Bard
Coding
  • Learn Python
  • Learn SQL
  • Learn MySQL
  • Learn NoSQL
  • Learn PySpark
  • Learn PyTorch
Interview Questions
  • Python Hard
  • R Easy
  • R Hard
  • SQL Easy
  • SQL Hard
  • Python Easy
Data Science Blog > Student Works > YelpQuest - Begin your Journey Here!

YelpQuest - Begin your Journey Here!

Charles Leung, Jiaxu Luo, Danli and Samriddhi Shakya
Posted on Sep 23, 2016

Abstract

It is a daunting task for small business owners to begin their own restaurant – 60% of which fail within their first three years. For a lot of small businesses, Yelp exposure is a key factor to determining whether or not they make it past year 3. Our capstone project goal is to determine the key attributes and features to getting high ratings on Yelp. We used data visualizations in conjunction with machine learning algorithms to identify attributes and features correlated with high business ratings. We also used natural language processing to extract a wealth of information from review texts. We, the Fantastic Five, created an application using R Shiny to help them assess the marketplace by three means:

  1. Map: Geolocation analysis of restaurant success
  2. Topic Modeling: Understanding negative reviews within market of specified category
  3. Cuisine Gallery: Understanding frequent cuisine topics within positive reviews

Contributed by Jiaxu Luo, Charles Leung, Danli Zeng and Samriddhi Shakya. They are currently in the NYC Data Science Academy 12 week full time Data Science Bootcamp program taking place between July 4th to September 23th, 2016. This post is based on their final capstone project (due on the 12th week of the program).

 

Introduction

Based on a research conducted by Cornell University, 27% of new restaurants fail within the first year and nearly 60% close by year three. One of the main barriers to succeed in that actually is Yelp exposure. Well established restaurants with regular clientele have a base of high ratings and review counts that push them to the top of searches and provide a fall back for any mishaps. Restaurant ratings from Yelp are trusted globally as a metric – it is one of the best examples of utilizing crowdsourced experiences and opinions. The questions we seek to answer – what are the key features that drive a restaurant’s success? We believe there are identifiable features from the public data provided by Yelp that correlate to review ratings. These important factors could be either inherent attributes of business, like open hours, noise level, or some subjective factors induced by the customers. We explored attributes of importance to high ratings with exploratory data visualization and predictive modeling. The review text we mined with a topic modeling algorithm known as Latent Dirichlet Allocation. Our final product, the culmination of our findings, is an R Shiny application, YelpQuest.

 

Data Processing

Our application sources from the Yelp 2016 Dataset Challenge, which provides the data tables: businesses, reviews, tips (shorter reviews), user information and check-ins. The business table lists a restaurant’s name, location, opening hours, category, average star rating, the number of reviews about the business and a series of attributes like noise level or reservations policy. The review table lists a restaurant’s star rating, the review text, the review date, and the number of votes that the review has received. We limited the scope of our dataset to the Greater Phoenix Metropolitan Area of Phoenix, then filtered the business by category to keep only restaurants and their reviews (622446). The texts from those restaurants reviews will form the corpus of this project.

yelp_challenge

Challenges

  1. For prediction, the number of features from attributes are enormous, while there are only 9427 restaurants. The amount of data we have is insufficient to support the results. Feature reduction or choosing a more sophisticated model would be necessary.
  2. The positive/negative standards of reviews differ by restaurant categories - review stars alone cannot be viewed as a generalization of customers' opinions. For example, fast food restaurants generally receive lower ratings; as a result, a 4-star fast food restaurant is more significant than a 4-star Italian restaurant.

Business Table

  1. Identify restaurants on the business file
  2. Create a subset of the business file that only include restaurants
  3. Create a subset of the reviews, check-ins, and tips files
  4. Summarize data from reviews, check-in, and tips file(e.g, sum the number of check-ins/tips/reviews for each restaurants) and create a file for the summarized data containing only business ID and summary fields that can be appended back to the restaurants file
  5. Merge the summary table back to the restaurant/business file that would serve as the final modeling dataset

Reviews Table

  1. Identify restaurants that are above/below the average in terms of overall business rating by categories (e.g., above the average - Thai: 4.5 stars, Fast food: 3.5 stars)
  2. Create a subset of positive reviews from above average restaurants
  3. Create a subset of negative reviews from below average restaurants
  4. Concatenate all the reviews of each subset from step (3) and (4)
  5. Create review subsets of top cuisines from step (5) for modeling datasets for positive review topics and negative review topics

Exploratory Data Analysis

We first wanted to test our preconceived notions with exploratory analysis. When we think of a 5 star restaurant, we don’t exactly think of fast food or pizza. We imagine lavish European cuisines like Italian or French. We plotted in the above chart, the average restaurant ratings by categories. Some restaurants, such as Thai or Greek, tend to have higher ratings while Buffets, Fast Food and Chicken Wings receive lower ratings. The data seems to support our hypothesis that restaurant ratings are correlated with certain restaurant categories.

cats

Also, generally we don’t think of divey cheap eateries when we imagine 5 star restaurants either. To test if price range has some level of dependence with restaurant ratings, we plotted a mosaic plot below. What you see is The Chi-square Test of price range and ratings level. (It gave us a highly significant p-value of 2.2e-16)

price-range

A mosaic plot uses color as a comparison for different combinations of categorical variables to their expected frequencies. Blue means there are more observations for that combination than what would be expected, and red fewer. In this particular case, we can see that the two variables are not completely independent, as is reinforced by the χ2 test of independence results.

 

Predictive Modeling

To determine the important features within the data, we decided to fit tree-based models. With so many attributes and features compared to observation, our data table is sparse. Tree-based models can handle sparsity, but XGBoost excels at it. We fit 3 different models: Random Forest, XgBoost and Gradient Boosted Trees. Below we show the results of XGBoost since, as expected, it had the most stable performance.

varimp2

First we passed all the available features as predictors into the model and received a model fit of R square = 0.936. The feature importance plot gave us a super strong predictor - Average User Star. However, this piece of information isn’t very insightful; the overall business rating is an average of all the user ratings, and so it is obvious that it would be the most important on the plot. We decided to rerun the XGBoost and remove all review related features:

varimp1

The second time, the R2 dropped drastically to 0.318. Without review-related information, we cannot predict ratings very well. This time, location, check-in number and price range are the most important predictors.

 

Topic Modeling

Pre-Processing

Before any modeling, we need to preprocess the review text:

  1. Remove commonly used "stop words", e.g., the, and, but ...
  2. Remove punctuations, escape non-characters
  3. Remove numbers
  4. Remove non-writable characters
  5. Strip whitespace
  6. Convert the text to lowercase
  7. Tokenize text into bigrams and trigrams

We decided to tokenize the review text into bigrams and trigrams (2 and 3 word combinations) because some words in unison with another change the original meaning. For example, "not good" would be split into "not" and "good" unigrams, which would be misleading in text analysis.

 

LDA and Data Visualization

To understand key topics within the review data, we used the LDA topic modelling algorithm to extract 20 topics from each category and rating. We used the R package "LDAvis" for interactive topic model visualization and answer these questions:

  1. What is the meaning of each topic?
  2. How prevalent is each topic?
  3. How do the topics relate to each other?

screen-shot-2016-09-29-at-6-25-20-pm

The first part of LDAvis answers the first question. The bar graph visualizes the term frequency per topic within our review text, with the term listed on the y axis, and frequency listed on the x axis. A special metric is used to determine the most important terms within the topic – saliency. Saliency is estimated term frequency within a singular topic relative to the term’s overall frequency in the review texts. The higher on the list of terms, the more unique and important it is for that topic.

The second part of the LDAvis is called the intertopic distance model. It provides a global view of the topic model and answers the latter two questions – The prevalence of each topic is displayed by the diameter of each topic circle. The relation of topics to each other is calculated through a distance known as the Jensen-Shannon divergence, a popular method of measuring similarity between two probability distributions, and then scaled onto two principle components. In gist, the closer two bubbles are to each other, the more similar they are. The visualization itself is so descriptive, we implemented it as a feature of our application.

 

Application

Our final product is an R Shiny application, comprising the following main features:

  1. Map: Geolocation analysis of restaurant success
  2. Topic Modeling: Understanding negative reviews within market of specified category
  3. Cuisine Gallery: Understanding frequent cuisine topics within positive reviews

The main user will be the small business owner, who intends on either starting or expanding his or her current restaurant.

ezgif-com-gif-maker

With the map, the user can identify the best place to start a restaurant, or get a bird’s eye view of the competition. The restaurants are displayed on an interactive map of Arizona, classified into “above average” and “below average” within the specified restaurant category. The user can get specific information about the restaurant by clicking one of the markers. Now say the user wants to start a two-dollar Italian restaurant

  1. Select the filters – category: Italian, price range: two-dollar
  2. Identify on the map large clusters

The largest cluster where people generally favor Italian food is probably a good place for one to start a restaurant.

ezgif-com-crop

The next feature is the topic model – while previously, to understand other restaurant’s negative reviews, the only way to do so was to browse each individual page. Topic modeling is the fastest way to quickly aggregate information. A user can quickly explore the different topic bubbles, and identify the problems based on the frequent terms in the reviews. For example, if time seems to be a large topic, perhaps the user can take advantage of that when starting his or her restaurant.

The final big feature is the menu gallery. The gallery displays the most positively talked about food items among reviews. A user can then build their restaurant’s own menu by looking at the most popular terms.

Through use of predictive modeling and EDA, we identified key features to incorporate as predictors, and filters for our application YelpQuest. Topic models from the negative and positive reviews make the product will hopefully assist future small business owners in growing and succeeding.

 

 

About Authors

Charles Leung

During his past three years in the manufacturing industry, Charles has discovered and developed his passion for big data – not only to solve quality and production issues but also to create tools that automated and optimized steelmaking...
View all posts by Charles Leung >

Jiaxu Luo

Jiaxu Luo is a recent MS graduate from Columbia University. As a child born in a business family and a student with diverse academic background in Material Science and Chemical Engineering, he grasps the importance of asking questions...
View all posts by Jiaxu Luo >

Danli

Danli Zeng is a young professional with 5 years' experience in MARKETING and MEDIA. She was specialized in integrated media planning and ROMI analysis for FMCG industry. Having worked on all sides of agency, media and client, she...
View all posts by Danli >

Samriddhi Shakya

Samriddhi comes from a Remote Sensing and Geographic Information Systems (GIS) background. He has a Master’s degree in Geography from Auburn University and Bachelors of Engineering degree in Geomatics from Kathmandu University. During his Masters at Auburn University,...
View all posts by Samriddhi Shakya >

Leave a Comment

Cancel reply

You must be logged in to post a comment.

No comments found.

View Posts by Categories

All Posts 2399 posts
AI 7 posts
AI Agent 2 posts
AI-based hotel recommendation 1 posts
AIForGood 1 posts
Alumni 60 posts
Animated Maps 1 posts
APIs 41 posts
Artificial Intelligence 2 posts
Artificial Intelligence 2 posts
AWS 13 posts
Banking 1 posts
Big Data 50 posts
Branch Analysis 1 posts
Capstone 206 posts
Career Education 7 posts
CLIP 1 posts
Community 72 posts
Congestion Zone 1 posts
Content Recommendation 1 posts
Cosine SImilarity 1 posts
Data Analysis 5 posts
Data Engineering 1 posts
Data Engineering 3 posts
Data Science 7 posts
Data Science News and Sharing 73 posts
Data Visualization 324 posts
Events 5 posts
Featured 37 posts
Function calling 1 posts
FutureTech 1 posts
Generative AI 5 posts
Hadoop 13 posts
Image Classification 1 posts
Innovation 2 posts
Kmeans Cluster 1 posts
LLM 6 posts
Machine Learning 364 posts
Marketing 1 posts
Meetup 144 posts
MLOPs 1 posts
Model Deployment 1 posts
Nagamas69 1 posts
NLP 1 posts
OpenAI 5 posts
OpenNYC Data 1 posts
pySpark 1 posts
Python 16 posts
Python 458 posts
Python data analysis 4 posts
Python Shiny 2 posts
R 404 posts
R Data Analysis 1 posts
R Shiny 560 posts
R Visualization 445 posts
RAG 1 posts
RoBERTa 1 posts
semantic rearch 2 posts
Spark 17 posts
SQL 1 posts
Streamlit 2 posts
Student Works 1687 posts
Tableau 12 posts
TensorFlow 3 posts
Traffic 1 posts
User Preference Modeling 1 posts
Vector database 2 posts
Web Scraping 483 posts
wukong138 1 posts

Our Recent Popular Posts

AI 4 AI: ChatGPT Unifies My Blog Posts
by Vinod Chugani
Dec 18, 2022
Meet Your Machine Learning Mentors: Kyle Gallatin
by Vivian Zhang
Nov 4, 2020
NICU Admissions and CCHD: Predicting Based on Data Analysis
by Paul Lee, Aron Berke, Bee Kim, Bettina Meier and Ira Villar
Jan 7, 2020

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 ChatGPT 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 football 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 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

NYC Data Science Academy

NYC Data Science Academy teaches data science, trains companies and their employees to better profit from data, excels at big data project consulting, and connects trained Data Scientists to our industry.

NYC Data Science Academy is licensed by New York State Education Department.

Get detailed curriculum information about our
amazing bootcamp!

Please enter a valid email address
Sign up completed. Thank you!

Offerings

  • HOME
  • DATA SCIENCE BOOTCAMP
  • ONLINE DATA SCIENCE BOOTCAMP
  • Professional Development Courses
  • CORPORATE OFFERINGS
  • HIRING PARTNERS
  • About

  • About Us
  • Alumni
  • Blog
  • FAQ
  • Contact Us
  • Refund Policy
  • Join Us
  • SOCIAL MEDIA

    © 2025 NYC Data Science Academy
    All rights reserved. | Site Map
    Privacy Policy | Terms of Service
    Bootcamp Application