aridkpi.viz
Visualisation utilities for aridkpi.
All functions are import-guarded for matplotlib so the core package can be
installed without it. Use pip install aridkpi[viz] to enable.
- aridkpi.viz.plot_kpi_summary(kpi_results: dict[str, dict[str, float]], title: str = 'KPI summary across typologies', ax: Any | None = None)[source]
Bar chart comparing KPI values across typologies / cases.
- Parameters:
kpi_results – Nested dict of the form
{case_name: {kpi_id: value, ...}, ...}.title – Plot title.
ax – Optional matplotlib axes.
- Returns:
matplotlib.axes.Axes – The axes used.
Examples
>>> data = { ... "adobe": {"IOD": 45.0, "dT_dt_max": 0.6}, ... "lightweight": {"IOD": 92.0, "dT_dt_max": 2.4}, ... } >>> # Used in the tutorial notebook to compare 4 typologies side by side.
- aridkpi.viz.plot_overheating_diagnostic(T_op: Series, T_comf: float = 26.0, title: str = 'Overheating diagnostic', ax: Any | None = None)[source]
Visual diagnostic of overheating: shaded area = excess over T_comf.
Useful for explaining IOD intuitively: the shaded area under the curve above the threshold is exactly the IOD integral.
- Parameters:
T_op – Operative temperature series.
T_comf – Comfort threshold.
title – Plot title.
ax – Optional matplotlib axes.
- Returns:
matplotlib.axes.Axes – The axes used.
- aridkpi.viz.plot_temperature_series(T_in: Series, T_ext: Series | None = None, T_comf: float = 26.0, title: str = 'Indoor / outdoor temperature', ax: Any | None = None)[source]
Plot indoor (and optional outdoor) temperature with comfort threshold.
- Parameters:
T_in – Indoor temperature series.
T_ext – Optional outdoor temperature series (overlaid on the same axes).
T_comf – Comfort threshold drawn as a horizontal reference line.
title – Plot title.
ax – Optional matplotlib axes. If
None, a new figure is created.
- Returns:
matplotlib.axes.Axes – The axes used.