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

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.3.tar.gz (4.4 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.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: covidstatetracker-0.0.3.tar.gz
  • Upload date:
  • Size: 4.4 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.3.tar.gz
Algorithm Hash digest
SHA256 6993559076a834564511fb5eb8313ef24b0ee897c570c2364c76e06e7c73e262
MD5 4bcff21bb6f414315b5ed520bf87392d
BLAKE2b-256 7b3c7498b6c52bd22281e1a3732c5d218d03fb73ae0e02dadb797c2e09b88d5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for covidstatetracker-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9942a3fc9e4f89b3cb158e3f0e21584b7b86685ecd4aa5c941fdb7910fcbdb22
MD5 d11747b6acd423da99bf536221ccf703
BLAKE2b-256 d54a14d690bf7c4ce5fe50344c18f433cc5fcc2c73fe441374e05607320730e9

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