Daily kWh by site
Hourly readings are rolled up to days: at hourly resolution three sites over a quarter is 6,000 points of noise, not a trend.
How it decided
Energy readings: 6,483 rows, 4 columns. reading_at, site and kwh.
6,483 rows in, 273 out across 3 columns. Hourly readings are rolled up to days: at hourly resolution three sites over a quarter is 6,000 points of noise, not a trend.
line. A measure over time, one line per site.
Palette, spacing, axis titles and legend placement applied. 0 issues found.
The transformation
This is the code, not a description of it — the chart above was drawn from what it returns, and the notebook download runs the same lines against the same file.
df["day"] = df["reading_at"].astype("datetime64[ns]").dt.floor("D")
result = df.groupby(["day", "site"], as_index=False)["kwh"].sum()
What it charted
273 rows out of 6,483, 3 columns. First 8 shown.
| day | site | kwh |
|---|---|---|
| 2025-01-01 | Plant A | 24167.81 |
| 2025-01-01 | Plant B | 13349.33 |
| 2025-01-01 | Plant C | 36078.12 |
| 2025-01-02 | Plant A | 24128.19 |
| 2025-01-02 | Plant B | 13627.38 |
| 2025-01-02 | Plant C | 36976.89 |
| 2025-01-03 | Plant A | 24382.17 |
| 2025-01-03 | Plant B | 13572.79 |