DataScience

What are the impacts of reducing the carbon intensity of electricity?

Aims

We need electricity. We also need clean air to breathe. Electricity has historically been generated primarily from fossil fuels, resulting in billions of tonnes of CO2 in our atmosphere - the amount of CO2 produced per unit of electricity generated is its ‘carbon intensity’. To minimize this, most nations have made serious efforts to adopt renewable technologies to ‘decarbonize’ their electricity. This project aims to provide a background to carbon intensity, the impacts a reduction might have, and a way we can all help.

Background

As highlighted above, renewable energy sources emit minimal CO2, and are generally rather cheap, providing strong rationale for a movement towards more sustainable electricity. The underlying CO2 emission data and cost data was scraped here.

Since 1985, the UK has made significant process adopting more renewable electricity sources. The underlying CarbonBrief data was cleaned here . The cleaning process involved filtering the data and stacking and unstacking the dataframe around an index of three columns to transform it into long data. This data can be replicated for any country within this dataset if you input its country code in the script.

We can see that the UK’s reduction in carbon intensity since 1985 has been mirrored by other countries around the world. The cleaning process involved manually changing names in my data to match the topojson country names (i.e US to USA) and performing a data join in Vega. When adding the slider to filter by year, initially it had no effect, and would only show data from one year. I was able to overcome this by changing the lookup transform to include fields I wanted, and by inverting the main (csv) and lookup (topojson) data.

Has it worked?

To see whether decreasing carbon intensity has been associated with better air quality, I have regressed the percentage of electricity generated by renewables on air quality in the top 50 countries by GDP, showing a negative correlation. Air quality data is from the WHO and the carbon intensity data is the same as before. Having created one dataframe, I wanted to automate the filtering by GDP. I did this by scraping data for the top 50 countries, and turning this into a list which I could use to filter the original dataframe.

In the UK, an increase in the percentage of electricity generated from renewables is correlated with a reduction in CO2 emissions per capita, although it should be noted that this effect is likely inflated due to simultaneity bias and OVB. Regression performed here

The UK has enjoyed decreasing CO2 emissions since 1990 as shown by the green wedge; this chart is my attempt to identify how much of this decrease can be explained by a shift to more renewable electricity generation. To do this, I first performed a simple projection of emissions in the UK, holding the electricity generation mix and CO2/capita fixed at 1985 levels, and adjusting for population growth. This is the top line of the area chart. The blue wedge shows the reduction in emission attributed to an increase in renewable energy, and the purple section is all other factors. In 2018, roughly 31% of the reduction in emissions could be attributed to greener electricity production. Data was cleaned and a more thorough explanation behind my calculations is here.

An easy way to help

This chart shows an API developed by carbonintensity.org. predicting the carbon intensity of the national grid 48 hours in advance. Currently, renewable energy can only be used as it is being generated. When demand for electricity outstrips the amount being produced renewably, the National Grid uses other storable energy sources (fossil fuels) to match this demand. By using electricity at times when demand is low, then we can reduce the amount of fossil fuels needed to supplement electricity generation. That means try to only charge your phone at night!

For this particular API, to chart data between certain dates in Vega, you had to manually input these dates, meaning the chart didn’t auto-update. To solve this, I hacked the URL in JavaScript, changing the dates to ‘today’s date’ +/- 2 days. I then loaded in the Vega-Lite specification directly into my project.html file, changing the URL data to this new auto-updating URL. You can see this (+ a better explanation) here .

Conclusions

Yes – we should care, and we should continue to adopt policies encouraging renewable electricity generation. Further work can be done to improve my projection of UK emissions and to identify the reduction of CO2 emissions attributable to a greener electricity mix. Further work could also use the carbon intensity API for specific companies / institutions to identify when might be a good time to run their electricity intensive processes.