On a daily basis, I am forced to deal with a crowded Starbucks. However, I was more annoyed by how I could never find alternatives to Starbucks that didn't have such a large crowd.To fix this, I decided to make an Alexa skill that would tell any user which stores or coffee shops the user should visit to avoid such a large crowd.

What it does

A conversation with Alexa would go like this:
User: Alexa, open Unpopular
Alexa: Where do you want to go to?
User: (Using cafe, as an example) Which cafes are least crowded right now?
Alexa would then tell the user the least crowded cafe currently at the zip code the user is in. Additionally, the user can ask for the least crowded stores at a certain hour the user inputs, as well as the least crowded stores in a certain zip code the user would speak.

How I built it

I used Amazon Alexa and a python library that handled Google Maps' Popular Times feature (since Google Maps did not have Popular Times in its API). I inputted what place the user wanted to go to (eg: cafe, restaurant. etc.), and whether or not the user specified a certain hour or zip code. If the user did not provide an hour or a zip code, the program will assume the user means the current hour and zip code. The zip code would be converted to coordinates using a text file I found online, and those coordinates would be modified by +/- 00.002500 to create a boundary. That information would then be processed by the Popular Times library and return (at most) 3 places which are currently not crowded.

Challenges I ran into

Figuring out how to work Alexa was perhaps the biggest challenge. Answering even the most basic questions, such as "What is an indent??" took me a long time to figure out, but once I understood everything, it all became much easier (which was how I figured out how to add user-indicated zip codes and hours)

Accomplishments that I'm proud of

I'm proud of figuring out how to use an API. I've always heard that term before, but I never understood what it actually is.
Additionally, I'm proud of figuring out how Alexa works because of the complications I had with it earlier

What I learned

How to use APIs
How to build an Amazon Alexa skill
How to combine two relatively distinct APIs (Google Maps and Echo) into one program

What's next for Unpopular

Right now, it only works if the user has a zip code and if the user lives on the East Coast, so that needs to be fixed
Additionally, I would like to have Alexa give back the address and/or rating of the cafe if the user would want that information too.

Built With

Share this project: