Sips and Stats: Seattle’s Best Coffee Spots Revealed

5 min read  •  June 18, 2025

Seattle’s coffee scene is iconic. But how does one cut through the hype to find the actual best spots? Atleast that is the problem I had in my initial days in the city and hence came the idea to explore the data for analysis.

YELP to the rescue! ;)
I used the Yelp API, unsupervised learning, geospatial clustering, and scaled review scores with some caffeine magic.


Data Collection

I pulled real-time data from Yelp’s Fusion API across Seattle, Bellevue, Kirkland, and Redmond. For each coffee shop, we extracted:

  • rating
  • review_count
  • price_level (converted from $ to numeric)
  • distance from city center
  • Geocoordinates (latitude, longitude)
  • Business metadata like categories and open/closed status

Choosing the Right Number of Clusters

Used the Elbow Method to find the optimal number of clusters (k) based on rating, reviews, price, and distance.

Questions

The elbow point clearly showed k = 4, which we used to form clusters with KMeans.


Clustering Seattle Coffee Shops

Each coffee shop was grouped into one of four clusters using:

  • rating
  • review_count
  • price_level
  • distance_km

These features were scaled using StandardScaler before clustering.

All clusters showed high average ratings (~4.0–4.7), but differed in price, location, and popularity. Something that justifies that coffee in Seattle has it’s own high benchmark standards :)

Questions

Map Visualization

We visualized the clusters on a folium map:

Seattle Coffee map

Each colored circle shows a coffee shop, color-coded by its assigned cluster.


Scaled Composite Score: Quality × Popularity

We created a scaled score to rank coffee shops by a balanced combination of quality and popularity.

from sklearn.preprocessing import MinMaxScaler

scaled = MinMaxScaler().fit_transform(df[['rating', 'review_count']])
df['scaled_rating'] = scaled[:, 0]
df['scaled_reviews'] = scaled[:, 1]
df['scaled_score'] = df['scaled_rating'] * df['scaled_reviews']

This avoids raw dominance of review counts and highlights well-loved shops across the board.


Top 10 Coffee Shops by Scaled Composite Score

NameLocationRatingReview CountScaled Score
Biscuit Bitch1909 1st Ave4.250300.840000
Starbucks Reserve Roastery Seattle1124 Pike St4.445300.792525
The Crumpet Shop1503 1st Ave4.527070.484354
Storyville Coffee Company94 Pike St4.624740.452501
Top Pot Doughnuts2124 5th Ave4.020480.325726
Biscuit Bitch2303 3rd Ave4.318290.312712
Moore Coffee Shop1930 2nd Ave4.413350.233559
Anchorhead Coffee - CenturyLink Plaza1600 7th Ave4.59830.175885
Coffeeholic House3700 S Hudson St4.77820.146139
Espresso Vivace Roasteria532 Broadway Ave E4.18740.142481

💸 Best Value-for-Money Coffee Spots

To surface affordable gems, we also calculated:

value_score = rating / price_level

This helps highlight high-rated spots with lower price points.


🔟 Top 10 Value-for-Money Coffee Shops

NameRatingPricePrice LevelValue Score
Overcast Coffee Company4.8$1.04.8
URL Coffee4.7$1.04.7
The Bridge Coffee House4.7$1.04.7
Sound & Fog4.7$1.04.7
Experience Tea4.7$1.04.7
C.C Espresso and Ice Creamery4.7$1.04.7
Cafe Argento4.6$1.04.6
Squirrel Chops4.6$1.04.6
Phin4.6$1.04.6
The Station4.6$1.04.6

🧠 What We Learned

  • Seattle’s coffee scene is remarkably high-rated across the board
  • Review count isn’t always correlated with value
  • Clustering helps organize the scene; scoring helps spotlight the stars

🚀 Next Steps

  • Use time-decay scoring for recent reviews
  • Sentiment analysis from textual reviews
  • Cluster-specific rankings (e.g., best hidden gem)

Explore the code and try your own ranking here:
🔗 Open the Colab Notebook


If you enjoyed this, follow Vishnu on LinkedIn or check out more blogs at mlgyaan.com for practical machine learning, data science, and storytelling with code.