bucky.data
#
Submodule containing objects that manage the input data
Submodules#
Package Contents#
Classes#
Wrapper for the stack of admin levels and their info |
|
Dataclass that holds the CSSE case/death data. |
|
Dataclass that holds the HHS hospitalization data. |
- class bucky.data.AdminLevelMapping(adm2: AdminLevel, adm1: Optional[AdminLevel] = None, adm0: Optional[AdminLevel] = None, levels: dict = field(init=False))[source]#
Wrapper for the stack of admin levels and their info
- adm0 :AdminLevel#
- adm1 :AdminLevel#
- adm2 :AdminLevel#
- mapping(self, from_: str, to: str, level: int)[source]#
Return dict mappings between attributes of the admin level (for use with pandas.Series.map)
- property n_adm1(self)#
DEPRECATED: return the number of adm1 regions
- class bucky.data.CSSEData[source]#
Bases:
SpatialStratifiedTimeseries
Dataclass that holds the CSSE case/death data.
- cumulative_cases :bucky._typing.ArrayLike#
- cumulative_deaths :bucky._typing.ArrayLike#
- incident_cases :bucky._typing.ArrayLike#
- incident_deaths :bucky._typing.ArrayLike#
- static from_csv(file: bucky._typing.PathLike, n_days: Optional[int] = None, valid_date_range=(None, None), force_enddate: Optional[datetime.date] = None, force_enddate_dow: Optional[int] = None, adm_mapping: Optional[bucky.data.adm_mapping.AdminLevelMapping] = None)[source]#
Read CSSE data from a CSV.
- class bucky.data.HHSData[source]#
Bases:
SpatialStratifiedTimeseries
Dataclass that holds the HHS hospitalization data.
- current_hospitalizations :bucky._typing.ArrayLike#
- incident_hospitalizations :bucky._typing.ArrayLike#
- static from_csv(file: bucky._typing.PathLike, n_days: Optional[int] = None, valid_date_range=(None, None), force_enddate: Optional[datetime.date] = None, force_enddate_dow: Optional[int] = None, adm_mapping: Optional[bucky.data.adm_mapping.AdminLevelMapping] = None)[source]#
Read HHS data from a CSV.