The Unofficial Wisconsin COVID API Wrapper in Python 3.
Project description
Wisconsin-Covid19-API
A wrapper library for data listed on DHS Wisconsin.
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
- David Teather - Initial work - davidteather
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | c95fa5a107e064f9e06854b34b7b8a6ac3c94d9f260f7b85f598c64ab6c4b133 |
|
MD5 | d6bcec67744baa7642352e70b0da0f70 |
|
BLAKE2b-256 | 3f0f5b82bd3f00d9d369ca9339d298d9da1605feba0aa119960fa6cc62c831e2 |