Some functions for doing analyses on the alberta covid data
%load_ext autoreload
%autoreload 2
The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload

calculate_doublingtimes[source]

calculate_doublingtimes(df:DataFrame, col_suffix:str='cumCases', median_incubation_period:float=5.2, combine_df=True)

given a dataframe look through and calculate the doubling times. Both doubling time based on the first occurance of covid-19 and doubling time based on a rolling window which looks back as far as the median incubation period (converted to integer using ceiling)

Parameters:

df: pd.DataFrame
    the dataframe containing the region data
col_suffix:str
    cumulative column suffix used to filter the dataframe to only grab cumulative data
    uses pd.DataFrame.filter(like=col_suffix)
combine_df:bool
    if True will return a new dataframe with the doubling time data joined with the old dataframe
    if False will only return a dataframe with the doubling time data


Return:

regionDF_doublingtime: DataFrame