Skip to main content

Web Scraper of COVID-19 data for Czechia

Python package covid19czechia provides access to COVID-19 data of Czechia.

The data is scraped from

  • Ministry of Health, Czech Republic
  • Czech Statistical Office

Setup and usage

Install from pip with

pip install covid19czechia

Importing module is done such as

import covid19czechia as CZ

x = CZ.covid_deaths()

Package is regularly updated. Update with

pip install --upgrade covid19czechia

COVID-19 Cases

Get Covid-19 cases in Czechia.

x = CZ.covid_confirmed_cases()

Aggregated dataframe countrywise / regionwise / districtwise can be fetched using

x1 = CZ.covid_confirmed(level = 1) # country
x2 = CZ.covid_confirmed(level = 2) # region
x3 = CZ.covid_confirmed(level = 3) # district

The data contains counts by age, age group and sex and information of week. To aggregate results only over some of the groups (example - per day)

x = x\
    .groupby(['date','week'])\
    .aggregate({'confirmed': 'sum'})\
    .reset_index()

Result of the example contains columns day, week and confirmed.

COVID-19 Tests

Get Covid-19 tests in Czechia.

x1 = CZ.covid_tests(level = 1) # country
x2 = CZ.covid_tests(level = 2) # region
x3 = CZ.covid_tests(level = 3) # district

COVID-19 Deaths

Get Covid-19 deaths in Czechia (weekly counts, by gender and age group)

x = CZ.covid_deaths()

The function returns Pandas dataframe. It can be stored to csv file with

x.to_csv("filename.csv", header = True, index = False)

Administrative unit setting

Optional parameter level sets granularity of administrative units the deaths are computed in.

Defaultly (level = 1) the deaths are taken from the whole Czechia.

x = CZ.covid_deaths(level = 1) # same as no argument given (above)

Settings level = 2 corresponds with deaths in regions (kraje, NUTS 3).

x = CZ.covid_deaths(level = 2)

Setting level = 3 means deaths per district (okresy, LAU 1).

x = CZ.covid_deaths(level = 3)

Read more about administrative units of Czech Republic here.

Total weekly deaths

For total deaths check my another package eurostat_deaths.

Release files for covid19czechia 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for covid19czechia 0.5.2
File Size Uploaded
covid19czechia-0.5.2.tar.gz 7.1 kB Details

Release files / covid19czechia-0.5.2.tar.gz

Download URL covid19czechia-0.5.2.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6da9a139778dbae72d42ca7b8a1704bd09c1bda3b31eb5a444e158649b5f936f
BLAKE2b-256 checksum
How to use checksums
2f22a5685343aa5a7b245d636ee128fc40ad2ed1515bc5c10d7d73d0bba15102
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/0.0.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

Release history Release notifications | RSS feed

This release

0.5.2 This release

1 release file

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page