Skip to content

Releases: apex2504/disease.py

0.8.0

04 May 16:56
Compare
Choose a tag to compare

Base URL updated to https://corona.lmao.ninja/v2

For historical data from JHU CSSE, the date attribute has changed to a datetime.datetime to allow for support with the format_date util.

New classes

AppleSubregions

  • country - the name of the country - str
  • subregions - a list of supported subregions - List[str]

AppleSubregionStatistics

  • subregion - the name of the subregion - str
  • statistics - a the statistics for the subregion - List[AppleMobilityData]

AppleMobilityData

  • name - the name of the subregion - str
  • type - the type of place. Will probably be 'sub-region' - str
  • date - the date of the data - datetime
  • driving - the value of driving - float/None
  • transit - the value of transit - float/None
  • walking - the value of walking - float/None

New methods

  • client.apple_all_countries() to get a list of supported countries. Returns List[str]
  • client.apple_subregions(country) to get a list of supported subregions within a country. Returns AppleSubregions
  • client.apple_mobility_data(country, subregion) to get all the mobility data for the specified region. Returns AppleSubregionStatistics

0.7.5

20 Apr 22:53
Compare
Choose a tag to compare

Richer errors for some methods.

New method: Client.get_country_list('a', 'few', 'countries', yesterday=True) - Gets the data for more than one country. Supports yesterday parameter.

0.7.4

17 Apr 23:04
Compare
Choose a tag to compare

Support for new NY Times endpoints, as well as add a country list in continent.

New methods

  • get_nyt_usa_data() - Get historical data for the US from the NY Times database. Returns List[NewYorkTimesUsaStatistics]
  • get_nyt_all_states() - Get historical data for all states from NY Times. Returns List[NewYorkTimesStateStatistics]
  • get_nyt_single_state(state) - Get historical data from NYT for a single state. Returns List[NewYorkTimesStateStatistics]
  • get_nyt_all_counties() - Get historical data for all counties of all states from NY Times. Returns List[NewYorkTimesCountyStatistics]
  • get_nyt_single_county(state) - Get historical data from NYT for a county of a certain name. Returns List[NewYorkTimesCountyStatistics]

0.7.0

15 Apr 21:04
Compare
Choose a tag to compare

Moved all endpoints to v2, and changed more methods.

All methods involving getting yesterday's data and sorted data have been removed and replaced with kwargs in existing methods.

get_sorted_data() -> get_all_countries(sort='mode')
yesterday_all() -> all(yesterday=True)
yesterday_country(country) -> get_country_data(country, yesterday=True)

Supports yesterday kwarg only:

  • all(yesterday=True)
  • get_country_data(country, yesterday=True)
  • get_single_state(state, yesterday=True)
  • get_single_continent(continent, yesterday=True)

Supports both yesterday and sort kwargs:

  • get_all_countries(yesterday=True, sort='mode')
  • get_all_states(yesterday=True, sort='mode')
  • get_all_continents(yesterday=True, sort='mode')

New methods

  • get_all_continents(yesterday=True, sort='mode') - Get the stats for all continents. Returns List[ContinentStatistics]
  • get_single_continent(continent, yesterday=True) - Get the stats for a single continent. Returns a single ContinentStatistics

0.6.6

10 Apr 00:55
Compare
Choose a tag to compare

Support for new data given my existing endpoints, as well as support for new /usacounties endpoint

0.6.4

05 Apr 20:06
Compare
Choose a tag to compare

Support for new endpoints and getting a certain number of days of history. Defaults to 'all' to get all existing historical data.

0.6.0

03 Apr 20:02
Compare
Choose a tag to compare

Rewrite of the library. Contains major changes to existing methods and classes, as well as includes several new ones. Join this Discord server for help with migrating.

Beta 0.5.0

30 Mar 18:03
Compare
Choose a tag to compare

Numerous changes, fixes and improvements

Beta 0.4.7

27 Mar 22:39
Compare
Choose a tag to compare

Numerous fixes and improvements over previous versions

Beta 0.4.3

23 Mar 02:55
Compare
Choose a tag to compare

Supports historical data and data sorted in a specified order.