Skip to content

Commit 2c8ad82

Browse files
committed
latest plot configurations
1 parent 960efee commit 2c8ad82

1 file changed

Lines changed: 32 additions & 13 deletions

File tree

inst/extdata/scripts/impetus/readData_BerlinWaterModel_v2.R

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Documentation of aggregation and visualization of Qsim results
2+
library(qsimVis)
23

34
project_path <-
45
# "Y:/iGB/Projects/IMPETUS/"
@@ -7,7 +8,7 @@ project_path <-
78

89
#data_path <- "Work-packages/WP4_Demonstration_KWB/CS-Berlin/04_Modelling/OGewaesser/BerlinWaterModel/Ergebnisse"
910
data_path <- "kwb.BerlinWaterModel"
10-
file_name <- "qsimVis_input_days_Val_S0.csv"
11+
file_name <- "qsimVis_input_hours_2017-2022_Fluoranthen.csv"
1112

1213
# find out about column names --------------------------------------------------
1314
colNames <- read.csv(
@@ -18,7 +19,7 @@ print(colNames)
1819
# load and prepare qsim data
1920
df_in <- qsimVis::QSIM_prepare(
2021
qsim_output_file = file.path(project_path, data_path, file_name),
21-
parameter_name = "Valsartan.g.m3", # "tracer.wwtp", "tracer.rain"
22+
parameter_name = "Fluoranthen.mg.m3", # "tracer.wwtp", "tracer.rain"
2223
date_column_name = "Datum",
2324
id_column_name = "GewaesserId",
2425
km_column_name = "Km",
@@ -36,9 +37,10 @@ output <- list(
3637
"def_hours" =
3738
qsimVis::deviating_hours(
3839
dataFrame = df_pro,
39-
thresholds = c(5, 10, 15, 20, 40, 60)/100, # Anzahl flexibel
40+
# thresholds = c(5, 10, 15, 20, 40, 60)/100, # Anzahl flexibel
41+
thresholds = c(0.0063, 0.12),
4042
# thresholds = c(0,10, 20, 40, 60, 80)/100,
41-
dev_type = "egt", # "elt" = equal or lower than möglich, "egt", "gt", "lt"
43+
dev_type = "gt", # "elt" = equal or lower than möglich, "egt", "gt", "lt"
4244
relative = TRUE), # If TRUE --> relative values in %
4345
"adv_deviation" =
4446
qsimVis::adverse_deviation_from_reference(
@@ -69,40 +71,57 @@ head(output$flow_mean)
6971
# es gibt keinen CVK
7072

7173
output_table <-
72-
"adv_deviation"
73-
# "stats"
74+
#"adv_deviation"
75+
"stats"
7476
# "def_hours"
7577

76-
78+
# Zeitdauer Abwasseranteil > x%
7779
if(output_table == "def_hours"){
7880
output_column <- "above_0.2"
7981
classBreaks <- c(0, 5, 10, 15, 25, 50, 100)
8082
# classBreaks <- c(seq(0,50, 5), seq(60,100,10))
8183
colorVector <- NULL # -> MisaColor
82-
LegendTitle <- "Anteil mit mehr als 20% Abwasser in %"
84+
LegendTitle <- "Zeitanteil mit mehr als 20% Abwasser in %"
8385
}
8486

87+
# Zeitdauer Regenabflussanteil > x%
8588
if(output_table == "def_hours"){
8689
output_column <- "above_0.1"
87-
classBreaks <- c(0, 5, 10, 220, 33, 50, 100)
90+
classBreaks <- c(0, 5, 10, 20, 33, 50, 100)
8891
colorVector <- NULL # -> MisaColor
8992
LegendTitle <- "Zeitanteil mit mehr als 10% Regenabfluss 2002-2022 [%]"
9093
}
9194

92-
# Durchfluss < 0
95+
# Zeitdauer Durchfluss < 0
9396
if(output_table == "def_hours"){
9497
output_column <- "below_0"
9598
classBreaks <- c(0, 1, 10, 15, 25, 50, 75, 100)
96-
colorVector <- c("dodgerblue4", "yellow", "orange", "darkorange3", "red", "red3", "darkred")
99+
colorVector <- c("deepskyblue4", "gold", "orange", "darkorange3", "red", "red3", "darkred") # "dodgerblue4"
97100
LegendTitle <- "Zeitanteil mit Durchfluss<0 in 2019 [%]"
98101
}
99102

103+
# Zeitdauer Fluoranthen > x µg/L
104+
if(output_table == "def_hours"){
105+
output_column <- "above_0.12"
106+
classBreaks <- c(0, 1, 10, 20, 40, 60, 80, 100)
107+
colorVector <- c("deepskyblue4", "gold", "orange", "darkorange3", "red", "red3", "darkred") # "dodgerblue4"
108+
LegendTitle <- "Zeitanteil mit Konzentration Fluoranthen >0.12µg/L = ZHL-UQN (2017-2022) [%]"
109+
}
110+
100111
# Valsartansäure
101112
if(output_table == "stats"){
102113
output_column <- "mean"
103114
classBreaks <- c(0, 0.25, 0.5, 1, 2.5, 4, 6)
104115
colorVector <- NULL
105-
LegendTitle <- "Konzentration Valsartansäure 2019 [µg/L]"
116+
LegendTitle <- "Konzentration Valsartansäure [µg/L]"
117+
}
118+
119+
# Fluoranthen
120+
if(output_table == "stats"){
121+
output_column <- "mean"
122+
classBreaks <- c(0, 0.0063, 0.04, 0.08, 0.12, 0.3, 0.5)
123+
colorVector <- c("deepskyblue4", "gold", "orange", "darkorange3", "red", "darkred")
124+
LegendTitle <- "Konzentration Fluoranthen 2017-2022, Mittelwert [µg/L]"
106125
}
107126

108127
# Combine river stretch and simulations data
@@ -149,7 +168,7 @@ qsimVis::add_river_legend(
149168

150169
# Save as png
151170
qsimVis::saveActiveDevice(
152-
filename = "WaterModelPlot",
171+
filename = "WaterModelPlot_Valsartansäure_2002-2022_ohne_Ozonung",
153172
path = file.path(project_path, data_path),
154173
type = "",
155174
resolution = "medium"

0 commit comments

Comments
 (0)