To know the statistics of a pandemic disease COVID-19, python has a module named "covid". It extracts information about all the countries affected by this deadly disease. The information was provided by John Hopkins by default and worldometers to get specific content. It mainly works on python versions above 3.5.
Installation
To use the covid module, first, install it using,
pip install covid
pip install covid
Source Selection
covid module use john hopkins source by default. To select source as john hopkins, use ,
covid or
covid -s john_hopkins in command line.
where -s indicates source.
To select source as worldometers, use
covid -s worldometers
covid or
covid -s john_hopkins in command line.
where -s indicates source.
To select source as worldometers, use
covid -s worldometers
Report on all the countries affected
To get the list of all the countries affected, use
covid -s worldometers --list-countries
On specifying this code, the output will be,
covid -s worldometers --list-countries
On specifying this code, the output will be,
List of all countries affected |
Getting a report of a specific country
To fetch report of a specific country, use
covid -s worldometers -c india
where -s indicates source of information and -c denotes country.
On specifying this code, the output will be,
covid -s worldometers -c india
where -s indicates source of information and -c denotes country.
On specifying this code, the output will be,
Report of India |
Report on active cases
To extract count on total active cases in the world use,
covid -s worldometers -o active
On specifying this code, the output will be,
covid -s worldometers -o active
On specifying this code, the output will be,
Total active cases |
Report on confirmed cases
To extract details about confirmed case use,
covid -s worldometers -o confirmed
On specifying this code, the output will be,
covid -s worldometers -o confirmed
On specifying this code, the output will be,
Total confirmed cases |
Report on recovered cases
To get the count on recovered cases use,
covid -s worldometers -o recovered
On specifying this code, the output will be,
covid -s worldometers -o recovered
On specifying this code, the output will be,
Total recovered cases |
Report on deaths
To get reports on deaths, use
covid -s worldometers -o deaths
On specifying this code, the output will be,
covid -s worldometers -o deaths
On specifying this code, the output will be,
Total death counts |
Comments
Post a Comment