Mapping Yelp Reviews Across San Francisco

Steven Tang
Fun with data and stats
4 min readAug 5, 2015

A significant portion of my life is dedicated to finding and eating at the best-reviewed (according to Yelp) restaurants in San Francisco. Some questions naturally arise — are there certain neighborhoods that contain higher rated restaurants? Are highly rated restaurants clustered together or spread out evenly throughout the city? The Yelp API can give us the data to answer these questions.

A few things to know about this map and the data that’s represented:

  • Each box is colored to reflect the average ratings of the top 10 Yelp search results for “restaurant” within that geographical boundary.
  • A box on the map is only colored if there were at least 2 restaurants with at least 10 reviews within that boundary.
  • The Yelp API only responds with ratings in increments of 0.5, so the true average rating might not be totally accurate, but I think it’s good enough for our purposes.

The Best and the Worst

Let’s take a look at the best and worst of SF’s Yelp ratings.

Here’s a map of areas that have average ratings greater than 4.0:

…and on the flip side, areas where the average rating is under 3.5:

From an unscientific glance at the map, it seems that there are a high concentration of highly reviewed restaurants in North Beach, Downtown, and the Mission. The worst-reviewed restaurants are spread more evenly throughout the city, though there don’t appear to be any particularly bad places in the areas where the top ones are.

Let’s take a closer look at the top two geographical boxes.

Northern tip of Ocean Beach (4.5 average rating)

Kawika’s Ocean Beach Deli (4.5)

TJ’s Cafe (4.5)

A small sample size gives this area a boost.

North Beach / Fort Mason (4.35 average rating)

Codmother Fish and Chips (4.5)

Hollywood Cafe (4.5)

Tanguito (4.5)

Hot Spud (4.5)

Fior d’Italia (4.0)

along with Carmel Pizza Company (4.5), 3 Potato 4 (4.5), Albona Ristorante Istrano (4.5), Darren’s Cafe (4.0), In-N-Out Burger (4.0). If I had to pinpoint one small area with a high concentration of highly reviewed restaurants, it’d be this one.

And the losers of this entire analysis are:

Daly City / Ingleside Heights border (2.33)

Chef Ming (2.5)

Golden Wok (2.0)

China Hut (2.5)

This is a hub for truly terrible Chinese food.

Noriega Street, Outer Sunset (2.75)

Eggettes (3.5)

Domino’s Pizza (2.0)

There’s just not much here.

Keep in mind that this doesn’t tell us where the best restaurants are, merely where to find ones that have been rated the highest by Yelp reviewers. Correlation between rating and “goodness” is a question for another time.

Furthermore, a high Yelp rating in one area is not equivalent to a high Yelp rating in another. Maybe people who eat/review in North Beach are particularly optimistic about their food while the Chinese take-out patrons in Ingelside are particularly prone to complaining on the Internet. I’ve also noticed that Asian restaurants in SF tend to have lower ratings than non-Asian places (Service is generally worse? Asian eaters are grumpier?). Even in an area as small as SF, it’s difficult to say that any two Yelp ratings can be considered equally. But if you have faith in the power of the Yelp reviewers, I hope I’ve been able to help you narrow your search for the next great (or terrible) thing.

I used the beautiful maps generated at stamen to visualize San Francisco, the Yelp API for data, and D3 for visualization.

--

--