Code copyright the author (2022)
License:
To cite:
Code:
Inspired by https://twitter.com/DrSimEvans/status/1508409309775994892
This analysis uses the UK NG ESO generation mix data.
The data contains average (mean) MW generation per half hour by source including interconnectors and storage.
As far as we can work out this data does not include distributed (i.e. non-grid connected) generation such as small scale wind, solar, hydro, biomass etc which is connected to the LV network. This means the ESO data is likely to underestimate total generation and potentially underestimate the proportion of total generation that is renewable. It is possible that this could be fixed using embedded wind & solar generation data from the demand update file.
The data also includes a half-hourly carbon intensity value in g CO2/kWh sourced from https://www.carbonintensity.org.uk/.
rmdParams$olderThan <- 7
If the data we have previously downloaded is more than 7` days old, re-download.
gbGenMixUrl <- "https://data.nationalgrideso.com/backend/dataset/88313ae5-94e4-4ddc-a790-593554d8c6b9/resource/f93d1835-75bc-43e5-84ad-12472b180a98/download/df_fuel_ckan.csv"
orig_DT <- load_gbGenMix(url = gbGenMixUrl,
dataPath = repoParams$ukGridDataLoc,
olderThan = rmdParams$olderThan)
## No local data file...re-downloading.
orig_DT[, dv_dateTime := lubridate::as_datetime(DATETIME)] # proper date time
message("Original data range from: ", min(orig_DT$dv_dateTime))
## Original data range from: 2009-01-01
message("...to: ", max(orig_DT$dv_dateTime))
## ...to: 2023-06-13 07:00:00
# add derived variables used later ----
orig_DT[, dv_year := lubridate::year(dv_dateTime)]
orig_DT[, dv_date := lubridate::as_date(dv_dateTime)]
orig_DT[, dv_hour := lubridate::hour(dv_dateTime)]
orig_DT[, dv_hms := hms::as_hms(dv_dateTime)]
# half-hours are the start of the half hours (we think)
message("Remove incomplete years to avoid weird things in plots.")
## Remove incomplete years to avoid weird things in plots.
gbGenMix_dt <- orig_DT[dv_year < 2023]
message("Filtered data range from: ", min(gbGenMix_dt$dv_dateTime))
## Filtered data range from: 2009-01-01
message("...to: ", max(gbGenMix_dt$dv_dateTime))
## ...to: 2022-12-31 23:30:00
gbGenMix_dt <- gridCarbon::add_peakPeriod(gbGenMix_dt,
dateTime = "dv_dateTime")
# check coding
# table(gbGenMix_dt$dv_hour, gbGenMix_dt$dv_peak, useNA = "always")
rmdParams$plotCap <- paste0("Data: NG ESO Generation Mix ",
min(gbGenMix_dt$dv_date), " - ",
max(gbGenMix_dt$dv_date),
"\nPlot: @dataknut \nCode: https://github.com/dataknut/gridCarbon")
The data covers more years than we need - we’ll start at 2012 too.
This looks like daily data.
# add together the % and totals we want (half-hourly)
gbGenMix_dt[, dv_coal_gas_pc := COAL_perc + GAS_perc]
gbGenMix_dt[, dv_solar_wind_pc := SOLAR_perc + WIND_perc]
gbGenMix_dt[, dv_coal_gas := COAL + GAS]
gbGenMix_dt[, dv_solar_wind := SOLAR + WIND]
# keep the vars we want for clarity
temp <- gbGenMix_dt[, .(dv_dateTime, dv_coal_gas, dv_solar_wind,
dv_coal_gas_pc, dv_solar_wind_pc, GENERATION)]
temp[, dv_date := lubridate::date(dv_dateTime)]
# aggregate to daily data for plotting
plotDT <- temp[,
.(mean_dv_solar_wind_pc = mean(dv_solar_wind_pc),
mean_dv_coal_gas_pc = mean(dv_coal_gas_pc),
total_dv_coal_gas = sum(dv_coal_gas),
total_dv_solar_wind = sum(dv_solar_wind),
total_GENERATION = sum(GENERATION),
nObs = .N), # to check for days with < 48 half hours
keyby = .(dv_date)
]
plotDT[, dv_year := lubridate::year(dv_date)] # for plots
plotDT[, total_dv_coal_gas_pc := total_dv_coal_gas/total_GENERATION] # daily %
plotDT[, total_dv_solar_wind_pc := total_dv_solar_wind/total_GENERATION]
message("Check for days with less than 48 hours - this will be truncated data")
## Check for days with less than 48 hours - this will be truncated data
table(plotDT$nObs)
##
## 48
## 5113
Figure 4.1 shows the mean half-hourly % generation by each type per day. This is slightly convoluted - it is the mean of the sum of the 48 daily half-hourly XXX_perc values in the original data where XXX is the generation type. Unfold the code above for clarity.
The smoothed curves are estimated for each year. The lines terminate at the maximum value for the year. I’m still trying to decide if they tell us anything useful.
ggplot2::ggplot(plotDT[dv_year > 2011], aes(x = mean_dv_solar_wind_pc,
y = mean_dv_coal_gas_pc,
colour = as.factor(dv_year),
alpha = dv_year)) +
geom_point() +
geom_smooth() +
scale_colour_viridis_d(name = "Year") +
guides(alpha = "none") +
labs(x = "Solar & wind (mean % of half-hourly generation per day)",
y = "Coal & gas (mean % of half-hourly generation per day)",
caption = rmdParams$plotCap)
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
# save it
ggplot2::ggsave(filename = "meanGBrenewablesVsfossilHalfHourPC.png",
path = here::here("rmd","plots"),
height = 5)
## Saving 7 x 5 in image
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
Figure 4.2 shows the percentage of daily generation by type. This is less convoluted as it is the sum of generation per day for the two categories (solar + wind vs gas + coal) as a % of total daily generation.
Again the smoothed curve is estimated for each year.
ggplot2::ggplot(plotDT[dv_year > 2011], aes(x = 100 * total_dv_solar_wind_pc,
y = 100 * total_dv_coal_gas_pc,
colour = as.factor(dv_year),
alpha = dv_year)) +
geom_point() +
geom_smooth() +
scale_colour_viridis_d(name = "Year") +
guides(alpha = "none") +
labs(x = "Solar & wind (% of total daily generation)",
y = "Coal & gas (% of total daily generation)",
caption = rmdParams$plotCap)
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
ggplot2::ggsave(filename = "dailyGBpcGenMix.png",
path = here::here("rmd","plots"),
height = 5)
## Saving 7 x 5 in image
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
Just cos we can… helpfully split into ‘peak’ and ‘off peak’ periods.
Peak period definitions:
Again the smoothed curve is estimated for each year (and demand period).
ggplot2::ggplot(gbGenMix_dt[dv_year > 2011], aes(x = dv_solar_wind_pc,
y = dv_coal_gas_pc,
alpha = dv_year,
colour = as.factor(dv_year))) +
geom_point() +
facet_wrap(. ~ dv_peakPeriod) +
geom_smooth() +
scale_colour_viridis_d(name = "Year") +
guides(alpha = "none") +
labs(x = "Solar & wind (% of half-hourly generation)",
y = "Coal & gas (% of half-hourly generation)",
caption = rmdParams$plotCap)
## `geom_smooth()` using method = 'gam' and formula = 'y ~ s(x, bs = "cs")'
ggplot2::ggsave(filename = "halfHourlyPCgenByPeakPeriod.png",
path = here::here("rmd","plots"),
height = 5)
## Saving 7 x 5 in image
## `geom_smooth()` using method = 'gam' and formula = 'y ~ s(x, bs = "cs")'
Values are in MW per half hour (presumably the mean over the half-hour) so divide by 2 to give MWh.
dt_long <- melt(gbGenMix_dt, id.vars = c("dv_dateTime", "dv_year", "dv_hms", "dv_peakPeriod", "dv_hour"))
dt_long[, dv_date := lubridate::date(dv_dateTime)]
plotDT <- dt_long[variable == "GAS" | variable == "COAL" |
variable == "NUCLEAR" | variable == "WIND" |
variable == "HYDRO" | variable == "IMPORTS" |
variable == "HYDRO" | variable == "BIOMASS" |
variable == "OTHER" | variable == "SOLAR" |
variable == "STORAGE",
.(dailyMWh = sum(as.numeric(value)/2)), # MW -> MWh
keyby = .(dv_year, dv_date, variable)]
# annual sum for cross-check
t <- plotDT[, .(sum_TWh = sum(dailyMWh/1000000)), keyby = .(Year = dv_year)]
t[, Year := as.factor(Year)]
gridCarbon::make_flexTable(t, caption = "Total TWh per year for cross-check")
Year | sum_TWh |
---|---|
2009 | 329.3 |
2010 | 335.2 |
2011 | 322.3 |
2012 | 323.8 |
2013 | 322.5 |
2014 | 310.0 |
2015 | 304.9 |
2016 | 303.3 |
2017 | 300.8 |
2018 | 298.4 |
2019 | 291.6 |
2020 | 275.5 |
2021 | 284.6 |
2022 | 289.3 |
# double check
Note that these values are lower then the ones found in https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1043323/Regional_Electricity_Generation_and_Supply_2016-2020.pdf although they are of the same order of magnitude (200 - 300 TWh per year).
One reason for this is that Northern Ireland is excluded from the NG ESO data used here.
Figure 5.1 shows individual trends.
p <- ggplot2::ggplot(plotDT, aes(x = dv_date, y = dailyMWh/1000, colour = variable)) +
geom_line() +
facet_grid(variable ~ .) +
scale_color_viridis_d(name = "Source") +
labs(x = "Date",
y = "GWh",
caption = rmdParams$plotCap)
p
ggplot2::ggsave(filename = "dailyGenBySource.png",
path = here::here("rmd","plots"),
height = 5)
## Saving 7 x 5 in image
Figure 5.2 stacks them - spot COVID19 lockdown 2020…
ggplot2::ggplot(plotDT, aes(x = dv_date, y = dailyMWh/1000, fill = variable)) +
geom_col(position = "stack") +
scale_fill_viridis_d(name = "Source") +
labs(x = "Date",
y = "GWh",
caption = rmdParams$plotCap)
ggplot2::ggsave(filename = "genTrendStackBySource.png",
path = here::here("rmd","plots")
)
## Saving 7 x 5 in image
Defined how?
we think renewable is wind + solar, low carbon includes nuclear - does this look likely?
# we think renewable is wind + solar, low carbon includes nuclear
gbGenMix_dt[, Year := lubridate::year(dv_date)]
ggplot2::ggplot(gbGenMix_dt, aes(x = RENEWABLE_perc,
y = LOW_CARBON_perc,
colour = NUCLEAR_perc)) +
geom_point() +
facet_wrap(Year ~ .)
make_NgesoPlots <- function(dt,
var = "RENEWABLE_perc", # defaults
lowColour = "green",
highColour = "red",
scaleLab = "Change me!",
minMax = "max"){
res <- list() # for the results
res$tile <- ggplot2::ggplot(dt, aes(x = dv_date,
y = dv_hms, fill = get(var))) +
geom_tile() +
theme(legend.position = "bottom") +
scale_x_date(date_labels="%b %Y",date_breaks ="12 month") +
theme(axis.text.x = element_text(angle = 60, hjust = 1)) +
scale_fill_continuous(name = scaleLab,
high = highColour,
low = lowColour) +
labs(x = "Date",
y = "Half-hour",
caption = rmdParams$plotCap)
# if(minMax = "max"){
# res$tile <- res$tile +
# scale_fill_continuous(name = paste0("Maximum ", scaleLab)
# )
# }
# if(minMax = "min"){
# res$tile <- res$tile +
# scale_fill_continuous(name = paste0("Half-hourly ", scaleLab)
# )
# }
# line plot
plotDT <- dt[,.(max = max(get(var)),
mean = mean(get(var)),
min = min(get(var))
),
keyby = .(dv_date)]
p <- ggplot2::ggplot(plotDT, aes(x = dv_date)) +
theme(legend.position = "bottom") +
scale_x_date(date_labels="%b %Y",date_breaks ="12 month") +
theme(axis.text.x = element_text(angle = 60, hjust = 1))
if(minMax == "max"){
yh <- max(plotDT$max)
p <- p + geom_line(aes(y = max, colour = max)) +
scale_color_continuous(name = paste0("Maximum half-hourly ", scaleLab),
high = highColour,
low = lowColour) +
geom_hline(yintercept = yh, colour = highColour) +
annotate("text", x = mean(plotDT$dv_date),
y = yh*1.05, label = paste0("Maximum: ", round(yh)))
p <- p + labs(x = "Date",
y = paste0("Maximum half-hourly ", scaleLab),
caption = rmdParams$plotCap
)
}
if(minMax == "min"){
yh <- min(plotDT$min)
p <- p + geom_line(aes(y = min, colour = min)) +
scale_color_continuous(name = paste0("Minimum half-hourly ", scaleLab),
high = highColour,
low = lowColour) +
geom_hline(yintercept = yh, colour = lowColour) +
annotate("text", x = mean(plotDT$dv_date),
y = yh*1.05, label = paste0("Minimum: ", round(yh)))
p <- p + labs(x = "Date",
y = paste0("Minimum half-hourly ", scaleLab),
caption = rmdParams$plotCap
)
}
res$line <- p
return(res)
}
rpc <- make_NgesoPlots(gbGenMix_dt,
var = "RENEWABLE_perc",
lowColour = "red",
highColour = "green",
scaleLab = "Renewable generation (%)",
minMax = "max" # max line or min line?
)
rpc$tile
rpc$line
rpc <- make_NgesoPlots(gbGenMix_dt[Year > 2021],
var = "RENEWABLE_perc",
lowColour = "red",
highColour = "green",
scaleLab = "Renewable generation (%)",
minMax = "max"
)
rpc$tile +
scale_x_date(date_labels="%b-%Y",date_breaks ="3 month")
## Scale for x is already present.
## Adding another scale for x, which will replace the existing scale.
rpc$line +
scale_x_date(date_labels="%b-%Y",date_breaks ="3 month")
## Scale for x is already present.
## Adding another scale for x, which will replace the existing scale.
#plotDT <- gbGenMix_dt[, .()]
ci <- make_NgesoPlots(gbGenMix_dt,
var = "WIND_perc",
lowColour = "red",
highColour = "green",
scaleLab = "Wind %",
minMax = "max"
)
ci$tile
ci$line
wpc <- gbGenMix_dt[, .(mean_pc = mean(WIND_perc)), keyby = .(dv_hms, Year)]
ggplot2::ggplot(wpc, aes(x = dv_hms, colour = Year, group = Year, y = mean_pc)) +
geom_line() +
labs(x = "Time of day",
y = "% wind generation")
ci <- make_NgesoPlots(gbGenMix_dt[Year > 2021],
var = "WIND_perc",
lowColour = "red",
highColour = "green",
scaleLab = "Wind %",
minMax = "max"
)
ci$tile +
scale_x_date(date_labels="%b-%Y",date_breaks ="3 month")
## Scale for x is already present.
## Adding another scale for x, which will replace the existing scale.
ci$line +
scale_x_date(date_labels="%b-%Y",date_breaks ="3 month")
## Scale for x is already present.
## Adding another scale for x, which will replace the existing scale.
Now let’s use the CARBON_INTENSITY
variable.
Seasons:
gbGenMix_dt[, dv_date := lubridate::date(dv_dateTime)]
gbGenMix_dt[, dv_month := lubridate::month(dv_dateTime)]
gbGenMix_dt <- gridCarbon::add_season(gbGenMix_dt,
dateVar = "dv_dateTime",
h = "N") # north
plotDT <- gbGenMix_dt[, .(mean_CI = mean(CARBON_INTENSITY)), keyby = .(dv_year, dv_date, dv_season)]
ggplot2::ggplot(plotDT[dv_year > 2011], aes(x = dv_date, y = mean_CI, colour = dv_season)) +
geom_point() +
scale_color_viridis_d(name = "Season") +
theme(legend.position = "bottom") +
labs(x = "Date",
y = "Mean g CO2e/kWh",
caption = rmdParams$plotCap)
ggplot2::ggsave(filename = "meanCiTrendBySeason.png",
path = here::here("rmd","plots")
)
## Saving 7 x 5 in image
Re-draw as a boxplot of mean daily CI by month - plotted at month start. 6.2 shows outliers nicely.
plotDT <- gbGenMix_dt[, .(mean_CI = mean(CARBON_INTENSITY)),
keyby = .(dv_year,
dv_date,
dv_season)]
plotDT[, dv_month := lubridate::floor_date(dv_date, unit = "months"),]
ggplot2::ggplot(plotDT[dv_year > 2011], aes(x = dv_month,
y = mean_CI,
group = dv_month,
colour = dv_season)) +
geom_boxplot() +
scale_color_viridis_d(name = "Season") +
theme(legend.position = "bottom") +
labs(x = "Month",
y = "Mean g CO2e/kWh",
caption = rmdParams$plotCap)
ggplot2::ggsave(filename = "meanCiTrendByMonthSeason.png",
path = here::here("rmd","plots")
)
## Saving 7 x 5 in image
Figure 6.3 shows half-hourly carbon intensity over time.
#plotDT <- gbGenMix_dt[, .()]
ci <- make_NgesoPlots(gbGenMix_dt,
var = "CARBON_INTENSITY",
lowColour = "green",
highColour = "brown",
scaleLab = "Carbon intensity (g CO2/MW)",
minMax = "min"
)
ci$tile
ci$line
ci <- make_NgesoPlots(gbGenMix_dt[Year > 2021],
var = "CARBON_INTENSITY",
lowColour = "green",
highColour = "brown",
scaleLab = "Carbon intensity (g CO2/MW)",
minMax = "min"
)
ci$tile +
scale_x_date(date_labels="%b-%Y",date_breaks ="3 month")
## Scale for x is already present.
## Adding another scale for x, which will replace the existing scale.
ci$line +
scale_x_date(date_labels="%b-%Y",date_breaks ="3 month")
## Scale for x is already present.
## Adding another scale for x, which will replace the existing scale.
Mean carbon intensity per year and season within peak period.
Figure 6.4 suggests evening peak periods still have slightly higher carbon intensity and the shape of the reduction curves differ by season although rather less by period. Interestingly the sustained reduction in carbon intensity in Summer has leveled off.
plotDT <- gbGenMix_dt[, .(mean_CI = mean(CARBON_INTENSITY)), keyby = .(dv_year, dv_peakPeriod, dv_season)]
ggplot2::ggplot(plotDT, aes(x = dv_year, y = mean_CI, colour = dv_peakPeriod)) +
geom_line() +
scale_color_viridis_d(name = "Peak period") +
facet_wrap(. ~ dv_season) +
labs(x = "Year",
y = "Mean g CO2e/kWh",
caption = rmdParams$plotCap)
ggplot2::ggsave(filename = "annualMeanCIByPeak.png",
path = here::here("rmd","plots")
)
## Saving 7 x 5 in image
Do we see a relationship between renewables generating and peak demand? This will be mediated by the way the electricity market works.
We may find wind curtailment (not visible here) at low demand periods where nuclear can’t be shut off.
First, what is the general average shape of carbon intensity and renewable generation?
Figure 7.1 shows that although the mean half-hourly carbon intensity had fallen over time (with the effect of solar in summer particularly noticeable), the morning and evening peaks are still relatively more carbon intense as demand overtakes the available renewable supply.
plotDT <- gbGenMix_dt[dv_year > 2011, .(mean_ci = mean(CARBON_INTENSITY),
mean_renewables_MW = mean(RENEWABLE),
mean_renewables_pc = mean(RENEWABLE_perc)),
keyby = .(dv_year, dv_hms, dv_season)]
ggplot2::ggplot(plotDT, aes(x = dv_hms, y = mean_ci,
alpha = dv_year,
colour = dv_year,
group = dv_year)) +
geom_line() +
scale_alpha_continuous(name="Year") +
scale_color_continuous(name = "Year",
low = "grey",
high = "#3CBAC6") + # UoS from Marine palette
theme(axis.text.x = element_text(angle = 45, hjust=1)) +
facet_wrap(. ~ dv_season) +
labs(x = "Time of day",
y = "Mean half-hourly carbon intensity",
caption = rmdParams$plotCap)
ggplot2::ggplot(plotDT, aes(x = dv_hms, y = mean_renewables_MW,
colour = dv_year,
alpha = dv_year,
group = dv_year)) +
geom_line() +
scale_alpha_continuous(name = "Year") +
scale_color_continuous(name = "Year",
low = "grey",
high = "#3CBAC6") + # UoS from Marine palette
facet_grid(dv_season ~ .) +
labs(x = "Time of day",
y = "Mean renewables (MW)",
caption = rmdParams$plotCap)
ggplot2::ggplot(plotDT, aes(x = dv_hms, y = mean_renewables_pc,
colour = dv_year,
alpha = dv_year,
group = dv_year)) +
geom_line() +
scale_alpha_continuous(name = "Year") +
scale_color_continuous(name = "Year",
low = "grey",
high = "#3CBAC6") + # UoS from Marine palette
facet_grid(dv_season ~ .) +
labs(x = "Time of day",
y = "Mean renewables (MW)",
caption = rmdParams$plotCap)
ggplot2::ggplot(gbGenMix_dt, aes(x = RENEWABLE, y = GENERATION)) +
geom_point() +
facet_wrap(. ~ dv_year) +
theme(axis.text.x = element_text(angle = 45, hjust=1))
7.4 shows the rise of solar…
plotDT <- gbGenMix_dt[, .(mean_renewables = mean(RENEWABLE),
mean_generation = mean(GENERATION)),
keyby = .(dv_year, dv_hms, dv_peakPeriod)]
ggplot2::ggplot(plotDT[dv_year > 2016], aes(x = dv_hms,
colour = dv_peakPeriod,
alpha = dv_year,
group = dv_year)) +
geom_line(aes(y = mean_renewables)) +
scale_alpha_continuous(name = "Year") +
scale_color_discrete(name = "Peak period") +
labs(x = "Time of day",
y = "Mean renewables (MW)",
caption = rmdParams$plotCap)
YMMV on 7.5
plotDT <- gbGenMix_dt[, .(mean_renewables = mean(RENEWABLE),
mean_generation = mean(GENERATION)),
keyby = .(dv_year, dv_hms, dv_peakPeriod, dv_season)]
ggplot2::ggplot(plotDT[dv_year > 2016], aes(x = mean_generation/1000 , y = mean_renewables/1000,
colour = dv_peakPeriod)) +
geom_point() +
scale_color_discrete(name = "Period") +
facet_grid(dv_season ~ dv_year) +
labs(x = "Mean total generation (GW)",
y = "Mean renewables (GW)",
caption = rmdParams$plotCap)
That’s it.
You might want to look at recent academic research on this topic:
skimr::skim(gbGenMix_dt)
Name | gbGenMix_dt |
Number of rows | 245424 |
Number of columns | 46 |
Key | NULL |
_______________________ | |
Column type frequency: | |
Date | 1 |
difftime | 2 |
factor | 2 |
numeric | 39 |
POSIXct | 2 |
________________________ | |
Group variables | None |
Variable type: Date
skim_variable | n_missing | complete_rate | min | max | median | n_unique |
---|---|---|---|---|---|---|
dv_date | 0 | 1 | 2009-01-01 | 2022-12-31 | 2016-01-01 | 5113 |
Variable type: difftime
skim_variable | n_missing | complete_rate | min | max | median | n_unique |
---|---|---|---|---|---|---|
dv_hms | 0 | 1 | 0 secs | 84600 secs | 42300 secs | 48 |
hms | 0 | 1 | 0 secs | 84600 secs | 42300 secs | 48 |
Variable type: factor
skim_variable | n_missing | complete_rate | ordered | n_unique | top_counts |
---|---|---|---|---|---|
dv_peakPeriod | 0 | 1 | FALSE | 5 | Ear: 71582, Day: 71582, Eve: 40904, Lat: 40904 |
dv_season | 0 | 1 | FALSE | 4 | Spr: 61824, Sum: 61824, Aut: 61152, Win: 60624 |
Variable type: numeric
skim_variable | n_missing | complete_rate | mean | sd | p0 | p25 | p50 | p75 | p100 | hist |
---|---|---|---|---|---|---|---|---|---|---|
GAS | 0 | 1 | 12677.01 | 5278.48 | 1556.0 | 8534.00 | 12830.0 | 16758.00 | 27472.0 | ▅▆▇▅▁ |
COAL | 0 | 1 | 6705.09 | 6648.97 | 0.0 | 587.00 | 4560.0 | 12180.00 | 26044.0 | ▇▂▃▂▁ |
NUCLEAR | 0 | 1 | 6739.81 | 1255.73 | 2488.0 | 5802.00 | 6910.0 | 7760.00 | 9342.0 | ▁▃▆▇▃ |
WIND | 0 | 1 | 4128.83 | 3955.07 | 1.0 | 1069.00 | 2832.0 | 5970.00 | 20912.0 | ▇▃▁▁▁ |
HYDRO | 0 | 1 | 396.01 | 245.23 | 0.0 | 192.00 | 365.0 | 563.00 | 1403.0 | ▇▇▅▁▁ |
IMPORTS | 0 | 1 | 2083.18 | 1195.17 | 0.0 | 1190.00 | 2138.0 | 2990.00 | 6668.0 | ▆▇▇▁▁ |
BIOMASS | 0 | 1 | 713.02 | 1014.14 | 0.0 | 0.00 | 0.0 | 1630.00 | 3262.0 | ▇▁▂▂▁ |
OTHER | 0 | 1 | 476.70 | 632.33 | 0.0 | 42.00 | 143.0 | 754.00 | 2470.0 | ▇▂▁▁▁ |
SOLAR | 0 | 1 | 760.66 | 1594.62 | 0.0 | 0.00 | 0.0 | 604.00 | 9892.0 | ▇▁▁▁▁ |
STORAGE | 0 | 1 | 291.24 | 358.14 | 0.0 | 0.00 | 214.0 | 434.00 | 2660.0 | ▇▂▁▁▁ |
GENERATION | 0 | 1 | 34971.56 | 7285.09 | 18365.0 | 29290.00 | 34813.0 | 40048.00 | 59605.0 | ▃▇▇▃▁ |
CARBON_INTENSITY | 0 | 1 | 326.56 | 139.60 | 34.0 | 208.00 | 319.0 | 454.00 | 644.0 | ▃▇▅▇▂ |
LOW_CARBON | 0 | 1 | 12738.33 | 4680.01 | 4626.0 | 9119.75 | 11525.0 | 15561.00 | 32578.0 | ▇▇▃▁▁ |
ZERO_CARBON | 0 | 1 | 12025.32 | 4173.98 | 4244.0 | 8891.00 | 10953.0 | 14525.00 | 30616.0 | ▆▇▃▁▁ |
RENEWABLE | 0 | 1 | 5285.50 | 4513.98 | 3.0 | 1604.00 | 3995.0 | 7791.00 | 25389.0 | ▇▃▂▁▁ |
FOSSIL | 0 | 1 | 19382.10 | 8879.23 | 1700.0 | 12677.00 | 18411.0 | 25393.00 | 49096.0 | ▃▇▆▂▁ |
GAS_perc | 0 | 1 | 35.82 | 12.52 | 4.6 | 26.40 | 36.7 | 45.50 | 72.7 | ▂▆▇▅▁ |
COAL_perc | 0 | 1 | 17.77 | 16.39 | 0.0 | 1.90 | 14.3 | 33.20 | 60.6 | ▇▂▃▃▁ |
NUCLEAR_perc | 0 | 1 | 19.99 | 5.24 | 8.1 | 16.10 | 19.3 | 23.10 | 42.3 | ▂▇▅▁▁ |
WIND_perc | 0 | 1 | 12.47 | 12.32 | 0.0 | 3.00 | 8.3 | 18.00 | 66.6 | ▇▂▁▁▁ |
HYDRO_perc | 0 | 1 | 1.11 | 0.64 | 0.0 | 0.60 | 1.0 | 1.50 | 4.1 | ▇▇▃▁▁ |
IMPORTS_perc | 0 | 1 | 6.34 | 3.92 | 0.0 | 3.40 | 6.4 | 9.10 | 26.8 | ▇▇▂▁▁ |
BIOMASS_perc | 0 | 1 | 2.21 | 3.18 | 0.0 | 0.00 | 0.0 | 5.00 | 16.0 | ▇▂▂▁▁ |
OTHER_perc | 0 | 1 | 1.42 | 1.92 | 0.0 | 0.10 | 0.5 | 2.10 | 10.3 | ▇▂▁▁▁ |
SOLAR_perc | 0 | 1 | 2.13 | 4.55 | 0.0 | 0.00 | 0.0 | 1.60 | 32.2 | ▇▁▁▁▁ |
STORAGE_perc | 0 | 1 | 0.74 | 0.88 | 0.0 | 0.00 | 0.6 | 1.10 | 7.9 | ▇▁▁▁▁ |
GENERATION_perc | 0 | 1 | 100.00 | 0.00 | 100.0 | 100.00 | 100.0 | 100.00 | 100.0 | ▁▁▇▁▁ |
LOW_CARBON_perc | 0 | 1 | 37.92 | 15.44 | 10.7 | 25.80 | 35.0 | 47.20 | 91.5 | ▆▇▅▂▁ |
ZERO_CARBON_perc | 0 | 1 | 35.71 | 13.80 | 10.7 | 25.10 | 33.0 | 43.70 | 87.2 | ▅▇▃▂▁ |
RENEWABLE_perc | 0 | 1 | 15.72 | 13.65 | 0.0 | 4.60 | 11.7 | 23.10 | 71.1 | ▇▃▂▁▁ |
FOSSIL_perc | 0 | 1 | 53.58 | 17.38 | 5.3 | 41.60 | 54.7 | 67.70 | 88.0 | ▁▃▇▇▅ |
dv_year | 0 | 1 | 2015.50 | 4.03 | 2009.0 | 2012.00 | 2016.0 | 2019.00 | 2022.0 | ▇▇▆▇▇ |
dv_hour | 0 | 1 | 11.50 | 6.92 | 0.0 | 5.75 | 11.5 | 17.25 | 23.0 | ▇▇▆▇▇ |
dv_coal_gas_pc | 0 | 1 | 53.58 | 17.38 | 5.2 | 41.60 | 54.7 | 67.70 | 88.0 | ▁▃▇▇▅ |
dv_solar_wind_pc | 0 | 1 | 14.60 | 13.51 | 0.0 | 3.60 | 10.5 | 21.90 | 70.5 | ▇▃▂▁▁ |
dv_coal_gas | 0 | 1 | 19382.10 | 8879.23 | 1700.0 | 12677.00 | 18411.0 | 25393.00 | 49096.0 | ▃▇▆▂▁ |
dv_solar_wind | 0 | 1 | 4889.49 | 4464.04 | 1.0 | 1251.00 | 3555.0 | 7326.00 | 24991.0 | ▇▃▂▁▁ |
Year | 0 | 1 | 2015.50 | 4.03 | 2009.0 | 2012.00 | 2016.0 | 2019.00 | 2022.0 | ▇▇▆▇▇ |
dv_month | 0 | 1 | 6.52 | 3.45 | 1.0 | 4.00 | 7.0 | 10.00 | 12.0 | ▇▅▅▅▇ |
Variable type: POSIXct
skim_variable | n_missing | complete_rate | min | max | median | n_unique |
---|---|---|---|---|---|---|
DATETIME | 0 | 1 | 2009-01-01 | 2022-12-31 23:30:00 | 2016-01-01 11:45:00 | 245424 |
dv_dateTime | 0 | 1 | 2009-01-01 | 2022-12-31 23:30:00 | 2016-01-01 11:45:00 | 245424 |
It is not clear from https://data.nationalgrideso.com/carbon-intensity1/historic-generation-mix/r/historic_gb_generation_mix how the following are defined:
test2021 <- gbGenMix_dt[dv_year == 2021]
#test2021[, ba_LOW_CARBON := ]
Packages etc: