A Data Scientist’s Quest for Philly’s Best Takeout

Arjun Govind
The Startup
Published in
5 min readAug 6, 2019
Photo by Sharon Chen on Unsplash

Like every college student, I love a good takeout meal. Be it fried rice or pizza, good takeout is always a great ending to a long day. However, after being let down by a few places my friends had recommended (thanks guys), I wondered if I could put my Wharton analytics coursework to good use to find the best takeout place in Philly.

I decided to rely on the wisdom of the crowd, scraping and analyzing Yelp reviews of all Chinese and pizza places in Philly to find the restaurant that offered the best food at the best price.

I’m sure by now you all have the same question in mind. Why couldn’t I just use the built-in Yelp filters? Three reasons. For one thing, I was still debating between Chinese food and pizza, and wanted to see which had better numbers. Next, a lot of the places I had in mind didn’t have a lot of ratings, and I wanted to see just how reliable those places would be. Lastly, Philly has a lot of options, and among many seemingly good options, I wanted to see if I could find a clear winner.

Scroll to the bottom for my pick!

Trends in Average Rating

To start out, I looked at the most basic metric — the ratings. I plotted the average rating for each of the restaurants against how many of these reviews there are, omitting some outliers for clarity.​

There are a couple of interesting features to this data. The most notable part is the difference in variance between restaurants with a low number of reviews and a high number of reviews. What this tells us is that as the number of reviews increases, restaurants are more consistent in their performance; for less reviewed places, it could be really good or really bad! Ratings also seem to steadily increase as the number of reviews increases. While pizza tends to have slightly better reviews on average for less popular places, that difference slowly decreases. Towards the right of the graph, the expected ratings of a pizza place and a Chinese restaurant are virtually identical.​

The bottom line here is that if you’re looking for a predictably solid place to go for dinner, both Chinese and pizza won’t disappoint if the place has a good amount of ratings. If you’re adventurous, then try somewhere off the beaten path!

Mapping Restaurants by Value for Money

Philadelphia Restaurants by Price and Total Reviews

This map indicated what my key problem was: most popular restaurants were far away from Wharton’s campus (towards the left of the map) and were in the Center City area. Unsurprisingly, restaurants downtown tended to be more expensive. However, the obvious challenge with this analysis is the fact that price and average rating will be highly correlated. As such, I created a “value-for-money index”, which was a ratio of the average rating to the price index.

From this graph, the largest circle was Dim Sum Garden, a Chinese restaurant in Center City, which is the big blue lump in the graph above. Seems like the best value-for-money means a trip downtown!

Chinese vs. Pizza

Now that I had some good places in mind from the value-for-index graph, I had to decide between pizza and Chinese. So back to the data I went! After having put in all this work, I wanted to try some food that would blow my mind. So I wanted to decide which of these would give me the best odds at a 5 star meal.

Here, I look at the proportion of 1-star and 5-star reviews with the total number of reviews; there are 2 trend lines for Chinese food and pizza. Unsurprisingly, as the number of reviews increases, the proportion of 1 star reviews decreases in both pizza and Chinese places: more popular places tend not to disappoint.

However, looking at the trend in 5 star reviews tells a different story. As a Chinese restaurant’s total reviews increases, its proportion of 5 star reviews increases, whereas the proportion decreases among pizza places. This perhaps suggests that popular pizza places, while undeniably good, don’t tend to wow people the way popular Chinese restaurants do.

The “Takeaways”

Pardon the pun.

I used web scraping to pull data for around 300 pizza parlors and 220 Chinese restaurants, aiming to compare their locations, prices, ratings and value for money. Here is a quick list of some of my findings.​

  • Philly’s most popular Chinese restaurants and pizzerias are in Center City.
  • For less reviewed restaurants, there is substantial variance in average rating. This levels out to around a 4 with 1000 ratings. Pizza is slightly higher rated, but the difference becomes negligible as reviews increase. For both pizza and Chinese, more reviews mean higher average ratings.
  • The proportion of 5/5 ratings increases for Chinese restaurants with more reviews, but decreases for pizza places. The average number of 1/5 ratings decreases for both, though, with ratings. If you want to be impressed, try a popular Chinese place! If you like consistency, go with pizza.
  • The restaurant with the best value-for-money is Dim Sum Garden, however some Center City pizzerias come close.

Now if you’ll excuse me, I got some good Kung Pao Chicken to enjoy.

--

--

Arjun Govind
The Startup

Digital Identity @ R3 | Wharton (Finance) + Penn Engineering (Master’s in Data Sci) ’21 | Venture Capital and Chess Enthusiast! | Twitter: @ArjunG_