Releases: apex2504/disease.py
0.8.0
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. ReturnsList[str]
client.apple_subregions(country)
to get a list of supported subregions within a country. ReturnsAppleSubregions
client.apple_mobility_data(country, subregion)
to get all the mobility data for the specified region. ReturnsAppleSubregionStatistics
0.7.5
0.7.4
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. ReturnsList[NewYorkTimesUsaStatistics]
get_nyt_all_states()
- Get historical data for all states from NY Times. ReturnsList[NewYorkTimesStateStatistics]
get_nyt_single_state(state)
- Get historical data from NYT for a single state. ReturnsList[NewYorkTimesStateStatistics]
get_nyt_all_counties()
- Get historical data for all counties of all states from NY Times. ReturnsList[NewYorkTimesCountyStatistics]
get_nyt_single_county(state)
- Get historical data from NYT for a county of a certain name. ReturnsList[NewYorkTimesCountyStatistics]
0.7.0
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. ReturnsList[ContinentStatistics]
get_single_continent(continent, yesterday=True)
- Get the stats for a single continent. Returns a singleContinentStatistics
0.6.6
0.6.4
0.6.0
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
Numerous changes, fixes and improvements
Beta 0.4.7
Numerous fixes and improvements over previous versions
Beta 0.4.3
Supports historical data and data sorted in a specified order.