Comparing 1st and 2nd lockdown using electricity consumption in France

[This article was first published on Macroeconomic Observatory - R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

The health and economic crisis is of unprecedented scale and speed. To measure it, high frequency data are used, complementary to traditional data. We focus on electricity consumption from ENEDIS data, available on DBnomics, through the rdbnomics package. All the following code is written in R, thanks to the RCoreTeam (2016) and the RStudioTeam (2016).

plot of chunk unnamed-chunk-4

plot of chunk unnamed-chunk-5

Data shows under-consumption of electricity in the spring and over-consumption of electricity in the fall of 2020.

plot of chunk unnamed-chunk-6

But variations in electricity consumption seem to be correlated with temperatures variations.

plot of chunk unnamed-chunk-7

We then look at electricity consumption by customer category.

plot of chunk unnamed-chunk-8

plot of chunk unnamed-chunk-9

Residential electricity consumption appears to capture a significant portion of the variations due to temperature.

plot of chunk unnamed-chunk-10

Large enterprises and SMEs experienced a net decrease (-20% and -27% respectively) during the 1st lockdown. The 2nd lockdown mainly impacts the electricity consumption of SMEs (-18% on average in November), even if large enterprises are also affected (-6% on average).

Useful links :

  • Retrieve all the data on DBnomics

  • Reproduce and update the presentation with the code here

  • High frequency data are available on DBnomics thanks to a partnership between Banque de France, Cepremap and OECD


R Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria, 2016. URL:

RStudio Team. RStudio: Integrated Development Environment for R. RStudio, Inc., Boston, MA, 2016. URL:

To leave a comment for the author, please follow the link and comment on their blog: Macroeconomic Observatory - R. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)