Field note · October 15, 2024

What is_holiday actually contains in grid-energy-load

8,760 rows, 2 distinct values, and the one fact about is_holiday that changes how you query it.

1 min read ·Data quality ·quality practice

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

8,760 rows, no nulls, 2 distinct values. Public holiday flag.

It is true in 3.0% of rows — 264 of 8,760.

That imbalance is the single most important fact about the column. It sets the baseline any model has to beat, it decides whether a per-segment breakdown will have enough rows in the minority class to say anything, and it determines how wide the confidence interval on any rate computed from it will be.

sql
select
  count(*)                     as rows,
  count(is_holiday)            as present,
  count(*) - count(is_holiday) as nulls,
  count(distinct is_holiday)   as distinct_values
from grid_energy_load;

A base rate this low is the reason accuracy is the wrong metric on anything predicting this column: always predicting false scores 97.0% and learns nothing.

Where this bites: slicing by a dimension with 18 levels leaves roughly 15 true rows per slice on average. That is thin enough that the noisiest segment will look like the most extreme one, every time, and someone will read the ranking as a finding.

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.