Field note · January 15, 2024
Reading solar_mw before trusting it in grid-energy-load
8,760 rows, 3,538 distinct values, and the one fact about solar_mw that changes how you query it.
Profiling solar_mw on grid-energy-load before anyone builds anything on top of it.
8,760 rows, no nulls, 3,538 distinct values. Solar generation.
The five-number version: min 0, p10 0, median 0, p90 1,144, max 2,264. The mean is 344.
The p10 to p90 band — 0 to 1,144 — is where ordinary rows live, and it is the pair worth quoting when somebody asks what to expect. Min and max describe the two strangest rows in the table and nothing else; they are useful for spotting impossible values and misleading for everything else.
select
count(*) as rows,
count(solar_mw) as present,
count(*) - count(solar_mw) as nulls,
count(distinct solar_mw) as distinct_values
from grid_energy_load;4,745 rows are exactly zero — 54.2% of the column. Decide what a zero means here before you average anything, because "did not happen" and "measured zero" do not belong in the same denominator.
Where this bites: the two populations move independently. A drop in the overall average could be fewer non-zero rows or smaller non-zero values, and one number cannot tell you which — so the reporting version is usually a rate and a size rather than a mean.
The grain is one row per hour, which is the context every one of those numbers depends on. None of them survive a change of grain, which is why "profile the column" and "profile the table" are the same job. Full schema, and the CSV, on the dataset page.