twoHelixestwoHelixes Start free

Datasets / Energy readings

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.

Question show daily energy use per site
Daily energy use by site010k20k30k40kJan 01Jan 08Jan 15Jan 22Jan 29Feb 05Feb 12Feb 19Feb 26Mar 05Mar 12Mar 19Mar 26DayPlant CPlant APlant B
Energy readings — 273 rows charted from 6,483, drawn as a line
How it decided
Finding the data75 ms

Energy readings: 6,483 rows, 4 columns. reading_at, site and kwh.

Shaping the data10 ms

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.

Choosing the chart15 ms

line. A measure over time, one line per site.

Applying defaults1 ms

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.

daysitekwh
2025-01-01Plant A24167.81
2025-01-01Plant B13349.33
2025-01-01Plant C36078.12
2025-01-02Plant A24128.19
2025-01-02Plant B13627.38
2025-01-02Plant C36976.89
2025-01-03Plant A24382.17
2025-01-03Plant B13572.79