Field note · May 16, 2023

What solar_mw actually contains in grid-energy-load

8,760 rows, 3,538 distinct values, and the one fact about solar_mw that changes how you query it.

1 min read ·Data quality ·quality practice

Working through grid-energy-load again. solar_mw is the column people trip over, so here is what it actually looks like.

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.

sql
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.