Skip to content

0.8.0

Compare
Choose a tag to compare
@apex2504 apex2504 released this 04 May 16:56
· 32 commits to master since this release

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