bucky.viz.utils#

Utility functions for plotting.

Module Contents#

Functions#

get_fitted_data(cfg, level, date_range)

Gets Bucky fitted historical data for the requested columns and dates.

get_historical_data(cfg, level, date_range)

Gets historical data for the requested columns and dates.

get_simulation_data(input_dir, level)

Gets Bucky simulation data from the requested input directory at the requested

bucky.viz.utils.get_fitted_data(cfg, level, date_range)[source]#

Gets Bucky fitted historical data for the requested columns and dates. admin level.

Parameters:
  • cfg (BuckyConfig) – BuckyConfig object with various plot-related parameters

  • level (str) – Requested admin level

  • date_range (tuple) – Date range for which to get fitted data

Returns:

df – Bucky fitted historical data in DataFrame

Return type:

pandas.DataFrame

bucky.viz.utils.get_historical_data(cfg, level, date_range)[source]#

Gets historical data for the requested columns and dates. admin level.

Parameters:
  • cfg (BuckyConfig) – BuckyConfig object with various plot-related parameters

  • level (str) – Requested admin level

  • date_range (tuple) – Date range for which to get fitted data

Returns:

df – Historical data in DataFrame

Return type:

pandas.DataFrame

bucky.viz.utils.get_simulation_data(input_dir, level)[source]#

Gets Bucky simulation data from the requested input directory at the requested admin level.

Parameters:
  • input_dir (matplotlib.axes.Axes) – Directory in which Bucky simulation data is located

  • level (str) – Requested admin level

Returns:

sim_data – Bucky simulation data in DataFrame

Return type:

pandas.DataFrame