Mapping custom identifiers to Climatiq emission factors

Perhaps the most important step in any emission calculation exercise is the selection of the right emission factor to use for a given emission-generating activity. This often means a laborious process of identifying the right emission factor for each category of activity before getting started with estimations. Typically that mapping information is then put in a spreadsheet somewhere, and is often difficult to find once an initial implementation is complete. Climatiq solves this problem with the Custom Activity Mapping tool, available in the Climatiq dashboard. This tool allows Climatiq users to map any identifier they choose to a Climatiq activity ID, which can then be used to make estimates via the Custom Activities endpoint.

This means that there is a persistent place within the Climatiq ecosystem where your activity to emission factor mapping is saved and can be updated at any time, without changing a line of code. Each of your projects can be mapped differently, affording you plenty of flexibility.

Let’s take a look at how it works.

To get started on your custom map, simply log in to the Climatiq dashboard and browse to Activity Mapping on the sidebar.

Activity mapping menu icon

Once there, you can click on the “Add new activity button to perform your first mapping.

Add new activity button

This will add a line to your mapping table. Simply put the label you would like to use in to the “Activity label” field, and then the Climatiq activity ID you want to use for this activity into the “Emission Factor ID” field and click “Save”.

Empty activity mapping

If for example, your accounting software has a category called “IT Equipment” and you’d like to automatically map that to a corresponding emission factor without changing anything in your accounting software or associated code. You would then write “IT Equipment” into the “activity label” field and go find the right emission factor for this activity in the Climatiq Data Explorer, then copy it into the Activity ID field in the Activity Mapping tool.

Complete activity mapping

Click save, and we’ve mapped our first emission factor! Then to prepare for our first query, click “Publish to API”. You might need to wait a minute or two before the changes take effect.

Now that we have an emission factor mapped to a custom activity label, we can use that label in the Custom Activities endpoint to perform emission estimations. For this exercise, we will take as our example “activity” a laptop computer purchased in Germany.

curl --request POST \
--url https://beta3.api.climatiq.io/custom-activities/estimate \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data
{
"custom_activity": {
"label": "IT Equipment",
"region": "DE"
},
"parameters": {
"money": 1099,
"money_unit": "eur"
}
}'

And you will get the following response back.

{
"co2e": 233.0979,
"co2e_unit": "kg",
"co2e_calculation_method": "ar5",
"co2e_calculation_origin": "source",
"emission_factor": {
"activity_id": "office_equipment-type_office_machinery_computers",
"uuid": "382cc9d8-2380-4dc3-8a61-a85cd6146042",
"id": "office_equipment-type_office_machinery_computers",
"access_type": "public",
"source": "EXIOBASE",
"year": "2021",
"region": "DE",
"category": "Office Equipment",
"lca_activity": "unknown",
"data_quality_flags": []
},
"constituent_gases": {
"co2e_total": 233.0979,
"co2e_other": null,
"co2": null,
"ch4": null,
"n2o": null
}
}

This tells me that 233.1 kgCO2e were emitted as a result of this purchase. So now every activity defined as "IT Equipment" will correctly map to the right emission factor, and if it is available across geographies etc. nothing needs to change. So if, for example, another laptop was purchased in the UK for £999 it is simply a matter of changing the region code to “GB”, the money value to 999 and the currency to “gbp” to receive an estimate.

We’ve shown you how you can map your own custom identifiers to activity IDs, allowing you to set up and maintain a taxonomy of activities without ever needing to change a line of code, or manage mappings in a spreadsheet or other tool.

Please do get in touch with any issues you encounter or ideas you have for improvements.