Data Explorers newsletter no. 11
Kia ora koutou
It feels like a long time since I wrote one of these newsletters, partly because it is a long time, and partly because … I don’t really need to say, do I?
Just in case you forgot, I’m Aaron Schiff, a consulting data scientist and economist, and this is my (very irregular) email newsletter. I promise you weren’t added to this list for some unscrupulous reason – the only way to get on it is to subscribe on my website.
This was a wet and wintery week in Auckland, but I’m feeling very grateful for how we in Aotearoa have dealt with COVID over the past few months. One of the challenges we face now is uncertainty about the ongoing economic and social effects. Headline economic statistics like GDP growth and unemployment rates help to provide the big picture but only show what was happening months ago. Higher-frequency indicators usually only give us a narrower view of what is happening but are more timely. For example, Stats NZ has made a dashboard of higher-frequency indicators that shed some light on current economic activity. Sense Partners has something similar in a PDF report.
Electricity as an indicator
I’ve spent a little time analysing electricity consumption data as an indicator of very short term economic activity. There are some problems with this—an open but deserted shopping mall might use almost as much electricity as a busy one—but New Zealand electricity consumption data is available daily (or even half-hourly if you want) with only one day’s delay. You can get it from the Electricity Authority’s awesome Electricity Market Information website.
Daily electricity consumption varies a lot depending on things like whether it’s a weekday, weekend or public holiday, the seasons, and weather conditions. Even after aggregating days to weeks, there is still a lot of variation. Here’s a chart of weekly national electricity consumption from 2010 up to the end of February 2020. As well as the weekly variation, there seems to be an underlying trend which was decreasing up to around 2016, then increasing (see the blue line that I’ve added).
To investigate the effects of lockdown on electricity consumption, we need to compare electricity consumption in the past few months with what it would have been in a business-as-usual scenario. To do this I trained a fairly simple statistical model that predicts weekly national electricity consumption based on the historic data from 2010 up to the end of February 2020. I then compared the predictions of that model with actual weekly electricity consumption in 2020. Technical details of this model are below if you’re interested.
The chart below shows the difference between my model’s predictions for each week in 2020 with actual electricity consumption, in percentage terms. I’ve shown 60%, 80% and 95% confidence bands, reflecting the uncertainty associated with the model’s predictions of business-as-usual electricity consumption in each week. Based on this, the Level 4 lockdown reduced weekly electricity consumption by something in the vicinity of 15%. Then in Level 3 we were somewhere around 5% below normal, and in Level 2 we are around normal or perhaps slightly above. So at least in terms of electricity consumption, the lockdown had a significant impact but only for five or six weeks, and the early signs for recovery are positive. Though as I said, caveats apply for translating this into changes in economic activity.
Where to from here?
I’m probably stating the obvious but for the next year or so we’re most likely faced with a wave of distressed businesses and job losses, massive disruption to international travel, and recessions in our major trading partner countries. On top of that, there seem to be temporary and perhaps permanent changes in people’s preferences for things like travel, working in offices, and eating out. Responding to these changes will require economic resources to be re-allocated and while some people and businesses will benefit from new opportunities, many others will suffer. To cope with this it will help if we can be flexible, monitor and evaluate what works and what doesn’t, and change our strategy based on evidence.
The code and the data for my little electricity model are here. I used the excellent fable package for R to train an automated ARIMA model of weekly national electricity consumption with explanatory variables for the week of the year, the number of public holiday days in the week, whether the week had a leap day in it, and a simple piecewise linear trend with a break in 2016. The model was trained using weekly electricity consumption data from 2010 up to the end of February 2020 and the chart below shows the percentage errors of the model’s predictions in that period. Overall the model fits reasonably well, but there are a few weeks with relatively large errors and some apparent ‘runs’ of positive and negative errors, so there’s probably room for improvement that could make the model’s estimates more accurate.
Who am I?
I’m an independent consulting data scientist and economist who helps businesses and governments make decisions, plan for the future, and reflect on the past. Most of my work is quantitative and involves evaluation, forecasting, data visualisation, and general statistical and econometric analysis. I use R and I work with all kinds of data – big data, small data, geographic data, survey data, economic data and data that has nothing to do with economics. I’m good at turning complicated data analysis into words and graphs that people can understand. Drop me a line if you need help with any of these things.
+64 9 336 1323