Skip to main content

A python script that generates latest data set of COVID-19 cases around the globe.

Project description

COVID-19 Cases

A python script that generates latest data set of COVID-19 cases around the globe.

Setup

pip install COVID-19-Cases

Usage

The script will return a dictionary for the Global cases and/or list of dictionary for the Country cases

import covid19cases as covid
# Get the latest cases around the globe
print(covid.get_global_cases())

Sample output:
{'Cases': '590,424', 'Deaths': '26,950', 'Recovered': '132,458'}
# Get the latest cases of all affected Countries
print(covid.get_country_cases())

Sample output:
[{'Country': 'China', 'TotalCases': '81,340', 'NewCases': '+55', 'TotalDeaths': '3,292', 'NewDeaths': '+5', 'TotalRecovered': '74,588', 'ActiveCases': '3,460', 'Critical': '1,034', 'CasesPerOneMillion': '57', 'DeathsPerOneMillion': '2'}, {'Country': 'USA', 'TotalCases': '100,514', 'NewCases': '+15,079', 'TotalDeaths': '1,546', 'NewDeaths': '+251', 'TotalRecovered': '2,465', 'ActiveCases': '96,503', 'Critical': '2,463', 'CasesPerOneMillion': '304', 'DeathsPerOneMillion': '5'}]
# Get the latest case of specific country
print(covid.get_country_cases("Italy"))

Sample output:
{'Country': 'Italy', 'TotalCases': '86,498', 'NewCases': '+5,909', 'TotalDeaths': '9,134', 'NewDeaths': '+919', 'TotalRecovered': '10,950', 'ActiveCases': '66,414', 'Critical': '3,732', 'CasesPerOneMillion': '1,431', 'DeathsPerOneMillion': '151'}

The data will change from time to time.

Source

I get the data on this site https://www.worldometers.info/coronavirus/ via Web scraping.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

COVID-19-Cases-0.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

COVID_19_Cases-0.0.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file COVID-19-Cases-0.0.1.tar.gz.

File metadata

  • Download URL: COVID-19-Cases-0.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for COVID-19-Cases-0.0.1.tar.gz
Algorithm Hash digest
SHA256 41097c13d6b61fa53f19b755a1612f543fea55feec79899785f155e8e6b0f102
MD5 02ed05e06621289776f1ec55cdbfac32
BLAKE2b-256 6ef21c0c0fc23bc09d211f7d16d5154c85fc865e97bc456e35eeca40de9f624b

See more details on using hashes here.

File details

Details for the file COVID_19_Cases-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: COVID_19_Cases-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for COVID_19_Cases-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65cb70441bd34f82d1dc51b2cd31e677d465d0f8a9b2f7f824e961b39f2b2b05
MD5 39cc7b0302ce544ba68226e4caab2f09
BLAKE2b-256 e6b10391360a9f07a3835b066679fbac16cbe7c0d39d5392a0b1aec6d6311ed7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page