Skip to main content

A package to analyze COVID-19 data using the NYTimes COVID-19 dataset

Project description

COVID State Tracker

COVID State Tracker is used to interface with Pandas to more easily access COVID data published by the New York Times

Installation

Use https://pypi.org/project/covidstatetracker/0.0.1/

pip install covidstatetracker

Requirements

Install pandas

https://pypi.org/project/pandas/

OR

pip install pandas 

Install MatPlotLib

https://pypi.org/project/matplotlib/

or

pip install matplotlib

Usage

from covidstates import states

states.getDF() # returns entire us-states dataframe from NYTimes with five columns (exlcuding index): date, state, fips (ignore), cases, deaths

states.getLength() # returns number of rows in data frame

states.getDate(index) # returns the date for the given index of a COVID-19 data entry

states.getState(index) # returns the name of the state for the given index of a COVID-19 data entry 

states.getDeathsToDate(index) # returns total number of deaths in a certain state up to the given index of a COVID-19 data entry

states.getDailyDeathCount(index) # returns the number of deaths in a certain state that happen in a single day for a given COVID-19 data entry

states.getCasesToDate(index) # returns total number of cases in a certain state up to the given index of a COVID-19 data entry

states.getDailyCaseCount(index) # returns the number of cases in a certain state that happen in a single day for a given COVID-19 data entry

states.getDateIndex(date) # returns all the indexes of a given date in the dataframe in a list

states.getStateIndex(state) # returns all the indexes of a given state in the dataframe in a list

states.graphDateCases(state, dates) # creates line graph of dates on the x axis and cases on the y axis for a given state

states.graphDateDeaths(state, dates) # creates line graph of dates on the x axis and daily deaths on the y axis for a given state

states.getDateRange(startDate, endDate) # returns list of dates (inclusive) from start date to end startDate

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT License

Copyright (c) 2021 Devon Schwartz and Neil Aylor

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

covidstatetracker-0.0.2.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

covidstatetracker-0.0.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: covidstatetracker-0.0.2.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.12

File hashes

Hashes for covidstatetracker-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2c222e861df5484dc915b8bf2ddb2542be2d530bdfc8f31e70d4a3364e5653fe
MD5 dd9262539542914ac7f8fd4959d2d79c
BLAKE2b-256 74a72a94f1fef0b03768c7ba768a7dd5216ece9c18949d54a23f2c4d73ec71b1

See more details on using hashes here.

File details

Details for the file covidstatetracker-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for covidstatetracker-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f83d4497ec38b237d3a009b625e81b976bfdfd1c8681756d4f6f041305faaaff
MD5 1685a49b8aa436877bef90cb8d706589
BLAKE2b-256 fd5661cd9d5f1d04534b50771ce28903765a31c8369da4f7aa65315a72e7c714

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page