Office building daily energy use
Daily electricity consumption of a fictional six-storey office building, Tower 7 at Lotus Business Park, for the whole of 2023, with the day's mean outdoor temperature and a working-day flag. Energy use is U-shaped in temperature (heating on cold days, much more cooling on hot days) and far lower at weekends. A straight-line regression fits badly, which shows up clearly in residual plots — a dataset for nonlinear relationships, polynomial and piecewise (degree-day) regression, and residual diagnostics including autocorrelation.
- Rows
- 365
- Columns
- 5
- One row is
- one day
- Version
- v1
Data dictionary
| Column | Type | Unit | Summary | Description |
|---|---|---|---|---|
dateDate | date | Calendar date. | ||
weekdayWeekday | category | 7 levels: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday… | Day of the week. | |
workdayWorking day | boolean | 2 levels | True Sunday–Thursday (the building's working week). | |
outdoor_temp_cOutdoor temperature | number | °C | mean 21.17, median 21.1, SD 8.983, range 5.6–38 | Daily mean outdoor temperature. |
energy_kwhEnergy use | number | kWh | mean 2331, median 2458, SD 717.8, range 973–3769; 5 missing | Electricity consumed by the building that day.Missing: Null on 5 days when the meter was offline. |
What it is good for
- Recognise a U-shaped relationship in a scatter plot and why correlation near zero does not mean no relationship.
- Compare linear, quadratic and degree-day (piecewise linear) regression models.
- Use residual plots and residuals over time to diagnose misfit and autocorrelation.
- Include a working-day indicator and interpret it.
Methods: scatter plot, polynomial regression, piecewise regression, dummy variables, residual diagnostics, Durbin–Watson statistic, autocorrelation.
Data quality notes
- energy_kwh is null on 5 days (meter outage).
- The relationship with temperature is nonlinear (U-shaped and asymmetric: cooling costs more than heating).
- Residuals are autocorrelated because weather and building behaviour persist from day to day.
Provenance and licence
Temperature = 21 + 12·seasonal cosine (coolest mid-January, hottest late July) + AR(1) weather noise (φ = 0.7, sd 2.2 °C). Energy (kWh) = base load (2 300 on working days, 1 100 on Friday/Saturday) + 55 × heating degrees below 16 °C + 95 × cooling degrees above 22 °C (both halved on non-working days) + AR(1) noise (φ = 0.5, sd 90). Five days of meter outage have no energy reading.
Synthetic data · CC0-1.0 (synthetic data generated by Statistics Quest) · generated deterministically (seed 20241027). It does not describe real people or organisations; any resemblance is coincidental.
Preview
Dataset
Office building daily energy use
365 rows · one row = one day · synthetic data
| Date | Weekday | Working day | Outdoor temperature (°C) | Energy use (kWh) |
|---|---|---|---|---|
| 2023-01-01 | Sunday | true | 9.4 | 2711.1 |
| 2023-01-02 | Monday | true | 12.3 | 2658.9 |
| 2023-01-03 | Tuesday | true | 13.3 | 2560.5 |
| 2023-01-04 | Wednesday | true | 10.2 | 2670.3 |
| 2023-01-05 | Thursday | true | 10.8 | 2549.4 |
| 2023-01-06 | Friday | false | 7.6 | 1320.4 |
| 2023-01-07 | Saturday | false | 5.6 | 1446.6 |
| 2023-01-08 | Sunday | true | 9.3 | 2721.3 |
| 2023-01-09 | Monday | true | 8.9 | 2689.9 |
| 2023-01-10 | Tuesday | true | 8.2 | 2664 |
| 2023-01-11 | Wednesday | true | 9.3 | 2533.5 |
| 2023-01-12 | Thursday | true | 11.1 | 2555.6 |
Used in
- Correlation heatmaps · Visualising and Exploring Data
- Covariance and correlation · Correlation and Regression
- R² and residual standard error · Correlation and Regression
- Residual analysis · Correlation and Regression
- Transformations · Correlation and Regression
- Time-indexed data · Time Series and Forecasting
- Model limitations and honest reporting · Advanced Foundations
- Energy use and the weather · Case