Want to know more?
Find out more about how Energy Systems Catapult can help you and your teams
Get in touch
Want to know more?
Find out more about how Energy Systems Catapult can help you
I’ve recently been working with the Carbon Intensity API, and I thought it might be worth sharing a few learnings. Let’s dive straight in.
Have you ever wondered how much carbon it takes to generate the electricity you’re using right now? Well now you can find out. The Carbon Intensity API tells you how much carbon it took to produce each unit of electricity (the ‘carbon intensity’) in any given half hour for any location in Great Britain. It can even give you a forecast.
Who’s Behind It? National Grid ESO, the University of Oxford Department of Computer Science, and the WWF teamed up. Their mission? To allow scheduling and minimisation of CO2 emissions.
Who can use it? Reading the terms, it seems like anyone can use the data for almost any use. Obviously, there are the usual restrictions of not using the API to break the law, but other than this, the main restrictions are not to sell access to or reproduce the API yourself.
Although it can also be used for forecasts, I used the API to calculate historic, time-of-use carbon emissions. Pairing the API with half-hourly energy use data, this is straightforward and comes with three main benefits over using national conversion factors.
Simplicity: The API gives you a single, programmatic source for carbon intensity figures going back years. No need to reference multiple spreadsheets or CSVs.
Figure 1: Example python code snippet of simple API call with received response in json format.
Time-of-use transparency: Electricity is kind of moody—it’s generally cleaner when it’s windy, sunny or during times of low demand, like at night. It’s dirtier at peak times and on cloudy, still days. With half-hourly data, we can easily account for this. Thanks to the API, we can pinpoint CO2 emissions based on when you switch on that kettle. Taking time-of-use into account, you get credit for only consuming when the grid is green, whereas using average figures assumes the same intensity for use at all times of day, and throughout the year. You can get an instant look at the live energy mix on energydashboard.co.uk, they use the API for their carbon intensity numbers.
Figure 2: API call URL adapted for specific datetime range of data and response received.
Location, location, location: Regional carbon intensity varies. For example, Scotland’s wind turbines often produce significant proportions of the region’s electricity, meaning theirs is often the greenest electricity in GB. Using national figures would unfairly treat usage in the highlands as causing the same emissions as usage in more polluting areas. Again, this API makes it easy to account for this. For a better visual understanding of how generation varies across GB see the map on energydashboard.co.uk.
Figure 3: API call URL for specific region specified by outer postcode (outcode) and response received.
Figure 4: API call URL for regional data for a datetime range. Response given for all regions is too long to include here but resembles the response shown in figure 3.
It is important for users to have easy access to carbon intensity data, granular to time and location. The Carbon Intensity API provides this data for free, in a fast and simple way.
Carbon Intensity API example code
To download this file, we would be grateful if you could tell us a little about yourself.
We use this information for internal research purposes to help us better understand which energy sector stakeholders are interested in which areas of our work. We do not share your details with any third parties.
If you do not wish to complete the form, please email communications@es.catapult.org.uk to request a digital copy.
Independent thought leadership and practical expertise that harnesses digital and data innovation to tackle the hardest challenges on the way to Net Zero.
Find out moreFind out more about how Energy Systems Catapult can help you and your teams
Find out more about how Energy Systems Catapult can help you