Skip to content

upretip/nepal-covid

Repository files navigation

Python application

nepal-covid

We get the data from from CSSE@JHU and use pandas and matplotlib to get the data for Nepal and plot the line graph for cumulative reported, recovered and death numbers. Then the plot is tweeted using Twitter api keys.

The tweet looks like this:

Nepal Covid graph for 2020-05-20. Source code on https://t.co/3ABqx0JfAB pic.twitter.com/JJRH13Opto

— PUPreti (@parashupreti) May 21, 2020

To reuse this code, you can clone this project then at the main direcetory of this project create a creds.py file. Sign up for developer account with twitter at https://developer.twitter.com/en/apps and add the api key, api key secret, access token and access token secret, need to make sure that the app has read and write access.

Here are the steps:

$> git clone [email protected]:upretip/nepal-covid
$> cd nepal-covid
$> python3 -m venv venv  # for windows python -m venv venv
$> source venv/bin/activate # for windows venv/source/activate
$> touch creds.py # below for how creds.py loos like
$> pip3 install -r requirements.txt 
$> python tweet_tweepy.py

creds.py

api_key = 'xxxxxxxxxxx' 
api_secret = 'xxxxxxxxxxxxxxxxxxx'
access_token = 'zzzzzzzzzzzzzzzzz'
access_secret = 'zzzzzzzzzzzzzzzzzzzzzzz'

Pull Requests are welcome.

About

Tweets COVID-19 numbers for Nepal with a linegraph

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages