Commit 645641ed authored by Matteo DE FELICE's avatar Matteo DE FELICE

Changes in plot height. Added discharge and level diff

parent 0a53b68b
......@@ -21,7 +21,7 @@ shinyServer(function(input, output, session) {
pf = readxl::read_xlsx(paste0('', input$result_xls), sheet = 'Power flow') %>%
mutate(date = seq(as_datetime('2016-01-01'), by = 'day', length.out = n()))
# Load ENTSOE Data
entsoe_storage = read_rds('data/ENTSOE-Storage-2015-2018.rds')
# Load WAPP demand data
......@@ -232,6 +232,13 @@ shinyServer(function(input, output, session) {
mutate(day_of_the_year = yday(date)) %>%
gather(area, spillage, -date, -day_of_the_year)
discharge = readxl::read_xlsx(paste0('', input$result_xls), sheet = 'Water discharge') %>%
select(contains(paste0(input$zone, '_HPHS')),
contains(paste0(input$zone, '_HDAM'))) %>%
mutate(date = seq(as_datetime('2016-01-01'), by = 'day', length.out = n())) %>%
mutate(day_of_the_year = yday(date)) %>%
gather(area, discharge, -date, -day_of_the_year)
pumping = readxl::read_xlsx(paste0('', input$result_xls), sheet = 'Pumping') %>%
select(contains(paste0(input$zone, '_HPHS')),
contains(paste0(input$zone, '_HDAM'))) %>%
......@@ -255,11 +262,15 @@ shinyServer(function(input, output, session) {
inner_join(
inner_join(
inner_join(
inner_join(inflows, res_zone), gen_zone),
spillage),
pumping),
inner_join(
inner_join(inflows, res_zone), gen_zone),
spillage),
pumping),
discharge),
res_normalised) %>%
mutate(filling_rate = (inflow * 60 * 60 * 24 / 1e6) / level) %>%
# mutate(filling_rate = (inflow * 60 * 60 * 24 / 1e6) / level) %>%
mutate(diff_level = c(NA, diff(level))) %>%
mutate(outflow = discharge + spillage) %>%
gather(variable, output, -date, -day_of_the_year, -area)
entsoe_data = entsoe_storage %>%
......
......@@ -46,7 +46,7 @@ shinyUI( fluidPage(
# Show a plot of the generated distribution
mainPanel(
plotOutput("main_plot", height = "600px")
plotOutput("main_plot", height = "800px")
)
)
))
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment