The impact of COVID-19 on household energy consumption in England and Wales from April 2020 to March 2022

,


Introduction
Coronavirus infectious disease (COVID- 19) was declared a global pandemic by the World Health Organisation in March 2020 [1].As a result of COVID-19 and the measures taken by governments to reduce its impact, populations around the world experienced huge changes to their ways of life, work, and study.Few areas of life, industry and the economy were unaffected, and the energy sector was no exception.In the first five months of the pandemic the downturn in industrial output and commercial activities reduced electricity demand by 3-12% in most EU countries and US states [2].Great Britain (GB) reportedly experienced the "strongest cumulative decline… of 11.4%", as well as being one of the few countries to remain below baseline levels beyond July 2020 [2].
Mehlig et al. [3] reported a fall in both national electricity and gas demand during lockdown 1 1 : 15.6% ± 1.8% (electricity reduction) and 12.0 ± 0.8% (gas reduction), and during lockdown 2: 6.3% ± 2.3% (electricity reduction) and 4.1 ± 1.1% (gas reduction).The shift for many people to full-time stay-at-home living, working and schooling affected the frequency, duration and timings of space and hot water heating and of appliance use [4], effects captured in household energy consumption data.Gausden [5] reported a 17% increase in domestic electricity consumption during the first UK lockdown, while Tubelo et al. [6] reported a 5% increase in April 2020 and a 17% average increase during April 2020 -January 2021.
While several studies (e.g.[3][4][5][6][7][8][9][10][11]) have attempted to estimate the impact of COVID-19 lockdowns on household energy use (an area noted as a recent 'research hotspot' [12]), few studies look beyond the first year of the pandemic to capture the potential persistence of changes in energy demand.There is a distinct lack of research on both changes in household gas demand and on the differences between changes in homes with different household and dwelling characteristics.Finally, the methods used to estimate changes attributable to the pandemic often require improbable assumptions, such as identical weather conditions 2  as in previous year(s) or preceding weeks.
In this study we train and test three types of predictive machine learning algorithm on pre-pandemic data for 508 (electricity) and 326 (gas) homes in England and Wales.The predictive models produce counterfactuals (predictions) for what dwelling-level daily energy consumption would have been in the absence of the pandemic, accounting for local weather conditions, historic demand, and day of the week/time of the year.We compare this counterfactual demand with measured daily household demand data to address the following research questions: • How did daily energy consumption change in the two years from the start of the COVID-19 pandemic in England and Wales?• How were different types of household/dwelling affected differently?In particular, household composition (presence of children or working adults), self-reported financial wellbeing, and Energy Performance Certificate (EPC) band.
Following this initial introduction, Section 1.1 provides a literature review, Section 1.2 describes the lockdown and restrictive periods in England and Wales during the pandemic, Section 2 describes the methods used, and Section 3 presents and discusses the results.Finally, conclusions are summarised in Section 4.

Literature review
Previous studies on the impact of COVID-19 on domestic electricity consumption in GB lack consensus on the scale of the effects observed; estimates for average increase in lockdown 1 range from 0 to 17% [6,7,13].An energy supplier detected a 17% increase from 2277 smart meters by comparing a 3-week period during lockdown 1 with a 3-week period prior [5]; a very simplistic approach that benefits from a large sample, but does not account for weather or time of year.21 energyefficient homes in Nottingham, England were found to have increased their electricity consumption by 5% in April 2020 and by 17% on average from April 2020 -January 2021, calculated by comparing with the same period in the previous year [6].This approach is preferable to comparing with an earlier period in the same year, but lacks weather correction, non-energy-efficient homes, or regional diversity.A study of 280 social housing households in Cornwall [13] did not find statistically significant changes in total domestic electricity or gas consumption during lockdown 1, although most homes included long-term sick or disabled or retired residents, a group likely to spend more time at home before the pandemic than the national average.However, their approach was more robust, employing mixed linear regression using data from the two years before the first lockdown to create counterfactuals against which to compare the observed domestic electricity, gas and water use.Studies on domestic gas use are noticeably absent from the literature, as are longitudinal studies beyond the first year of the pandemicimportant gaps we address with this study.
A key feature of this study is the use of pre-pandemic data to train counterfactual models at the individual household level, in order to overcome the limitations of many methods used in previous studies.The first studies on the impact of the pandemic compared consumption during the first lockdown with a preceding perioda 'pre-post' methodology.The simplest approach was to compare the first week or two of lockdown with the preceding week(s), such as in [14][15][16], or three weeks during lockdown with 3 earlier weeks [5].Similarly, Kirli et al. [17] compared the week of 23rd March 2020 (start of lockdown) with the week of 2nd March 2020.Rouleau and Gosselin [18] studied the first 4 months of lockdown with the preceding months while Snow et al. [19] compared the first seven weeks of lockdown with the preceding seven weeks and also with the corresponding seven weeks in the previous year.While these comparisons provided results quickly and required minimal historic data, they assume that the weather conditions did not change between the two comparison periods and that people hadn't started to change their behaviours in reaction to COVID-19 before official lockdowns began.In fact, the UK Government began advising the public to stay home from 16th March 2020 ahead of the legal requirement to stay home from 24th March.
To avoid some of these issues, other studies compared the lockdown period with the same period in the preceding year(s) (e.g.[6,20,21]) or by analysing historical trends in 2017 -2020 [22,23].These approaches removed the initial (pre-lockdown) effects of the pandemic from the control group but ignored weather fluctuations between years.Analysis of ECMWF weather data revealed that in GB the weather during the first lockdown was unseasonably warm and sunny, and the combination of temperature and solar irradiance was unlike any period in the previous 18 months [4].One simple way to overcome this, as used by Chinthavali et al. [24], is to only compare energy consumption on days with similar weather conditions.Alternatively, using weather-correction factors (typically determined via regression) to improve the comparability between energy demand in different years has been employed by several studies on the impact of the pandemic on energy consumption, e.g.[10,11,[25][26][27].
To account (usually more fully) for differences between years, historic data can be used to model the relationship between energy consumption and relevant factors (such as weather, time of the year, day of the week) to develop counterfactuals (also known as baselines) against which actual energy consumption during COVID-19 can be compared.A study comparing different methods for data from different countries found ARIMA dynamic harmonic regression that incorporated temperature, holidays, and seasonality to be most consistently accurate at predicting the training data [2].Their models were trained with data from 2016 to February 2020 and counterfactuals created for March -July 2020 with real temperature data.Mehlig et al. [3] used data from 2017 to 2019 to create a counterfactual model for 2020 electricity and gas demand using ordinary least squares (OLS) regressions with heating and cooling degree days and separate models for weekdays and for weekends/holidays.Similarly, Rana et al. [28] used simulations and regression models to account for external temperature and time of day in their study of a residential building in Canada.A case study of residential buildings in India applied Multiple Criteria Decision Making (MCDM) based Best Worst Method (BWM) to determine the most relevant factors for energy consumption during the pandemic [8].Meanwhile a Canadian study applied changepoint analysis, descriptive statistics and k-means clustering to explore the impact of COVID-19 on electricity bills [9].The only domestic GB study to use counterfactual modelling was the Cornwall study by Menneer et al. [13], where mixed linear regression using data from the two years before the first lockdown was used for domestic electricity, gas and water counterfactual models.Some of the most common data-driven models for domestic energy prediction more generally are artificial neural networks (ANNs), support vector machines (SVMs), statistical regression, decision trees (DTs) and genetic algorithms (GAs) [29].The review by Wei et al. [29] provides many examples of studies using these methods for energy demand prediction.Less common but with the benefit of greater simplicity, elastic net regression is an extension of linear regression, used successfully by studies such as Sâtre-Meloy [30] to model energy consumption in buildings, and shown to out-perform other methods tested by the author.Of the artificial intelligence models, ANNs are reportedly the most 2 Weather is known to be a significant driver of domestic electricity and gas demand [49].

E. Zapata-Webborn et al.
prevalent for energy forecasting/prediction [31] (for reviews see, for example, [29,[32][33][34]).While ensemble method Extreme Gradient Boosting (XGBoost) is a relatively new technique to be applied for energy prediction, it has shown strong performance within the field in studies such as [35][36][37][38].Given the ability of machine learning methods to capture complex relationships between predictor variables and their track record for more accurate predictive abilities, this study develops and compares some of these more advanced methods, applied for the first time to estimate the impact of the pandemic on domestic electricity and gas consumption in England and Wales.

COVID-19 lockdowns in England and Wales
The UK Government began recommending working from home in March 2020, and the first official lockdown commenced 23rd March 2020.A wide range of measures were employed at different times and varying between regions, including between England and Wales.We define six periods before all restrictions ended based on official timelines and best estimates for transitions between full lockdowns and highly restrictive periods when daily routines were yet to return to normal.Table 1 summarises the timelines of key legislation and official recommendations in England and Wales.

Research framework
The research framework is presented in Fig. 1.There are four main stages: data pre-processing, counterfactual modelling, model evaluation (and selection), and results analysis.These are described in detail in the sections which follow.

Data pre-processing
The Smart Energy Research Lab (SERL) [42][43][44][45] collects half-hourly electricity and (where available) gas data, and survey data for homes across GB.The earliest energy data dates back to August 2018 from the first recruitment wave, when ~1700 participants were recruited in September 2019 [46].Additional recruitment increased the sample to over 13,000 households [44].However, due to the need for sufficient pre-pandemic data for counterfactual modelling, only households recruited in September 2019 could be included in this study.We used the 5th edition of the SERL Observatory dataset [47] for half-hourly electricity and gas data, hourly ERA5 reanalysis climate data 3 [48], and the SERL survey.After filtering (described below), the final samples for the counterfactual modelling comprised 508 households with electricity data (our 'electricity households') and 326 households with gas data ('gas households').Of these, 286 households have both electricity and gas data. 4Appendix A describes the sample representativeness in terms of region, IMD quintile, EPC rating, and a selection of dwelling and household characteristics.

Date and time variables
Days of the week were classified as weekdays, weekends, or national holidays.A sinusoidal transform was applied to days of the year so that the transform output assigned similar values to days that were close together (see Appendix B for details).Model development involved trialling different time resolutions: half-hourly, by period of the day (Table 2), and daily.Eight time periods were constructed by identifying times of the day when average energy use is approximately constant [45].Due to the night-time period starting at 11 pm, all days were redefined to start at 11 pm rather than midnight.

Energy data
The pre-pandemic model training period was chosen to be 1st April 2019 -29th February 2020 since a) starting it sooner significantly reduced the number of eligible households, and b) COVID-19 was Medium-Range Weather Forecasts is responsible for any use that may be made of the Copernicus information or data it contains. 4A household which does not belong to the 'gas households' may still use gas, but either we are unable to collect the data due to no mains gas or no gas smart meter, or there is insufficient valid gas data.A household which does not belong to the 'electricity households' will be due to a lack of valid data in the training and prediction periods.metres was converted 5 to kWh.Half-hourly energy data was averaged when period-of-the day or daily were the time resolution of the model.

Weather data
Temperature, solar irradiance, and rainfall were selected to be the predictor weather variables, as these were deemed most relevant to energy consumption [49].By including these variables in the model, we account for changes in energy consumption caused by changing weather conditions (e.g.extra heating use due to a particularly cold winter would be predicted by the model rather than attributed to the effects of the pandemic).Linear interpolation was used to generate half-hourly datapoints from the hourly weather data in the SERL Observatory (see Appendix B).Following interpolation, means were calculated for each period of the day and each day.In addition to current weather conditions, temperature and solar irradiance on the preceding days can affect the thermal mass of the building.These variables were therefore included for each of the three preceding days in the set of possible predictor variables.

Elastic net regression
Elastic net regression is an extension of linear regression (which aims to minimise the error between the outputs of a linear combination of predictor variables and true observations (dependent variable)).Coming from the simplest family of predictive models, this is a good first model to develop.Being susceptible to overfitting, 6 regularisation (or 'shrinkage') methods have been developed to combat this issue.Regularisation reduces model variance at the expense of a small increase in model bias.Common regularisation methods include ridge regression; penalising (but not eliminating) large coefficients, lasso regression; penalising many predictor variables through variable elimination, and elastic net regression; a combination of the two.We chose to use elastic net regression as it can benefit from both approaches, and has been found to outperform other methods at predicting electricity consumption [30].
In elastic net regression, for n outcome data points y i (in our case energy demand) and p predictor variables x j , the coefficients β j for each predictor are determined by minimising the residual sum-of-squares plus the elastic net penalty (using a gradient descent method): Tuning parameters α ∈ [0, 1] and λ ≥ 0 are determined by trialling different values to determine a combination for optimal performance.α = 0 is the ridge penalty; α = 1 is the lasso penalty, and in between is a combination of the two.Prior to minimisation the response is centred (y i sum to 0) and the predictors standardised (for each predictor variable j, ∑ i x ij = 0 and ).We performed elastic net regression using R packages glmnet [57] and caret [51] with 10-fold cross-validation and tune length 10 (10 values of α and 10 values of λ tried in each model run).As the simplest algorithm used, the elastic net regression took the shortest time to run (between 3 and 8 times faster than neural networks (the second quickest), depending on the number of variants tested).

Artificial neural network
Artificial neural networks also learn a function relating predictor and output variables but, in contrast with elastic net regression, permit nonlinear relationships.A neural network consists of a network of multiple 'neurons' or 'units' which are connected in 'hidden' layers so that the outputs of the units in one layer are used as inputs to the units in the next.This is known as a 'feedforward neural network'.Each unit is represented by an equation similar to the elastic net regression equation: a linear sum of the inputs multiplied by parameters known as weights and a bias term.The output of this equation is then passed through an 'activation function' which is usually nonlinear.A neural network can consist of many such units which means they can estimate highly nonlinear relationships between input and output variables.
Neural networks have become popular for modelling energy consumption (for reviews see, for example, [29,[32][33][34], although the focus has predominantly been on forecasting applications, rather than predicting high-resolution energy consumption counterfactuals.Similar approaches to ours include a study that trained a single-hidden-layer neural network using calendar and weather variables to predict hourly energy use for a hotel (to estimate savings from energy efficiency measures) [63], and the ASHRAE Great Energy Predictor III competition to predict hourly nondomestic energy consumption [64] in which several of the winning entries used neural networks (combined in an ensemble approach).
For this study we tested a range of single-layer neural network models trialling (for simplicity) between 3 and 10 units and decays of 0, 0.01, 0.05, 0.1 and 0.5, using the R package nnet [65] implemented with caret [51].

Extreme gradient boosting
Extreme gradient boosting is a type of ensemble method, which work by learning from and combining the best attributes of many models together.They start with a base learner (the first model) and use an iterative learning process called boosting.We chose to build on the elastic net regression modelling and use a linear base model which is simpler to develop than, for example, decision trees.Boosting learns from training multiple models on re-weighted versions the dataset such that harder-to-predict points take higher weights in later model runs, and the final model is the result of averaging over the set of models [66,67].Extreme gradient boosting ('XGBoost') is one type of scalable boosting technique which improves upon gradient boosting in terms of computational efficiency and in combatting over-fitting [68].It has Linear regression is less susceptible to over-fitting than more complex nonlinear models such as neural networks.
become popular as a regression (and classification) tool, particularly known for its success in Kaggle and other machine learning competitions [68,69].
In recent years XGBoost has proven effective compared with other methods for predicting energy consumption.For example, in Fan et al. [35] XGBoost outperformed six other methods including support vector regression (SVR) and elastic net regression in terms of feature extraction and prediction accuracy for day-ahead building cooling load profiles.XGBoost also outperformed all eight other models including SVR when predicting domestic space cooling in Feng et al. [36], and against five other models in a study exploring household CO 2 emission patterns and the underlying drivers [37].Less conclusively, depending on the metric used, XGBoost performed as well or better than the top three-performing algorithms of seven developed to predict district heating load (showing similar performance to SVR and long short-term memory networks) [38].Given its strong performance for energy demand prediction and predictive modelling more widely, we chose to use XGBoost using the R package xgboost [62] implemented with caret [51] and linear booster 'gblinear'.We set 150 rounds, step size η = 0.1 and tested α and λ in {0, 0.25, 0.5, 0.75, 1}.Depending on the fuel and data granularity (daily or by period of the day), the model took between 2 and 20 hours to run.

Model evaluation
The final model selection process considered monthly error and bias (full details in Appendix C).Table 3 summarises the selected models for each fuel.XGBoost was the dominant algorithm for our sample; the most accurate for 92% of electricity households and 100% of gas households.Predictions for period A (night-time) were often found to have high bias and modelling period A separately reduced error and bias in most such cases.Predicting gas demand during summer was much less accurate than during winter when demand is high, so modelling the summer separately was also trialled for gas models, with frequent success (different definitions of 'summer' were explored).
More models were tested than shown in the table, altering the formula, modelling all periods of the day separately/night-time separately/ all periods together, and for gas using different months in the definition of 'summer' to model separately.Extreme gradient boosting was tested with fewer variations than the other models due to its much longer run time (for example it was not feasible to model all periods separately).
Following our extensive model development and testing process the final models were all well within the guideline accuracy thresholds, and at the sample level mean error (CV(RMSE)) and bias (NMBE) were extremely close to zero (defined in Appendix C).Median CV(RMSE) was 3.86% for electricity counterfactuals and 3.19% for gas (recommended to be <15% [70]).Median NMBE was 0.21% for electricity and − 0.10% for gas (recommended within ±5% [70]), where positive NMBE indicates under-prediction.

Change in total daily energy consumption
Table 4 reports median annual observed energy consumption, counterfactual, and differences between the two.The first 12 months of the pandemic saw much greater increases in use of both fuels compared to the following 12 months, when restrictions were much lighter or removed completely.Only gas saw a decrease in consumption, in 2021/ 22, but only in absolute terms; as a percentage there was a small increase. 7Our estimated median increase in electricity consumption of 8% in the first year of the pandemic is lower than the 17% increase among 21 energy-efficient homes found by Tubelo et al. [6].This could be due to our use of the median rather than the mean (which would be higher, but in our view, less representative of most households), or because our sample slightly over-represents retired households, whose electricity consumption we found (below) to be less impacted by the pandemic.To our knowledge the existing literature does not offer a GB comparison for our result that in year 2 electricity consumption increased by around 2% on average, or for any of our annual gas consumption results.Fig. 2 shows observed and counterfactual average 8 daily energy consumption each month.Observed electricity consumption was noticeably higher than the counterfactual from April 2020 to September 2021, after which observations approximately matched counterfactuals,

Table 3
Summary of selected models and the number of households for which each was the most accurate.*June -September was the "summer" definition used for this particular model.Periods defined in Table 2. roughly coinciding with COVID-19 restrictions ending.Daily electricity demand increased by around 500 Wh (8.9%) during April -June 2020 (~lockdown 1); lower than the 17% increase in electricity demand estimated by Krarti and Aldubyan [7].Note that our analysis accounts for solar irradiance and subtracts solar PV exports (to give net demand), which given the extremely sunny weather during lockdown 1 [4], may be partially responsible for our lower estimate of demand increase.The greatest difference between observations and counterfactuals was during lockdown 3 (January -March 2021) when schools and workplaces were closed during winter, 9 increasing electricity demand by around 800 Wh/day (11.6%).In the final quarter (almost two years on from lockdown 1) electricity consumption was around 100 Wh/day (2.0%) higher than predicted.Gas is predominantly used for space heating in GB and therefore shows much stronger seasonal effects than electricity demand.Lockdown 1 showed no discernible effect on gas demand, as found by Mehlig et al.'s UK study [3] and in a Canadian study by Rouleau and Gosselin [18].In contrast, winter lockdown/restrictive periods showed noticeable increases, with lockdown 3 seeing the greatest increase in gas demand of around 5500 Wh/day (9.0%).This difference implies that the behavioural effects of staying home during lockdowns is seasonal for gas consumption; greater occupancy does not lead to increased heating use when the weather is warm.The increase in gas use did not repeat in winter 2021/22 (after restrictions had ended), with gas demand slightly lower than predicted (~2% lower in Q1 2022).Gas prices had already started to increase at the end of 2021 (before the large increases following the invasion of Ukraine later in 2022) due to utility companies going out of business and their customers being moved onto more expensive tariffs [71,72], which may have played a role in reducing gas demand compared to the counterfactuals.

Comparing weekends and weekdays
During lockdowns we might expect the greatest changes in energy demand to be on weekdays due to the closure of schools and workplaces, but our results paint a somewhat different picture.Fig. 3 compares how energy demand is estimated to have changed10 on weekends and weekdays.We analyse by quarter as there are fewer data points when splitting by weekends/weekdays which reduces monthly model accuracy.
Electricity demand increased by a very similar amount on weekends and weekdays during most of the two-year period; by around 500 Wh/ day in the first 12 months and by 100 Wh/day in year 2 on both weekends and weekdays.
Gas demand also changed similarly on weekends and weekdays; in year 1 gas demand increased by around 1900 Wh/day on weekdays and by 2100 Wh/day on weekends, while in year 2 both day types saw a decrease compared to predictions of around 200 Wh/day.Even in lockdown 3 (the quarter with the greatest absolute difference) gas increased by around 5000 Wh/day on weekdays and by around 6200 Wh/day on weekend days.The reasons for the slightly greater increase on weekends are unclear but may relate to the absence of winter weekend breaks during lockdown, unlike in the previous year.

Within-sample differences in total consumption changes
While Fig. 2    11 Median change is calculated by taking the mean difference between observations and counterfactuals each day of the month for a household, and taking the household sample mean of these mean values.Likewise for the upper and lower quartiles (replacing median with 25% and 75% percentiles).

captured the sample average observation and
Change in gas consumption also varied widely by household.Whilst the lower quartile used the same or less gas than predicted during lockdown 3, the upper quartile increased daily consumption by around 12,000 Wh/day (~12%) compared to counterfactuals.Towards the end of the two-year period gas use was generally lower than counterfactuals, although the upper quartile of the sample were still using at least 4900 Wh/day (8%) more than predicted.We see large percentage increases in summer gas use due to the very low gas counterfactuals (i.e., we divide by very small numbers), so summer gas percentages should be treated with caution (more details about model accuracy in summer in Appendix C).

Presence of children and working adults
The wide range of change in energy use during the COVID-19 pandemic shown in Fig. 4 motivates our subgroup analysis of energy demand change.Households were asked about the number of people in each age and working status category in the SERL survey when they signed up.We split those who responded (493 with electricity data (97%) and 315 with gas data (97%)) into three categories relating to school and work, which we refer to as 'family status': 1. Households with children aged up to 16 years (107 with electricity data, 76 with gas data) 2. Households all aged 17 + years with at least one person in work ( 159with electricity data, 98 with gas data) 3. Households all aged 17 + years with no one in work (227 with electricity data, 141 with gas data).
Fig. 5 shows the average change in daily electricity and gas consumption for each family status category in kWh and as a percentage (calculated in the same way as for Fig. 3).During lockdowns, households with children saw the greatest increase in electricity use, followed by child-free households with adults in work.In the first year of the pandemic, on average, households with children used around 1400 Wh/ day (14%) more electricity than predicted, child-free households with adults in work around 700 Wh/day (8%) more than predicted, and childfree households with no adults in work around 300 Wh/day (5%) more.In year 2, households with children used around 1100 Wh/day (11%) more electricity than predicted, child-free households with adults in work around 200 Wh/day (2%) more than predicted, and child-free households with no working adults used approximately their predicted energy consumption (i.e., a 0% change or return to normal).In Q1 2022 (6 months post-restrictions) households with children were still using around 1100 Wh/day (11%) more electricity than predicted, whereas those without children but adults in work used <300 Wh/day (3%) more, and those with neither adults in work nor children had returned to predicted electricity consumption levels.We hypothesise that they may have bought more electronic devices and appliances during lockdown for home schooling and entertainment that continued to be used, that childcare practices changed and continued with increased home working, and that as children grow older, they naturally used more energy [73].
The results are less clear for changes in gas consumption.In the first year of the pandemic, on average, households with children used around 1000 Wh/day (3%) more gas than predicted, child-free households with adults in work around 2000 Wh/day (5%) more than predicted, and child-free households with no adults in work around 2100 Wh/day (7%) more.In year 2, households with children used around 1000 Wh/day (2%) less gas than predicted, child-free households with adults in work around 700 Wh/day (4%) less than predicted, while child-free households with no working adults were still using around 200 Wh/day (2%) more gas than predicted.Increases were similar across the groups in several quarters, although lockdown 3 saw households with children increasing their absolute gas consumption more than those without.From October 2021 consumption decreased across all groups, with the biggest decrease in October -December 2021 among those households with children.In the final quarter studied (Q1 2022) all household groups were using less gas than predicted (4%, 2% and 1% less for those with children, adults in work, and neither; respectively).
The smaller differences between these groups in terms of change in gas consumption imply that gas use may be more closely related to building characteristics than occupant behaviour.Interestingly, in contrast to their increased electricity use, households with children cut back most on gas use in winter 2021/22.This highlights the potential complex interplay between gas and electricity use.In GB, gas is mostly used for space heating.Most electricity use ends up as heat in a building.If appliance electricity use increases, then the gas heating system will require less energy for a given temperature because in effect the lights and appliances are part-heating the building.

Household financial wellbeing
The SERL survey asked our sample in autumn 2019 "how well would you say you yourself are managing financially these days?Would you say you are…" with five options.We grouped responses as 'high' or 'low' financial wellbeing as follows: • High financial wellbeing: 'living comfortably' or 'doing alright' (360 with electricity data, 227 with gas data); we term these our 'wealthier' households.• Low financial wellbeing: 'just about getting by', 'finding it quite difficult', or 'finding it very difficult' (115 with electricity data, 79 with gas data); we term these our 'less wealthy' households.
This data represents 94% of our electricity and gas households and the results are shown in Fig. 6.Wealthier households were predicted to use 21% more electricity (both years) and 28% or 31% more gas (year 1 or year 2) than less wealthy households on average each year of the Fig. 6.Average change in daily energy consumption each quarter by self-reported financial wellbeing: 'high' (doing well) or low (struggling financially); see text for details including numbers in each category.Boxed yellow shading indicates restriction severity each quarter: dark yellow (national lockdown), pale yellow (restrictions in place), white (no restrictions).(For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)pandemic.The higher energy consumption during 'normal' conditions was then exacerbated during the pandemic, with wealthier households increasing consumption by much more than less-affluent households, particularly during lockdowns 1 and 3 (in both kWh and as a percentage change).
In year 1 of the pandemic wealthier households increased their electricity consumption by around 600 Wh/day (9%) compared to less wealthy households' 300 Wh/day (5%) increase; in year 2 wealthier households used around 200 Wh/day (3%) more than predicted while less wealthy households used around 100 Wh/day (2%) less than predicted.The greatest differences between these groups occurred during lockdowns 1 and 3 with wealthier households using 10% and 16% more than predicted while the less wealthy used around 4% and 8% more in lockdowns 1 and 3, respectively.In Q1 2022 wealthier households were still consuming 500 Wh/day (~7%) more electricity than predicted while the less wealthy were using around 200 Wh/day (2%) less than predicted.We hypothesise that this could be due to wealthier households buying more appliances during lockdown, being more likely to buy electric vehicles, and potentially being more likely to work in sectors where working from home is a possibility (unlike key workers, who were often on lower incomes, such as care workers, delivery drivers, refuse collectors, and supermarket staff).In year 1 of the pandemic wealthier households increased their gas consumption by around 2100 Wh/day (6%) and less wealthy households increased by 1800 Wh/day (6%); in year 2 wealthier households used around 200 Wh/day less (0.5% more) gas than predicted and lesswealthy households used around 500 Wh/day (2%) less than predicted.During lockdown 3 wealthier households increased consumption by more than less wealthy households (5800 Wh/day compared to 4500 Wh/day), but as a percentage of their predicted consumption the increase was lower than for the less wealthy (an 8% increase compared with a 10% increase), because their pre-pandemic use had been higher (and therefore their counterfactuals higher).The following winter (2021-22) both groups used less gas than predicted, and changed their consumption in roughly similar waysa very different picture to the diverging trends in electricity use between these groups.

Dwelling Energy Performance Certificate
Energy Performance Certificates (EPCs) for domestic buildings were introduced to estimate the energy costs (normalised by floor area) associated with comfortably running a home.EPC bands run from A to G, with A-rated homes being the most efficient.We would like to understand whether energy use changed differently depending on EPC band.To ensure all categories included at least 10 households for statistical disclosure control, we combined categories E, F and G.There were no households in the sample in EPC band A and the next smallest category was band B in the gas sample (15 homes).Percentage breakdowns are shown in Appendix A. Fig. 7 shows the average change in daily energy consumption by EPC band.Less efficient dwellings typically increased their electricity and gas consumption (compared to predictions) by more than more efficient dwellings.The trend was less clear in the gas data, with anomalies in some quarters, and similar increases across EPC bands in lockdown 3 (the winter lockdown).
Note that several factors correlate with EPC band which could be contributing to differences between groups, such as income, property size and tenancy.Some bands also have very low sample sizes in our study (particularly in band B (both fuels) and bands E-G for gas).With these caveats in mind, our less efficient homes increased their electricity use by more than the more efficient homes during the first year of the pandemic.In the second year those in band B used less than predicted throughout most of the year, in contrast to the other bands.Band B homes are more likely to have solar panels, which may have offset more of their demand, although if they had solar panels during the model training period the model should have accounted for that.In winter 2021/22 band C-D homes were using more electricity than predicted,

Table A1
Sample breakdowns by various categories where data is available for the electricity and gas home samples and comparable population estimates exist.Some categories have been merged for statistical disclosure control due to low counts.*Excludes regions: North East, North West and Yorkshire and the Humber due to smart meter rollout delays in these areas during initial recruitment.** Census data excludes caravans and mobile and temporary structures as they are not included in our sample.*** Census data uses 66 as the upper age limit rather than 65 years.unlike band E-G homes which returned to counterfactual levels of electricity consumption.Note that band E-G homes are more likely to use electricity and unmetered sources of energy such as oil and coal for heating (due to the way EPC bands are determined).We would expect to see a stronger trend in the gas analysis, as heating requirements should be more strongly related to EPC rating.That said, recent analysis has shown that the energy use in EPC bands C, D, F and G typically do not reflect the energy use predicted by EPCs, and the average energy use between these bands is very similar [74].Fig. 7 reveals that dwellings in bands D-G increased gas use by more than those in bands B and C during October 2020 -March 2021 (including the winter lockdowns).The following winter in the absence of restrictions bands E-G showed a greater (kWh) reduction in gas consumption than the more efficient homes (compared to their counterfactuals).Indeed, in January -March 2022 homes in bands E-G used 7.2 kWh/day less than predicted (14.0%less), while band C homes (those with the next greatest reduction) only reduced gas use by 1.7 kWh/day (3.7%).It is possible that these households may have been underheating them due to rising gas prices, coupled with the relatively higher costs of keeping less efficient homes warm.These results support the growing body of evidence for greater investment in insulating homes and supporting energy efficiency measures.However, also see the above note about unmetered energy use and electrical heating and note that this is a relatively small sample size of 25 E-G-rated homes.

Learnings from the counterfactual modelling process
Major events such as the COVID-19 pandemic can have substantial impacts on our day-to-day lives, from the loss of loved ones and the effects of Long COVID, to changes in how and where we work, school, shop, and travel.Measuring the impacts of such events on energy consumption is rarely straightforward.In the absence of an entirely unaffected control group, we require longitudinal datasets for pre-and postevent comparisons, longitudinal observations, or for training counterfactual models.Each approach brings its own advantages and complexities.To study change in total daily demand we developed counterfactual models using historic smart meter and weather data for each household.This allowed us to effectively account for weather, time of the year and day of the week when creating counterfactuals.Weather variables are particularly important to consider due to their potential to decrease (in the case of solar irradiance) or increase (rainfall and colder conditions) domestic energy consumption [49].Whereas other studies assumed identical weather conditions to previous years/seasons, we used weather variables in the predictive models to avoid misattributing the cause of weather-related changes in energy demand.While more complicated than other types of analysis, it gave us a robust approach for predicting demand over two years, in a way that simple historic comparisons cannot.An important caveat with this approach is that household circumstances may change between the training period and end of the prediction period in ways unrelated to the pandemic.For example, changes unrelated to the pandemic, such as the number of occupants, pets, and people working, the acquisition of new appliances and technologies such as electric vehicles and heat pumps, improved energy-efficiency measures such as added loft insulation or new windows, and extensions.Therefore, our confidence in and the validity of the counterfactuals reduces moving forward in time.While crossvalidation is useful for selecting the best models, and our training/ testing error and bias measures give us confidence that our model is well within recommended guidelines, we do not provide confidence intervals with our counterfactuals, because the model uncertainty over time is unknown.We are reassured that our counterfactuals imply reasonable results that, on the whole, align with our prior beliefs about the pandemic and the changes in lockdown 1 estimated in other studies, however, we cannot say for certain that all differences between counterfactuals and observations are due to the pandemic and resulting restrictions.
The counterfactual model development process gave new insights into predictive energy modelling.Extreme Gradient Boosting was the most effective model for most households in the sample; a method which is relatively untried in the area of energy modelling, compared to neural networks and support vector machines.Modelling the night-time period separately reduced overall error and bias because night-time demand has such a different relationship with weather and calendar variables compared to daytime demand.For gas we found it useful to model summer separately from the rest of the year for some households, as the infrequent use of heating meant one model for use in winter and summer was less effective.Additionally, although modelling each household separately is far more computationally intensive, it allows for different relationships between predictor and outcome variables for different households, without requiring the inclusion of variables that may partially explain differences between households (for example a regression with all households might use floor area and number of occupants as predictor variables).This unique approach meant that the final predictions were created using a range of algorithms, with simpler models showing greater accuracy for some households.

Limitations
As discussed above, there are limitations to consider when interpreting these results.Due to the timing of the pandemic, sample sizes were much lower than the full SERL sample and do not fully represent the wider population.We are aware that the samples tend to overrepresent households in Wales, more efficient households, and households comprising retired couples [44].Gas results during summer, though not relevant for our findings, must be treated with caution due to the low levels of gas use which when divided by for percentage changes, can show misleadingly large differences between groups or months.The EPC analysis suffers from small sample sizes in each band grouping.Finally, the further from the training period (pre-February 2020), the more results in a given month/quarter must be treated with caution.

Implications and further work
Despite the huge impact of the pandemic and resulting lockdown restrictions our results showed relatively small sample-average changes in electricity and gas demand.Even during the winter lockdown when schools and workplaces were closed, on average electricity only increased by 12% and gas by 9% compared to counterfactuals.Of course, some households did increase their consumption by much more, and daily consumption does not show the whole picture.Forthcoming analysis by Pullinger et al. [75] found significant changes in demand profiles; indeed a key part of the pandemic was the within-day shifting of demand rather than large increases overall in the general population, many of whom continued to go out to work, or whose lives in retirement saw smaller day-to-day changes.While most of the drivers of energy consumption during the pandemic ended with or following the lifting of lockdown restrictions, some factors may continue to play a role going forward.Households with children or working adults and wealthier households were still consuming more electricity than predicted at the start of 2022 -potentially due to the persistence of greater home working [76] and/or the use of new appliances and devices bought during the pandemic [77,78].If national lockdowns were to recur in future, this analysis highlights the vulnerability of particular groups to increased energy costsin particular households with children, and those in less-efficient dwellings.During winter, those struggling financially are likely to see a greater percentage increase in their gas demand than wealthier households, which could increase the prevalence of fuel poverty.
The approaches employed here can be applied to estimating the impact of other events or interventions.We have shown the value of developing household-level counterfactual models to individually tailor the relationship between weather, calendar, and energy consumption variables, which overcome challenges such as unusual weather patterns compared to a simpler time-period comparison method.The authors plan further work to study the impact of the cost-of-living crisis in GB using similar techniques.

Conclusions
This paper assessed the impact of COVID-19 on domestic electricity and gas consumption in England and Wales over two years (April 2020 -March 2022).Machine learning counterfactual (predictive) models were (RMSE) (error) and NMBE (bias).
For each household we are looking for a counterfactual model with low error and low absolute bias.However, since we are interested in monthly and quarterly analysis of the impact of COVID-19 over time, we also considered the error and bias in each month of the year.Accurately predicting summer demand was particularly difficult for the gas models, since heating is rare and total gas use very low (so dividing by y gives high error and bias).To select the final counterfactual model to be used for each household, we first removed any model with CV(RMSE) > 15% or |NMBE| > 5%, removing < 10 households for each fuel from the analysis.Then we selected the model with the lowest mean CV(RMSE) over all months.In some months gas use was zero which meant CV(RMSE) would be infinite.Therefore if y = 0 and ∑ ( y i − ŷi ) 2 = 0 or ∑( y i − ŷi ) = 0 (~perfect predictions), we set CV(RMSE) = 0 or NMBE = 0, respectively.If y = 0 and ∑ ( y i − ŷi ) 2 > 0 (infinite error) we removed the month from the monthly accuracy analysis (we took the mean of all other months), and likewise for NMBE if ∑( y i − ŷi ) ∕ = 0. Fig. C.1 shows the distribution of error each month for the best (selected) model for each household by way of boxplots.While we were able to reduce error in summer predictions considerably for gas by modelling summer separately for some households, the error is still higher than in winter, because consumption values are much lower, and so as a percentage a small difference is much bigger.March was the one month we didn't require training data for as it reduced the sample size considerably, and was excluded from the 2020 analysis, so for some households there was limited data for training and testing in March, and therefore higher error.

E
. Zapata-Webborn et al.   already affecting life in GB in March 2020.Data before April 2019 was also included for model training and validation where available.The counterfactual period was taken to be 1st April 2020 to 31st March 2022 to allow for full-month analysis over two years.Households were filtered from the dataset that did not have at least 15 days' valid data in every month in the training and counterfactual periods.Electricity demand was calculated as the net consumption data (imports minus any exports (for those with solar PV, for example)).Gas demand measured in cubic

Fig. 1 .
Fig. 1.Research framework of this study.For each fuel, each household's data is processed, and the counterfactual models developed separately.Once the counterfactuals have been developed the data is combined for sample and subgroup analysis.Training data dates back to at least April 2019; earlier where available.Acronyms: EPC (Energy Performance Certificate), CV(RMSE) (Coefficient of Variation of Root Mean Squared Error), NMBE (Normalised Mean Bias Error), IQR (Interquartile range).

Fig. 2 .
Fig. 2. Monthly average daily electricity and gas consumption (observed and counterfactual) in kWh (508 electricity households, 326 gas).See text for average calculation details.Shading: dark yellow (national lockdown), pale yellow (restrictions in place), white (no restrictions).(For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Fig. 3 .
Fig. 3. Median estimated change in mean daily energy demand (kWh), comparing weekends and weekdays (508 electricity households, 326 gas).Boxed yellow shading indicates restriction severity each quarter: dark yellow (national lockdown), pale yellow (restrictions in place), white (no restrictions).(For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Fig. 4 .
Fig. 4. Median, 25th and 75% percentile average change in daily energy consumption (508 electricity households, 326 gas).Change = observations minus counterfactuals, see text for average calculation details.Shading: dark yellow (national lockdown), pale yellow (restrictions in place), white (no restrictions).(For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Fig. 5 .
Fig. 5. Average change in daily energy consumption each quarter by 'family status'; see text for details including numbers in each category.Boxed yellow shading indicates restriction severity each quarter: dark yellow (national lockdown), pale yellow (restrictions in place), white (no restrictions).(For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Fig. 7 .
Fig. 7. Average change in daily energy consumption each quarter by Energy Performance Certificate (EPC) band; see text for details.Boxed yellow shading indicates restriction severity each quarter: dark yellow (national lockdown), pale yellow (restrictions in place), white (no restrictions).(For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Fig. C1 .
Fig. C1.Coefficient of the Variation of the Root Mean Square Error (CV(RMSE)) each month for the best-performing models.Boxes show the median and interquartile range for the sample, vertical lines extend to the 5th and 95th percentiles.Error increases in summer for gas models as consumption is very low.March had a lack of training and testing data causing large errors for a small proportion of households.ASHRAE guidelines recommend monthly bias < 15%.

Fig. C2 .
Fig. C2.Normalised mean bias error (NMBE) each month for the best-performing models.Boxes show the median and interquartile range for the sample, vertical lines extend to the 5th and 95th percentiles.Gas models tend to underpredict in summer when consumption is very low.March had a lack of training and validation data causing large bias for a small proportion of households.ASHRAE guidelines recommend monthly bias within ± 5%.

Fig. C3 .
Fig. C3.Overall mean monthly model error (measured with CV(RMSE)) and bias (NMBE).Dashed lines show the ASHRAE guideline threshold for acceptable accuracy/bias.Boxes show the median and interquartile range for the sample, vertical lines extend to the 5th and 95th percentiles.

Fig. C. 2
shows the mean bias each month for the final models.NMBE < 0 (as is more often the case for gas and in March for electricity) implies the model overpredicts the true values.This means that any results for summer gas use are more likely to be underestimating an increase in demand due to COVID-19.Fig. C.3 shows box plots for the test error and bias of each household's final (selected) model error and bias.Dashed lines indicate the ASHRAE guideline thresholds.Due to statistical disclosure control (SDC) we are unable to show outliers or exact percentiles (instead showing the mean of the 10 closest points to the true percentile).Following our extensive model development and testing process the final models are all well within the guideline accuracy thresholds, and at the sample level mean CV(RMSE) and NMBE are extremely close to zero.Median CV(RMSE) is 3.86% for electricity counterfactuals and 3.19% for gas.Median NMBE is 0.21% for electricity and − 0.10% for gas.Note that positive NMBE indicates under-prediction.

Table 1
[39][40][41]kdowns and periods with lockdown-related restrictions in England and Wales.In some cases, dates are approximate where lockdowns ended gradually, or dates differed between the two countries.In our figures (Section 3) we indicate lockdowns 1-3 with dark yellow shading and local lockdowns/other restrictions with pale yellow shading.Lockdown information from[39][40][41].
3Note: neither the European Commission nor the European Centre for

Table 2
Definitions of each period of the day, used as the input data time resolution by some models.
5Gas volume (kWh) = Gas volume (m 3 ) * 1.02264 * calorific value / 3.6 and we used a calorific value of 39.5 MJm − 3 .6Overfittingis when a model fails to generalise to new data because it has become too closely aligned to training data and missed the general trends.

Table 4
Average annual totals and percentage change of the sample (sample median of observed, counterfactual and observed minus counterfactual (change) energy consumption for each 12-month period (April -March).
7Mathematically this is explained by households with observations < counterfactuals (decrease) had larger counterfactuals than those that saw an increase, and so their percentage change was lower in absolute terms, leading to a positive sample average percentage change.8Unlessstatedotherwise, 'average' refers to an approximation of the sample median, as the mean can be skewed by outliers.Note that medians and other percentiles here are always the mean of the 10 closest values to the true percentile, to prevent disclosing a value created by a specific household, due to best-practice statistical disclosure control protocols.E.Zapata-Webborn et al.