Spicy is good: exploring mexican restaurants.

Posted on Jul 24, 2023

The Yelp Open Dataset is a collection of data from Yelp (the famous online review platform) that provides data scientists with information regarding businesses, reviews, user information, etc. With all of this data, that spans over years, I set up on researching a few questions that peaked my interest; specially two. The first one was: is there a relationship between the stars a given restaurant has received in its reviews and the "priceyness" on where that restaurant is located?; and secondly: how are mexican restaurants reviewed by users?

Do food establishments in expensier cities better rated?

To tackle this question I sourced information from Zillow.com, specifically the Median List Price for All Homes that they publish. Also, I used the information from february 2021, which is the cutoff date for the Yelp Dataset. After some data cleaning for both datsets and merging them I got the following results.

Dividing the cities into 5 buckets depending on the Zillow information we can see that there are many more restaurants reviewed in cities with high home list prices and mid-high prices. What is interesting to see from the data is that both the mean and standard deviation of the star ratings are pretty much the same for the mid-low to high list price cities (with a slight bump in the mid price cities). It is only in the low priced homes cities that the mean review drops to 3.3. However, it is important to point out that the number of restaurants reviewed in such cities is much lower than on the other buckets.

I was surprised by the uniformity of the data, while I didn't believe there'd be much difference in the review ratings for restaurants based on where they are located I did believe there was going to be a wider gap. Goood (and bad) food is everywhere.

So, what about mexican restaurants?

I ran the same analysis for mexican restaurants and the results were pretty much the same, the dip in the low list price cities was higher though (it could be that the reduce number of mexican establishments compared to overall establishments excacerbates the results).

That got me to the next question...

Are Mexican restaurants that are located in the border better reviewed?

One would think that mexican restaurants that are located in border states (California, Arizona, New Mexico and Texas) have better mexican restaurants, right? Well, let's see...

It appears that being located on the border does barely help mexican restaurants be better reveiwed. The mean between both groups is only 0.06 and the median and standard deviation is the same.

So mexican restaurant quality is not affected by in which type of cities they are located, neither in a expensive or inexpensive one, or in a border state city or not. So then we can see if there's a characterisic in the reviews of mexican restaurants that can help us see if it has an effect on the ratings. So we move on to the hot issue at hand.

Is being reviewed as a Spicy restaurant good for its rating?

We all know that mexican food is famous for being spicy, but is that good for its ratings or not? To anwer this question I used the information given by the review dataset of the Yelp Open Dataset. It gives us each review a user give, including the comments they left of the restaurant. With that information I went to answer two questions: does including a word like spicy (or synonyms) imply a restaurant is better rated?, and is there a sweet spot into how many times such a word is used (probably a place that's too spicy might not be suited for American palates)?

The type of reviews analyzed were of the sort:

'Chips and salsa were good but you had to pay for them including salsa picante which was perfectly spicy.  Food was tasty and margaritas were refreshing.  I had the tacos and were pretty good.'

This reviewer used a "spicy" synonym 2 times, picante and spicy. So in a new feature called "has_picante" it would be classified as a yes, and in the "picante_counter" it would be a 2.

Then, running this information against the reviews we can see the following:

Mexican restaurants that are reviewed with a picante word have a higher mean and a lower standard deviation. But is that statistically significant? Yes, it is. I ran a t-test to compare both means which gave me a p-value of less than 0.05.

Now, what about the sweet spot, because it can be that using a picante word too much implies that the food was indeed too spicy for it to be good.

Here we can see the times a picante word was used against the mean star rating for those restaurants. We see that there does appear to be a sweet spot at 5 times used, followed by a steep drop off after 6.

So, when you are choosing which mexican restaurant to go to, don't take into consideration if it is in an expensive city, or even if it is in a border town; you just want to focus on those that are the right amount of spicy!

About Author

FerDataSci

Economist with a focus on Finance and Data Science
View all posts by FerDataSci >

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