Module timeseries reference

Methods for generating timeseries plots

epivislab.timeseries.get_summary_defaults(xr)

Detect dropdown widget defaults for prediction interval plots from coordinates of xarray

Excludes coordinates with np.datetime64 type, as these are assumed to contain the timestep data to be used for the x-axis.

Parameters

xr (xarray) – simulation data

Returns

dictionary with {coordinate name: default value} structure

Return type

dict

epivislab.timeseries.get_spaghetti_defaults(xr, index_coord)

Detect dropdown widget defaults for spaghetti plots from coordinates of xarray

Exlucludes coordinates with np.datetime64 type, as these are assumed to contain the timestep data to be used for the x-axis. Also excludes the index_coord.

Parameters

xr (xarray) – simulation data

Returns

dictionary with {coordinate name: default value} structure

Return type

dict

epivislab.timeseries.build_widgets(data_xr, defaults)

Construct dropdown widgets given simulation data and dropdown default values.

Parameters
  • data_xr (xarray) – simulation data

  • defaults (dict) – dictionary with {coordinate name: default value} structure

Returns

dictionary with {coordinate name: widgets.Dropdown object} structure

Return type

dict

epivislab.timeseries.interval_timeseries(summary_xr)

Create a prediction interval plot

Parameters

summary_xr (xarray) – simulation data containing coordinates upper (upper predition interval), lower (lower prediction interval), and median (median prediction value).

Returns

None; outputs plotly graph using plotly display method.

epivislab.timeseries.spaghetti_timeseries(simulation_xr, x_val, y_val, index_coord)

Create a spaghetti plot.

Parameters
  • simulation_xr (xarray) – simulation data containing data from multiple simulations.

  • x_val (str) – coordinate in simulation_xr containing x-axis data (timestep data)

  • y_val (str) – coordinate in simulation_xr containing y-axis data (simulation measurement data)

  • index_coord (str) – coordinate in simulation_xr containing index value distinguising different simulations.

Returns

None; outputs plotly graph using plotly display method.