Skip to main content

The Unofficial Wisconsin COVID API Wrapper in Python 3.

Project description

Wisconsin-Covid19-API

A wrapper library for data listed on DHS Wisconsin.

Linkedin Sponsor Me GitHub release (latest by date) Downloads

Installing

pip install wisconsin-covid19

Quickstart

import wisconsin_covid19

# State History
for data_point in wisconsin_covid19.state.history():
    print(data_point.POSITIVE)

# All Testing Sites
for data_point in wisconsin_covid19.testing_site.all():
    print(data_point.ADDRESS)

# All County Data
for data_point in wisconsin_covid19.county.history_all():
    print(data_point.POSITIVE)

# All Census Tract Data
for data_point in wisconsin_covid19.census_tract.history_all():
    print(data_point.POSITIVE)

# All School District Data
for data_point in wisconsin_covid19.school_district.history_all():
    print(data_point.POSITIVE)

# All City Data
for data_point in wisconsin_covid19.city.history_all():
    print(data_point.POSITIVE)

# All Zip Code Data
for data_point in wisconsin_covid19.zip_code.history_all():
    print(data_point.POSITIVE)

Data Notes

Here's a comprehensive PDF about what the data means from Wisconsin here

  • The most important part of that is that -999 represents less than 5 cases, this will mess up your code if you don't filter it.
  • When using wisconsin_covid19.census_tract.history(census_tract_name) the census_tract_name can be generated by getting a census tract number here multiply by 100, and add a prefix of the FIPS code of the county found here
    • Ex: census tract in Madison, WI = "0017.04" -> "001704" with a FIPS code of "55025" the variable you should pass to this library wrapper is "55025001704"
    • This is known as a GEOID

General Methods

history(data_type, **kwargs)

history_all(**kwargs)

on_date(data_type, date, **kwargs)

on_date_all(date, **kwargs)

today(data_type, **kwargs)

today_all(**kwargs)

The methods are pretty self explanatory you can probably figure it out pretty easily if you've got an IDE that shows you the available classes/methods associated with an object.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

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

wisconsin_covid19-0.0.2.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file wisconsin_covid19-0.0.2.tar.gz.

File metadata

  • Download URL: wisconsin_covid19-0.0.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for wisconsin_covid19-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c95fa5a107e064f9e06854b34b7b8a6ac3c94d9f260f7b85f598c64ab6c4b133
MD5 d6bcec67744baa7642352e70b0da0f70
BLAKE2b-256 3f0f5b82bd3f00d9d369ca9339d298d9da1605feba0aa119960fa6cc62c831e2

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