Skip to contents

Plot a snapshot of capacity factors by cluster and time-slice

Usage

ideea_snapshot_cf(
  x,
  ideea_cl_sf,
  ideea_sf = NULL,
  cf_name = names(x)[grepl("cf_"), names(x)][1],
  slice = sample(x$slice, 1),
  timestamp.stamp = TRUE,
  return_data = FALSE,
  fill_scale_lims = range(x[[cf_name]]),
  ...
)

Arguments

x

data.frame, capacity factors data, an outpuf of get_ideea_cf()

ideea_cl_sf

sf object, cluster shapefile, an output of get_ideea_cl_sf()

ideea_sf

sf object, ideea shapefile, an output of get_ideea_map()

cf_name

character, the name of the capacity factor column (e.g. "wcf_100m", "scf_tl", etc.)

slice

character of length one, the time-slice to plot (e.g. "d001_h00")

return_data

logical, if TRUE, the function returns the data used for plotting

fill_scale_lims

numeric of length two, the limits of the fill scale

...

ignored

datatime

logical, if TRUE, the time-slice is converted to a timestamp

Value

A ggplot object of capacity factors by cluster and time-slice or the data used for plotting

Examples

resource <- "win"
nreg <- 5
tol <- 0.1
cf_name <- "wcf_100m"
ideea_sf <- get_ideea_map(nreg = nreg, offshore = T, islands = T)
ideea_cl_sf <- get_ideea_cl_sf(resource = resource, tol = tol)
#> Error in str_detect(names(x), pattern = "cf_"): could not find function "str_detect"
x <- get_ideea_cf(resource, tol = tol)
#> Reading capacity factors data from:
#>    D:/Dropbox/projects/ideea_extra//merra2/cf_win_r5_TOL10_d365_h24_2019.fst 
#>    Maximum number of clusters per region: 11 
ideea_snapshot_cf(x, ideea_cl_sf, ideea_sf, cf_name = cf_name)
#> Error in eval(expr, envir, enclos): object 'ideea_cl_sf' not found