Miniplots#
Goal
Show each month as a mini panel to compare energy values across years, making it easy to spot month-by-month trends.
Data Basis
Monthly energy consumption data (seasonal_monthly.csv) bundled with the pyedautils package. 10 years of monthly values.
Data Preparation#
import pandas as pd
from importlib import resources
data_path = resources.files("pyedautils") / "data" / "seasonal_monthly.csv"
df = pd.read_csv(data_path, sep=";")
df.head()
| timestamp | value | |
|---|---|---|
| 0 | 2010-01-01 | 19.000000 |
| 1 | 2010-02-01 | 19.642857 |
| 2 | 2010-03-01 | 17.032258 |
| 3 | 2010-04-01 | 8.633333 |
| 4 | 2010-05-01 | 0.870968 |
Visualization#
from pyedautils.plots import plot_seasonal_miniplots
fig = plot_seasonal_miniplots(
data=df,
title="Seasonal Miniplots (10 Years)",
ylab="Mean daily energy [kWh/d]",
)
fig.show()