spencerburleigh.com/Places

city guides generated from a decade of Google Maps stars

For the last 10+ years I’ve starred more than 10,000 places on Google Maps. I’ve always wanted to do something with this data but until AI it didn’t feel worth the effort. Since classification and working with new APIs has gotten so much easier, this project now felt within reach but I didn’t just want to make generic guides.

I’ve focused on finding hidden gems in my dataset, pulling the review score and number of reviews for each place and then logarithmically downranking places that have a lot of reviews. This created 58 guides for cities/regions/countries that had enough places to run this on.

How it works

Five stages, each a separate module with its own tests. Numbers below are the current run.

1. Ingest

Google Takeout exports saved places as KML and CSV, one file per list, with no categories and no ratings. The ingest step normalises those into a single record per place, keyed on Google’s CID where one exists and on rounded coordinates where it does not. A classifier assigns each place one of 19 categories from its name and context.

  • ~10,500 places total — ~4,300 visited, ~6,200 want-to-go
  • Residential and private addresses are filtered out before anything else
  • Low-confidence classifications land in a review queue rather than being trusted silently

2. Enrichment, within Google Maps’ (very expensive API’s) free tier

Takeout doesn’t give you ratings, so I needed to use the Google Places API. This shaped the whole project since you only get 1,000 free hits of the rating / userRatingCount endpoint each month. I didn’t want to pay or drag this out so deduped with an exact name key and then on distance between points (eg two things within 30m of each other are probably the same place). I also ordered the queue by leverage: places that would change a guide’s contents get called first, places that are unlikely to rank highly or in a place where I haven’t saved enough places to make a guide are deprioritized.

3. Geography

Places are assigned to guides by bounding box — 89 of them, from single cities to whole countries. Boxes nest, so a Manhattan restaurant sits inside New York, Greater New York, and the United States at once. Assignment is exclusive: the smallest box containing a place wins it, and larger boxes become “Rest of” guides for whatever is left over.

This produced a lot of bugs: France’s rectangle covered all of Belgium and most of Switzerland so I added guard boxes and tests to validate country.

4. Country-normalised scoring

Whenever I travel to a new country it takes me a bit to understand how to perceive how harsh/lenient reviewers the people are: a 4.4★ in Tokyo and a 4.4★ in Austin are not the same!

I used my data to determine a base rating for each guide location and to calculate a z-score for how well a given place compares with its peers in that context.

  • 28 countries had enough places to earn their own baseline. Italian reviewers are the most generous with a 4.60 mean, while Japan is harshest with a mean of 4.22.
  • Small samples are shrunk toward the global mean using a pseudo-count of 30, so a country with 12 places can’t skew too much.

From there I evaluated each place’s popularity adjusted rating:

hidden_gem_score = rating_z − 0.35 × log10(review_count)

I added three additional guards to refine the results:

  1. The no-Louvre rule. Anything in the top 10% of review counts for its location is dropped outright, whatever its rating. The Louvre is excellent; you do not need me to tell you to visit the Louvre.
  2. Rating floor of 4.0. Being obscure is not a qualification.
  3. Review floor of 30. There’s too much variance with so few reviews and a place with 2 x 5.0★ reviews is probably someone’s cousins saying nice things.

5. Construct guides

This process produced rankings we could segment by category for each area that had enough saved places to publish a guide. Each place is plotted on a map of the place with a key and has a direct Google Maps link. Guides to larger geographic areas eg Japan or Hawaii have the prefecture / island added.

Code coming soon

I’m cleaning up the code and planning to publish it soon so others can run this on their own Google saved places and share their own guides!


Standing invitation (inspired by Patio11 who also has some good tips on how to approach this): if you want to talk about hard tech or systems, I want to talk to you.

My email is my full name at gmail.com.