How does the Actual vs. Average widget work?

The Actual vs Average widget is showing every day data for that day.
The Average spectrum is the same day of the last 5 weeks with normalized values to capture general behavior.
Initially, it takes up to 2 weeks worth of data for the standard deviation and range to begin properly reflecting a site's trends.
The system collects historical energy consumption data for the same day of the week over the past 5 weeks. It calculates average values for each time point across these weeks. These averages serve as the initial baseline for “typical” consumption.
To account for variability, the system calculates a standard deviation from these averages. This helps create an “acceptable range” around the average values.
To smooth out irregularities in the averaged data, the system applies polynomial fitting. This creates a curve that represents the general trend of the average consumption pattern.
The smoothed curve becomes the “normalized” or “expected” consumption pattern for the current day.
The widget then displays this normalized pattern along with an upper and lower bound, based on the calculated standard deviation. This creates a range of “normal” consumption.
Current day’s actual consumption is compared against this normalized range, allowing users to see how today’s usage compares to the typical pattern.