diff --git a/dev/api/index.html b/dev/api/index.html index ad0629a..726ba05 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,2 +1,2 @@ -API · UKCarbonIntensityData.jl

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

+API · UKCarbonIntensityData.jl

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

diff --git a/dev/index.html b/dev/index.html index c931733..d5ca4c7 100644 --- a/dev/index.html +++ b/dev/index.html @@ -13,259 +13,259 @@ regional_intensity = regional_data.intensity; regional_mix = regional_data.generation; display(first(regional_mix))

Todays forecast

We can also grab the forecast data for the next 48 hours, at both national or regional levels.

national_data = get_todays_forecast()
-first(national_data)
DataFrameRow (5 columns)
Rowfromtoforecastactualindex
DateTimeDateTimeAnyAnyAny
12024-12-26T23:30:002024-12-27T00:00:00184162moderate
regional_data = get_todays_forecast(regional = true)
-first(regional_data)
DataFrameRow (8 columns)
Rowfromtoshortnamednoregionregionidgenerationmixforecastindex
DateTimeDateTimeAnyAnyAnyAnyAnyAny
12024-12-26T23:30:002024-12-27T00:00:00North ScotlandScottish Hydro Electric Power Distribution1Any[Dict{String, Any}("fuel"=>"biomass", "perc"=>1.3), Dict{String, Any}("fuel"=>"coal", "perc"=>0), Dict{String, Any}("fuel"=>"imports", "perc"=>1.8), Dict{String, Any}("fuel"=>"gas", "perc"=>2.6), Dict{String, Any}("fuel"=>"nuclear", "perc"=>17.4), Dict{String, Any}("fuel"=>"other", "perc"=>0), Dict{String, Any}("fuel"=>"hydro", "perc"=>3.9), Dict{String, Any}("fuel"=>"solar", "perc"=>0), Dict{String, Any}("fuel"=>"wind", "perc"=>72.9)]12very low

Plotting Data

This package also exports some recipes to plot the data. Below shows how we can retrieve the 48 hour forecast data, for the nation as a whole,

todays_plot()
+first(national_data)
DataFrameRow (5 columns)
Rowfromtoforecastactualindex
DateTimeDateTimeAnyAnyAny
12024-12-27T23:30:002024-12-28T00:00:00189165moderate
regional_data = get_todays_forecast(regional = true)
+first(regional_data)
DataFrameRow (8 columns)
Rowfromtoshortnamednoregionregionidgenerationmixforecastindex
DateTimeDateTimeAnyAnyAnyAnyAnyAny
12024-12-27T23:30:002024-12-28T00:00:00North ScotlandScottish Hydro Electric Power Distribution1Any[Dict{String, Any}("fuel"=>"biomass", "perc"=>0), Dict{String, Any}("fuel"=>"coal", "perc"=>0), Dict{String, Any}("fuel"=>"imports", "perc"=>0), Dict{String, Any}("fuel"=>"gas", "perc"=>21.1), Dict{String, Any}("fuel"=>"nuclear", "perc"=>0), Dict{String, Any}("fuel"=>"other", "perc"=>0), Dict{String, Any}("fuel"=>"hydro", "perc"=>3.7), Dict{String, Any}("fuel"=>"solar", "perc"=>0), Dict{String, Any}("fuel"=>"wind", "perc"=>75.2)]83low

Plotting Data

This package also exports some recipes to plot the data. Below shows how we can retrieve the 48 hour forecast data, for the nation as a whole,

todays_plot()
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

or for a specific region

todays_plot(region = "South Scotland")
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
todays_plot(region = "North West England")
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

We can also view the recorded carbon intensity over a given time period

carbon_intensity(start_date, end_date)
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/search/index.html b/dev/search/index.html index 32e5850..ea29ca5 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · UKCarbonIntensityData.jl

Loading search...

    +Search · UKCarbonIntensityData.jl

    Loading search...