fit_regions

fit_regions(covid19_data: pandas.core.frame.DataFrame, fit_function: Callable, data_source: str, fit_func_kwargs: dict = {}) → Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame][source]

Function to fit all regions of a covid dataset

Parameters
  • covid19_data (pd.DataFrame) – Full covid19 data from a data_source

  • fit_function (Callable) – Implementation of a model with fit_data_model

  • data_source (str) – name of the data source, only needed to print debug information

  • fit_func_kwargs (dict, optional) – Additional kwargs passed to fit_function, by default {}

Returns

fitted_plot_data, fitted_param_results

fitted_plot_data:

actual fitted data, which can be used for plotting

fitted_param_results:

fit parameters

Return type

Tuple[pd.DataFrame, pd.DataFrame]