Description Usage Arguments Details Value See Also Examples
Create valid data container that has aggregated load and variable generation (VG) time series for different areas and levels of aggregation.
1 | format_timedata(data, levels = NULL, scenario = NULL, day.steps = 24)
|
data |
Data frame with the load and VG time series (see details for requirements) |
levels |
Optional data frame that contains levels of aggregation, e.g., BAA, transmission area or interconnection (see details for requirements) |
scenario |
Name of columns in |
day.steps |
Number of data points in a day (defaults to 24) |
The columns identified by scenario
are used to perform calculations separately. This way one can run
different sensitivities in the same calculation (e.g., to estimate the capacity value of wind with different
penetration levels).
Requirements for data
:
The number of entries needs to be a multiple of day.steps
A Time
column that can be ordered (integer or time stamps)
A Load
column with load time series
No column named Level
, NetLoad
, VG
, WinProb
or Multiplier
(they are reserved name)
Optionally, if a column called Area
exists, it will be used to separate areas
All columns must contain numbers except for Time
, Area
and those in scenario
Requirements for levels
:
This parameter is optional
If levels
is provided, data
must contain a column called Area
The first column must contain the most granular level of data
The column names in levels
will become the names of the different levels of aggregation
A data frame with load and VG data aggregated by scenario and different areas and levels of aggregation
outage_table
is the function that creates outage tables
sliding_window
is used internally by several functions to extend
time data objects
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Create data for two days
tdata <- data.frame(Area = c(rep("A", 48), rep("B", 48)),
Time = 1:48,
Load = c(runif(48, 200, 250), runif(48, 400, 450)),
Wind = c(runif(48, 20, 25), runif(48, 40, 45)))
levs <- data.frame(BAA = c("A", "B"), Region = c("All", "All"))
# Format time data without and with different levels of aggregation
td1 <- format_timedata(tdata)
head(td1)
td2 <- format_timedata(tdata, levs)
head(td2)
# Format time data with a scenario column
tdata2 <- tdata
tdata2$Scenario <- "Scenario 1"
td3 <- format_timedata(tdata2, scenario = "Scenario")
head(td3)
# Format time data without Area column (minimum example)
tdata3 <- tdata
tdata2$Area <- NULL
td4 <- format_timedata(tdata3)
head(td4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.