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
Metadata
Release files for wisconsin-covid19 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wisconsin_covid19-0.0.2.tar.gz | 5.6 kB | Details |
Release files / wisconsin_covid19-0.0.2.tar.gz
| Download URL | wisconsin_covid19-0.0.2.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c95fa5a107e064f9e06854b34b7b8a6ac3c94d9f260f7b85f598c64ab6c4b133
|
|
BLAKE2b-256 checksum How to use checksums |
3f0f5b82bd3f00d9d369ca9339d298d9da1605feba0aa119960fa6cc62c831e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|