Skip to content

Releases: apex2504/disease.py

1.2.0

19 Jan 23:22
Compare
Choose a tag to compare

Adds support for vaccine tracking.

New methods for Covid

  • vaccine_coverage(last_days='all') -> returns List[VaccineTimeline]
  • vaccine_countries(last_days='all') -> returns List[VaccineCountry]
  • vaccine_country(last_days='all') -> returns VaccineCountry

New classes in covidstatistics

VaccineTimeline

  • date: datetime
  • value: int

VaccineCountry

  • country: str
  • timeline: List[VaccineTimeline]

1.1.0

08 Jan 19:45
39d9d39
Compare
Choose a tag to compare

corona_api -> disease.py

see readme for migration instructions

0.9.0

02 Jun 20:04
Compare
Choose a tag to compare

Support for the new twoDaysAgo parameter for the API in the form of two_days_ago=True/False. See README for documentation. Please note that a ValueError will be raised if you use both yesterday=True and two_days_ago=True.

New attributes

GlobalStatistics

  • today_recoveries
  • one_case_per_people
  • one_death_per_people
  • one_test_per_people

CountryStatistics

  • today_recoveries
  • one_case_per_people
  • one_death_per_people
  • one_test_per_people

ContinentStatistics

  • today_recoveries

0.8.8

18 May 23:08
Compare
Choose a tag to compare

New attributes for GlobalStatistics, CountryStatistics and ContinentStatistics;

  • active_per_million
  • recoveries_per_million
  • critical_per_million
  • population
    All of those should be pretty self explanatory.

0.8.7

17 May 12:24
Compare
Choose a tag to compare

Support for allow_none in the following methods;

  • get_single_state()
  • get_all_states()
  • get_state_list()
  • gov_country()

0.8.6

16 May 23:04
Compare
Choose a tag to compare

Support for the new allowNull parameter. This is to say whether or not null values are given as 0 or None. The format_number util has also been updated to return 'Unknown' when a None value is passed.

  • allow_none=True means None values can be returned
  • allow_none=False means that all null values will be returned as 0

Usage

  • allow_none=True/False

Supported methods

  • all()
  • get_country_data()
  • get_all_countries()
  • get_country_list()
  • get_single_continent()
  • get_all_continents()

0.8.5

14 May 23:26
Compare
Choose a tag to compare

bug fix to JHU data returning the wrong county name.
base URL changed to https://disease.sh/v2

0.8.4

10 May 22:38
Compare
Choose a tag to compare

Supports new /v2/gov endpoints. Due to the fact that different data will be provided by different countries, we cannot create a unified class for the returned data. As a result, the data returned will either be a dict or a list of dicts. To get a list of the available attributes, you can use list(dict.keys()).

New methods

  • gov_supported_countries() - Get a list of all the supported countries. Returns List[str]
  • gov_country(country) - Get the data from the country's government. Could return either dict or List[dict]

0.8.2

07 May 22:09
Compare
Choose a tag to compare

Internal changes to yesterday and sort params. In terms of usage and syntax, they are exactly the same as before.

New methods

  • get_jhu_all_counties() - get a list of all counties supported by JHU and their data - List[JhuCsseStatistics]

New utils

  • parse_date(datetime.datetime) - Split a datetime.datetime into its various parts, useful for formatting date yourself. Data returned in day, month, year, hour, minute, second.

0.8.1

04 May 17:07
Compare
Choose a tag to compare

For NYT methods, all date members have been changed to datetime.datetime