When quarantine is over people will like to visit only the least crowded places. Peek was inspired to enable people to avoid crowded places by checking out their destinations before heading out.

What it does

Peek allows individuals to enter their intended destinations into a google maps query and get a prediction of how crowded it is expected to be at that time of the day.

How I built it

  • Peek is powered by a flask server that connects the JavaScript in the HTML script to the python backend.
  • Firstly, a user enters a location from the user and its place id is retrieved from google places API. The ID is then sent to the python backend via a POST request using jQuery which returns a prediction of how crowded the place is expected to be.
  • Due to the scarcity/unavailability of real-time data, I had to rely on data from the populartimes API on GitHub. populartimes provided a reliable source of popular times of millions of places which was unavailable via google maps API.
  • Based on the popular times of a particular location, one of 4 possible predictions is made:
    1. highly crowded - current number of people >= 70% of range*
    2. slightly crowded - 30% of range* < current number of people < 70% of range*
    3. not crowded - current number of people <= 30 % of range*
    4. probably crowded - no popular times data available. **range => range between the least crowded hour and the most crowded hour
  • The prediction is then passed on to the frontend and displayed via a callback function.

Challenges I ran into

  • It was my first time using google maps API so I kinda had a slow start.

Accomplishments that I'm proud of

  • Learned new skills

What I learned

  • jQuery
  • Google Maps API
  • Javascript asynchronous functions

What's next for Peek

  • Increase prediction accuracy
  • Improve UI/UX
Share this project: