[Twilio Hackathon Submission] A location based Covid-19 WhatsApp Tracker for India 🇮🇳
Tags: twiliohackathon, python, showdev
Published: 2020-05-01 06:48:32

[Comment]: # (All of this is placeholder text. Use this format or any other format of your choosing to best describe your project.)

[Reminder]: # (Make sure you've submitted the Twilio CodeExchange agreement: https://ahoy.twilio.com/code-exchange-community)

[Important]: # (By making a submission, you agree to the competition's terms: https://www.twilio.com/legal/twilio-dev-hackathon-terms)

### Motivation :bulb:
There is an ocean of information about COVID-19 on the Internet, but WhatsApp still remains the primary medium for clutter-free information and communication for a vast majority of people.

## What I built 🚀
A location based WhatsApp bot powered by Twilio that helps users track COVID-19 cases from all over India, as well as get information about essential services to help them be better prepared to deal with the pandemic.
#### Category Submission: 
COVID-19 Communications, Interesting Integrations

### Features
- **Get country and state-wide statistics** :chart_with_downwards_trend:
  * Cumulative total, active, and new cases since last update.
  * Number of patients confirmed, recovered, and deceased.
- **Share your WhatsApp location** :pushpin:
  * Get localized statistics on the number of cases.
  * Get distance from the closest detected active case.
- **Find essential services around you** :hospital:
  * COVID-19 testing labs.
  * Emergency healthcare services.
  * Free food.
  * Mental well-being and emotional support.
  * Delivery services (vegetables, fruits, groceries, medicines).
  * Government / NGO helplines.

## Demo
To start interacting with the bot, send a WhatsApp message to Twilio's default shared Sandbox number `+1 415 523 8886` with the join code *came-told*.
Below are the screenshots of an interaction with the bot:

#### Country and State-wide Statistics
![img1](https://raw.githubusercontent.com/adbose/covid-india-whatsapp-tracker/master/assets/img1.jpeg)
![img2](https://raw.githubusercontent.com/adbose/covid-india-whatsapp-tracker/master/assets/img2.jpeg)
#### Localized cases
![img3](https://raw.githubusercontent.com/adbose/covid-india-whatsapp-tracker/master/assets/img3.jpeg)
![img4](https://raw.githubusercontent.com/adbose/covid-india-whatsapp-tracker/master/assets/img4.jpeg)
#### Essential Services
![img5](https://raw.githubusercontent.com/adbose/covid-india-whatsapp-tracker/master/assets/img5.jpeg)
![img6](https://raw.githubusercontent.com/adbose/covid-india-whatsapp-tracker/master/assets/img6.jpeg)
![img7](https://raw.githubusercontent.com/adbose/covid-india-whatsapp-tracker/master/assets/img7.jpeg)
![img8](https://raw.githubusercontent.com/adbose/covid-india-whatsapp-tracker/master/assets/img8.jpeg)
![img9](https://raw.githubusercontent.com/adbose/covid-india-whatsapp-tracker/master/assets/img9.jpeg)

## Link to Code
[Github](https://github.com/adbose/covid-india-whatsapp-tracker)

## How I built it
### Tech Stack
- [Twilio API for WhatsApp](https://www.twilio.com/whatsapp)
- [Flask](https://flask.palletsprojects.com) microservice framework / Python 3.8
- [OpenStreetMap Nominatim](https://nominatim.openstreetmap.org)

The project is developed using Python3.8 with the Flask web microframework, and uses Twilio's Programmable SMS API for WhatsApp.
To offer the location based features of our bot we used the `geopy` OpenStreetMap library.
We used Heroku as our platform to build and deploy our code to Production where we used Gunicorn as our web server.
To send and receive messages with users, we Twilio's Sandbox for WhatsApp configured with our Heroku app's URL endpoint as a webhook.
 
To get more detailed instructions on how to set up and run the project locally, and deploy it on Production, checkout the [README.md](https://github.com/adbose/covid-india-whatsapp-tracker/blob/master/README.md) file from the project repository link above.

## Additional Resources/Info
[Covid-19 India API](https://api.covid19india.org/): A volunteer-driven, crowdsourced database for COVID-19 stats & patient tracing in India
[Twilio API Docs for WhatsApp](https://www.twilio.com/docs/whatsapp): Official Twilio Documentation for the Programmable SMS API for WhatsApp.