HTML interactive plot showing the hourly energy cost. Also,
a comparison between the original scenario is done when
original_df
is not NULL
.
Arguments
- df
tibble, with columns
datetime
,consumption
,production
- original_df
tibble with same columns than
df
corresponding to the original scenario (e.g. without flexibility)- import_capacity
numeric, maximum power to import from the grid (in kW)
- export_capacity
numeric, maximum power to export to the grid (in kW, positive).
- ...
extra arguments to pass to dygraphs::dyOptions function
Examples
df <- dplyr::select(
energy_profiles,
datetime,
production = solar,
consumption = building
)
df <- dplyr::slice_head(df, n = 300)
head(df)
#> # A tibble: 6 × 3
#> datetime production consumption
#> <dttm> <dbl> <dbl>
#> 1 2023-01-01 00:00:00 0 2.61
#> 2 2023-01-01 00:15:00 0 2.42
#> 3 2023-01-01 00:30:00 0 2.23
#> 4 2023-01-01 00:45:00 0 2.04
#> 5 2023-01-01 01:00:00 0 1.85
#> 6 2023-01-01 01:15:00 0 1.78
plot_net_power(df)
# Build another random building profile
building_variation <- rnorm(nrow(df), mean = 0, sd = 1)
df2 <- dplyr::mutate(df, consumption = consumption + building_variation)
plot_net_power(df2, original_df = df)