Mashup of Yelp and Google Maps
December 18th, 2012 [programming]
I’m testing using the Yelp API to populate a custom map, powered by the Google Maps API. The program is the Yelp Mapper. It’s a full-screen map that lets you show markers for businesses and such. The field in the lower-left-hand corner lets you enter any description of a place. This goes to the Google geocoding API, which determines where to move the map to. State codes and ZIP codes work well here.
The next field lets you search for Yelp entries. The search is matched against the business name, category, and user comments. Every search you make is layered on top of the previous matches, unless you hit the clear button.
The goal of the program is to create a version of the bike-shops map which gets its data dynamically. (See Updating the Bike Shops Map.) This version is much more powerful because both the location and the subject are dynamically chosen by the user. However, the tradeoff is that you lose some precision. You’ll find the Yelp searches turn up a lot of unintended results. It’s nice to have a curated map, but impractical to scale up for a larger audience.
When you search on Yelp’s site, each spot is shown with a red marker on the map. I wanted to include a variety of icons. Once again, I used icons from the Nicolas Mollet’s Map Icons collection. Yelp’s category list has hundreds of different categories to describe each business. I gave each of their taxonomy’s 22 roots a custom icon. I also picked out 28 of the specific categories a custom icon. So, pizza joints have a pizza icon, coffee shops have a coffee icon, but most other categories still use the much-broader icon of their parent category. Yelp can include several categories for a business; my application uses only the first one listed.
I’ve also added custom items for a few chain stores, like Target, McDonald’s, Safeway, and others.
One bit of data lacking from the Yelp API is the URL of each business. They of course have that data and use it on their own site, but they don’t want to share it with the API. Instead, they offer the URL of the business’s page on Yelp itself, helping to direct traffic back to Yelp.
The Yelp API limits me to 100 queries a day, which hopefully the testing will bypass. Once Yelp approves the use, it goes up to 1,000 hits a day.
The Yelp Mapper program is in the first stages of testing. Please leave comments, suggestions and error reports in the comments below.