bucky.data.clean_historical_data#

Submodule to clean and preprocess the covid data.

Module Contents#

Functions#

clean_historical_data(csse_data, hhs_data, adm_mapping, fit_cfg, force_save_plots=False)

Preprocess the historical data to smooth it and remove outliers.

mask_outliers(ts, window_size=3, frac_err_max=0.1)

Find unusual outliers in timeseries compared to other time-local values.

plot_historical_fits(csse_data, hhs_data, adm_mapping, fitted_data, valid_adm1_case_mask, valid_adm1_death_mask)

Plot the fitted historical data for review

bucky.data.clean_historical_data.clean_historical_data(csse_data, hhs_data, adm_mapping, fit_cfg, force_save_plots=False)[source]#

Preprocess the historical data to smooth it and remove outliers.

bucky.data.clean_historical_data.mask_outliers(ts, window_size=3, frac_err_max=0.1)[source]#

Find unusual outliers in timeseries compared to other time-local values.

bucky.data.clean_historical_data.plot_historical_fits(csse_data, hhs_data, adm_mapping, fitted_data, valid_adm1_case_mask, valid_adm1_death_mask)[source]#

Plot the fitted historical data for review