Skip to content

Commit 6233af5

Browse files
committed
smaller adaptations
1 parent 2c8ad82 commit 6233af5

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

inst/extdata/scripts/impetus/readData_BerlinWaterModel_v2.R

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ output <- list(
6464
)
6565
)
6666

67+
output_table <-
68+
#"adv_deviation"
69+
"stats"
70+
#"def_hours"
71+
6772
head(output$adv_deviation)
6873
head(output$def_hours)
6974
head(output$stats)
7075
head(output$flow_mean)
7176
# es gibt keinen CVK
7277

73-
output_table <-
74-
#"adv_deviation"
75-
"stats"
76-
# "def_hours"
77-
7878
# Zeitdauer Abwasseranteil > x%
7979
if(output_table == "def_hours"){
8080
output_column <- "above_0.2"
@@ -105,7 +105,7 @@ if(output_table == "def_hours"){
105105
output_column <- "above_0.12"
106106
classBreaks <- c(0, 1, 10, 20, 40, 60, 80, 100)
107107
colorVector <- c("deepskyblue4", "gold", "orange", "darkorange3", "red", "red3", "darkred") # "dodgerblue4"
108-
LegendTitle <- "Zeitanteil mit Konzentration Fluoranthen >0.12µg/L = ZHL-UQN (2017-2022) [%]"
108+
LegendTitle <- "Zeitanteil mit Konzentration Fluoranthen >0.12µg/L = ZHK-UQN (2017-2022) [%]"
109109
}
110110

111111
# Valsartansäure
@@ -124,19 +124,25 @@ if(output_table == "stats"){
124124
LegendTitle <- "Konzentration Fluoranthen 2017-2022, Mittelwert [µg/L]"
125125
}
126126

127+
##########################################################################################################
128+
# Create map #############################################################################################
129+
##########################################################################################################
130+
127131
# Combine river stretch and simulations data
128132
mapping_table <- read.table(
129133
file = system.file(package = "qsimVis",
130134
"extdata/scripts/impetus/BelinWaterModel_id_table.csv"),
131135
header = TRUE,
132136
sep = ";")
137+
133138
rivers <- qsimVis::prepare_rivers(
134139
mapping_table = mapping_table,
135140
aggregated_data = output[[output_table]],
136141
value_column = output_column,
137142
path_manual = system.file(package = "qsimVis", "extdata/manually_added_rivers"),
138143
gap_filling = "steps"
139144
)
145+
140146
# add classes and colors
141147
rivers <- qsimVis::value_to_classes(
142148
river_list = rivers,
@@ -168,10 +174,10 @@ qsimVis::add_river_legend(
168174

169175
# Save as png
170176
qsimVis::saveActiveDevice(
171-
filename = "WaterModelPlot_Valsartansäure_2002-2022_ohne_Ozonung",
177+
filename = "WaterModelPlot_Fuoranthen_2017-2022_Zeitanteil_above_ZHK-UQN",
172178
path = file.path(project_path, data_path),
173-
type = "",
174-
resolution = "medium"
179+
type = "", # "vector" = svg-file
180+
resolution = "low"
175181
)
176182

177183
# save as svg (vector graphic)

0 commit comments

Comments
 (0)