wisconsin-covid19 0.0.2
The Unofficial Wisconsin COVID API Wrapper in Python 3.
License: MIT
Keywords: wisconsin,covid19,covid-19

# Wisconsin-Covid19-API

A wrapper library for data listed on [DHS Wisconsin](https://www.dhs.wisconsin.gov/covid-19/data.htm#download). 

[![Linkedin](https://img.shields.io/badge/LinkedIn-0077B5?style=flat-square&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/david-teather-4400a37a/) [![Sponsor Me](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/davidteather) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/davidteather/Wisconsin-Covid19-API?style=flat-square)](https://github.com/davidteather/Wisconsin-Covid19-API/releases) [![Downloads](https://static.pepy.tech/personalized-badge/wisconsin_covid19?period=total&units=international_system&left_color=grey&right_color=orange&left_text=Downloads)](https://pypi.org/project/wisconsin_covid19/) ![](https://visitor-badge.laobi.icu/badge?page_id=davidteather.Wisconsin-COVID19-API) 

## 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](https://www.dhs.wisconsin.gov/publications/p02677.pdf)
* 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](https://geomap.ffiec.gov/FFIECGeocMap/GeocodeMap1.aspx) multiply by 100, and add a prefix of the FIPS code of the county found [here](https://www.nrcs.usda.gov/wps/portal/nrcs/detail/national/home/?cid=nrcs143_013697)
    * 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](https://www.census.gov/programs-surveys/geography/guidance/geo-identifiers.html)

## 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](https://github.com/davidteather)

See also the list of [contributors](https://github.com/davidteather/TikTok-Api/contributors) who participated in this project.

## License

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