In these times of the pandemic, it is imperative that everyone follows the principle of "social distancing". However, we can't just never get out of the house since we need essential supplies to survive. So, it would be really cool, if an app could predict whether a particular area will be crowded at a particular time or not. To facilitate this, we built Coronav - which will help us get essentials while also avoiding the crowds.
What it does
It provides the user with a map interface with an additional feature of color-coding of areas according to their estimated population distribution. We are using 4 different colors to correspond to different levels of crowds. We also provide the user with an option to enter the day and time for which they need the predictions. The user can even enter the search text of a particular place and the map will then be focused on that location. The user can also enter their feedback of a particular place and we will use it to make better predictions in the future. To facilitate all of this, the app uses its front-end (PWA interface) and runs on a Flask + Oracle Autonomous DB back-end. We have trained and used our own Machine Learning model using GCP to make the predictions.
How I built it
As mentioned previously, our PWA app has a front-end written in Angular and a Flask back-end. We have trained our model using GCP that makes a prediction at each time-step. We also use Google's Places API to get the locations of nearby places. Thus, every time the user reloads / moves the map, a request is sent to the back-end with the current locations and the user's selection of day and time (default being the current date-time). The back-end uses Places API's get nearby places API call, to find place_ids of places near it. It then assigns the predictions to these nearby places as taken from the Oracle Autonomous Database. The database was populated with all the places and their predictions from the model prior to us deploying the app. (Note: such a populating will require a large number of insertions, hence, for the purpose of this Hackathon, we focused only on places in Los Angeles, CA.) Then, the back-end responds with these predictions and the front-end displays them as color coded areas.
Challenges I ran into
Handling spatial data is far more tougher than we thought it'd be. Developing an app that made use of Oracle Autonomous DB was also quite new to me and my team.
Accomplishments that I'm proud of
We were able to finish this in such a short time.
What I learned
- Learning how to analyse and model geographical data in such a short period of time.
- Learned to use several new technologies including Oracle Autonomous DB.
What's next for Coronav
Now, we want to make changes to the app such that it is not only as seamless as the current one, but also scalable for larger areas (world-wide). There are some minor bugs related to handling of requests in the back-end and we would like to fix those as well.
Try It out
angular.js, flask, gcp, gcpml, mapsapi, material, oracleautonomousdb, placesapi, pwa, python