Carbon Calculator

This endpoint returns the carbon emissions and abatement data as shown on Enact's carbon calculator page. The endpoint will take a maximum of a years worth of data at a minimum of settlement-period granularity.

Using the LCP Delta Python Package

The Python package provides the simplest interface for this endpoint. To use it, pass a pandas DataFrame containing the following required columns:

date_time_utc – The timestamp of the half-hour period (string or datetime), in UTC.

dynamic_frequency_response_credited_volume_mw – Credited MW volume for Dynamic Frequency Response.

total_credited_volume_mwh – Total credited MWh for the period.

These columns must follow the data definitions described in the Carbon Calculator documentation.

Synchronous

from lcp_delta import enact
import pandas as pd

enact_api_helper = enact.APIHelper(username, public_api_key)

response_dictionary = enact_api_helper.get_carbon_emissions(
	df
)

weekly_df = response_dictionary["weekly"]
monthly_df = response_dictionary["monthly"]
period_metrics_df = response_dictionary["period_metrics"]
full_range_metrics_df = response_dictionary["full_range_metrics"]

Asynchronous (package version 1.3.0 and later)

from lcp_delta import enact
import pandas as pd
import asyncio

async def main():
  enact_api_helper = enact.APIHelper(username, public_api_key)

  response_dictionary = await enact_api_helper.get_carbon_emissions(
    df
  )

  weekly_df = response_dictionary["weekly"]
  monthly_df = response_dictionary["monthly"]
  period_metrics_df = response_dictionary["period_metrics"]
  full_range_metrics_df = response_dictionary["full_range_metrics"]

asyncio.run(main())

Using the API directly

The endpoint expects a single object containing a list of timestamped data points. as described below and shown in the example.

You can supply a maximum of one row per settlement period.

The API returns four tables, each using a consistent structure as demonstrated below.

Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!