API

Data retrieval

UKCarbonIntensityData.get_regional_dataFunction
get_carbon_intensity(start_date::ZonedDateTime, end_date::ZonedDateTime)

Returns a NamedTuple with two fields named intensity and generation. Both tables contain data spanning the period defined by the start_date and end_date. the intensity field contains a dataframe of the forecast data of the regional carbon intensity, and the generation field contains a dataframe of the regional generation as a percent of the total generation.

source
UKCarbonIntensityData.get_carbon_intensityFunction
get_carbon_intensity(start_date::ZonedDateTime, end_date::ZonedDateTime)

Returns a DataFrame of the nationwide forecast and actual carbon intensity between the given start_date and end_date.

source
UKCarbonIntensityData.get_todays_forecastFunction
get_todays_forecast(;regional::Bool=false, region::AbstractString="")

Returns a DataFrame of the forecast and actual carbon intensity between for the 48 hours of the day the query is called. By default return national level data, pass regional=true to return data with regional spatial resolution. To retreive data for a single region, pass the region = <desired region> where <desired region> must be included in the the AVAILABLE_REGIONS.

source

Plot Recipes

UKCarbonIntensityData.todays_plotType
todays_plot(; region = "")

Plot the 48 forecast for the carbon intensity starting from midnight on the day that the function is called. By default shows the national forecast. If the region kwarg is a valid region, then plot data for this region only. Valid regions are contained in AVAILABLE_REGIONS.

source

Mappings