bucky.util.get_historical_data
¶
utilities to read historical data that cooresponds to a bucky output file.
Module Contents¶
Functions¶
|
Return daily historical data from a diff of the historical cumulative data. |
|
Return historical data for requested columns. |
Attributes¶
- bucky.util.get_historical_data.covid_tracking¶
- bucky.util.get_historical_data.csse¶
- bucky.util.get_historical_data.data_locations¶
- bucky.util.get_historical_data.graph_file¶
- bucky.util.get_historical_data.hhs_hosp¶
- bucky.util.get_historical_data.vacc¶
- bucky.util.get_historical_data.add_daily_history(history_data, window_size=None)[source]¶
Return daily historical data from a diff of the historical cumulative data.
- Parameters
history_data (
pandas.DataFrame
) – Cumulative case and death data
- Returns
history_data – Historical data with added columns for daily case and death data
- Return type
- bucky.util.get_historical_data.get_historical_data(columns, level, lookup_df, window_size, hist_file)[source]¶
Return historical data for requested columns.
- Parameters
level (
str
) – Geographic level to get historical data for, e.g. adm1lookup_df (
pandas.DataFrame
) – Dataframe with names and values for admin0, admin1, and admin2 levelswindow_size (
int
) – Size of window in dayshist_file (
str
orNone
) – Historical data file to use if not using defaults.
- Returns
history_data – Historical data indexed by data and geographic level containing only requested columns
- Return type