src.plot.altair

Module Contents

src.plot.altair.plot_estimate(df, legend=True)[source]

Plot the load forecast transformer.

Parameters
dfpd.DataFrame

DataFrame with the columns date, lower, upper, forecast(Q10-Q190, median), extreme

Returns
Altair chart
src.plot.altair.plot_observed(df)[source]

Plot the historic/observed load of a transformer.

Parameters
dfpd.DataFrame

DataFrame with like:

Returns
Altair chart
src.plot.altair.plot_limits(df)[source]

Plot the capacity limits of a transformer as a ruler of as a line if metadata changes over time.

Parameters
dfpd.DataFrame

DataFrame with the limits to be plotted

Returns
Altair chart
src.plot.altair.lightness_scale(factor, limits=['#bedef4', '#1f77b4'])[source]

Create right color intensity for float values.

Parameters
factor: float

Factor of full color intensity.

limits: list

Hex colour codes for start and end of scale.

Returns
str

Hex code for the factor value.

src.plot.altair.plot_base(df_data=None, df_meta=None)[source]

Plot one or more of the following: history, forecast, transformer limits.

Parameters
df_datapd.DataFrame

DataFrame with the timeseries

df_metapd.DataFrame

DataFrame with the metadata

Returns
Altair layer chart
src.plot.altair.plot_decompose(df)[source]

Plot decomposition of PYMC3 GAM model components by model variable.

Parameters
dfpd.DataFrame

Data of estimates in long format.

Returns
alt.Chart

Altair plot.

src.plot.altair.plot_all(df_data, df_meta=None)[source]

Plot estimates, observed and limits.

Parameters
df_datapd.DataFrame

DataFrame with the timeseries

df_metapd.DataFrame

DataFrame with the metadata

Returns
Altair layer chart