22title : " TEMPEST_Aquifer_WellTest_202509"
33author : " Stephanie J. Wilson"
44date : " 2025-09-05"
5- output : pdf_document
5+ output :
6+ pdf_document :
7+ latex_engine : xelatex
68---
79
810``` {r setup, include=FALSE}
@@ -17,14 +19,16 @@ library(tidyr)
1719library(lubridate)
1820library(knitr)
1921library(tibble)
22+ library(patchwork)
2023```
21-
2224## Aquatroll (AQ600) Well Data
23-
2425``` {r, echo=FALSE}
26+ cat("In Situ AQ600 was put in a bucket with the well outflow.
27+ Data was recorded every minute for the duration of the test.
28+ Missing points are from removing the AQ600 from the bucket to check transmission.")
2529
2630well_dat <- read.csv("COMPASS_TEMPEST_WellTest_AQ600_Data.csv")
27- head(well_dat)
31+ # head(well_dat)
2832
2933#change column names in well_dat
3034colnames(well_dat) <- c("Date_Time","pH", "pH_mV" ,"ORP_mV", "DO_mgL", "DO_Sat", "DO_pp", "Actual_Conductivity_µScm" ,
@@ -43,54 +47,55 @@ well_dat_filtered <- well_dat %>%
4347 filter(DO_mgL < 1) %>%
4448 filter(TDS_ppt > 0.10)
4549
50+ #create a table of average concentrations:
51+ summary_stats <- well_dat_filtered %>%
52+ summarise(
53+ Salinity_psu_mean = mean(Salinity_psu, na.rm = TRUE),
54+ Salinity_psu_sd = sd(Salinity_psu, na.rm = TRUE),
55+ Sp_Conductivity_µScm_mean = mean(Specific_Conductivity_µScm, na.rm = TRUE),
56+ Sp_Conductivity_µScm_sd = sd(Specific_Conductivity_µScm, na.rm = TRUE),
57+ DO_mgL_mean = mean(DO_mgL, na.rm = TRUE),
58+ DO_mgL_sd = sd(DO_mgL, na.rm = TRUE),
59+ TDS_ppt_mean = mean(TDS_ppt, na.rm = TRUE),
60+ TDS_ppt_sd = sd(TDS_ppt, na.rm = TRUE)
61+ ) %>%
62+ pivot_longer(
63+ everything(),
64+ names_to = c("Measurement", ".value"),
65+ names_sep = "_(?=[^_]+$)" # Split at last underscore
66+ ) %>%
67+ mutate(mean = round(mean, 3),
68+ sd = round(sd, 3))
69+
70+ kable(summary_stats)
71+
4672
4773#plot Salinity
4874sal <- ggplot()+
4975 geom_point(data=well_dat_filtered, aes(x=Date_Time, y=Salinity_psu), size=2, color="blue")+
5076 theme_bw()+ labs(x="Time", y="Salinity (psu)", title="Aquifer Salinity") + theme(legend.title = element_blank())
51- sal
77+
5278
5379#plot Conductivity
5480cond <- ggplot()+
5581 geom_point(data=well_dat_filtered, aes(x=Date_Time, y=Specific_Conductivity_µScm), size=2, color="darkblue")+
5682 theme_bw()+ labs(x="Time", y="Specific Conductivity (µScm)", title="Aquifer Conductivity") + theme(legend.title = element_blank())
57- cond
83+
84+ sal + cond
5885
5986#plot DO
6087do <- ggplot()+
6188 geom_point(data=well_dat_filtered, aes(x=Date_Time, y=DO_mgL), size=2, color="darkred")+
6289 theme_bw()+ labs(x="Time", y="Dissolved Oxygen (mg/L)", title="Aquifer Dissolved Oxygen") + theme(legend.title = element_blank())
63- do
6490
6591
6692#plot TDS
6793tds <- ggplot()+
6894 geom_point(data=well_dat_filtered, aes(x=Date_Time, y=TDS_ppt), size=2, color="darkgreen")+
6995 theme_bw()+ labs(x="Time", y="Total Dissolved Solids (ppt))", title="Aquifer TDS") + theme(legend.title = element_blank())
70- tds
7196
97+ do + tds
7298
73- #create a table of average concentrations:
74- summary_stats <- well_dat_filtered %>%
75- summarise(
76- Salinity_psu_mean = mean(Salinity_psu, na.rm = TRUE),
77- Salinity_psu_sd = sd(Salinity_psu, na.rm = TRUE),
78- Sp_Conductivity_µScm_mean = mean(Specific_Conductivity_µScm, na.rm = TRUE),
79- Sp_Conductivity_µScm_sd = sd(Specific_Conductivity_µScm, na.rm = TRUE),
80- DO_mgL_mean = mean(DO_mgL, na.rm = TRUE),
81- DO_mgL_sd = sd(DO_mgL, na.rm = TRUE),
82- TDS_ppt_mean = mean(TDS_ppt, na.rm = TRUE),
83- TDS_ppt_sd = sd(TDS_ppt, na.rm = TRUE)
84- ) %>%
85- pivot_longer(
86- everything(),
87- names_to = c("Measurement", ".value"),
88- names_sep = "_(?=[^_]+$)" # Split at last underscore
89- ) %>%
90- mutate(mean = round(mean, 3),
91- sd = round(sd, 3))
92-
93- kable(summary_stats)
9499
95100```
96101
0 commit comments