covid19
covid19 copied to clipboard
Covid19 India Patients Analyzer and Telegram Bot
Covid19 India Patients Analyzer and Telegram Bot
This project analyzes the patients data obtained from the APIs built by Covid19India (https://api.covid19india.org/) using Kafka topics and generates alerts. These alerts are picked up by Telegram Bot app which sends these alerts to anyone subscribed.
The Telegram Bot is available at https://t.me/covid19_india_alerts_bot
To subscribe, just send the command /start
. To unsubscribe, send the command /stop
.
New Features
- Send
/location
to get information about your area. - Get latest zones information of all districts with
/zones
. - Get latest numbers of all districts with
/district
. - Testing data is included in every on-demand update if available. This includes tests done, positive, negative and positivity rate.
- District updates are included.
- All updates carry news sources (links to State Govt / ANI tweets).
- Updates include
Doubling rate
based on previous day statistics. - New commands:
/today
,/summary
and/total
. See below for more details. - Get charts ang graphs with command
/charts
Below is an example of an alert sent by the bot:
Alert Updates
The folks at Covid19India (https://www.covid19india.org/) are doing an amazing job of continuously updating the patient information using official and unofficial (social media etc.) sources. The bot tries to capture these updates and sends alerts that links to previous alert sent for the same patient (if any). This helps you see the progress a patient makes (like recovered or deceased). Alerts are only sent if the update is significant. Currently this means either changes in status or notes.
Telegram Commands
/mystate
- Set preferred state
Not interested in updates of all Indian states? Then you can use the command /mystate
to set your
preferred state. Once set, you will receive updates of that state only including cumulative totals
across India. You will continue to receive summary updates every 4 hours.
/clearmystate
- Remove preferred state
If you have set preferred state and would like to start receiving updates for every state, then
send the command /clearmystate
to clear your preferred state.
/getmystate
- Get currently preferred state
At any time, you want to check what preferred state is set if any, then send the command /getmystate
.
/start
- Subscribe to automatic real-time updates
Get real-time updates of all Indian States
/stop
- Unsubscribe from updates
Stop receiving updates.
/stats
- On-demand Statistics
/summary
- Get summary of all Indian States
/today
- Get today's increase of all Indian States
/total
- Get total count across India
/zones
- Get zones information for any district
/district
- Get latest numbers for any district
To get the current statistics of any Indian State or Total, send the command /stats
.
The bot will reply with an option to choose a region:
You can select any region or choose Total
to get cumulative sum of all Indian states. If you choose
a region, next screen will pop-up asking to choose a state within the region.
You should get back the cumulative statistics of the chosen state at that point of time.
Architecture
Individual Patient Updates
Cumulative + Delta + Daily Increase Updates
Python Importer
The Python script that imports the Covid19India API is available here: https://github.com/xsreality/covid19-patient-importer
Contributing
- Contributions for new ideas and open issues are welcome!
- Please open a GitHub issue before opening a pull request.
- For any queries, contact me on Telegram at https://t.me/xsreality
Credits
- Team behind Covid19India for gathering statistics across India and providing API. https://www.covid19india.org/
- GeoIQ for providing API for location based Covid19 information. https://www.geoiq.io/covid19.html