-
Notifications
You must be signed in to change notification settings - Fork 2
/
ui.R
1382 lines (1360 loc) · 77.7 KB
/
ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
ui <- function(req) {
tagList( # Added functionality for not losing your settings
# shinythemes::themeSelector(), # user-defined theme
# Java to prompt the students to click a button
# Java script https://community.rstudio.com/t/keeping-track-of-idle-time-during-app-usage/1735
tags$script("
(function() {
var timeoutWarningMsecs = 12 * 60 * 1000;
var idleTimer;
function onTimeout() {
alert('Warning: Session is about to time out! Please click a button to prevent losing progress.');
}
function startIdleTimer() {
if (idleTimer) clearTimeout(idleTimer);
idleTimer = setTimeout(onTimeout, timeoutWarningMsecs);
}
$(document).on('shiny:message shiny:inputchanged', startIdleTimer);
})();"),
tags$style(type = "text/css", "text-align: justify"),
tags$head(tags$link(rel = "shortcut icon", href = "macroeddi_ico_green.ico")), # Add icon for web bookmarks
tags$head(includeHTML(("google-analytics.html"))),
tags$header(
introBox(
img(src = "eddie_banner_2020_test.png", height = 100,
width = 1544, top = 5),
data.step = 1,
data.intro = help_text["welcome", 1]
)
),
fluidPage(
column(11,
br(),
p(tags$b("Teaching materials associated with this module can be found at ",
tags$a(href="https://serc.carleton.edu/eddie/teaching_materials/modules/module9.html",
"https://serc.carleton.edu/eddie/teaching_materials/modules/module9.html.", target="_blank"))),
h2(tags$b("Module 9: Using High-Frequency Data to Manage Water Quality"))
),
column(1, align = "right",
br(),
introBox(
actionButton("help", label = "Help", icon = icon("question-circle"))
)
)
),
navbarPage(position = "static-top", id = "maintab",
tags$header(
fluidRow(
)
),
# 1. Introduction ----
tabPanel(introBox(tab_names["mtab1", 2],
data.step = 2,
data.intro = help_text["tab_nav1", 1]
),
value = "mtab1",
introjsUI(), # must include in UI
withMathJax(), # NEEDS to be here for rendering eqn's in data.table
tags$style(".btn-file {
background-color:#98CAB2;
border-color: #2E4F84;
}
.progress-bar {
background-color: #2E4F84;
}"),
# Change progress bar color
tags$style(paste0("
.irs-grid-text { font-size: 10pt; }
.irs-bar,
.irs-bar-edge,
.irs-single,
.irs-grid-pol {
background: ", slider_col, ";
border-color: ", slider_col, ";
}")),
includeCSS("www/slider_cols.css"),
tags$style(HTML("
.irs-bar {
border-color: transparent;
background-color: transparent;
}
#first {
border: 4px double red;
}
#13a_graz {
margin-bottom: 10px;
}
#bla_border {
border: 2px solid black;
}
#bla_border2 {
border: 1px solid black;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
#txt_j {
text-align: justify;
}
#txt_c {
text-align: center;
}
#txt_l {
text-align: left;
}
#ackn {
color: gray;
font-size: 12px
}
#pheno img {
transition:transform 0.25s ease;
max-width: 100%; width: 100%; height: auto
}
#nextBtn1:hover {
background-color: yellow;
}
#dl_btn {
width:290px
}
#pheno:hover img{
-webkit-transform:scale(1.5);
transform:scale(1.5);
}
#wh_link a {
color: #FFFFFF
}
#q6_tab {
'border':'1px solid #ddd'
}
.box.box-solid.box-primary>.box-header {
}
.box.box-solid.box-primary{
background:#C1E4E2
}
.box.box-solid.box-success{
background: #F5F094;
}
.box.box-solid.box-info{
background: #DDE4E1;
}
.box.box-solid.box-warning>.box-header {
}
.box.box-solid.box-warning{
background:#D6AB9C
}
")),
introBox(
fluidRow(
column(6,
#* Module text ====
introBox(data.step = 10,
data.intro = help_text["thank_you", 1],
h2("Using High-Frequency Data to Manage Water Quality")
),
h3("Focal question"),
h4(tags$b(tags$i("How can we use high-frequency data to improve water quality?"))),
h3("Summary"),
p("In recent decades, there have been substantial improvements in our ability to monitor water quality in real time using sensors that measure variables at a high frequency (every few minutes). These new data allow us to track changes in the water at a much finer scale than previous monitoring data, which were generally collected at weekly to monthly scales."),
p("In this module, you will explore data collected using high-frequency sensors and learn how to interpret these data to inform water quality management."),
h3("Learning Outcomes"),
tags$line(),
tags$ul(
tags$li(id = "txt_j", module_text["LO1", ]),
tags$li(id = "txt_j", module_text["LO2", ]),
tags$li(id = "txt_j", module_text["LO3", ]),
tags$li(id = "txt_j", module_text["LO4", ])
)
),
column(6,
br(), br(), br(),
img(src = "mod9_conceptual_figure.png", height = "100%",
width = "100%")
)
)
),
hr(),
fluidRow(
column(11,
introBox(data.step = 4, data.intro = help_text["workflow", 1],
h3("Workflow for this module")
),
box(id = "box1", width = 12, status = "success", solidHeader = TRUE,
fluidRow(
column(11, offset = 1, h4(tags$b(module_text["workflow1", ]))))),
br(),br(),br(),
fluidRow(
column(12, offset = 1,
introBox(data.step = 5, data.intro = help_text["videos", 1],
HTML('<iframe width="560" height="315" src="https://www.youtube.com/embed/rM3Hc0rVUdI?si=sfxbQqDEat1v7tZQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>')
)
)
),
br(),
box(id = "box1", width = 12, status = "success", solidHeader = TRUE,
fluidRow(
column(11, offset = 1, h4(tags$b(module_text["workflow2", ]))))),
br(),br(),br(),br(),br(),
fluidRow(
column(12, offset = 1,
HTML('<iframe width="560" height="315" src="https://www.youtube.com/embed/uOaZhENushQ?si=9ontMzU5SGu7A59_" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'),
)
),
br(),
box(id = "box1", width = 12, status = "success", solidHeader = TRUE,
fluidRow(
column(11, offset = 1, h4(tags$b(module_text["workflow3", ]))))),
br(),br(),br(),
fluidRow(
#** Choose site ----
column(4,
h4("Site Names"),
p("Select a site in the table to highlight on the map"),
conditionalPanel("input.row_num > 25",
selectizeInput("row_num", "Select row",
choices = 1:nrow(sites_df),
options = list(
placeholder = 'Please select a row',
onInitialize = I('function() { this.setValue(""); }'))
)
),
DTOutput("table01", fill = TRUE)
),
#** Site map ----
column(4,
h4("Map of Virginia Reservoir LTREB sites"),
wellPanel(
leafletOutput("ltrebmap")
)
),
#** Site photo ----
column(4,
h4("Site photo"),
wellPanel(
imageOutput("site_photo"),
p(id = "txt_j", module_text["site_photo", ])
)
)
),
br(),
box(id = "box1", width = 12, status = "success", solidHeader = TRUE,
fluidRow(
column(11, offset = 1, h4(tags$b(module_text["workflow4", ]))))),
br(),br(),br(),br(),
tags$style(type="text/css", "#stud_dl {background-color:#98CAB2;color: white}"),
wellPanel(
fluidRow(
column(6, align = "center", offset = 3,
downloadButton(outputId = "stud_dl", label = "Download Student Handout")
)
)
),
box(id = "box1", width = 12, status = "success", solidHeader = TRUE,
fluidRow(
column(11, offset = 1, h4(tags$b(module_text["workflow5", ]))))),
br(),br(),br(),
box(id = "box1", width = 12, status = "success", solidHeader = TRUE,
fluidRow(
column(11, offset = 1, h4(tags$b(module_text["workflow6", ]))))),
br(),br(),br(),
box(id = "box1", width = 12, status = "success", solidHeader = TRUE,
fluidRow(
column(11, offset = 1, h4(tags$b(module_text["workflow7", ]))))),
br(),br(),br()
)
),
hr(),
fluidRow(
column(4,
h3("Introductory presentation"),
p(tags$i("Click through the slides to review some of the main points from the introductory presentation to help you answer the questions below.")),
p(tags$b("What is water quality?")),
tags$ul(
tags$li(module_text["water_quality", ])
),
p(tags$b("What is meant by high-frequency water quality data?")),
tags$ul(
tags$li(module_text["high_freq_data", ])
),
p(tags$b("How are high-frequency water quality data collected?")),
tags$ul(
tags$li(module_text["collection", ])
),
),
column(8, offset = 0, align = "center",
h3("Key Slides",
align = "center"),
h5("Click the arrows to navigate through the slides", align = "center"),
wellPanel(
introBox(data.step = 6, data.intro = help_text["slides", 1],
slickROutput("slides", width = "700px", height = "525px")
)
)
)
),
hr(),
fluidRow(
column(10, align = "left",
box(id = "box1", width = 10, status = "primary",
solidHeader = TRUE,
fluidRow(
column(8, offset = 1,
h3("Let's begin..."),
p(id = "txt_j", "Open your Canvas quiz or Word document. Then, answer the following questions in the Canvas quiz or Word document."),
introBox(
h3(tags$b("Think about it!")),
p(tags$b(quest["q1", 1])),
tags$ul(
tags$li(id = "txt_j", quest["q1a", ]),
tags$li(id = "txt_j", quest["q1b", ]),
tags$li(id = "txt_j", quest["q1c", ]),
tags$li(id = "txt_j", quest["q1d", ]),
tags$li(id = "txt_j", quest["q1e", ])
),
p(tags$b(quest["q2", 1])),
tags$ul(
tags$li(id = "txt_j", quest["q2a", ]),
tags$li(id = "txt_j", quest["q2b", ]),
tags$li(id = "txt_j", quest["q2c", ])
),
data.step = 8, data.intro = help_text["questions", 1]
)
)
)
)
)
),
hr(),
fluidRow(
column(6,
h3("Data sources"),
p(HTML(paste0('This module will introduce how to use high-frequency water quality data to inform drinking water management using data from ', a(href = "https://www.ltreb-reservoirs.org/", "Virginia Reservoirs LTREB sites", target = "_blank"), ", which are drinking water supply reservoirs located in southwest Virginia and owned and operated by the Western Virginia Water Authority.")))
),
column(6, align = "center",
a(
href = "https://www.ltreb-reservoirs.org/",
img(src = "ltreb.png", title = "Virginia Reservoirs LTREB logo", height = "80%",
width = "80%"), target = "_blank"
),
a(
href = "https://www.westernvawater.org/",
img(src = "wvwa.png", title = "Western Virginia Water Authority logo", height = "80%",
width = "80%"), target = "_blank"
)
)
)
),
# 2. Activity A ----
tabPanel(title = tab_names["mtab2", 2], value = "mtab2",
img(src = "eddie_banner_2020_test.png", height = 100,
width = 1544, top = 5),
fluidRow(
column(12,
wellPanel(style = paste0("background: ", obj_bg),
h2("Activity A - Access and explore high-frequency water quality data"),
p(module_text["act_A", ])
)
),
column(12,
box(id = "box1", width = 10, status = "success",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
introBox(
h3("Objective 1: Learn about your focal drinking water reservoir"))
)
)
)
)
),
hr(),
fluidRow(
#** LTREB Intro ----
column(6,
box(id = "box12", width = 12, status = "warning",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h3("You have chosen to work with"),
wellPanel(
htmlOutput("site_name")
),
p("You will learn about the characteristics and uses of this reservoir and explore high-frequency water quality data collected there.")
)
)
),
fluidRow(
column(12,
p("")
)
),
fluidRow(
column(12,
wellPanel(
h4(tags$b("About Site")),
textOutput("site_info")
)
)
)
),
column(6,
h4("Site photo"),
wellPanel(
imageOutput("site_photo1"),
p(id = "txt_j", module_text["site_photo", ])
)
)
),
hr(),
fluidRow(
column(12, align = "left",
box(id = "box3", width = 10, status = "primary",
solidHeader = TRUE,
fluidRow(
column(5, offset = 1,
h3("Questions"),
p(tags$b(quest["q3", 1])),
p(tags$b(quest["q4", 1])),
p(tags$b(quest["q5", 1])),
tags$ul(
tags$li(id = "txt_j", quest["q5a", ]),
tags$li(id = "txt_j", quest["q5b", ]),
tags$li(id = "txt_j", quest["q5c", ]),
tags$li(id = "txt_j", quest["q5d", ])
),
p(tags$b(quest["q6", 1])),
p(tags$b(quest["q7", 1]))
),
column(5,
h3(""),
p("Virginia's Water Quality Assessment Guidance Manual gives the following guidance on water quality evaluation using a trophic state index (TSI), which may be calculated from Secchi depth (SD), chlorophyll-a (CA) in the top 1 meter of the water column, or total phosphorus (TP) in the top 1 meter of the water column:"),
p(tags$em("A trophic state index value of 60 or greater for any one of the 3 indices will indicate that nutrient enrichment from anthropogenic sources are adversely interfering, directly or indirectly, with the designated uses. A TSI value of 60 corresponds to a CA concentration of 20 ug/l, a SD of 1 meter, and a TP concentration of 48 ug/l.")),
p(tags$b(quest["q8", 1]))
)
)
)
)
),
hr(),
fluidRow(
column(12,
box(id = "box1", width = 10, status = "success",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
introBox(
h3("Objective 2: Explore high-frequency water quality data from your chosen reservoir"))
)
)
)
)
),
hr(),
fluidRow(
column(12,
h4("Now we will visualize high-frequency data from your chosen reservoir and explore how these data can be related to water quality."))
),
fluidRow(
column(4,
h3("Water temperature"),
p(tags$i("Watch the video and click through the slides to understand how water temperature data relate to water quality. The information in the presentation is also summarized in text below to help you answer the questions.")),
br(),
box(id = "box12", width = 12, status = "primary",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1, align = "left",
h4("Video"),
HTML('<iframe width="280" height="157" src="https://www.youtube.com/embed/phJ6JogqUeE?si=CVuARbc2N3MVu19f" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'),
h4("Questions"),
p(tags$b(quest["q9", 1])),
p(tags$b(quest["q10", 1])),
tags$ul(
tags$li(id = "txt_j", quest["q10a", ]),
tags$li(id = "txt_j", quest["q10b", ]),
tags$li(id = "txt_j", quest["q10c", ]),
tags$li(id = "txt_j", quest["q10d", ]),
tags$li(id = "txt_j", quest["q10e", ])
),
)
)
)
),
column(8, offset = 0, align = "center",
h3("Using water temperature to assess water quality",
align = "center"),
h5("Click the arrows to navigate through the slides", align = "center"),
wellPanel(
slickROutput("wtemp_slides", width = "700px", height = "525px")
)
)
),
hr(),
fluidRow(
column(6,
p(tags$b("Why is water temperature important?")),
tags$ul(
tags$li(module_text["wtemp", ])
),
p(tags$b("What is thermal stratification?")),
tags$ul(
tags$li(module_text["stratification", ])
),
img(src = "water_density.png", height = "60%", id = "bla_border",
width = "60%", tags$style("border: solid 2px black;")),
p("Water density vs. water temperature (degrees Celsius)"),
p(tags$em("Source: Mike Arthur and Demian Saffer, accessed at: https://www.e-education.psu.edu/earth111/node/842"))
),
column(6,
p(tags$b("How does thermal stratification change over the course of a year?")),
tags$ul(
tags$li(module_text["seasonal_strat", ])
),
p(tags$b("How does thermal stratification affect water quality?")),
tags$ul(
tags$li(module_text["strat_wq", ])
),
p(tags$b("What is turnover?")),
tags$ul(
tags$li(module_text["turnover", ])
),
p(tags$b("How does turnover affect water quality?")),
tags$ul(
tags$li(module_text["turnover_wq", ])
)
)
),
hr(),
fluidRow(
column(4,
h3("Plot water temperature data"),
p("Click the button below to plot water temperature data at your chosen reservoir site."),
actionButton("plot_wtemp", "Plot high-frequency water temperature data"),
br(),br(),
box(id = "box12", width = 12, status = "primary",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h4("Questions"),
p(tags$b(quest["q11", 1])),
p(tags$b(quest["q12", 1])),
p(tags$b(quest["q13", 1]))
)
)
)
),
column(8,
wellPanel(
introBox(data.step = 7, data.intro = help_text["plots", 1],
plotlyOutput("wtemp_plot")
)
)
)
),
hr(),
fluidRow(
column(4,
h3("Dissolved oxygen"),
p(tags$i("Watch the video and click through the slides to understand how dissolved oxygen data relate to water quality. The information in the presentation is also summarized in text below to help you answer the questions.")),
br(),
box(id = "box12", width = 12, status = "primary",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h4("Video"),
HTML('<iframe width="280" height="157" src="https://www.youtube.com/embed/3Gft3PS2XYg?si=udyreazhKxA70_Gk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'),
h4("Questions"),
p(tags$b(quest["q14", 1])),
tags$ul(
tags$li(quest["q14a", ]),
tags$li(quest["q14b", ]),
tags$li(quest["q14c", ]),
tags$li(quest["q14d", ])
),
p(tags$b(quest["q15", 1])),
tags$ul(
tags$li(quest["q15a", ]),
tags$li(quest["q15b", ]),
tags$li(quest["q15c", ]),
tags$li(quest["q15d", ])
)
)
)
)
),
column(8, offset = 0, align = "center",
h3("Using dissolved oxygen to assess water quality",
align = "center"),
h5("Click the arrows to navigate through the slides", align = "center"),
wellPanel(
slickROutput("do_slides", width = "700px", height = "525px")
)
)
),
hr(),
fluidRow(
column(6,
p(tags$b("What is dissolved oxygen?")),
tags$ul(
tags$li(module_text["do", ])
),
p(tags$b("How is dissolved oxygen related to water temperature?")),
tags$ul(
tags$li(module_text["do_wtemp", ])
),
img(src = "oxygen_solubility.png", height = "60%", id = "bla_border",
width = "60%", tags$style("border: solid 2px black;")),
p("Oxygen solubility vs. water temperature (degrees Celsius)"),
p(tags$em("Source: Kenneth C. Waterman, accessed at: https://www.researchgate.net/figure/Effect-of-temperature-on-oxygen-solubility-in-water-generated-by-extrapolation-of-data_fig5_7957124"))
),
column(6,
p(tags$b("How can dissolved oxygen affect water quality?")),
tags$ul(
tags$li(module_text["do_wq", ])
)
)
),
hr(),
fluidRow(
column(4,
h3("Plot dissolved oxygen data"),
p("Click the button below to plot dissolved oxygen data at your chosen reservoir site."),
actionButton("plot_do", "Plot high-frequency dissolved oxygen data"),
br(),br(),
box(id = "box12", width = 12, status = "primary",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h4("Questions"),
p(tags$b(quest["q16", 1])),
p(tags$b(quest["q17", 1])),
p(tags$b(quest["q18", 1])),
p(tags$b(quest["q19", 1])),
p(tags$b(quest["q20", 1]))
)
)
)
),
column(8,
wellPanel(
plotlyOutput("do_plot")
)
)
),
hr(),
fluidRow(
column(4,
h3("Turbidity"),
p(tags$i("Watch the video and click through the slides to understand how turbidity data relate to water quality. The information in the presentation is also summarized in text below to help you answer the questions.")),
br(),
box(id = "box12", width = 12, status = "primary",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h4("Video"),
HTML('<iframe width="280" height="157" src="https://www.youtube.com/embed/r0OGKBf0n7o?si=amBJjBo2YMNpdJpI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'),
h4("Questions"),
p(tags$b(quest["q21", 1])),
tags$ul(
tags$li(quest["q21a", ]),
tags$li(quest["q21b", ]),
tags$li(quest["q21c", ])
),
p(tags$b(quest["q22", 1]))
)
)
)
),
column(8, offset = 0, align = "center",
h3("Using turbidity to assess water quality",
align = "center"),
h5("Click the arrows to navigate through the slides", align = "center"),
wellPanel(
slickROutput("turb_slides", width = "700px", height = "525px")
)
)
),
hr(),
fluidRow(
column(6,
p(tags$b("What is turbidity?")),
tags$ul(
tags$li(module_text["turb", ])
),
p(tags$b("How do we measure turbidity?")),
tags$ul(
tags$li(module_text["turb_measure", ])
)
),
column(6,
p(tags$b("How is turbidity related to water quality?")),
tags$ul(
tags$li(module_text["turb_wq", ]),
tags$li(tags$b(module_text["turb_reg", ])),
tags$li(module_text["turb_treat", ]),
tags$li(module_text["turb_operator", ])
)
)
),
hr(),
fluidRow(
column(4,
h3("Plot turbidity data"),
p("Click the button below to plot turbidity data at your chosen reservoir site."),
actionButton("plot_turb", "Plot high-frequency turbidity data"),
br(),br(),
box(id = "box12", width = 12, status = "primary",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h4("Questions"),
p(tags$b(quest["q23", 1])),
p(tags$b(quest["q24", 1]))
)
)
)
),
column(8,
wellPanel(
plotlyOutput("turb_plot")
)
)
),
hr(),
fluidRow(
column(12,
box(id = "box1", width = 10, status = "success",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
introBox(
h3("Next step:"),
h4("Use high-frequency water quality data to make decisions about withdrawal depth in your focal reservoir."))
)
)
)
)
)
),
# 6. Activity B ----
tabPanel(title = tab_names["mtab3", 2], value = "mtab3",
img(src = "eddie_banner_2020_test.png", height = 100,
width = 1544, top = 5),
fluidRow(
column(12,
wellPanel(style = paste0("background: ", obj_bg),
h2("Activity B - Use high-frequency water quality data to make water treatment plant operation decisions"),
p(module_text["act_B", ])
)
),
column(12,
box(id = "box1", width = 10, status = "success",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
introBox(
h3("Objective 3: Use high-frequency water quality data to make water withdrawal depth decisions at different times of year"))
)
)
)
)
),
hr(),
fluidRow(
column(6,
box(id = "box12", width = 12, status = "warning",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h3("Operation scenario"),
h4("Decide: from which depth should water be extracted for treatment?"),
p("You are operating a reservoir with intake valves at multiple depths. During the course of a year, you must decide which intake valve to use to extract water for drinking water treatment."),
p("Remember, water quality can differ greatly at different depths in the reservoir! Your objective is to withdraw water at the depth that has the highest water quality, to minimize treatment difficulty and cost."),
p("Click the plotting buttons below to view reservoir data from different times of year. Then, use what you have learned in previous objectives to choose an intake valve depth."),
h4("The depths of water intake valves in your reservoir are given below."),
wellPanel(
htmlOutput("extraction_depths"),
p("You will use water quality data to decide which of these depths is best for water extraction.")
)
)
)
)
),
column(6,
img(src = "Carvins2023.png", height = "90%", id = "bla_border",
width = "90%", tags$style("border: solid 2px black;")),
p(tags$em("Carvin's Cove Reservoir, Roanoke, VA")),
p(tags$em("Photo credit: Ryan Keverline"))
)
),
hr(),
fluidRow(
column(6,
h3("Summer"),
p("Click the 'Plot summer data' button below to view high-frequency data from the most recent complete calendar year at Falling Creek and Beaverdam Reservoirs. Then, answer the questions below."),
p(tags$em("These plots are interactive! You can scroll over them to see data values, zoom in and out, and change your view window. Plot options will appear in the top right corner of the plot when you scroll over it.")),
fluidRow(
column(4,
actionButton("plot_summer_data", "Plot summer data")
)
)
),
column(6,
)
),
fluidRow(br()),
fluidRow(
column(4,
box(id = "box12", width = 12, status = "primary",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h4("Questions"),
p(tags$b(quest["q25", 1])),
p(tags$b(quest["q26", 1])),
p(tags$b(quest["q27", 1]))
)
)
)
),
column(8,
wellPanel(
plotlyOutput("summer_data_plot", width = "800px", height = "700px")
)
)
),
fluidRow(
column(12,
box(id = "box12", width = 12, status = "warning",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h3("Make a decision for water extraction on July 31."),
h4(tags$em("Hint: you can scroll over the plot to see the exact values of the water quality variables at different depths on July 31.")),
p(tags$b(quest["q28", 1])),
p(tags$b(quest["q29", 1]))
)
)
)
)
),
hr(),
fluidRow(
column(6,
h3("Fall"),
p("Click the 'Plot fall data' button below to view high-frequency data from the most recent complete calendar year at Falling Creek and Beaverdam Reservoirs. Then, answer the questions below."),
p(tags$em("These plots are interactive! You can scroll over them to see data values, zoom in and out, and change your view window. Plot options will appear in the top right corner of the plot when you scroll over it.")),
fluidRow(
column(4,
actionButton("plot_fall_data", "Plot fall data")
)
)
),
column(6,
)
),
fluidRow(br()),
fluidRow(
column(4,
box(id = "box12", width = 12, status = "primary",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h4("Questions"),
p(tags$b(quest["q30", 1])),
p(tags$em("Hint! Notice that the data are plotted in degrees Fahrenheit!")),
p(tags$b(quest["q31", 1])),
p(tags$b(quest["q32", 1]))
)
)
)
),
column(8,
wellPanel(
plotlyOutput("fall_data_plot", width = "800px", height = "700px")
)
)
),
fluidRow(
column(12,
box(id = "box12", width = 12, status = "warning",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h3("Make a decision for water extraction before and after fall turnover."),
p(tags$b(quest["q33", 1])),
p(tags$b(quest["q34", 1])),
p(tags$b(quest["q35", 1])),
p(tags$b(quest["q36", 1])),
p(tags$b(quest["q37", 1]))
)
)
)
)
),
hr(),
fluidRow(
column(6,
h3("Winter"),
p("Click the 'Plot winter data' button below to view high-frequency data from the most recent complete calendar year at Falling Creek and Beaverdam Reservoirs. Then, answer the questions below."),
p(tags$em("These plots are interactive! You can scroll over them to see data values, zoom in and out, and change your view window. Plot options will appear in the top right corner of the plot when you scroll over it.")),
fluidRow(
column(4,
actionButton("plot_winter_data", "Plot winter data")
)
)
),
column(6,
)
),
fluidRow(br()),
fluidRow(
column(4,
box(id = "box12", width = 12, status = "primary",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h4("Questions"),
p(tags$b(quest["q38", 1])),
p(tags$b(quest["q39", 1])),
p(tags$b(quest["q40", 1]))
)
)
)
),
column(8,
wellPanel(
plotlyOutput("winter_data_plot", width = "800px", height = "700px")
)
)
),
fluidRow(
column(12,
box(id = "box12", width = 12, status = "warning",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h3("Make a decision for water extraction on January 31."),
p(tags$b(quest["q41", 1])),
p(tags$b(quest["q42", 1]))
)
)
)
)
),
hr(),
fluidRow(
column(12,
box(id = "box1", width = 10, status = "success",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
introBox(
h3("Objective 4: Define water quality forecasting and interpret a fall turnover forecast"))
)
)
)
)
),
hr(),
fluidRow(
column(6,
h3("Forecasting fall turnover"),
p("You have seen that fall turnover can have substantial impacts on water quality."),
p("Because of this, researchers have been working to develop water temperature forecasts to predict fall turnover in advance."),
p("With advance notice of turnover, water managers may be able to take preemptive management action to avoid water quality degradation or increased treatment costs during turnover."),
p("Below, you will learn about water temperature forecasting and how to interpret a turnover forecast."),
box(id = "box12", width = 12, status = "warning",
solidHeader = TRUE,
fluidRow(
column(10, offset = 1,
h3("Fall turnover effects on water quality"),
p("The picture to the right illustrates the potential effects of fall turnover on water quality."),
p("When temperatures homogenize across the water column, dissolved substances and particulate matter can be brought to the surface, increasing turbidity."),
p("The bottle on the left was a sample taken from Falling Creek Reservoir just before turnover, while the bottle on the right was collected right after turnover - just a few days later!"),
p(tags$em("Photo credit: Bethany Bookout"))
)
)
)
),
column(6,
img(src = "turnover_water_samples.png", height = "90%", id = "bla_border",
width = "90%", tags$style("border: solid 2px black;")),
p(tags$em("Water samples from Falling Creek Reservoir just before (left) and after (right) fall turnover."))
)
),
hr(),
fluidRow(