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 hashes)

Uploaded Source

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