en
Get Started

CO2 Converter

Convert electricity consumption into co2 emission based on the carbon intensity of the location and date.

Plugin information

Version 1.0.0
Author Dataiku (Romain Menini)
Released 2022-01-07
Last updated 2022-01-07
License Apache Software License
Source code Github
Reporting issues Github

Description

This plugin allows you to convert electricity consumption into co2 emission based on the carbon intensity of the location and date.

Setup

From the plugin menu, click Add Plugin and Fetch from git repository and paste this url: https://github.com/dataiku/dss-plugin-co2

Detailed instructions on how to install a plugin can be found here.

A dedicated code environment is required for this plugin, with pandas 1.0. 

Two data providers are compatible with this plugin (RTE or Electricity Map). For more details on how to use the different data suppliers, please refer to the ‘Data providers’ section of this page. If using an Electricity Map, once you have your token, go to Plugin > CO2 Converter > Settings > ElectricityMap API Configuration > + Add preset.

How to use

This plugin adds a recipe to the flow in which you need to specify a Date column and an electricity consumption column:

You’ll also need to specify an API provider. Once the API provider is set up, the plugin automatically queries the API based on the date range from the input dataset, to avoid making too many requests. Also, due to electricityMap API limitations, it creates chunks of 10 days for this data provider. Since electricityMap requires latitude and longitude columns, it allows multiple locations in the same input dataset. If you are using Electricity Map you will need to use a previously configured plugin preset before specifying the latitude and longitude columns of your dataset

  • Finally, run the plugin recipe to retrieve the closest carbon intensity from your location. The recipe outputs a dataset that appends 3 new columns to the input dataset:
    co2_date_time (closest date available from the API provider. It may be interesting to use metrics & checks  to check the difference between the requested and provided dates.)
  • carbon_intensity (gCO₂eq/kWh)
  • co2_emission (kgCO₂eq)

Data providers

RTE

This data provider is free but only covers France. you don’t need to specify any other information to use it.

ElectricityMap

This data provider is a paid one so you’ll need to request an API token using the contact form. Before that, make sure the location you want to retrieve the carbon intensity from is covered on the ElectricityMap app.