knitr::opts_chunk$set(fig.width=12, fig.height=8, fig.path='images/',
                      echo=FALSE, warning=FALSE, message=FALSE, eval=TRUE)
load("data/flood_metadata.RData")
load("data/flood_data.RData")
source("global.R")

q50 <- median(na.omit(flood_metadata$median_fgp))
q25 <- quantile(na.omit(flood_metadata$median_fgp), 0.25)
q75 <- quantile(na.omit(flood_metadata$median_fgp), 0.75)
st_selection_1 <- which(flood_metadata$median_fgp < q25)
st_selection_2 <- which(flood_metadata$median_fgp > q25 & flood_metadata$median_fgp < q50)
st_selection_3 <- which(flood_metadata$median_fgp > q50 & flood_metadata$median_fgp < q75)
st_selection_4 <- which(flood_metadata$median_fgp > q75)

QS

QS 2y

gof_type <- "QS"
returnPeriod <- 2

plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_1)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_2)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_3)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_4)

QS 10y

returnPeriod <- 10

plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_1)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_2)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_3)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_4)

QS 30y

returnPeriod <- 30

plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_1)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_2)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_3)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_4)

BS

BS 2y

gof_type <- "BS"
returnPeriod <- 2

plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_1)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_2)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_3)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_4)

BS 10y

returnPeriod <- 10

plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_1)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_2)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_3)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_4)

BS 30y

returnPeriod <- 30

plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_1)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_2)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_3)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_4)

Return levels

RL 10y

gof_type <- "r.levels"
returnPeriod <- 10

plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_1)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_2)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_3)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_4)

RL 100y

returnPeriod <- 100

plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_1)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_2)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_3)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_4)

RL 200y

returnPeriod <- 200

plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_1)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_2)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_3)
plot4server_rlevels_coeffvar_ave(gof_type, returnPeriod,30,150, st_selection_4)

KS

gof_type <- "KS"

plot4server_gof_averaged(gof_type, 30,150, st_selection_1)
plot4server_gof_averaged(gof_type, 30,150, st_selection_2)
plot4server_gof_averaged(gof_type, 30,150, st_selection_3)
plot4server_gof_averaged(gof_type, 30,150, st_selection_4)

AD

gof_type <- "AD"

plot4server_gof_averaged(gof_type, 30,150, st_selection_1)
plot4server_gof_averaged(gof_type, 30,150, st_selection_2)
plot4server_gof_averaged(gof_type, 30,150, st_selection_3)
plot4server_gof_averaged(gof_type, 30,150, st_selection_4)


NVE/FlomKart_ShinyApp documentation built on May 7, 2019, 6:03 p.m.