diff --git a/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_GHG_202604.Rmd b/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_GHG_202604.Rmd new file mode 100644 index 0000000..bf23053 --- /dev/null +++ b/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_GHG_202604.Rmd @@ -0,0 +1,1604 @@ +--- +title: "GENX: Porewater Methane" +author: "April Samples" +date: "`r Sys.Date()`" +output: + pdf_document: + toc: true + toc_depth: 1 + number_sections: true +output_dir: "To Be Reviewed/PDF" +--- + +```{r Run Setup,include=FALSE} +if (!require("pacman")) install.packages("pacman") +pacman::p_load( + dplyr, + purrr, + fuzzyjoin, + ggplot2, + ggpubr, + data.table, + stringr, + here) +``` +\newpage + +##Run Information +```{r run information, include=TRUE} +cat("Run Information: Melanie Giessner ") #lets you know what section you're in +#set the run date & user name +sample_year <- "2026" +sample_month <- "April" +user <- "Melanie Giessner" +#identify the files you want to read in +#read in as a list to accommodate multiple runs in a month + +#change dates +folder_path_rawdata <- paste0("Raw Data") +GHG_files <- list.files(path = folder_path_rawdata,pattern = "20260417|20260501" ,full.names = TRUE) +head(GHG_files) +#GHG_files <- c("Raw Data/20260417_GENX_GHGdata.csv","Raw Data/20260501_GENX_GHGdata.csv" ) + + +# Define the file path for QAQC log file - NO Need to change just check year +log_path <- "Processed Data/ShimadzuGC_Slope_QAQC.csv" + + +# Define final path for data be sure to change year and month and run number +final_path <- "Processed Data/GCReW_GENX_Porewater_CH4_202604.csv" + +#Gas in Water Calculations +# "TempC" column value in Celsius (equilibration temperature) and volume of gas (in liters) in syringe (not changing currently) +TempC = 25 #Equilibration Temperature (Celsius) + +volume_g = 0.015 #volume of gas (in liters) in syringe when equilibrized +volume_w = 0.015 #volume of water (in liters) in syringe when equilibrized (should be equal to volume_g) + +#record any notes about the run or anything other info here: +run_notes <- "" + +#Metadata File Path + Raw_Metadata = here(".." , "GCReW", "GCReW_Project_Treatment_Metadata.csv") + +#Collection_Dates = "Raw Data/Sample_Collection_Dates_2024.csv" + +cat(run_notes) +``` + + +##Set Up + +```{r setup, include=FALSE} + +if (!require("pacman")) install.packages("pacman") +pacman::p_load( + dplyr, + purrr, + fuzzyjoin, + ggplot2, + ggpubr, + stringr, + here) + +##Low & High Standard Curve Cutoffs +CH4_low_std_crv_cutoff <- 10 +CH4_low_std_crv_area_cutoff <- 7000 +CH4_mid_std_crv_cutoff <- 100 +CH4_mid_std_crv_area_cutoff <- 70000 +CH4_high_std_crv_cutoff <- 10000 + +CO2_low_std_crv_cutoff <- 2000 +CO2_low_std_crv_area_cutoff <- 900000 +CO2_mid_std_crv_cutoff <- 20000 +CO2_mid_std_crv_area_cutoff <- 7000000 +CO2_high_std_crv_cutoff <- 50100 + +N2O_low_std_crv_cutoff <- 5 +N2O_low_std_crv_area_cutoff <- 13000 +N2O_mid_std_crv_cutoff <- 50.2 +N2O_mid_std_crv_area_cutoff <- 100000 +N2O_high_std_crv_cutoff <- 500 + +r2_cutoff <- 0.990 + +##Gas In Water Calculation +R <- 0.08206 +CTK <- 273.15 + +#Metadata file path +#Raw_Metadata = here(".." , "GCReW", "GCReW_Project_Treatment_Metadata.csv") + +##Detection Limits +adl_cutoff <- 20000 +bdl_cutoff <- 50 + +##Check Standard Concentration +level_CH4 <- 10 #ppm +level_CO2 <- 2000 #ppm +level_N2O <- 5 #ppm +chks_flag = 60 +blks_flag = 60 + +#Volumes +exetainer_volume =12 + + +``` + + +##Read in metadata and create similar sample IDs for matching to samples +```{r pull in metadata for later, include=FALSE} + +#read in the raw metadata file +raw_metadata <- read.csv(Raw_Metadata) + +#clean up columns in metadata file: + #Pull out only SMARTX Rows + #Create a Sample_Name column to match the SEAL +metadata <- raw_metadata %>% + filter(grepl("GENX", Project, ignore.case = TRUE)) %>% + mutate(Sample_Name = Sample.ID) %>% + mutate(Month = sample_month) %>% + mutate(Year = sample_year) %>% + rename( + Sample_ID = Sample.ID, + ) %>% + dplyr::select(-N_Treatment) + + +``` + +# Read in data files +```{r , include=FALSE} + +#Read in Nov Data +raw_list <- map(GHG_files, read.csv) + + +# Combining Files +raw <- bind_rows(raw_list) + + + +#rename column +colnames(raw)[1] <- "Sample_ID" + +#head(stds_ch4) + +``` + +# Assess standard curves +```{r , echo=FALSE} +stds_ch4 <- raw %>% + filter(str_detect(Type, "Standard")) %>% filter(!Conc_CH4 == "unknown") + +#Correct data class +stds_ch4[, "Conc_CH4"] <- as.numeric(stds_ch4[, "Conc_CH4"]) + +#get the area of the top of the low curve +CH4_low_std_crv_area_cutoff <-stds_ch4$CH4_Area[stds_ch4$Conc_CH4 == CH4_low_std_crv_cutoff] +#Separate Into Low and High + +mnmx_stds <- stds_ch4 %>% filter(Conc_CH4 > 0) %>% group_by(Run_Date) %>% mutate(CH4_Min = min(Conc_CH4), CH4_Max = max(Conc_CH4)) %>% dplyr::select(Run_Date, CH4_Min, CH4_Max) %>% unique() + +low_stds_ch4 <- stds_ch4 %>% + filter(!Conc_CH4 > CH4_low_std_crv_cutoff) + +low_stds_ch4$Conc_CH4 <- as.numeric(low_stds_ch4$Conc_CH4) + + +high_stds_ch4 <- stds_ch4 %>% + filter(!Conc_CH4 < CH4_low_std_crv_cutoff) + +high_stds_ch4$Conc_CH4 <- as.numeric(high_stds_ch4$Conc_CH4) + +#High Curve for CH4 +CH4_Curve <- ggplot(high_stds_ch4, aes(CH4_Area , Conc_CH4, color = Run_Date)) + geom_point(size = 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "High CH4 Std Curve") +CH4_Curve + + # Convert 'run date' to a factor for grouping + high_stds_ch4_grouped <- high_stds_ch4 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data <- high_stds_ch4_grouped %>% + group_by(Run_Date) %>% + group_split() + +#run regression and get coefficients by Run + +Slope_CH4_raw_list <- map(split_data, ~ .x %>% mutate(CH4_Curve = "High", + CH4_R2 = summary(lm(Conc_CH4 ~ CH4_Area , data = .))$adj.r.squared , + CH4_Slope = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[2], + CH4_Intercept = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[1])) + + Slope_CH4_raw <- bind_rows(Slope_CH4_raw_list) + + Slope_CH4_High <- Slope_CH4_raw %>% dplyr::select(Run_Date, CH4_Curve, CH4_R2, CH4_Slope, CH4_Intercept) %>% distinct() + + + +#low Curve for CH4 +CH4_Curve <- ggplot(low_stds_ch4, aes(CH4_Area , Conc_CH4, color = Run_Date)) + geom_point(size = + 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "Low CH4 Std Curve") +CH4_Curve + +low_CH4_lm <- lm(low_stds_ch4$CH4_Area ~ low_stds_ch4$Conc_CH4) +low_cf <- coef(low_CH4_lm) + + # Convert 'run date' to a factor for grouping + low_stds_ch4_grouped <- low_stds_ch4 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data_l <- low_stds_ch4_grouped %>% + group_by(Run_Date) %>% + group_split() + + +#run regression and get coefficients by Run + +Slope_CH4_raw_list_l <- map(split_data_l, ~ .x %>% mutate(CH4_Curve = "Low", + CH4_R2 = summary(lm(Conc_CH4 ~ CH4_Area , data = .))$adj.r.squared , + CH4_Slope = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[2], + CH4_Intercept = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[1])) + + Slope_CH4_raw_l <- bind_rows(Slope_CH4_raw_list_l) + + Slope_CH4_Low <- Slope_CH4_raw_l %>% dplyr::select(Run_Date, CH4_Curve, CH4_R2, CH4_Slope, CH4_Intercept) %>% distinct() + + Slope_CH4 <- rbind(Slope_CH4_High, Slope_CH4_Low) + + Slope_CH4_m <- left_join(Slope_CH4, mnmx_stds) + + + +#check r2 + +ifelse(Slope_CH4_High$CH4_R2 < r2_cutoff, paste0("High_R2 is Bad","-", Slope_CH4_High$Run_Date), paste0("High_R2 is Good","-", Slope_CH4_High$Run_Date)) + +ifelse(Slope_CH4_Low$CH4_R2 < r2_cutoff, paste0("Low_R2 is Bad","-", Slope_CH4_Low$Run_Date), paste0("Low_R2 is Good","-", Slope_CH4_Low$Run_Date)) + +High_R2_Flags <- Slope_CH4_High %>% mutate(Flag_CH4 = ifelse(CH4_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CH4, Run_Date, CH4_Curve) + + +Low_R2_Flags <- Slope_CH4_Low %>% mutate(Flag_CH4 = ifelse(CH4_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CH4, Run_Date, CH4_Curve) + +Flags_df_CH4 <- rbind(High_R2_Flags, Low_R2_Flags) +``` + + +```{r CO2, echo=FALSE} +stds_CO2 <- raw %>% + filter(str_detect(Type, "Standard")) %>% filter(!Conc_CO2 == "unknown") + +#Correct data class +stds_CO2[, "Conc_CO2"] <- as.numeric(stds_CO2[, "Conc_CO2"]) + +#get the area of the top of the low curve +CO2_low_std_crv_area_cutoff <-stds_CO2$CO2_Area[stds_CO2$Conc_CO2 == CO2_low_std_crv_cutoff] +#Separate Into Low and High + +mnmx_stds <- stds_CO2 %>% filter(Conc_CO2 > 0) %>% group_by(Run_Date) %>% mutate(CO2_Min = min(Conc_CO2), CO2_Max = max(Conc_CO2)) %>% dplyr::select(Run_Date, CO2_Min, CO2_Max) %>% unique() + +low_stds_CO2 <- stds_CO2 %>% + filter(!Conc_CO2 > CO2_low_std_crv_cutoff) + +low_stds_CO2$Conc_CO2 <- as.numeric(low_stds_CO2$Conc_CO2) + + +high_stds_CO2 <- stds_CO2 %>% + filter(!Conc_CO2 < CO2_low_std_crv_cutoff) + +high_stds_CO2$Conc_CO2 <- as.numeric(high_stds_CO2$Conc_CO2) + +#High Curve for CO2 +CO2_Curve <- ggplot(high_stds_CO2, aes(CO2_Area , Conc_CO2, color = Run_Date)) + geom_point(size = 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "High CO2 Std Curve") +CO2_Curve + + # Convert 'run date' to a factor for grouping + high_stds_CO2_grouped <- high_stds_CO2 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data <- high_stds_CO2_grouped %>% + group_by(Run_Date) %>% + group_split() + +#run regression and get coefficients by Run + +Slope_CO2_raw_list <- map(split_data, ~ .x %>% mutate(CO2_Curve = "High", + CO2_R2 = summary(lm(Conc_CO2 ~ CO2_Area , data = .))$adj.r.squared , + CO2_Slope = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[2], + CO2_Intercept = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[1])) + + Slope_CO2_raw <- bind_rows(Slope_CO2_raw_list) + + Slope_CO2_High <- Slope_CO2_raw %>% dplyr::select(Run_Date, CO2_Curve, CO2_R2, CO2_Slope, CO2_Intercept) %>% distinct() + + + +#low Curve for CO2 +CO2_Curve <- ggplot(low_stds_CO2, aes(CO2_Area , Conc_CO2, color = Run_Date)) + geom_point(size = + 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "Low CO2 Std Curve") +CO2_Curve + +low_CO2_lm <- lm(low_stds_CO2$CO2_Area ~ low_stds_CO2$Conc_CO2) +low_cf <- coef(low_CO2_lm) + + # Convert 'run date' to a factor for grouping + low_stds_CO2_grouped <- low_stds_CO2 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data_l <- low_stds_CO2_grouped %>% + group_by(Run_Date) %>% + group_split() + + +#run regression and get coefficients by Run + +Slope_CO2_raw_list_l <- map(split_data_l, ~ .x %>% mutate(CO2_Curve = "Low", + CO2_R2 = summary(lm(Conc_CO2 ~ CO2_Area , data = .))$adj.r.squared , + CO2_Slope = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[2], + CO2_Intercept = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[1])) + + Slope_CO2_raw_l <- bind_rows(Slope_CO2_raw_list_l) + + Slope_CO2_Low <- Slope_CO2_raw_l %>% dplyr::select(Run_Date, CO2_Curve, CO2_R2, CO2_Slope, CO2_Intercept) %>% distinct() + + Slope_CO2 <- rbind(Slope_CO2_High, Slope_CO2_Low) + + Slope_CO2_m <- left_join(Slope_CO2, mnmx_stds) + + + +#check r2 + +ifelse(Slope_CO2_High$CO2_R2 < r2_cutoff, paste0("High_R2 is Bad","-", Slope_CO2_High$Run_Date), paste0("High_R2 is Good","-", Slope_CO2_High$Run_Date)) + +ifelse(Slope_CO2_Low$CO2_R2 < r2_cutoff, paste0("Low_R2 is Bad","-", Slope_CO2_Low$Run_Date), paste0("Low_R2 is Good","-", Slope_CO2_Low$Run_Date)) + +High_R2_Flags <- Slope_CO2_High %>% mutate(Flag_CO2 = ifelse(CO2_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CO2, Run_Date, CO2_Curve) + + +Low_R2_Flags <- Slope_CO2_Low %>% mutate(Flag_CO2 = ifelse(CO2_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CO2, Run_Date, CO2_Curve) + +Flags_df_CO2 <- rbind(High_R2_Flags, Low_R2_Flags) +``` + + +```{r N20, echo=FALSE} +stds_N2O <- raw %>% + filter(str_detect(Type, "Standard")) %>% filter(!Conc_N2O == "unknown") + +#Correct data class +stds_N2O[, "Conc_N2O"] <- as.numeric(stds_N2O[, "Conc_N2O"]) + +#get the area of the top of the low curve +N2O_low_std_crv_area_cutoff <-stds_N2O$N2O_Area[stds_N2O$Conc_N2O == N2O_low_std_crv_cutoff] +#Separate Into Low and High + +mnmx_stds <- stds_N2O %>% filter(Conc_N2O > 0) %>% group_by(Run_Date) %>% mutate(N2O_Min = min(Conc_N2O), N2O_Max = max(Conc_N2O)) %>% dplyr::select(Run_Date, N2O_Min, N2O_Max) %>% unique() + +low_stds_N2O <- stds_N2O %>% + filter(!Conc_N2O > N2O_low_std_crv_cutoff) + +low_stds_N2O$Conc_N2O <- as.numeric(low_stds_N2O$Conc_N2O) + + +high_stds_N2O <- stds_N2O %>% + filter(!Conc_N2O < N2O_low_std_crv_cutoff) + +high_stds_N2O$Conc_N2O <- as.numeric(high_stds_N2O$Conc_N2O) + +#High Curve for N2O +N2O_Curve <- ggplot(high_stds_N2O, aes(N2O_Area , Conc_N2O, color = Run_Date)) + geom_point(size = 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "High N2O Std Curve") +N2O_Curve + + # Convert 'run date' to a factor for grouping + high_stds_N2O_grouped <- high_stds_N2O %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data <- high_stds_N2O_grouped %>% + group_by(Run_Date) %>% + group_split() + +#run regression and get coefficients by Run + +Slope_N2O_raw_list <- map(split_data, ~ .x %>% mutate(N2O_Curve = "High", + N2O_R2 = summary(lm(Conc_N2O ~ N2O_Area , data = .))$adj.r.squared , + N2O_Slope = coef(lm(Conc_N2O ~ N2O_Area , data = .))[2], + N2O_Intercept = coef(lm(Conc_N2O ~ N2O_Area , data = .))[1])) + + Slope_N2O_raw <- bind_rows(Slope_N2O_raw_list) + + Slope_N2O_High <- Slope_N2O_raw %>% dplyr::select(Run_Date, N2O_Curve, N2O_R2, N2O_Slope, N2O_Intercept) %>% distinct() + + + +#low Curve for N2O +N2O_Curve <- ggplot(low_stds_N2O, aes(N2O_Area , Conc_N2O, color = Run_Date)) + geom_point(size = + 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "Low N2O Std Curve") +N2O_Curve + +low_N2O_lm <- lm(low_stds_N2O$N2O_Area ~ low_stds_N2O$Conc_N2O) +low_cf <- coef(low_N2O_lm) + + # Convert 'run date' to a factor for grouping + low_stds_N2O_grouped <- low_stds_N2O %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data_l <- low_stds_N2O_grouped %>% + group_by(Run_Date) %>% + group_split() + + +#run regression and get coefficients by Run + +Slope_N2O_raw_list_l <- map(split_data_l, ~ .x %>% mutate(N2O_Curve = "Low", + N2O_R2 = summary(lm(Conc_N2O ~ N2O_Area , data = .))$adj.r.squared , + N2O_Slope = coef(lm(Conc_N2O ~ N2O_Area , data = .))[2], + N2O_Intercept = coef(lm(Conc_N2O ~ N2O_Area , data = .))[1])) + + Slope_N2O_raw_l <- bind_rows(Slope_N2O_raw_list_l) + + Slope_N2O_Low <- Slope_N2O_raw_l %>% dplyr::select(Run_Date, N2O_Curve, N2O_R2, N2O_Slope, N2O_Intercept) %>% distinct() + + Slope_N2O <- rbind(Slope_N2O_High, Slope_N2O_Low) + + Slope_N2O_m <- left_join(Slope_N2O, mnmx_stds) + + + +#check r2 + +ifelse(Slope_N2O_High$N2O_R2 < r2_cutoff, paste0("High_R2 is Bad","-", Slope_N2O_High$Run_Date), paste0("High_R2 is Good","-", Slope_N2O_High$Run_Date)) + +ifelse(Slope_N2O_Low$N2O_R2 < r2_cutoff, paste0("Low_R2 is Bad","-", Slope_N2O_Low$Run_Date), paste0("Low_R2 is Good","-", Slope_N2O_Low$Run_Date)) + +High_R2_Flags <- Slope_N2O_High %>% mutate(Flag_N2O = ifelse(N2O_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_N2O, Run_Date, N2O_Curve) + + +Low_R2_Flags <- Slope_N2O_Low %>% mutate(Flag_N2O = ifelse(N2O_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_N2O, Run_Date, N2O_Curve) + +Flags_df_N2O <- rbind(High_R2_Flags, Low_R2_Flags) + + +``` + +```{r log} +#add new standard curve data to log +Slope_CH4_1 <- Slope_CH4 %>% mutate(curve = paste0("Slope_CH4_", CH4_Curve), R2 = CH4_R2, slope = CH4_Slope, intercept = CH4_Intercept, Analysis = "CH4", Run_by = user, Curve_top = case_when( + CH4_Curve == "Low" ~ paste(CH4_low_std_crv_cutoff,"ppm"), + CH4_Curve == "High" ~ paste(CH4_high_std_crv_cutoff,"ppm"), + .default = as.character(CH4_mid_std_crv_cutoff) +)) %>% dplyr::select(Analysis, Run_Date, Run_by, Curve_top, curve, R2, slope, intercept) +Slope_CO2_1 <- Slope_CO2 %>% mutate(curve = paste0("Slope_CO2_", CO2_Curve), R2 = CO2_R2, slope = CO2_Slope, intercept = CO2_Intercept, Analysis = "CO2", Run_by = user, Curve_top = case_when( + CO2_Curve == "Low" ~ paste(CO2_low_std_crv_cutoff,"ppm"), + CO2_Curve == "High" ~ paste(CO2_high_std_crv_cutoff,"ppm"), + .default = as.character(CO2_mid_std_crv_cutoff) +)) %>% dplyr::select(Analysis, Run_Date, Run_by, Curve_top, curve, R2, slope, intercept) +Slope_N2O_1 <- Slope_N2O %>% mutate(curve = paste0("Slope_N2O_", N2O_Curve), R2 = N2O_R2, slope = N2O_Slope, intercept = N2O_Intercept, Analysis = "N2O", Run_by = user, Curve_top = case_when( + N2O_Curve == "Low" ~ paste(N2O_low_std_crv_cutoff,"ppm"), + N2O_Curve == "High" ~ paste(N2O_high_std_crv_cutoff,"ppm"), + .default = as.character(N2O_mid_std_crv_cutoff) +)) %>% dplyr::select(Analysis, Run_Date, Run_by, Curve_top, curve, R2, slope, intercept) + +Slope <- rbind(Slope_CH4_1, Slope_CO2_1, Slope_N2O_1) + + log <- read.csv(log_path) + log <- log[, -c(1)] + head(log) + + log <- rbind(log, Slope) + +#remove possible duplicates from multiple QAQC attempts + + unique_log <- log %>% + mutate(Run_Date = as.Date(Run_Date,tryFormats = c("%Y-%m-%d", "%m/%d/%Y", "%m/%d/%y")), curve= gsub("L","l",curve), curve= gsub("H","h",curve))%>% distinct(.keep_all = TRUE) + + Slopes_chk_CH4 <- ggplot(unique_log %>% filter( grepl("CH4",curve,ignore.case = T)), aes(x = Run_Date, y = slope, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + Slopes_chk_CH4 + + Slopes_chk_CO2 <- ggplot(unique_log %>% filter( grepl("CO2",curve,ignore.case = T)), aes(x = Run_Date, y = slope, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + Slopes_chk_CO2 + + Slopes_chk_N2O <- ggplot(unique_log %>% filter( grepl("N2O",curve,ignore.case = T)), aes(x = Run_Date, y = slope, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + Slopes_chk_N2O + + + int_chk_CH4 <- ggplot(unique_log %>% filter( grepl("CH4",curve,ignore.case = T)), aes(x = Run_Date, y = intercept, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + int_chk_CH4 + + int_chk_CO2 <- ggplot(unique_log %>% filter( grepl("CO2",curve,ignore.case = T)), aes(x = Run_Date, y = intercept, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + int_chk_CO2 + + int_chk_N2O <- ggplot(unique_log %>% filter( grepl("N2O",curve,ignore.case = T)), aes(x = Run_Date, y = intercept, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + int_chk_N2O + +``` + + +## Now calculate the CH4 in ppm +```{r Calculate Concetration, echo=FALSE} +#head(raw) + +#pull out Samples +Samples_1 <- raw %>% + filter(!str_detect(Type, "Lab air")) %>% + filter(!str_detect(Type, "Standard")) %>% + filter(!str_detect(Type, "Blank")) %>% + filter(!str_detect(Type, "Chk_STD")) %>% + filter(!str_detect(Type, "ChkStd")) %>% + filter(!str_detect(Type, "NA")) %>% + + mutate(CH4_Curve = ifelse(CH4_Area >= mean(CH4_low_std_crv_area_cutoff,na.rm = TRUE), "High", "Low"), CO2_Curve = ifelse(CO2_Area >= mean(CO2_low_std_crv_area_cutoff,na.rm = TRUE), "High", "Low"), N2O_Curve = ifelse(N2O_Area >= mean(N2O_low_std_crv_area_cutoff,na.rm = TRUE), "High", "Low")) +#head(Samples) + +Samples_2 <- merge(Samples_1, Slope_CH4_m) +Samples_2 <- merge(Samples_2, Slope_CO2_m) +Samples_2 <- merge(Samples_2, Slope_N2O_m) +#Calculate CH4 concentrations in ppm +Samples <- Samples_2 %>% + mutate(CH4_Conc_ppm = (CH4_Area*CH4_Slope) + CH4_Intercept ,CO2_Conc_ppm = (CO2_Area*CO2_Slope)+ CO2_Intercept, N2O_Conc_ppm = (N2O_Area*N2O_Slope) + N2O_Intercept ) + +##########make flags for any dilutions needed + + +Samples$CH4_Flag <- ifelse(Samples$CH4_Conc_ppm > Samples$CH4_Max, "ADL", ifelse(Samples$CH4_Conc_ppm < Samples$CH4_Min, "BDL", "Within Range")) +Samples$CO2_Flag <- ifelse(Samples$CO2_Conc_ppm > Samples$CO2_Max, "ADL", ifelse(Samples$CO2_Conc_ppm < Samples$CO2_Min, "BDL", "Within Range")) +Samples$N2O_Flag <- ifelse(Samples$N2O_Conc_ppm > Samples$N2O_Max, "ADL", ifelse(Samples$N2O_Conc_ppm < Samples$N2O_Min, "BDL", "Within Range")) +#head(Samples) + + + +``` + +# Aanlayze the Check Standards +```{r Asses Check Standards, echo=FALSE} + +chks_1 <- raw %>% + filter(!str_detect(Type, "Lab air")) %>% + filter(!str_detect(Type, "Standard")) %>% + filter(!str_detect(Type, "Blank")) %>% + filter(!str_detect(Type, "Sample")) %>% + filter(!str_detect(Type, "NA")) %>% + mutate(CH4_Curve = "Low",CO2_Curve = "Low",N2O_Curve = "Low") +#head(chks) + + +chks_2 <- merge(chks_1, Slope_CH4_m) +chks_2 <- merge(chks_2, Slope_CO2_m) +chks_2 <- merge(chks_2, Slope_N2O_m) + +chks <- chks_2 %>% + mutate(CH4_Conc_ppm = (CH4_Area*CH4_Slope) + CH4_Intercept ,CO2_Conc_ppm = (CO2_Area*CO2_Slope)+ CO2_Intercept, N2O_Conc_ppm = (N2O_Area*N2O_Slope) + N2O_Intercept ) + +#calculate percent difference of check standards +chks<- chks %>% mutate( + Ch4_diff = (((chks$CH4_Conc_ppm - level_CH4) / ((chks$CH4_Conc_ppm + level_CH4) /2)) * 100), + CH4_diff_flag = ifelse(abs(Ch4_diff) < 10, 'YES', 'NO, rerun'), + CO2_diff = (((chks$CO2_Conc_ppm - level_CO2) / ((chks$CO2_Conc_ppm + level_CO2) /2)) * 100), + CO2_diff_flag = ifelse(abs(CO2_diff) < 10, 'YES', 'NO, rerun'), + N2O_diff = (((chks$N2O_Conc_ppm - level_N2O) / ((chks$N2O_Conc_ppm + level_N2O) /2)) * 100), + N2O_diff_flag = ifelse(abs(N2O_diff) < 10, 'YES', 'NO, rerun'), + ) + +#calculate the percent of check standards that are within the range based on the flag +CH4_chks_percent <- (sum(chks$CH4_diff_flag == "YES") / nrow(chks)) * 100 +CO2_chks_percent <- (sum(chks$CO2_diff_flag == "YES") / nrow(chks)) * 100 +N2O_chks_percent <- (sum(chks$N2O_diff_flag == "YES") / nrow(chks)) * 100 +#report out if flags indicate need for rerun + +if (CH4_chks_percent >= chks_flag) { + message(">60% of CH4 Check Standards are within range of expected concentration - PROCEED") +} else { + message("<60% of CH4 Check Standards are within range of expected concentration - REASSESS") +} + +if (CO2_chks_percent >= chks_flag) { + message(">60% of CO2 Check Standards are within range of expected concentration - PROCEED") +} else { + message("<60% of CO2 Check Standards are within range of expected concentration - REASSESS") +} + +if (N2O_chks_percent >= chks_flag) { + message(">60% of N2O Check Standards are within range of expected concentration - PROCEED") +} else { + message("<60% of N2O Check Standards are within range of expected concentration - REASSESS") +} + +#now plot the Ch4 concentrations and the CO2 concentrations vs. the expected concentration +#then also make the color the percent difference between the expected and observed concentration + +ch4_chk <- ggplot(data = chks, aes(x = Run_Date, y = CH4_Conc_ppm, fill = + CH4_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c("NO, rerun" = "darkgrey", "YES" = "darkgreen")) + + theme_classic() + labs(x = " ", y = "Concentration (ppm)", title = + "Check Stds: CH4") + + theme(legend.position = "bottom") + geom_hline( + yintercept = level_CH4, + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "% Difference <10%")) + + +ch4_chk + +CO2_chk <- ggplot(data = chks, aes(x = Run_Date, y = CO2_Conc_ppm, fill = + CO2_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c("NO, rerun" = "darkgrey", "YES" = "darkgreen")) + + theme_classic() + labs(x = " ", y = "Concentration (ppm)", title = + "Check Stds: CO2") + + theme(legend.position = "bottom") + geom_hline( + yintercept = level_CO2, + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "% Difference <10%")) + + +CO2_chk + +N2O_chk <- ggplot(data = chks, aes(x = Run_Date, y = N2O_Conc_ppm, fill = + N2O_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c("NO, rerun" = "darkgrey", "YES" = "darkgreen")) + + theme_classic() + labs(x = " ", y = "Concentration (ppm)", title = + "Check Stds: N2O") + + theme(legend.position = "bottom") + geom_hline( + yintercept = level_N2O, + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "% Difference <10%")) + + +N2O_chk + +#Add Check Standard Flags + +flag_chk_CH4 <- ifelse(CH4_chks_percent >= chks_flag, + "", + "; CH4 Check Standards out Of Range") +flag_chk_CO2 <- ifelse(CO2_chks_percent >= chks_flag, + "", + "; CO2 Check Standards out Of Range") +flag_chk_N2O <- ifelse(N2O_chks_percent >= chks_flag, + "", + "; N2O Check Standards out Of Range") + +Flags_df_CH4 <- Flags_df_CH4 %>% mutate(Flag_CH4 = paste0(Flag_CH4, flag_chk_CH4)) +Flags_df_CO2 <- Flags_df_CO2 %>% mutate(Flag_CO2 = paste0(Flag_CO2,flag_chk_CO2)) +Flags_df_N2O <- Flags_df_N2O %>% mutate(Flag_N2O = paste0(Flag_N2O, flag_chk_N2O)) +``` + +# Analyze the Blanks +```{r Analyze Blanks, echo=FALSE} +cat("Assess Blanks") + +blanks <- raw %>% + filter(!str_detect(Type, "Lab air")) %>% + filter(!str_detect(Type, "Standard")) %>% + filter(!str_detect(Type, "Sample")) %>% + filter(!str_detect(Type, "Chk_STD")) %>% + filter(!str_detect(Type, "ChkStd")) %>% + filter(!str_detect(Type, "NA")) + + +#Pull out samples from df_all to calc quantile +samples_blanks <- raw %>% + filter(str_detect(Type, c("Sample"))) + +#Calculating the lowest 25% of sample concentrations to compare to the blank concentrations + +blk_flag_CH4 <- quantile(samples_blanks$CH4_Area, prob = c(.25)) #this gives you the lower 25% quartile of the data + +blk_flag_CO2 <- quantile(samples_blanks$CO2_Area, prob = c(.25)) #this gives you the lower 25% quartile of the data + +blk_flag_N2O <- quantile(samples_blanks$N2O_Area, prob = c(.25)) #this gives you the lower 25% quartile of the data + +blanks<-blanks %>% mutate(CH4_diff_flag = ifelse(blanks$CH4_Area <= blk_flag_CH4, 'YES', 'NO, rerun'), + CO2_diff_flag = ifelse(blanks$CO2_Area <= blk_flag_CO2, 'YES', 'NO, rerun'), + N2O_diff_flag = ifelse(blanks$N2O_Area <= blk_flag_N2O, 'YES', 'NO, rerun')) + +#calculate the percent of check standards that are within the range based on the flag +CH4_blks_percent <- (sum(blanks$CH4_diff_flag == "YES") / nrow(blanks)) * + 100 +CO2_blks_percent <- (sum(blanks$CO2_diff_flag == "YES") / nrow(blanks)) * + 100 +N2O_blks_percent <- (sum(blanks$N2O_diff_flag == "YES") / nrow(blanks)) * + 100 + +#report out if flags indicate need for rerun +if (CH4_blks_percent >= blks_flag) { + message(">60% of CH4 Blanks are below the lower 25% quartile of samples - PROCEED") +} else { + message("<60% of CH4 blaks are lower 25% quartile of samples - REASSESS") +} + +#report out if flags indicate need for rerun +if (CO2_blks_percent >= blks_flag) { + message(">60% of CO2 Blanks are below the lower 25% quartile of samples - PROCEED") +} else { + message("<60% of CO2 blaks are lower 25% quartile of samples - REASSESS") +} + +#report out if flags indicate need for rerun +if (N2O_blks_percent >= blks_flag) { + message(">60% of N2O Blanks are below the lower 25% quartile of samples - PROCEED") +} else { + message("<60% of N2O blaks are lower 25% quartile of samples - REASSESS") +} + + +#plotting the blanks compared to the lower 25% of conc (what the flag is) +CH4_blks_plot <- ggplot(data = blanks, aes(x = Run_Date, y = CH4_Area, fill = + CH4_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c( + "YES" = "deepskyblue3", + "NO, rerun" = "darkred" + )) + + theme_classic() + labs(x = " ", y = "CH4 Area", title = "CH4 Blanks") + + theme(legend.position = "bottom") + + geom_hline( + yintercept = as.numeric(blk_flag_CH4), + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "Blank Conc <25% Quartile Samples")) + +print(CH4_blks_plot) + +#CO2 +CO2_blks_plot <- ggplot(data = blanks, aes(x = Run_Date, y = CO2_Area, fill = + CO2_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c( + "YES" = "deepskyblue3", + "NO, rerun" = "darkred" + )) + + theme_classic() + labs(x = " ", y = "CO2 Area", title = "CO2 Blanks") + + theme(legend.position = "bottom") + + geom_hline( + yintercept = as.numeric(blk_flag_CO2), + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "Blank Conc <25% Quartile Samples")) + +print(CO2_blks_plot) + +#N2O +N2O_blks_plot <- ggplot(data = blanks, aes(x = Run_Date, y = N2O_Area, fill = + N2O_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c( + "YES" = "deepskyblue3", + "NO, rerun" = "darkred" + )) + + theme_classic() + labs(x = " ", y = "N2O Area", title = "N2O Blanks") + + theme(legend.position = "bottom") + + geom_hline( + yintercept = as.numeric(blk_flag_N2O), + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "Blank Conc <25% Quartile Samples")) + +print(N2O_blks_plot) +#find average of run blanks for flagging samples later +# Compute averages +blk_avg_CH4 <- mean(blanks$CH4_Area, na.rm = TRUE) +blk_avg_CO2 <- mean(blanks$CO2_Area, na.rm = TRUE) +blk_avg_N2O <- mean(blanks$N2O_Area, na.rm = TRUE) +# Create a data frame +blank_avgs <- data.frame(Test = c("CH4","CO2","N2O"), + Blank_Mean_Area = c(blk_avg_CH4,blk_avg_CO2,blk_avg_N2O)) + +# Pretty print +knitr::kable(blank_avgs, caption = "Mean Area of Blanks", digits = 4) + + +#write out a flag if more than 60% of the blanks are above the lower 25% quantile of samples +flag_blks_CH4 <- ifelse(CH4_blks_percent >= blks_flag, + "", + '; CH4 Blanks out of Range') + +flag_blks_CO2 <- ifelse(CO2_blks_percent >= blks_flag, + "", + '; CO2 Blanks out of Range') + +flag_blks_N2O <- ifelse(N2O_blks_percent >= blks_flag, + "", + '; N2O Blanks out of Range') + + + +Flags_df_CH4 <- Flags_df_CH4 %>% mutate(Flag_CH4 = paste0(Flag_CH4, flag_blks_CH4)) +Flags_df_CO2 <- Flags_df_CO2 %>% mutate(Flag_CO2 = paste0(Flag_CO2,flag_blks_CO2)) +Flags_df_N2O <- Flags_df_N2O %>% mutate(Flag_N2O = paste0(Flag_N2O, flag_blks_N2O)) + + +``` + +# Dilution correct samples and Check Range +```{r, echo=FALSE} + +#Correct if volume other than 12mL of Sample was added +Samples$CH4_Conc_ppm_dilcorr <- ((0.5 * Samples$CH4_Conc_ppm) * (exetainer_volume + Samples$Sample_Volume)) / + (Samples$Sample_Volume) +Samples$CO2_Conc_ppm_dilcorr <- ((0.5 * Samples$CO2_Conc_ppm) * (exetainer_volume + Samples$Sample_Volume)) / + (Samples$Sample_Volume) +Samples$N2O_Conc_ppm_dilcorr <- ((0.5 * Samples$N2O_Conc_ppm) * (exetainer_volume + Samples$Sample_Volume)) / + (Samples$Sample_Volume) +#check results +#head(Samples) + +#quick first look at the samples +ch4_samples <- ggplot(data = Samples, aes(x = Sample_ID, y = CH4_Conc_ppm, fill = + CH4_Flag)) + + geom_bar(stat = 'identity') + + scale_fill_manual(values = c("Within Range" = "darkgreen", + "ADL" = "darkred", + "BDL" = "darkblue")) + + theme_classic() + labs(x = " ", y = "CH4 (ppm)", title = "CH4: Green = Within Range (Not Dil Cor)") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + ch4_samples + + CO2_samples <- ggplot(data = Samples, aes(x = Sample_ID, y = CO2_Conc_ppm, fill = + CO2_Flag)) + + geom_bar(stat = 'identity') + + scale_fill_manual(values = c("Within Range" = "darkgreen", + "ADL" = "darkred", + "BDL" = "darkblue")) + + theme_classic() + labs(x = " ", y = "CO2 (ppm)", title = "CO2: Green = Within Range (Not Dil Cor)") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + CO2_samples + + N2O_samples <- ggplot(data = Samples, aes(x = Sample_ID, y = N2O_Conc_ppm, fill = + N2O_Flag)) + + geom_bar(stat = 'identity') + + scale_fill_manual(values = c("Within Range" = "darkgreen", + "ADL" = "darkred", + "BDL" = "darkblue")) + + theme_classic() + labs(x = " ", y = "N2O (ppm)", title = "N2O: Green = Within Range (Not Dil Cor)") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + N2O_samples +# #corrected for different dilutions +# ch4_samples_cor <- ggplot(data = Samples, aes(x = Sample_ID, y = CH4_Conc_ppm_dilcorr, fill = +# CH4_Flag)) + +# geom_bar(stat = 'identity') + +# scale_fill_manual(values = c("Within Range" = "green4", +# "ADL" = "red3", +# "BDL" = "blue3")) + +# theme_classic() + labs(x = " ", y = "CH4 (ppm)", title = "CH4: Green = Within Range") + +# theme(axis.text.x = element_text( +# angle = 90, +# vjust = 0.5, +# hjust = 1 +# )) + +# theme(legend.position = "none") +# + +# ch4_samples_cor + + +``` + + +# Calculate gas in water +```{r, echo=FALSE} + +# Convert ppm CH4 to total uM CH4 in the sample headspace +# use Ideal Gas Law: +# hdsp umol CH4 = ppm CH4*(PV/RT) +# P = 1 (pressure in atm) +# R = 0.082 (gas constant) +# V = 0.015 (gas syringe volume in L) +# T = "TempC" column value in Kelvin (equilibration temperature) + +#Calculate CH4 uM from ppm + +Samples$CH4_Conc_uM <- (Samples$CH4_Conc_ppm_dilcorr * (( 1 * volume_g )/(R * (TempC + CTK) )))/ volume_w + +Samples$CO2_Conc_uM <- (Samples$CO2_Conc_ppm_dilcorr * (( 1 * volume_g )/(R * (TempC + CTK) )))/ volume_w + +Samples$N2O_Conc_uM <- (Samples$N2O_Conc_ppm_dilcorr * (( 1 * volume_g )/(R * (TempC + CTK) )))/ volume_w +#old equation +#Samples$CH4_Conc_uM <- (Samples$CH4_Conc_ppm_dilcorr * ((1 * volume / 1000) / (R * (TempC + CTK)))) / (volume / 1000) + + +#quick first look at the samples +ch4_samples1 <- ggplot(data = Samples, aes(x = Sample_ID, y = CH4_Conc_uM)) + + geom_bar(stat = 'identity', fill = "darkblue") + + theme_classic() + + labs(x = " ", y = "CH4 (uM)", title = "CH4 Gas in Water") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + +ch4_samples1 + +#quick first look at the samples +CO2_samples1 <- ggplot(data = Samples, aes(x = Sample_ID, y = CO2_Conc_uM)) + + geom_bar(stat = 'identity', fill = "darkblue") + + theme_classic() + + labs(x = " ", y = "CO2 (uM)", title = "CO2 Gas in Water") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + +CO2_samples1 + +#quick first look at the samples +N2O_samples1 <- ggplot(data = Samples, aes(x = Sample_ID, y = N2O_Conc_uM)) + + geom_bar(stat = 'identity', fill = "darkblue") + + theme_classic() + + labs(x = " ", y = "N2O (uM)", title = "N2O Gas in Water") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + +N2O_samples1 + +``` + +# Merge samples with Metadata & check all samples are present +```{r check sample ids with metadata, echo=FALSE} + +cat("Merge Samples with Metadata") + +Samples_A <- Samples %>% filter(grepl("Ch", Sample_ID)) %>% mutate(Sample_Date = as.Date(substr(Sample_ID,1, 8), format = "%Y%m%d")) %>% mutate(Sample_ID = substring(Sample_ID, first = 10)) %>% mutate(Sample_ID = str_sub(Sample_ID, end = -3),Sample_ID=ifelse(grepl("cm",Sample_ID),str_sub(Sample_ID, end = -3),Sample_ID)) %>% mutate(Sample_ID = str_replace(Sample_ID, "_", "-")) +#check to see if all samples are present in the metadata +all_present <- all(metadata$Sample_Name %in% Samples_A$Sample_ID) + +if (all_present) { + message("All sample IDs are present in data") +} else { + message("Some sample IDs are missing from data.") + + # Optional: Which ones are missing? + missing_ids <- setdiff(metadata$Sample_Name, Samples_A$Sample_ID) + print(missing_ids) +} + + +#merge metadata with sample run data +merged_data1 <- metadata %>% + mutate(Sample_ID = paste0("\\b", Sample_ID, "\\b")) %>% + fuzzyjoin::regex_left_join(Samples_A, ., by = c(Sample_ID = "Sample_Name")) + +#might want to include a flag or something to see that all the samples are included? + +#add flags + +merged_2 <- merge(merged_data1, Flags_df_CH4) +merged_2 <- merge(merged_2, Flags_df_CO2) +merged_2 <- merge(merged_2, Flags_df_N2O) +merged_data <-merged_2 %>% mutate(Flags = paste0(Flag_CH4,Flag_CO2,Flag_N2O)) + + + +df_all_clean <- merged_data + +``` + +## Organize Data +```{r, echo=FALSE,include=FALSE} +#check results + head(Samples) + + #pull out what we need + + df_all_clean_cols <- df_all_clean %>% + dplyr::select( + Site, + Project, + Year, + Month, + Sample_Date, + Community, + Nickname, + Plot, + Depth_cm, + CO2_Treatment, + Temp_Treatment, + CH4_Conc_ppm_dilcorr, + CH4_Conc_uM, + CH4_Flag, + CO2_Conc_ppm_dilcorr, + CO2_Conc_uM, + CO2_Flag, + N2O_Conc_ppm_dilcorr, + N2O_Conc_uM, + N2O_Flag, + Flags, + Run_Date + ) + + final_data_labeled <- df_all_clean_cols %>% + mutate( + Run_notes = run_notes, #new column with notes about the run + Analysis_rundate = Run_Date) + + #rename columns + org_labeled_fin_data <- final_data_labeled %>% + rename( + CH4_Conc_ppm = CH4_Conc_ppm_dilcorr, + CH4_Conc_Flag = CH4_Flag, + CO2_Conc_ppm = CO2_Conc_ppm_dilcorr, + CO2_Conc_Flag = CO2_Flag, + N2O_Conc_ppm = N2O_Conc_ppm_dilcorr, + N2O_Conc_Flag = N2O_Flag, + QAQC_Flags = Flags + ) + + #Order Columns for Final Data Frame + All_Clean_Data <- org_labeled_fin_data %>% + dplyr::select( + Site, + Project, + Year, + Month, + Sample_Date, + Community, + Nickname, + Plot, + Depth_cm, + CO2_Treatment, + Temp_Treatment, + CO2_Conc_ppm, + CO2_Conc_uM, + CO2_Conc_Flag, + N2O_Conc_ppm, + N2O_Conc_uM, + N2O_Conc_Flag, + CH4_Conc_ppm, + CH4_Conc_uM, + CH4_Conc_Flag, + QAQC_Flags, + Analysis_rundate, + Run_notes + ) + head(All_Clean_Data) + +``` + + +## Visualize Data CH4 +```{r Visualize Data CH4, fig.height=10, echo=FALSE} +cat("Visualize Data") + +### Ammonia +CH4_forplot <- All_Clean_Data + +CH4_forplot$Depth_cm <- + as.numeric(CH4_forplot$Depth_cm) + +#group the data for plotting +CH4_forplot <- CH4_forplot %>% + group_by(Depth_cm) %>% + mutate(row_num = factor(row_number())) %>% # create row_num as factor per group + ungroup() %>% + mutate(Treatment = paste0("+", Temp_Treatment, " " ,"C")) %>% mutate(Chamber = factor(Plot, levels = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"))) %>% mutate(Depth1 = paste0(Depth_cm, " cm")) %>% mutate(Depth = factor(Depth1, levels = c("5 cm", "20 cm", "40 cm", "80 cm"))) + +#create plot +viz_CH4_plot <- ggplot(data = CH4_forplot, aes( + x = as.factor(Chamber), + y = CH4_Conc_uM, + fill = as.factor(Chamber) +)) + + geom_col(stat = "identity", + position = position_dodge2(padding = 0.1, + width = 0.5, + preserve = "single" )) + + facet_grid(Depth ~ ., + scales = "free_x") + + scale_fill_manual( + breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Ch1" = "blue4", + "Ch2" = "blue3", + "Ch3" = "turquoise4", + "Ch4" = "lightseagreen", + "Ch5" = "mediumseagreen", + "Ch6" = "limegreen", + "Ch7" = "yellowgreen", + "Ch8" = "yellow2", + "Ch9" = "darkgoldenrod2", + "Ch10" = "darkorange2", + "Ch11" = "orangered1", + "Ch12" = "red2"), + name = "Chamber:" + ) + + theme_classic() + + labs( + x = " ", + y = "CH4 Conc (uM)", + title = "GENX: Porewater CH4" + ) + + theme(legend.position = "right") + + scale_x_discrete(drop = TRUE, limits = rev) + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.key = element_rect("black"), + legend.position = "none" + ) + + coord_flip() +print(viz_CH4_plot) + +``` +\newpage + +\newpage +```{r Visualize CH4 Data by Rep, fig.height=8.5, echo=FALSE} + +#get replicate value and treatment info +CH4_forplot <- CH4_forplot %>% + mutate(Chamber = case_when( + Plot == "Ch1" ~ "Chamber 1", + Plot == "Ch2" ~ "Chamber 2", + Plot == "Ch3" ~ "Chamber 3", + Plot == "Ch4" ~ "Chamber 4", + Plot == "Ch5" ~ "Chamber 5", + Plot == "Ch6" ~ "Chamber 6", + Plot == "Ch7" ~ "Chamber 7", + Plot == "Ch8" ~ "Chamber 8", + Plot == "Ch9" ~ "Chamber 9", + Plot == "Ch10" ~ "Chamber 10", + Plot == "Ch11" ~ "Chamber 11", + Plot == "Ch12" ~ "Chamber 12" + + + ) + ) %>% mutate(Chamber = factor(levels = c( + "Chamber 1", + "Chamber 2", + "Chamber 3", + "Chamber 4", + "Chamber 5", + "Chamber 6", + "Chamber 7", + "Chamber 8", + "Chamber 9", + "Chamber 10", + "Chamber 11", + "Chamber 12" + ), Chamber)) + +#make plot +viz_CH4_plot_2 <- ggplot(data = CH4_forplot, + aes(x = CH4_Conc_uM, y = Depth_cm, color = Chamber, shape = as.factor(Sample_Date))) + + geom_point(size = 3) + + geom_path(linewidth = 1) + + scale_color_manual(breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Chamber 1" = "blue4", + "Chamber 2" = "blue3", + "Chamber 3" = "turquoise4", + "Chamber 4" = "lightseagreen", + "Chamber 5" = "mediumseagreen", + "Chamber 6" = "limegreen", + "Chamber 7" = "yellowgreen", + "Chamber 8" = "yellow2", + "Chamber 9" = "darkgoldenrod2", + "Chamber 10" = "darkorange2", + "Chamber 11" = "orangered1", + "Chamber 12" = "red2"), + name = "Chamber:") + + facet_wrap(~Chamber, ncol = 3, nrow = 4, scales = "free_x") + + labs(x = "CH4 Conc (uM)", + y = "Depth (cm)", + title = "GENX: Porewater CH4 by Chamber") + + scale_y_reverse(breaks = c(5, 20, 40, 80), + limits = c(85, 0)) + + theme_classic() + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.position = "none" + ) + + +viz_CH4_plot_2 + +``` + + +##Visualize Data N2O +```{r Visualize Data N2O, fig.height=10, echo=FALSE} +cat("Visualize Data") + +### Ammonia +N2O_forplot <- All_Clean_Data + +N2O_forplot$Depth_cm <- + as.numeric(N2O_forplot$Depth_cm) + +#group the data for plotting +N2O_forplot <- N2O_forplot %>% + group_by(Depth_cm) %>% + mutate(row_num = factor(row_number())) %>% # create row_num as factor per group + ungroup() %>% + mutate(Treatment = paste0("+", Temp_Treatment, " " ,"C")) %>% mutate(Chamber = factor(Plot, levels = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"))) %>% mutate(Depth1 = paste0(Depth_cm, " cm")) %>% mutate(Depth = factor(Depth1, levels = c("5 cm", "20 cm", "40 cm", "80 cm"))) + +#create plot +viz_N2O_plot <- ggplot(data = N2O_forplot, aes( + x = as.factor(Chamber), + y = N2O_Conc_uM, + fill = as.factor(Chamber) +)) + + geom_col(stat = "identity", + position = position_dodge2(padding = 0.1, + width = 0.5, + preserve = "single" )) + + facet_grid(Depth ~ ., + scales = "free_x") + + scale_fill_manual( + breaks = c( + "Ch1", "Ch2", "Ch3", "N2O", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Ch1" = "blue4", + "Ch2" = "blue3", + "Ch3" = "turquoise4", + "Ch4" = "lightseagreen", + "Ch5" = "mediumseagreen", + "Ch6" = "limegreen", + "Ch7" = "yellowgreen", + "Ch8" = "yellow2", + "Ch9" = "darkgoldenrod2", + "Ch10" = "darkorange2", + "Ch11" = "orangered1", + "Ch12" = "red2"), + name = "Chamber:" + ) + + theme_classic() + + labs( + x = " ", + y = "N2O Conc (uM)", + title = "GENX: Porewater N2O" + ) + + theme(legend.position = "right") + + scale_x_discrete(drop = TRUE, limits = rev) + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.key = element_rect("black"), + legend.position = "none" + ) + + coord_flip() +print(viz_N2O_plot) + +``` +\newpage + +```{r Visualize N2O Data by Rep, fig.height=8.5, echo=FALSE} + +#get replicate value and treatment info +N2O_forplot <- N2O_forplot %>% + mutate(Chamber = case_when( + Plot == "Ch1" ~ "Chamber 1", + Plot == "Ch2" ~ "Chamber 2", + Plot == "Ch3" ~ "Chamber 3", + Plot == "Ch4" ~ "Chamber 4", + Plot == "Ch5" ~ "Chamber 5", + Plot == "Ch6" ~ "Chamber 6", + Plot == "Ch7" ~ "Chamber 7", + Plot == "Ch8" ~ "Chamber 8", + Plot == "Ch9" ~ "Chamber 9", + Plot == "Ch10" ~ "Chamber 10", + Plot == "Ch11" ~ "Chamber 11", + Plot == "Ch12" ~ "Chamber 12" + + + ) + ) %>% mutate(Chamber = factor(levels = c( + "Chamber 1", + "Chamber 2", + "Chamber 3", + "Chamber 4", + "Chamber 5", + "Chamber 6", + "Chamber 7", + "Chamber 8", + "Chamber 9", + "Chamber 10", + "Chamber 11", + "Chamber 12" + ), Chamber)) + +#make plot +viz_N2O_plot_2 <- ggplot(data = N2O_forplot, + aes(x = N2O_Conc_uM, y = Depth_cm, color = Chamber, shape = as.factor(Sample_Date))) + + geom_point(size = 3) + + geom_path(linewidth = 1) + + scale_color_manual(breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Chamber 1" = "blue4", + "Chamber 2" = "blue3", + "Chamber 3" = "turquoise4", + "Chamber 4" = "lightseagreen", + "Chamber 5" = "mediumseagreen", + "Chamber 6" = "limegreen", + "Chamber 7" = "yellowgreen", + "Chamber 8" = "yellow2", + "Chamber 9" = "darkgoldenrod2", + "Chamber 10" = "darkorange2", + "Chamber 11" = "orangered1", + "Chamber 12" = "red2"), + name = "Chamber:") + + facet_wrap(~Chamber, ncol = 3, nrow = 4, scales = "free_x") + + labs(x = "N2O Conc (uM)", + y = "Depth (cm)", + title = "GENX: Porewater N2O by Chamber") + + scale_y_reverse(breaks = c(5, 20, 40, 80), + limits = c(85, 0)) + + #xlim() + + theme_classic() + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.position = "none" + ) + + +viz_N2O_plot_2 + +``` + +##Visualize Data CO2 +```{r Visualize Data CO2, fig.height=10, echo=FALSE} +cat("Visualize Data") + +### Ammonia +CO2_forplot <- All_Clean_Data + +CO2_forplot$Depth_cm <- + as.numeric(CO2_forplot$Depth_cm) + +#group the data for plotting +CO2_forplot <- CO2_forplot %>% + group_by(Depth_cm) %>% + mutate(row_num = factor(row_number())) %>% # create row_num as factor per group + ungroup() %>% + mutate(Treatment = paste0("+", Temp_Treatment, " " ,"C")) %>% mutate(Chamber = factor(Plot, levels = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"))) %>% mutate(Depth1 = paste0(Depth_cm, " cm")) %>% mutate(Depth = factor(Depth1, levels = c("5 cm", "20 cm", "40 cm", "80 cm"))) + +#create plot +viz_CO2_plot <- ggplot(data = CO2_forplot, aes( + x = as.factor(Chamber), + y = CO2_Conc_uM, + fill = as.factor(Chamber) +)) + + geom_col(stat = "identity", + position = position_dodge2(padding = 0.1, + width = 0.5, + preserve = "single" )) + + facet_grid(Depth ~ ., + scales = "free_x") + + scale_fill_manual( + breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Ch1" = "blue4", + "Ch2" = "blue3", + "Ch3" = "turquoise4", + "Ch4" = "lightseagreen", + "Ch5" = "mediumseagreen", + "Ch6" = "limegreen", + "Ch7" = "yellowgreen", + "Ch8" = "yellow2", + "Ch9" = "darkgoldenrod2", + "Ch10" = "darkorange2", + "Ch11" = "orangered1", + "Ch12" = "red2"), + name = "Chamber:" + ) + + theme_classic() + + labs( + x = " ", + y = "CO2 Conc (uM)", + title = "GENX: Porewater CO2" + ) + + theme(legend.position = "right") + + scale_x_discrete(drop = TRUE, limits = rev) + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.key = element_rect("black"), + legend.position = "none" + ) + + coord_flip() +print(viz_CO2_plot) + +``` +\newpage + +```{r Visualize CO2 Data by Rep, fig.height=8.5, echo=FALSE} + +#get replicate value and treatment info +CO2_forplot <- CO2_forplot %>% + mutate(Chamber = case_when( + Plot == "Ch1" ~ "Chamber 1", + Plot == "Ch2" ~ "Chamber 2", + Plot == "Ch3" ~ "Chamber 3", + Plot == "Ch4" ~ "Chamber 4", + Plot == "Ch5" ~ "Chamber 5", + Plot == "Ch6" ~ "Chamber 6", + Plot == "Ch7" ~ "Chamber 7", + Plot == "Ch8" ~ "Chamber 8", + Plot == "Ch9" ~ "Chamber 9", + Plot == "Ch10" ~ "Chamber 10", + Plot == "Ch11" ~ "Chamber 11", + Plot == "Ch12" ~ "Chamber 12" + + + ) + ) %>% mutate(Chamber = factor(levels = c( + "Chamber 1", + "Chamber 2", + "Chamber 3", + "Chamber 4", + "Chamber 5", + "Chamber 6", + "Chamber 7", + "Chamber 8", + "Chamber 9", + "Chamber 10", + "Chamber 11", + "Chamber 12" + ), Chamber)) + +#make plot +viz_CO2_plot_2 <- ggplot(data = CO2_forplot, + aes(x = CO2_Conc_uM, y = Depth_cm, color = Chamber, shape = as.factor(Sample_Date))) + + geom_point(size = 3) + + geom_path(linewidth = 1) + + scale_color_manual(breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Chamber 1" = "blue4", + "Chamber 2" = "blue3", + "Chamber 3" = "turquoise4", + "Chamber 4" = "lightseagreen", + "Chamber 5" = "mediumseagreen", + "Chamber 6" = "limegreen", + "Chamber 7" = "yellowgreen", + "Chamber 8" = "yellow2", + "Chamber 9" = "darkgoldenrod2", + "Chamber 10" = "darkorange2", + "Chamber 11" = "orangered1", + "Chamber 12" = "red2"), + name = "Chamber:") + + facet_wrap(~Chamber, ncol = 3, nrow = 4, scales = "free_x") + + labs(x = "CO2 Conc (uM)", + y = "Depth (cm)", + title = "GENX: Porewater CO2 by Chamber") + + scale_y_reverse(breaks = c(5, 20, 40, 80), + limits = c(85, 0)) + + theme_classic() + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.position = "none" + ) + + +viz_CO2_plot_2 + +``` + + +##Export Data +```{r, echo=FALSE} +write.csv(All_Clean_Data, final_path) +write.csv(unique_log, log_path) +#end +``` + +#end \ No newline at end of file diff --git a/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_GHG_20260406.Rmd b/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_GHG_20260406.Rmd new file mode 100644 index 0000000..7cb817d --- /dev/null +++ b/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_GHG_20260406.Rmd @@ -0,0 +1,1604 @@ +--- +title: "GENX: Porewater Methane" +author: "March and April 2026 Samples" +date: "`r Sys.Date()`" +output: + pdf_document: + toc: true + toc_depth: 1 + number_sections: true +output_dir: "To Be Reviewed/PDF" +--- + +```{r Run Setup,include=FALSE} +if (!require("pacman")) install.packages("pacman") +pacman::p_load( + dplyr, + purrr, + fuzzyjoin, + ggplot2, + ggpubr, + data.table, + stringr, + here) +``` +\newpage + +##Run Information +```{r run information, include=TRUE} +cat("Run Information: Melanie Giessner ") #lets you know what section you're in +#set the run date & user name +sample_year <- "2026" +sample_month <- "March & April" +user <- "Melanie Giessner" +#identify the files you want to read in +#read in as a list to accommodate multiple runs in a month + +#change dates +folder_path_rawdata <- paste0("Raw Data") +GHG_files <- list.files(path = folder_path_rawdata,pattern = "20260406" ,full.names = TRUE) +head(GHG_files) +#GHG_files <- c("Raw Data/20260417_GENX_GHGdata.csv","Raw Data/20260501_GENX_GHGdata.csv" ) + + +# Define the file path for QAQC log file - NO Need to change just check year +log_path <- "Processed Data/ShimadzuGC_Slope_QAQC.csv" + + +# Define final path for data be sure to change year and month and run number +final_path <- "Processed Data/GCReW_GENX_Porewater_CH4_20260406.csv" + +#Gas in Water Calculations +# "TempC" column value in Celsius (equilibration temperature) and volume of gas (in liters) in syringe (not changing currently) +TempC = 25 #Equilibration Temperature (Celsius) + +volume_g = 0.015 #volume of gas (in liters) in syringe when equilibrized +volume_w = 0.015 #volume of water (in liters) in syringe when equilibrized (should be equal to volume_g) + +#record any notes about the run or anything other info here: +run_notes <- "" + +#Metadata File Path + Raw_Metadata = here(".." , "GCReW", "GCReW_Project_Treatment_Metadata.csv") + +#Collection_Dates = "Raw Data/Sample_Collection_Dates_2024.csv" + +cat(run_notes) +``` + + +##Set Up + +```{r setup, include=FALSE} + +if (!require("pacman")) install.packages("pacman") +pacman::p_load( + dplyr, + purrr, + fuzzyjoin, + ggplot2, + ggpubr, + stringr, + here) + +##Low & High Standard Curve Cutoffs +CH4_low_std_crv_cutoff <- 10 +CH4_low_std_crv_area_cutoff <- 7000 +CH4_mid_std_crv_cutoff <- 100 +CH4_mid_std_crv_area_cutoff <- 70000 +CH4_high_std_crv_cutoff <- 10000 + +CO2_low_std_crv_cutoff <- 2000 +CO2_low_std_crv_area_cutoff <- 900000 +CO2_mid_std_crv_cutoff <- 20000 +CO2_mid_std_crv_area_cutoff <- 7000000 +CO2_high_std_crv_cutoff <- 50100 + +N2O_low_std_crv_cutoff <- 5 +N2O_low_std_crv_area_cutoff <- 13000 +N2O_mid_std_crv_cutoff <- 50.2 +N2O_mid_std_crv_area_cutoff <- 100000 +N2O_high_std_crv_cutoff <- 500 + +r2_cutoff <- 0.990 + +##Gas In Water Calculation +R <- 0.08206 +CTK <- 273.15 + +#Metadata file path +#Raw_Metadata = here(".." , "GCReW", "GCReW_Project_Treatment_Metadata.csv") + +##Detection Limits +adl_cutoff <- 20000 +bdl_cutoff <- 50 + +##Check Standard Concentration +level_CH4 <- 10 #ppm +level_CO2 <- 2000 #ppm +level_N2O <- 5 #ppm +chks_flag = 60 +blks_flag = 60 + +#Volumes +exetainer_volume =12 + + +``` + + +##Read in metadata and create similar sample IDs for matching to samples +```{r pull in metadata for later, include=FALSE} + +#read in the raw metadata file +raw_metadata <- read.csv(Raw_Metadata) + +#clean up columns in metadata file: + #Pull out only SMARTX Rows + #Create a Sample_Name column to match the SEAL +metadata <- raw_metadata %>% + filter(grepl("GENX", Project, ignore.case = TRUE)) %>% + mutate(Sample_Name = Sample.ID) %>% + mutate(Month = sample_month) %>% + mutate(Year = sample_year) %>% + rename( + Sample_ID = Sample.ID, + ) %>% + dplyr::select(-N_Treatment) + + +``` + +# Read in data files +```{r , include=FALSE} + +#Read in Nov Data +raw_list <- map(GHG_files, read.csv) + + +# Combining Files +raw <- bind_rows(raw_list) + + + +#rename column +colnames(raw)[1] <- "Sample_ID" + +#head(stds_ch4) + +``` + +# Assess standard curves +```{r , echo=FALSE} +stds_ch4 <- raw %>% + filter(str_detect(Type, "Standard")) %>% filter(!Conc_CH4 == "unknown") + +#Correct data class +stds_ch4[, "Conc_CH4"] <- as.numeric(stds_ch4[, "Conc_CH4"]) + +#get the area of the top of the low curve +CH4_low_std_crv_area_cutoff <-stds_ch4$CH4_Area[stds_ch4$Conc_CH4 == CH4_low_std_crv_cutoff] +#Separate Into Low and High + +mnmx_stds <- stds_ch4 %>% filter(Conc_CH4 > 0) %>% group_by(Run_Date) %>% mutate(CH4_Min = min(Conc_CH4), CH4_Max = max(Conc_CH4)) %>% dplyr::select(Run_Date, CH4_Min, CH4_Max) %>% unique() + +low_stds_ch4 <- stds_ch4 %>% + filter(!Conc_CH4 > CH4_low_std_crv_cutoff) + +low_stds_ch4$Conc_CH4 <- as.numeric(low_stds_ch4$Conc_CH4) + + +high_stds_ch4 <- stds_ch4 %>% + filter(!Conc_CH4 < CH4_low_std_crv_cutoff) + +high_stds_ch4$Conc_CH4 <- as.numeric(high_stds_ch4$Conc_CH4) + +#High Curve for CH4 +CH4_Curve <- ggplot(high_stds_ch4, aes(CH4_Area , Conc_CH4, color = Run_Date)) + geom_point(size = 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "High CH4 Std Curve") +CH4_Curve + + # Convert 'run date' to a factor for grouping + high_stds_ch4_grouped <- high_stds_ch4 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data <- high_stds_ch4_grouped %>% + group_by(Run_Date) %>% + group_split() + +#run regression and get coefficients by Run + +Slope_CH4_raw_list <- map(split_data, ~ .x %>% mutate(CH4_Curve = "High", + CH4_R2 = summary(lm(Conc_CH4 ~ CH4_Area , data = .))$adj.r.squared , + CH4_Slope = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[2], + CH4_Intercept = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[1])) + + Slope_CH4_raw <- bind_rows(Slope_CH4_raw_list) + + Slope_CH4_High <- Slope_CH4_raw %>% dplyr::select(Run_Date, CH4_Curve, CH4_R2, CH4_Slope, CH4_Intercept) %>% distinct() + + + +#low Curve for CH4 +CH4_Curve <- ggplot(low_stds_ch4, aes(CH4_Area , Conc_CH4, color = Run_Date)) + geom_point(size = + 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "Low CH4 Std Curve") +CH4_Curve + +low_CH4_lm <- lm(low_stds_ch4$CH4_Area ~ low_stds_ch4$Conc_CH4) +low_cf <- coef(low_CH4_lm) + + # Convert 'run date' to a factor for grouping + low_stds_ch4_grouped <- low_stds_ch4 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data_l <- low_stds_ch4_grouped %>% + group_by(Run_Date) %>% + group_split() + + +#run regression and get coefficients by Run + +Slope_CH4_raw_list_l <- map(split_data_l, ~ .x %>% mutate(CH4_Curve = "Low", + CH4_R2 = summary(lm(Conc_CH4 ~ CH4_Area , data = .))$adj.r.squared , + CH4_Slope = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[2], + CH4_Intercept = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[1])) + + Slope_CH4_raw_l <- bind_rows(Slope_CH4_raw_list_l) + + Slope_CH4_Low <- Slope_CH4_raw_l %>% dplyr::select(Run_Date, CH4_Curve, CH4_R2, CH4_Slope, CH4_Intercept) %>% distinct() + + Slope_CH4 <- rbind(Slope_CH4_High, Slope_CH4_Low) + + Slope_CH4_m <- left_join(Slope_CH4, mnmx_stds) + + + +#check r2 + +ifelse(Slope_CH4_High$CH4_R2 < r2_cutoff, paste0("High_R2 is Bad","-", Slope_CH4_High$Run_Date), paste0("High_R2 is Good","-", Slope_CH4_High$Run_Date)) + +ifelse(Slope_CH4_Low$CH4_R2 < r2_cutoff, paste0("Low_R2 is Bad","-", Slope_CH4_Low$Run_Date), paste0("Low_R2 is Good","-", Slope_CH4_Low$Run_Date)) + +High_R2_Flags <- Slope_CH4_High %>% mutate(Flag_CH4 = ifelse(CH4_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CH4, Run_Date, CH4_Curve) + + +Low_R2_Flags <- Slope_CH4_Low %>% mutate(Flag_CH4 = ifelse(CH4_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CH4, Run_Date, CH4_Curve) + +Flags_df_CH4 <- rbind(High_R2_Flags, Low_R2_Flags) +``` + + +```{r CO2, echo=FALSE} +stds_CO2 <- raw %>% + filter(str_detect(Type, "Standard")) %>% filter(!Conc_CO2 == "unknown") + +#Correct data class +stds_CO2[, "Conc_CO2"] <- as.numeric(stds_CO2[, "Conc_CO2"]) + +#get the area of the top of the low curve +CO2_low_std_crv_area_cutoff <-stds_CO2$CO2_Area[stds_CO2$Conc_CO2 == CO2_low_std_crv_cutoff] +#Separate Into Low and High + +mnmx_stds <- stds_CO2 %>% filter(Conc_CO2 > 0) %>% group_by(Run_Date) %>% mutate(CO2_Min = min(Conc_CO2), CO2_Max = max(Conc_CO2)) %>% dplyr::select(Run_Date, CO2_Min, CO2_Max) %>% unique() + +low_stds_CO2 <- stds_CO2 %>% + filter(!Conc_CO2 > CO2_low_std_crv_cutoff) + +low_stds_CO2$Conc_CO2 <- as.numeric(low_stds_CO2$Conc_CO2) + + +high_stds_CO2 <- stds_CO2 %>% + filter(!Conc_CO2 < CO2_low_std_crv_cutoff) + +high_stds_CO2$Conc_CO2 <- as.numeric(high_stds_CO2$Conc_CO2) + +#High Curve for CO2 +CO2_Curve <- ggplot(high_stds_CO2, aes(CO2_Area , Conc_CO2, color = Run_Date)) + geom_point(size = 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "High CO2 Std Curve") +CO2_Curve + + # Convert 'run date' to a factor for grouping + high_stds_CO2_grouped <- high_stds_CO2 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data <- high_stds_CO2_grouped %>% + group_by(Run_Date) %>% + group_split() + +#run regression and get coefficients by Run + +Slope_CO2_raw_list <- map(split_data, ~ .x %>% mutate(CO2_Curve = "High", + CO2_R2 = summary(lm(Conc_CO2 ~ CO2_Area , data = .))$adj.r.squared , + CO2_Slope = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[2], + CO2_Intercept = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[1])) + + Slope_CO2_raw <- bind_rows(Slope_CO2_raw_list) + + Slope_CO2_High <- Slope_CO2_raw %>% dplyr::select(Run_Date, CO2_Curve, CO2_R2, CO2_Slope, CO2_Intercept) %>% distinct() + + + +#low Curve for CO2 +CO2_Curve <- ggplot(low_stds_CO2, aes(CO2_Area , Conc_CO2, color = Run_Date)) + geom_point(size = + 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "Low CO2 Std Curve") +CO2_Curve + +low_CO2_lm <- lm(low_stds_CO2$CO2_Area ~ low_stds_CO2$Conc_CO2) +low_cf <- coef(low_CO2_lm) + + # Convert 'run date' to a factor for grouping + low_stds_CO2_grouped <- low_stds_CO2 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data_l <- low_stds_CO2_grouped %>% + group_by(Run_Date) %>% + group_split() + + +#run regression and get coefficients by Run + +Slope_CO2_raw_list_l <- map(split_data_l, ~ .x %>% mutate(CO2_Curve = "Low", + CO2_R2 = summary(lm(Conc_CO2 ~ CO2_Area , data = .))$adj.r.squared , + CO2_Slope = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[2], + CO2_Intercept = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[1])) + + Slope_CO2_raw_l <- bind_rows(Slope_CO2_raw_list_l) + + Slope_CO2_Low <- Slope_CO2_raw_l %>% dplyr::select(Run_Date, CO2_Curve, CO2_R2, CO2_Slope, CO2_Intercept) %>% distinct() + + Slope_CO2 <- rbind(Slope_CO2_High, Slope_CO2_Low) + + Slope_CO2_m <- left_join(Slope_CO2, mnmx_stds) + + + +#check r2 + +ifelse(Slope_CO2_High$CO2_R2 < r2_cutoff, paste0("High_R2 is Bad","-", Slope_CO2_High$Run_Date), paste0("High_R2 is Good","-", Slope_CO2_High$Run_Date)) + +ifelse(Slope_CO2_Low$CO2_R2 < r2_cutoff, paste0("Low_R2 is Bad","-", Slope_CO2_Low$Run_Date), paste0("Low_R2 is Good","-", Slope_CO2_Low$Run_Date)) + +High_R2_Flags <- Slope_CO2_High %>% mutate(Flag_CO2 = ifelse(CO2_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CO2, Run_Date, CO2_Curve) + + +Low_R2_Flags <- Slope_CO2_Low %>% mutate(Flag_CO2 = ifelse(CO2_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CO2, Run_Date, CO2_Curve) + +Flags_df_CO2 <- rbind(High_R2_Flags, Low_R2_Flags) +``` + + +```{r N20, echo=FALSE} +stds_N2O <- raw %>% + filter(str_detect(Type, "Standard")) %>% filter(!Conc_N2O == "unknown") + +#Correct data class +stds_N2O[, "Conc_N2O"] <- as.numeric(stds_N2O[, "Conc_N2O"]) + +#get the area of the top of the low curve +N2O_low_std_crv_area_cutoff <-stds_N2O$N2O_Area[stds_N2O$Conc_N2O == N2O_low_std_crv_cutoff] +#Separate Into Low and High + +mnmx_stds <- stds_N2O %>% filter(Conc_N2O > 0) %>% group_by(Run_Date) %>% mutate(N2O_Min = min(Conc_N2O), N2O_Max = max(Conc_N2O)) %>% dplyr::select(Run_Date, N2O_Min, N2O_Max) %>% unique() + +low_stds_N2O <- stds_N2O %>% + filter(!Conc_N2O > N2O_low_std_crv_cutoff) + +low_stds_N2O$Conc_N2O <- as.numeric(low_stds_N2O$Conc_N2O) + + +high_stds_N2O <- stds_N2O %>% + filter(!Conc_N2O < N2O_low_std_crv_cutoff) + +high_stds_N2O$Conc_N2O <- as.numeric(high_stds_N2O$Conc_N2O) + +#High Curve for N2O +N2O_Curve <- ggplot(high_stds_N2O, aes(N2O_Area , Conc_N2O, color = Run_Date)) + geom_point(size = 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "High N2O Std Curve") +N2O_Curve + + # Convert 'run date' to a factor for grouping + high_stds_N2O_grouped <- high_stds_N2O %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data <- high_stds_N2O_grouped %>% + group_by(Run_Date) %>% + group_split() + +#run regression and get coefficients by Run + +Slope_N2O_raw_list <- map(split_data, ~ .x %>% mutate(N2O_Curve = "High", + N2O_R2 = summary(lm(Conc_N2O ~ N2O_Area , data = .))$adj.r.squared , + N2O_Slope = coef(lm(Conc_N2O ~ N2O_Area , data = .))[2], + N2O_Intercept = coef(lm(Conc_N2O ~ N2O_Area , data = .))[1])) + + Slope_N2O_raw <- bind_rows(Slope_N2O_raw_list) + + Slope_N2O_High <- Slope_N2O_raw %>% dplyr::select(Run_Date, N2O_Curve, N2O_R2, N2O_Slope, N2O_Intercept) %>% distinct() + + + +#low Curve for N2O +N2O_Curve <- ggplot(low_stds_N2O, aes(N2O_Area , Conc_N2O, color = Run_Date)) + geom_point(size = + 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "Low N2O Std Curve") +N2O_Curve + +low_N2O_lm <- lm(low_stds_N2O$N2O_Area ~ low_stds_N2O$Conc_N2O) +low_cf <- coef(low_N2O_lm) + + # Convert 'run date' to a factor for grouping + low_stds_N2O_grouped <- low_stds_N2O %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data_l <- low_stds_N2O_grouped %>% + group_by(Run_Date) %>% + group_split() + + +#run regression and get coefficients by Run + +Slope_N2O_raw_list_l <- map(split_data_l, ~ .x %>% mutate(N2O_Curve = "Low", + N2O_R2 = summary(lm(Conc_N2O ~ N2O_Area , data = .))$adj.r.squared , + N2O_Slope = coef(lm(Conc_N2O ~ N2O_Area , data = .))[2], + N2O_Intercept = coef(lm(Conc_N2O ~ N2O_Area , data = .))[1])) + + Slope_N2O_raw_l <- bind_rows(Slope_N2O_raw_list_l) + + Slope_N2O_Low <- Slope_N2O_raw_l %>% dplyr::select(Run_Date, N2O_Curve, N2O_R2, N2O_Slope, N2O_Intercept) %>% distinct() + + Slope_N2O <- rbind(Slope_N2O_High, Slope_N2O_Low) + + Slope_N2O_m <- left_join(Slope_N2O, mnmx_stds) + + + +#check r2 + +ifelse(Slope_N2O_High$N2O_R2 < r2_cutoff, paste0("High_R2 is Bad","-", Slope_N2O_High$Run_Date), paste0("High_R2 is Good","-", Slope_N2O_High$Run_Date)) + +ifelse(Slope_N2O_Low$N2O_R2 < r2_cutoff, paste0("Low_R2 is Bad","-", Slope_N2O_Low$Run_Date), paste0("Low_R2 is Good","-", Slope_N2O_Low$Run_Date)) + +High_R2_Flags <- Slope_N2O_High %>% mutate(Flag_N2O = ifelse(N2O_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_N2O, Run_Date, N2O_Curve) + + +Low_R2_Flags <- Slope_N2O_Low %>% mutate(Flag_N2O = ifelse(N2O_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_N2O, Run_Date, N2O_Curve) + +Flags_df_N2O <- rbind(High_R2_Flags, Low_R2_Flags) + + +``` + +```{r log} +#add new standard curve data to log +Slope_CH4_1 <- Slope_CH4 %>% mutate(curve = paste0("Slope_CH4_", CH4_Curve), R2 = CH4_R2, slope = CH4_Slope, intercept = CH4_Intercept, Analysis = "CH4", Run_by = user, Curve_top = case_when( + CH4_Curve == "Low" ~ paste(CH4_low_std_crv_cutoff,"ppm"), + CH4_Curve == "High" ~ paste(CH4_high_std_crv_cutoff,"ppm"), + .default = as.character(CH4_mid_std_crv_cutoff) +)) %>% dplyr::select(Analysis, Run_Date, Run_by, Curve_top, curve, R2, slope, intercept) +Slope_CO2_1 <- Slope_CO2 %>% mutate(curve = paste0("Slope_CO2_", CO2_Curve), R2 = CO2_R2, slope = CO2_Slope, intercept = CO2_Intercept, Analysis = "CO2", Run_by = user, Curve_top = case_when( + CO2_Curve == "Low" ~ paste(CO2_low_std_crv_cutoff,"ppm"), + CO2_Curve == "High" ~ paste(CO2_high_std_crv_cutoff,"ppm"), + .default = as.character(CO2_mid_std_crv_cutoff) +)) %>% dplyr::select(Analysis, Run_Date, Run_by, Curve_top, curve, R2, slope, intercept) +Slope_N2O_1 <- Slope_N2O %>% mutate(curve = paste0("Slope_N2O_", N2O_Curve), R2 = N2O_R2, slope = N2O_Slope, intercept = N2O_Intercept, Analysis = "N2O", Run_by = user, Curve_top = case_when( + N2O_Curve == "Low" ~ paste(N2O_low_std_crv_cutoff,"ppm"), + N2O_Curve == "High" ~ paste(N2O_high_std_crv_cutoff,"ppm"), + .default = as.character(N2O_mid_std_crv_cutoff) +)) %>% dplyr::select(Analysis, Run_Date, Run_by, Curve_top, curve, R2, slope, intercept) + +Slope <- rbind(Slope_CH4_1, Slope_CO2_1, Slope_N2O_1) + + log <- read.csv(log_path) + log <- log[, -c(1)] + head(log) + + log <- rbind(log, Slope) + +#remove possible duplicates from multiple QAQC attempts + + unique_log <- log %>% + mutate(Run_Date = as.Date(Run_Date,tryFormats = c("%Y-%m-%d", "%m/%d/%Y", "%m/%d/%y")), curve= gsub("L","l",curve), curve= gsub("H","h",curve))%>% distinct(.keep_all = TRUE) + + Slopes_chk_CH4 <- ggplot(unique_log %>% filter( grepl("CH4",curve,ignore.case = T)), aes(x = Run_Date, y = slope, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + Slopes_chk_CH4 + + Slopes_chk_CO2 <- ggplot(unique_log %>% filter( grepl("CO2",curve,ignore.case = T)), aes(x = Run_Date, y = slope, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + Slopes_chk_CO2 + + Slopes_chk_N2O <- ggplot(unique_log %>% filter( grepl("N2O",curve,ignore.case = T)), aes(x = Run_Date, y = slope, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + Slopes_chk_N2O + + + int_chk_CH4 <- ggplot(unique_log %>% filter( grepl("CH4",curve,ignore.case = T)), aes(x = Run_Date, y = intercept, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + int_chk_CH4 + + int_chk_CO2 <- ggplot(unique_log %>% filter( grepl("CO2",curve,ignore.case = T)), aes(x = Run_Date, y = intercept, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + int_chk_CO2 + + int_chk_N2O <- ggplot(unique_log %>% filter( grepl("N2O",curve,ignore.case = T)), aes(x = Run_Date, y = intercept, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + int_chk_N2O + +``` + + +## Now calculate the CH4 in ppm +```{r Calculate Concetration, echo=FALSE} +#head(raw) + +#pull out Samples +Samples_1 <- raw %>% + filter(!str_detect(Type, "Lab air")) %>% + filter(!str_detect(Type, "Standard")) %>% + filter(!str_detect(Type, "Blank")) %>% + filter(!str_detect(Type, "Chk_STD")) %>% + filter(!str_detect(Type, "ChkStd")) %>% + filter(!str_detect(Type, "NA")) %>% + + mutate(CH4_Curve = ifelse(CH4_Area >= mean(CH4_low_std_crv_area_cutoff,na.rm = TRUE), "High", "Low"), CO2_Curve = ifelse(CO2_Area >= mean(CO2_low_std_crv_area_cutoff,na.rm = TRUE), "High", "Low"), N2O_Curve = ifelse(N2O_Area >= mean(N2O_low_std_crv_area_cutoff,na.rm = TRUE), "High", "Low")) +#head(Samples) + +Samples_2 <- merge(Samples_1, Slope_CH4_m) +Samples_2 <- merge(Samples_2, Slope_CO2_m) +Samples_2 <- merge(Samples_2, Slope_N2O_m) +#Calculate CH4 concentrations in ppm +Samples <- Samples_2 %>% + mutate(CH4_Conc_ppm = (CH4_Area*CH4_Slope) + CH4_Intercept ,CO2_Conc_ppm = (CO2_Area*CO2_Slope)+ CO2_Intercept, N2O_Conc_ppm = (N2O_Area*N2O_Slope) + N2O_Intercept ) + +##########make flags for any dilutions needed + + +Samples$CH4_Flag <- ifelse(Samples$CH4_Conc_ppm > Samples$CH4_Max, "ADL", ifelse(Samples$CH4_Conc_ppm < Samples$CH4_Min, "BDL", "Within Range")) +Samples$CO2_Flag <- ifelse(Samples$CO2_Conc_ppm > Samples$CO2_Max, "ADL", ifelse(Samples$CO2_Conc_ppm < Samples$CO2_Min, "BDL", "Within Range")) +Samples$N2O_Flag <- ifelse(Samples$N2O_Conc_ppm > Samples$N2O_Max, "ADL", ifelse(Samples$N2O_Conc_ppm < Samples$N2O_Min, "BDL", "Within Range")) +#head(Samples) + + + +``` + +# Aanlayze the Check Standards +```{r Asses Check Standards, echo=FALSE} + +chks_1 <- raw %>% + filter(!str_detect(Type, "Lab air")) %>% + filter(!str_detect(Type, "Standard")) %>% + filter(!str_detect(Type, "Blank")) %>% + filter(!str_detect(Type, "Sample")) %>% + filter(!str_detect(Type, "NA")) %>% + mutate(CH4_Curve = "Low",CO2_Curve = "Low",N2O_Curve = "Low") +#head(chks) + + +chks_2 <- merge(chks_1, Slope_CH4_m) +chks_2 <- merge(chks_2, Slope_CO2_m) +chks_2 <- merge(chks_2, Slope_N2O_m) + +chks <- chks_2 %>% + mutate(CH4_Conc_ppm = (CH4_Area*CH4_Slope) + CH4_Intercept ,CO2_Conc_ppm = (CO2_Area*CO2_Slope)+ CO2_Intercept, N2O_Conc_ppm = (N2O_Area*N2O_Slope) + N2O_Intercept ) + +#calculate percent difference of check standards +chks<- chks %>% mutate( + Ch4_diff = (((chks$CH4_Conc_ppm - level_CH4) / ((chks$CH4_Conc_ppm + level_CH4) /2)) * 100), + CH4_diff_flag = ifelse(abs(Ch4_diff) < 10, 'YES', 'NO, rerun'), + CO2_diff = (((chks$CO2_Conc_ppm - level_CO2) / ((chks$CO2_Conc_ppm + level_CO2) /2)) * 100), + CO2_diff_flag = ifelse(abs(CO2_diff) < 10, 'YES', 'NO, rerun'), + N2O_diff = (((chks$N2O_Conc_ppm - level_N2O) / ((chks$N2O_Conc_ppm + level_N2O) /2)) * 100), + N2O_diff_flag = ifelse(abs(N2O_diff) < 10, 'YES', 'NO, rerun'), + ) + +#calculate the percent of check standards that are within the range based on the flag +CH4_chks_percent <- (sum(chks$CH4_diff_flag == "YES") / nrow(chks)) * 100 +CO2_chks_percent <- (sum(chks$CO2_diff_flag == "YES") / nrow(chks)) * 100 +N2O_chks_percent <- (sum(chks$N2O_diff_flag == "YES") / nrow(chks)) * 100 +#report out if flags indicate need for rerun + +if (CH4_chks_percent >= chks_flag) { + message(">60% of CH4 Check Standards are within range of expected concentration - PROCEED") +} else { + message("<60% of CH4 Check Standards are within range of expected concentration - REASSESS") +} + +if (CO2_chks_percent >= chks_flag) { + message(">60% of CO2 Check Standards are within range of expected concentration - PROCEED") +} else { + message("<60% of CO2 Check Standards are within range of expected concentration - REASSESS") +} + +if (N2O_chks_percent >= chks_flag) { + message(">60% of N2O Check Standards are within range of expected concentration - PROCEED") +} else { + message("<60% of N2O Check Standards are within range of expected concentration - REASSESS") +} + +#now plot the Ch4 concentrations and the CO2 concentrations vs. the expected concentration +#then also make the color the percent difference between the expected and observed concentration + +ch4_chk <- ggplot(data = chks, aes(x = Run_Date, y = CH4_Conc_ppm, fill = + CH4_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c("NO, rerun" = "darkgrey", "YES" = "darkgreen")) + + theme_classic() + labs(x = " ", y = "Concentration (ppm)", title = + "Check Stds: CH4") + + theme(legend.position = "bottom") + geom_hline( + yintercept = level_CH4, + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "% Difference <10%")) + + +ch4_chk + +CO2_chk <- ggplot(data = chks, aes(x = Run_Date, y = CO2_Conc_ppm, fill = + CO2_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c("NO, rerun" = "darkgrey", "YES" = "darkgreen")) + + theme_classic() + labs(x = " ", y = "Concentration (ppm)", title = + "Check Stds: CO2") + + theme(legend.position = "bottom") + geom_hline( + yintercept = level_CO2, + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "% Difference <10%")) + + +CO2_chk + +N2O_chk <- ggplot(data = chks, aes(x = Run_Date, y = N2O_Conc_ppm, fill = + N2O_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c("NO, rerun" = "darkgrey", "YES" = "darkgreen")) + + theme_classic() + labs(x = " ", y = "Concentration (ppm)", title = + "Check Stds: N2O") + + theme(legend.position = "bottom") + geom_hline( + yintercept = level_N2O, + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "% Difference <10%")) + + +N2O_chk + +#Add Check Standard Flags + +flag_chk_CH4 <- ifelse(CH4_chks_percent >= chks_flag, + "", + "; CH4 Check Standards out Of Range") +flag_chk_CO2 <- ifelse(CO2_chks_percent >= chks_flag, + "", + "; CO2 Check Standards out Of Range") +flag_chk_N2O <- ifelse(N2O_chks_percent >= chks_flag, + "", + "; N2O Check Standards out Of Range") + +Flags_df_CH4 <- Flags_df_CH4 %>% mutate(Flag_CH4 = paste0(Flag_CH4, flag_chk_CH4)) +Flags_df_CO2 <- Flags_df_CO2 %>% mutate(Flag_CO2 = paste0(Flag_CO2,flag_chk_CO2)) +Flags_df_N2O <- Flags_df_N2O %>% mutate(Flag_N2O = paste0(Flag_N2O, flag_chk_N2O)) +``` + +# Analyze the Blanks +```{r Analyze Blanks, echo=FALSE} +cat("Assess Blanks") + +blanks <- raw %>% + filter(!str_detect(Type, "Lab air")) %>% + filter(!str_detect(Type, "Standard")) %>% + filter(!str_detect(Type, "Sample")) %>% + filter(!str_detect(Type, "Chk_STD")) %>% + filter(!str_detect(Type, "ChkStd")) %>% + filter(!str_detect(Type, "NA")) + + +#Pull out samples from df_all to calc quantile +samples_blanks <- raw %>% + filter(str_detect(Type, c("Sample"))) + +#Calculating the lowest 25% of sample concentrations to compare to the blank concentrations + +blk_flag_CH4 <- quantile(samples_blanks$CH4_Area, prob = c(.25)) #this gives you the lower 25% quartile of the data + +blk_flag_CO2 <- quantile(samples_blanks$CO2_Area, prob = c(.25)) #this gives you the lower 25% quartile of the data + +blk_flag_N2O <- quantile(samples_blanks$N2O_Area, prob = c(.25)) #this gives you the lower 25% quartile of the data + +blanks<-blanks %>% mutate(CH4_diff_flag = ifelse(blanks$CH4_Area <= blk_flag_CH4, 'YES', 'NO, rerun'), + CO2_diff_flag = ifelse(blanks$CO2_Area <= blk_flag_CO2, 'YES', 'NO, rerun'), + N2O_diff_flag = ifelse(blanks$N2O_Area <= blk_flag_N2O, 'YES', 'NO, rerun')) + +#calculate the percent of check standards that are within the range based on the flag +CH4_blks_percent <- (sum(blanks$CH4_diff_flag == "YES") / nrow(blanks)) * + 100 +CO2_blks_percent <- (sum(blanks$CO2_diff_flag == "YES") / nrow(blanks)) * + 100 +N2O_blks_percent <- (sum(blanks$N2O_diff_flag == "YES") / nrow(blanks)) * + 100 + +#report out if flags indicate need for rerun +if (CH4_blks_percent >= blks_flag) { + message(">60% of CH4 Blanks are below the lower 25% quartile of samples - PROCEED") +} else { + message("<60% of CH4 blaks are lower 25% quartile of samples - REASSESS") +} + +#report out if flags indicate need for rerun +if (CO2_blks_percent >= blks_flag) { + message(">60% of CO2 Blanks are below the lower 25% quartile of samples - PROCEED") +} else { + message("<60% of CO2 blaks are lower 25% quartile of samples - REASSESS") +} + +#report out if flags indicate need for rerun +if (N2O_blks_percent >= blks_flag) { + message(">60% of N2O Blanks are below the lower 25% quartile of samples - PROCEED") +} else { + message("<60% of N2O blaks are lower 25% quartile of samples - REASSESS") +} + + +#plotting the blanks compared to the lower 25% of conc (what the flag is) +CH4_blks_plot <- ggplot(data = blanks, aes(x = Run_Date, y = CH4_Area, fill = + CH4_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c( + "YES" = "deepskyblue3", + "NO, rerun" = "darkred" + )) + + theme_classic() + labs(x = " ", y = "CH4 Area", title = "CH4 Blanks") + + theme(legend.position = "bottom") + + geom_hline( + yintercept = as.numeric(blk_flag_CH4), + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "Blank Conc <25% Quartile Samples")) + +print(CH4_blks_plot) + +#CO2 +CO2_blks_plot <- ggplot(data = blanks, aes(x = Run_Date, y = CO2_Area, fill = + CO2_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c( + "YES" = "deepskyblue3", + "NO, rerun" = "darkred" + )) + + theme_classic() + labs(x = " ", y = "CO2 Area", title = "CO2 Blanks") + + theme(legend.position = "bottom") + + geom_hline( + yintercept = as.numeric(blk_flag_CO2), + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "Blank Conc <25% Quartile Samples")) + +print(CO2_blks_plot) + +#N2O +N2O_blks_plot <- ggplot(data = blanks, aes(x = Run_Date, y = N2O_Area, fill = + N2O_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c( + "YES" = "deepskyblue3", + "NO, rerun" = "darkred" + )) + + theme_classic() + labs(x = " ", y = "N2O Area", title = "N2O Blanks") + + theme(legend.position = "bottom") + + geom_hline( + yintercept = as.numeric(blk_flag_N2O), + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "Blank Conc <25% Quartile Samples")) + +print(N2O_blks_plot) +#find average of run blanks for flagging samples later +# Compute averages +blk_avg_CH4 <- mean(blanks$CH4_Area, na.rm = TRUE) +blk_avg_CO2 <- mean(blanks$CO2_Area, na.rm = TRUE) +blk_avg_N2O <- mean(blanks$N2O_Area, na.rm = TRUE) +# Create a data frame +blank_avgs <- data.frame(Test = c("CH4","CO2","N2O"), + Blank_Mean_Area = c(blk_avg_CH4,blk_avg_CO2,blk_avg_N2O)) + +# Pretty print +knitr::kable(blank_avgs, caption = "Mean Area of Blanks", digits = 4) + + +#write out a flag if more than 60% of the blanks are above the lower 25% quantile of samples +flag_blks_CH4 <- ifelse(CH4_blks_percent >= blks_flag, + "", + '; CH4 Blanks out of Range') + +flag_blks_CO2 <- ifelse(CO2_blks_percent >= blks_flag, + "", + '; CO2 Blanks out of Range') + +flag_blks_N2O <- ifelse(N2O_blks_percent >= blks_flag, + "", + '; N2O Blanks out of Range') + + + +Flags_df_CH4 <- Flags_df_CH4 %>% mutate(Flag_CH4 = paste0(Flag_CH4, flag_blks_CH4)) +Flags_df_CO2 <- Flags_df_CO2 %>% mutate(Flag_CO2 = paste0(Flag_CO2,flag_blks_CO2)) +Flags_df_N2O <- Flags_df_N2O %>% mutate(Flag_N2O = paste0(Flag_N2O, flag_blks_N2O)) + + +``` + +# Dilution correct samples and Check Range +```{r, echo=FALSE} + +#Correct if volume other than 12mL of Sample was added +Samples$CH4_Conc_ppm_dilcorr <- ((0.5 * Samples$CH4_Conc_ppm) * (exetainer_volume + Samples$Sample_Volume)) / + (Samples$Sample_Volume) +Samples$CO2_Conc_ppm_dilcorr <- ((0.5 * Samples$CO2_Conc_ppm) * (exetainer_volume + Samples$Sample_Volume)) / + (Samples$Sample_Volume) +Samples$N2O_Conc_ppm_dilcorr <- ((0.5 * Samples$N2O_Conc_ppm) * (exetainer_volume + Samples$Sample_Volume)) / + (Samples$Sample_Volume) +#check results +#head(Samples) + +#quick first look at the samples +ch4_samples <- ggplot(data = Samples, aes(x = Sample_ID, y = CH4_Conc_ppm, fill = + CH4_Flag)) + + geom_bar(stat = 'identity') + + scale_fill_manual(values = c("Within Range" = "darkgreen", + "ADL" = "darkred", + "BDL" = "darkblue")) + + theme_classic() + labs(x = " ", y = "CH4 (ppm)", title = "CH4: Green = Within Range (Not Dil Cor)") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + ch4_samples + + CO2_samples <- ggplot(data = Samples, aes(x = Sample_ID, y = CO2_Conc_ppm, fill = + CO2_Flag)) + + geom_bar(stat = 'identity') + + scale_fill_manual(values = c("Within Range" = "darkgreen", + "ADL" = "darkred", + "BDL" = "darkblue")) + + theme_classic() + labs(x = " ", y = "CO2 (ppm)", title = "CO2: Green = Within Range (Not Dil Cor)") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + CO2_samples + + N2O_samples <- ggplot(data = Samples, aes(x = Sample_ID, y = N2O_Conc_ppm, fill = + N2O_Flag)) + + geom_bar(stat = 'identity') + + scale_fill_manual(values = c("Within Range" = "darkgreen", + "ADL" = "darkred", + "BDL" = "darkblue")) + + theme_classic() + labs(x = " ", y = "N2O (ppm)", title = "N2O: Green = Within Range (Not Dil Cor)") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + N2O_samples +# #corrected for different dilutions +# ch4_samples_cor <- ggplot(data = Samples, aes(x = Sample_ID, y = CH4_Conc_ppm_dilcorr, fill = +# CH4_Flag)) + +# geom_bar(stat = 'identity') + +# scale_fill_manual(values = c("Within Range" = "green4", +# "ADL" = "red3", +# "BDL" = "blue3")) + +# theme_classic() + labs(x = " ", y = "CH4 (ppm)", title = "CH4: Green = Within Range") + +# theme(axis.text.x = element_text( +# angle = 90, +# vjust = 0.5, +# hjust = 1 +# )) + +# theme(legend.position = "none") +# + +# ch4_samples_cor + + +``` + + +# Calculate gas in water +```{r, echo=FALSE} + +# Convert ppm CH4 to total uM CH4 in the sample headspace +# use Ideal Gas Law: +# hdsp umol CH4 = ppm CH4*(PV/RT) +# P = 1 (pressure in atm) +# R = 0.082 (gas constant) +# V = 0.015 (gas syringe volume in L) +# T = "TempC" column value in Kelvin (equilibration temperature) + +#Calculate CH4 uM from ppm + +Samples$CH4_Conc_uM <- (Samples$CH4_Conc_ppm_dilcorr * (( 1 * volume_g )/(R * (TempC + CTK) )))/ volume_w + +Samples$CO2_Conc_uM <- (Samples$CO2_Conc_ppm_dilcorr * (( 1 * volume_g )/(R * (TempC + CTK) )))/ volume_w + +Samples$N2O_Conc_uM <- (Samples$N2O_Conc_ppm_dilcorr * (( 1 * volume_g )/(R * (TempC + CTK) )))/ volume_w +#old equation +#Samples$CH4_Conc_uM <- (Samples$CH4_Conc_ppm_dilcorr * ((1 * volume / 1000) / (R * (TempC + CTK)))) / (volume / 1000) + + +#quick first look at the samples +ch4_samples1 <- ggplot(data = Samples, aes(x = Sample_ID, y = CH4_Conc_uM)) + + geom_bar(stat = 'identity', fill = "darkblue") + + theme_classic() + + labs(x = " ", y = "CH4 (uM)", title = "CH4 Gas in Water") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + +ch4_samples1 + +#quick first look at the samples +CO2_samples1 <- ggplot(data = Samples, aes(x = Sample_ID, y = CO2_Conc_uM)) + + geom_bar(stat = 'identity', fill = "darkblue") + + theme_classic() + + labs(x = " ", y = "CO2 (uM)", title = "CO2 Gas in Water") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + +CO2_samples1 + +#quick first look at the samples +N2O_samples1 <- ggplot(data = Samples, aes(x = Sample_ID, y = N2O_Conc_uM)) + + geom_bar(stat = 'identity', fill = "darkblue") + + theme_classic() + + labs(x = " ", y = "N2O (uM)", title = "N2O Gas in Water") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + +N2O_samples1 + +``` + +# Merge samples with Metadata & check all samples are present +```{r check sample ids with metadata, echo=FALSE} + +cat("Merge Samples with Metadata") + +Samples_A <- Samples %>% filter(grepl("Ch", Sample_ID)) %>% mutate(Sample_Date = as.Date(substr(Sample_ID,1, 8), format = "%Y%m%d")) %>% mutate(Sample_ID = substring(Sample_ID, first = 10)) %>% mutate(Sample_ID = str_sub(Sample_ID, end = -3),Sample_ID=ifelse(grepl("cm",Sample_ID),str_sub(Sample_ID, end = -3),Sample_ID)) %>% mutate(Sample_ID = str_replace(Sample_ID, "_", "-")) +#check to see if all samples are present in the metadata +all_present <- all(metadata$Sample_Name %in% Samples_A$Sample_ID) + +if (all_present) { + message("All sample IDs are present in data") +} else { + message("Some sample IDs are missing from data.") + + # Optional: Which ones are missing? + missing_ids <- setdiff(metadata$Sample_Name, Samples_A$Sample_ID) + print(missing_ids) +} + + +#merge metadata with sample run data +merged_data1 <- metadata %>% + mutate(Sample_ID = paste0("\\b", Sample_ID, "\\b")) %>% + fuzzyjoin::regex_left_join(Samples_A, ., by = c(Sample_ID = "Sample_Name")) + +#might want to include a flag or something to see that all the samples are included? + +#add flags + +merged_2 <- merge(merged_data1, Flags_df_CH4) +merged_2 <- merge(merged_2, Flags_df_CO2) +merged_2 <- merge(merged_2, Flags_df_N2O) +merged_data <-merged_2 %>% mutate(Flags = paste0(Flag_CH4,Flag_CO2,Flag_N2O)) + + + +df_all_clean <- merged_data + +``` + +## Organize Data +```{r, echo=FALSE,include=FALSE} +#check results + head(Samples) + + #pull out what we need + + df_all_clean_cols <- df_all_clean %>% + dplyr::select( + Site, + Project, + Year, + Month, + Sample_Date, + Community, + Nickname, + Plot, + Depth_cm, + CO2_Treatment, + Temp_Treatment, + CH4_Conc_ppm_dilcorr, + CH4_Conc_uM, + CH4_Flag, + CO2_Conc_ppm_dilcorr, + CO2_Conc_uM, + CO2_Flag, + N2O_Conc_ppm_dilcorr, + N2O_Conc_uM, + N2O_Flag, + Flags, + Run_Date + ) + + final_data_labeled <- df_all_clean_cols %>% + mutate( + Run_notes = run_notes, #new column with notes about the run + Analysis_rundate = Run_Date) + + #rename columns + org_labeled_fin_data <- final_data_labeled %>% + rename( + CH4_Conc_ppm = CH4_Conc_ppm_dilcorr, + CH4_Conc_Flag = CH4_Flag, + CO2_Conc_ppm = CO2_Conc_ppm_dilcorr, + CO2_Conc_Flag = CO2_Flag, + N2O_Conc_ppm = N2O_Conc_ppm_dilcorr, + N2O_Conc_Flag = N2O_Flag, + QAQC_Flags = Flags + ) + + #Order Columns for Final Data Frame + All_Clean_Data <- org_labeled_fin_data %>% + dplyr::select( + Site, + Project, + Year, + Month, + Sample_Date, + Community, + Nickname, + Plot, + Depth_cm, + CO2_Treatment, + Temp_Treatment, + CO2_Conc_ppm, + CO2_Conc_uM, + CO2_Conc_Flag, + N2O_Conc_ppm, + N2O_Conc_uM, + N2O_Conc_Flag, + CH4_Conc_ppm, + CH4_Conc_uM, + CH4_Conc_Flag, + QAQC_Flags, + Analysis_rundate, + Run_notes + ) + head(All_Clean_Data) + +``` + + +## Visualize Data CH4 +```{r Visualize Data CH4, fig.height=10, echo=FALSE} +cat("Visualize Data") + +### Ammonia +CH4_forplot <- All_Clean_Data + +CH4_forplot$Depth_cm <- + as.numeric(CH4_forplot$Depth_cm) + +#group the data for plotting +CH4_forplot <- CH4_forplot %>% + group_by(Depth_cm) %>% + mutate(row_num = factor(row_number())) %>% # create row_num as factor per group + ungroup() %>% + mutate(Treatment = paste0("+", Temp_Treatment, " " ,"C")) %>% mutate(Chamber = factor(Plot, levels = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"))) %>% mutate(Depth1 = paste0(Depth_cm, " cm")) %>% mutate(Depth = factor(Depth1, levels = c("5 cm", "20 cm", "40 cm", "80 cm"))) + +#create plot +viz_CH4_plot <- ggplot(data = CH4_forplot, aes( + x = as.factor(Chamber), + y = CH4_Conc_uM, + fill = as.factor(Chamber) +)) + + geom_col(stat = "identity", + position = position_dodge2(padding = 0.1, + width = 0.5, + preserve = "single" )) + + facet_grid(Depth ~ ., + scales = "free_x") + + scale_fill_manual( + breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Ch1" = "blue4", + "Ch2" = "blue3", + "Ch3" = "turquoise4", + "Ch4" = "lightseagreen", + "Ch5" = "mediumseagreen", + "Ch6" = "limegreen", + "Ch7" = "yellowgreen", + "Ch8" = "yellow2", + "Ch9" = "darkgoldenrod2", + "Ch10" = "darkorange2", + "Ch11" = "orangered1", + "Ch12" = "red2"), + name = "Chamber:" + ) + + theme_classic() + + labs( + x = " ", + y = "CH4 Conc (uM)", + title = "GENX: Porewater CH4" + ) + + theme(legend.position = "right") + + scale_x_discrete(drop = TRUE, limits = rev) + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.key = element_rect("black"), + legend.position = "none" + ) + + coord_flip() +print(viz_CH4_plot) + +``` +\newpage + +\newpage +```{r Visualize CH4 Data by Rep, fig.height=8.5, echo=FALSE} + +#get replicate value and treatment info +CH4_forplot <- CH4_forplot %>% + mutate(Chamber = case_when( + Plot == "Ch1" ~ "Chamber 1", + Plot == "Ch2" ~ "Chamber 2", + Plot == "Ch3" ~ "Chamber 3", + Plot == "Ch4" ~ "Chamber 4", + Plot == "Ch5" ~ "Chamber 5", + Plot == "Ch6" ~ "Chamber 6", + Plot == "Ch7" ~ "Chamber 7", + Plot == "Ch8" ~ "Chamber 8", + Plot == "Ch9" ~ "Chamber 9", + Plot == "Ch10" ~ "Chamber 10", + Plot == "Ch11" ~ "Chamber 11", + Plot == "Ch12" ~ "Chamber 12" + + + ) + ) %>% mutate(Chamber = factor(levels = c( + "Chamber 1", + "Chamber 2", + "Chamber 3", + "Chamber 4", + "Chamber 5", + "Chamber 6", + "Chamber 7", + "Chamber 8", + "Chamber 9", + "Chamber 10", + "Chamber 11", + "Chamber 12" + ), Chamber)) + +#make plot +viz_CH4_plot_2 <- ggplot(data = CH4_forplot, + aes(x = CH4_Conc_uM, y = Depth_cm, color = Chamber, shape = as.factor(Sample_Date))) + + geom_point(size = 3) + + geom_path(linewidth = 1) + + scale_color_manual(breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Chamber 1" = "blue4", + "Chamber 2" = "blue3", + "Chamber 3" = "turquoise4", + "Chamber 4" = "lightseagreen", + "Chamber 5" = "mediumseagreen", + "Chamber 6" = "limegreen", + "Chamber 7" = "yellowgreen", + "Chamber 8" = "yellow2", + "Chamber 9" = "darkgoldenrod2", + "Chamber 10" = "darkorange2", + "Chamber 11" = "orangered1", + "Chamber 12" = "red2"), + name = "Chamber:") + + facet_wrap(~Chamber, ncol = 3, nrow = 4, scales = "free_x") + + labs(x = "CH4 Conc (uM)", + y = "Depth (cm)", + title = "GENX: Porewater CH4 by Chamber") + + scale_y_reverse(breaks = c(5, 20, 40, 80), + limits = c(85, 0)) + + theme_classic() + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.position = "none" + ) + + +viz_CH4_plot_2 + +``` + + +##Visualize Data N2O +```{r Visualize Data N2O, fig.height=10, echo=FALSE} +cat("Visualize Data") + +### Ammonia +N2O_forplot <- All_Clean_Data + +N2O_forplot$Depth_cm <- + as.numeric(N2O_forplot$Depth_cm) + +#group the data for plotting +N2O_forplot <- N2O_forplot %>% + group_by(Depth_cm) %>% + mutate(row_num = factor(row_number())) %>% # create row_num as factor per group + ungroup() %>% + mutate(Treatment = paste0("+", Temp_Treatment, " " ,"C")) %>% mutate(Chamber = factor(Plot, levels = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"))) %>% mutate(Depth1 = paste0(Depth_cm, " cm")) %>% mutate(Depth = factor(Depth1, levels = c("5 cm", "20 cm", "40 cm", "80 cm"))) + +#create plot +viz_N2O_plot <- ggplot(data = N2O_forplot, aes( + x = as.factor(Chamber), + y = N2O_Conc_uM, + fill = as.factor(Chamber) +)) + + geom_col(stat = "identity", + position = position_dodge2(padding = 0.1, + width = 0.5, + preserve = "single" )) + + facet_grid(Depth ~ ., + scales = "free_x") + + scale_fill_manual( + breaks = c( + "Ch1", "Ch2", "Ch3", "N2O", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Ch1" = "blue4", + "Ch2" = "blue3", + "Ch3" = "turquoise4", + "Ch4" = "lightseagreen", + "Ch5" = "mediumseagreen", + "Ch6" = "limegreen", + "Ch7" = "yellowgreen", + "Ch8" = "yellow2", + "Ch9" = "darkgoldenrod2", + "Ch10" = "darkorange2", + "Ch11" = "orangered1", + "Ch12" = "red2"), + name = "Chamber:" + ) + + theme_classic() + + labs( + x = " ", + y = "N2O Conc (uM)", + title = "GENX: Porewater N2O" + ) + + theme(legend.position = "right") + + scale_x_discrete(drop = TRUE, limits = rev) + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.key = element_rect("black"), + legend.position = "none" + ) + + coord_flip() +print(viz_N2O_plot) + +``` +\newpage + +```{r Visualize N2O Data by Rep, fig.height=8.5, echo=FALSE} + +#get replicate value and treatment info +N2O_forplot <- N2O_forplot %>% + mutate(Chamber = case_when( + Plot == "Ch1" ~ "Chamber 1", + Plot == "Ch2" ~ "Chamber 2", + Plot == "Ch3" ~ "Chamber 3", + Plot == "Ch4" ~ "Chamber 4", + Plot == "Ch5" ~ "Chamber 5", + Plot == "Ch6" ~ "Chamber 6", + Plot == "Ch7" ~ "Chamber 7", + Plot == "Ch8" ~ "Chamber 8", + Plot == "Ch9" ~ "Chamber 9", + Plot == "Ch10" ~ "Chamber 10", + Plot == "Ch11" ~ "Chamber 11", + Plot == "Ch12" ~ "Chamber 12" + + + ) + ) %>% mutate(Chamber = factor(levels = c( + "Chamber 1", + "Chamber 2", + "Chamber 3", + "Chamber 4", + "Chamber 5", + "Chamber 6", + "Chamber 7", + "Chamber 8", + "Chamber 9", + "Chamber 10", + "Chamber 11", + "Chamber 12" + ), Chamber)) + +#make plot +viz_N2O_plot_2 <- ggplot(data = N2O_forplot, + aes(x = N2O_Conc_uM, y = Depth_cm, color = Chamber, shape = as.factor(Sample_Date))) + + geom_point(size = 3) + + geom_path(linewidth = 1) + + scale_color_manual(breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Chamber 1" = "blue4", + "Chamber 2" = "blue3", + "Chamber 3" = "turquoise4", + "Chamber 4" = "lightseagreen", + "Chamber 5" = "mediumseagreen", + "Chamber 6" = "limegreen", + "Chamber 7" = "yellowgreen", + "Chamber 8" = "yellow2", + "Chamber 9" = "darkgoldenrod2", + "Chamber 10" = "darkorange2", + "Chamber 11" = "orangered1", + "Chamber 12" = "red2"), + name = "Chamber:") + + facet_wrap(~Chamber, ncol = 3, nrow = 4, scales = "free_x") + + labs(x = "N2O Conc (uM)", + y = "Depth (cm)", + title = "GENX: Porewater N2O by Chamber") + + scale_y_reverse(breaks = c(5, 20, 40, 80), + limits = c(85, 0)) + + #xlim() + + theme_classic() + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.position = "none" + ) + + +viz_N2O_plot_2 + +``` + +##Visualize Data CO2 +```{r Visualize Data CO2, fig.height=10, echo=FALSE} +cat("Visualize Data") + +### Ammonia +CO2_forplot <- All_Clean_Data + +CO2_forplot$Depth_cm <- + as.numeric(CO2_forplot$Depth_cm) + +#group the data for plotting +CO2_forplot <- CO2_forplot %>% + group_by(Depth_cm) %>% + mutate(row_num = factor(row_number())) %>% # create row_num as factor per group + ungroup() %>% + mutate(Treatment = paste0("+", Temp_Treatment, " " ,"C")) %>% mutate(Chamber = factor(Plot, levels = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"))) %>% mutate(Depth1 = paste0(Depth_cm, " cm")) %>% mutate(Depth = factor(Depth1, levels = c("5 cm", "20 cm", "40 cm", "80 cm"))) + +#create plot +viz_CO2_plot <- ggplot(data = CO2_forplot, aes( + x = as.factor(Chamber), + y = CO2_Conc_uM, + fill = as.factor(Chamber) +)) + + geom_col(stat = "identity", + position = position_dodge2(padding = 0.1, + width = 0.5, + preserve = "single" )) + + facet_grid(Depth ~ ., + scales = "free_x") + + scale_fill_manual( + breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Ch1" = "blue4", + "Ch2" = "blue3", + "Ch3" = "turquoise4", + "Ch4" = "lightseagreen", + "Ch5" = "mediumseagreen", + "Ch6" = "limegreen", + "Ch7" = "yellowgreen", + "Ch8" = "yellow2", + "Ch9" = "darkgoldenrod2", + "Ch10" = "darkorange2", + "Ch11" = "orangered1", + "Ch12" = "red2"), + name = "Chamber:" + ) + + theme_classic() + + labs( + x = " ", + y = "CO2 Conc (uM)", + title = "GENX: Porewater CO2" + ) + + theme(legend.position = "right") + + scale_x_discrete(drop = TRUE, limits = rev) + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.key = element_rect("black"), + legend.position = "none" + ) + + coord_flip() +print(viz_CO2_plot) + +``` +\newpage + +```{r Visualize CO2 Data by Rep, fig.height=8.5, echo=FALSE} + +#get replicate value and treatment info +CO2_forplot <- CO2_forplot %>% + mutate(Chamber = case_when( + Plot == "Ch1" ~ "Chamber 1", + Plot == "Ch2" ~ "Chamber 2", + Plot == "Ch3" ~ "Chamber 3", + Plot == "Ch4" ~ "Chamber 4", + Plot == "Ch5" ~ "Chamber 5", + Plot == "Ch6" ~ "Chamber 6", + Plot == "Ch7" ~ "Chamber 7", + Plot == "Ch8" ~ "Chamber 8", + Plot == "Ch9" ~ "Chamber 9", + Plot == "Ch10" ~ "Chamber 10", + Plot == "Ch11" ~ "Chamber 11", + Plot == "Ch12" ~ "Chamber 12" + + + ) + ) %>% mutate(Chamber = factor(levels = c( + "Chamber 1", + "Chamber 2", + "Chamber 3", + "Chamber 4", + "Chamber 5", + "Chamber 6", + "Chamber 7", + "Chamber 8", + "Chamber 9", + "Chamber 10", + "Chamber 11", + "Chamber 12" + ), Chamber)) + +#make plot +viz_CO2_plot_2 <- ggplot(data = CO2_forplot, + aes(x = CO2_Conc_uM, y = Depth_cm, color = Chamber, shape = as.factor(Sample_Date))) + + geom_point(size = 3) + + geom_path(linewidth = 1) + + scale_color_manual(breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Chamber 1" = "blue4", + "Chamber 2" = "blue3", + "Chamber 3" = "turquoise4", + "Chamber 4" = "lightseagreen", + "Chamber 5" = "mediumseagreen", + "Chamber 6" = "limegreen", + "Chamber 7" = "yellowgreen", + "Chamber 8" = "yellow2", + "Chamber 9" = "darkgoldenrod2", + "Chamber 10" = "darkorange2", + "Chamber 11" = "orangered1", + "Chamber 12" = "red2"), + name = "Chamber:") + + facet_wrap(~Chamber, ncol = 3, nrow = 4, scales = "free_x") + + labs(x = "CO2 Conc (uM)", + y = "Depth (cm)", + title = "GENX: Porewater CO2 by Chamber") + + scale_y_reverse(breaks = c(5, 20, 40, 80), + limits = c(85, 0)) + + theme_classic() + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.position = "none" + ) + + +viz_CO2_plot_2 + +``` + + +##Export Data +```{r, echo=FALSE} +write.csv(All_Clean_Data, final_path) +write.csv(unique_log, log_path) +#end +``` + +#end \ No newline at end of file diff --git a/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_GHG_20260513.Rmd b/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_GHG_20260513.Rmd new file mode 100644 index 0000000..7c456e3 --- /dev/null +++ b/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_GHG_20260513.Rmd @@ -0,0 +1,1604 @@ +--- +title: "GENX: Porewater Methane" +author: "May 2026 Samples" +date: "`r Sys.Date()`" +output: + pdf_document: + toc: true + toc_depth: 1 + number_sections: true +output_dir: "To Be Reviewed/PDF" +--- + +```{r Run Setup,include=FALSE} +if (!require("pacman")) install.packages("pacman") +pacman::p_load( + dplyr, + purrr, + fuzzyjoin, + ggplot2, + ggpubr, + data.table, + stringr, + here) +``` +\newpage + +##Run Information +```{r run information, include=TRUE} +cat("Run Information: Melanie Giessner ") #lets you know what section you're in +#set the run date & user name +sample_year <- "2026" +sample_month <- "May" +user <- "Melanie Giessner" +#identify the files you want to read in +#read in as a list to accommodate multiple runs in a month + +#change dates +folder_path_rawdata <- paste0("Raw Data") +GHG_files <- list.files(path = folder_path_rawdata,pattern = "20260513" ,full.names = TRUE) +head(GHG_files) +#GHG_files <- c("Raw Data/20260417_GENX_GHGdata.csv","Raw Data/20260501_GENX_GHGdata.csv" ) + + +# Define the file path for QAQC log file - NO Need to change just check year +log_path <- "Processed Data/ShimadzuGC_Slope_QAQC.csv" + + +# Define final path for data be sure to change year and month and run number +final_path <- "Processed Data/GCReW_GENX_Porewater_CH4_20260513.csv" + +#Gas in Water Calculations +# "TempC" column value in Celsius (equilibration temperature) and volume of gas (in liters) in syringe (not changing currently) +TempC = 25 #Equilibration Temperature (Celsius) + +volume_g = 0.015 #volume of gas (in liters) in syringe when equilibrized +volume_w = 0.015 #volume of water (in liters) in syringe when equilibrized (should be equal to volume_g) + +#record any notes about the run or anything other info here: +run_notes <- "" + +#Metadata File Path + Raw_Metadata = here(".." , "GCReW", "GCReW_Project_Treatment_Metadata.csv") + +#Collection_Dates = "Raw Data/Sample_Collection_Dates_2024.csv" + +cat(run_notes) +``` + + +##Set Up + +```{r setup, include=FALSE} + +if (!require("pacman")) install.packages("pacman") +pacman::p_load( + dplyr, + purrr, + fuzzyjoin, + ggplot2, + ggpubr, + stringr, + here) + +##Low & High Standard Curve Cutoffs +CH4_low_std_crv_cutoff <- 10 +CH4_low_std_crv_area_cutoff <- 7000 +CH4_mid_std_crv_cutoff <- 100 +CH4_mid_std_crv_area_cutoff <- 70000 +CH4_high_std_crv_cutoff <- 10000 + +CO2_low_std_crv_cutoff <- 2000 +CO2_low_std_crv_area_cutoff <- 900000 +CO2_mid_std_crv_cutoff <- 20000 +CO2_mid_std_crv_area_cutoff <- 7000000 +CO2_high_std_crv_cutoff <- 50100 + +N2O_low_std_crv_cutoff <- 5 +N2O_low_std_crv_area_cutoff <- 13000 +N2O_mid_std_crv_cutoff <- 50.2 +N2O_mid_std_crv_area_cutoff <- 100000 +N2O_high_std_crv_cutoff <- 500 + +r2_cutoff <- 0.990 + +##Gas In Water Calculation +R <- 0.08206 +CTK <- 273.15 + +#Metadata file path +#Raw_Metadata = here(".." , "GCReW", "GCReW_Project_Treatment_Metadata.csv") + +##Detection Limits +adl_cutoff <- 20000 +bdl_cutoff <- 50 + +##Check Standard Concentration +level_CH4 <- 10 #ppm +level_CO2 <- 2000 #ppm +level_N2O <- 5 #ppm +chks_flag = 60 +blks_flag = 60 + +#Volumes +exetainer_volume =12 + + +``` + + +##Read in metadata and create similar sample IDs for matching to samples +```{r pull in metadata for later, include=FALSE} + +#read in the raw metadata file +raw_metadata <- read.csv(Raw_Metadata) + +#clean up columns in metadata file: + #Pull out only SMARTX Rows + #Create a Sample_Name column to match the SEAL +metadata <- raw_metadata %>% + filter(grepl("GENX", Project, ignore.case = TRUE)) %>% + mutate(Sample_Name = Sample.ID) %>% + mutate(Month = sample_month) %>% + mutate(Year = sample_year) %>% + rename( + Sample_ID = Sample.ID, + ) %>% + dplyr::select(-N_Treatment) + + +``` + +# Read in data files +```{r , include=FALSE} + +#Read in Nov Data +raw_list <- map(GHG_files, read.csv) + + +# Combining Files +raw <- bind_rows(raw_list) + + + +#rename column +colnames(raw)[1] <- "Sample_ID" + +#head(stds_ch4) + +``` + +# Assess standard curves +```{r , echo=FALSE} +stds_ch4 <- raw %>% + filter(str_detect(Type, "Standard")) %>% filter(!Conc_CH4 == "unknown") + +#Correct data class +stds_ch4[, "Conc_CH4"] <- as.numeric(stds_ch4[, "Conc_CH4"]) + +#get the area of the top of the low curve +CH4_low_std_crv_area_cutoff <-stds_ch4$CH4_Area[stds_ch4$Conc_CH4 == CH4_low_std_crv_cutoff] +#Separate Into Low and High + +mnmx_stds <- stds_ch4 %>% filter(Conc_CH4 > 0) %>% group_by(Run_Date) %>% mutate(CH4_Min = min(Conc_CH4), CH4_Max = max(Conc_CH4)) %>% dplyr::select(Run_Date, CH4_Min, CH4_Max) %>% unique() + +low_stds_ch4 <- stds_ch4 %>% + filter(!Conc_CH4 > CH4_low_std_crv_cutoff) + +low_stds_ch4$Conc_CH4 <- as.numeric(low_stds_ch4$Conc_CH4) + + +high_stds_ch4 <- stds_ch4 %>% + filter(!Conc_CH4 < CH4_low_std_crv_cutoff) + +high_stds_ch4$Conc_CH4 <- as.numeric(high_stds_ch4$Conc_CH4) + +#High Curve for CH4 +CH4_Curve <- ggplot(high_stds_ch4, aes(CH4_Area , Conc_CH4, color = Run_Date)) + geom_point(size = 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "High CH4 Std Curve") +CH4_Curve + + # Convert 'run date' to a factor for grouping + high_stds_ch4_grouped <- high_stds_ch4 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data <- high_stds_ch4_grouped %>% + group_by(Run_Date) %>% + group_split() + +#run regression and get coefficients by Run + +Slope_CH4_raw_list <- map(split_data, ~ .x %>% mutate(CH4_Curve = "High", + CH4_R2 = summary(lm(Conc_CH4 ~ CH4_Area , data = .))$adj.r.squared , + CH4_Slope = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[2], + CH4_Intercept = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[1])) + + Slope_CH4_raw <- bind_rows(Slope_CH4_raw_list) + + Slope_CH4_High <- Slope_CH4_raw %>% dplyr::select(Run_Date, CH4_Curve, CH4_R2, CH4_Slope, CH4_Intercept) %>% distinct() + + + +#low Curve for CH4 +CH4_Curve <- ggplot(low_stds_ch4, aes(CH4_Area , Conc_CH4, color = Run_Date)) + geom_point(size = + 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "Low CH4 Std Curve") +CH4_Curve + +low_CH4_lm <- lm(low_stds_ch4$CH4_Area ~ low_stds_ch4$Conc_CH4) +low_cf <- coef(low_CH4_lm) + + # Convert 'run date' to a factor for grouping + low_stds_ch4_grouped <- low_stds_ch4 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data_l <- low_stds_ch4_grouped %>% + group_by(Run_Date) %>% + group_split() + + +#run regression and get coefficients by Run + +Slope_CH4_raw_list_l <- map(split_data_l, ~ .x %>% mutate(CH4_Curve = "Low", + CH4_R2 = summary(lm(Conc_CH4 ~ CH4_Area , data = .))$adj.r.squared , + CH4_Slope = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[2], + CH4_Intercept = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[1])) + + Slope_CH4_raw_l <- bind_rows(Slope_CH4_raw_list_l) + + Slope_CH4_Low <- Slope_CH4_raw_l %>% dplyr::select(Run_Date, CH4_Curve, CH4_R2, CH4_Slope, CH4_Intercept) %>% distinct() + + Slope_CH4 <- rbind(Slope_CH4_High, Slope_CH4_Low) + + Slope_CH4_m <- left_join(Slope_CH4, mnmx_stds) + + + +#check r2 + +ifelse(Slope_CH4_High$CH4_R2 < r2_cutoff, paste0("High_R2 is Bad","-", Slope_CH4_High$Run_Date), paste0("High_R2 is Good","-", Slope_CH4_High$Run_Date)) + +ifelse(Slope_CH4_Low$CH4_R2 < r2_cutoff, paste0("Low_R2 is Bad","-", Slope_CH4_Low$Run_Date), paste0("Low_R2 is Good","-", Slope_CH4_Low$Run_Date)) + +High_R2_Flags <- Slope_CH4_High %>% mutate(Flag_CH4 = ifelse(CH4_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CH4, Run_Date, CH4_Curve) + + +Low_R2_Flags <- Slope_CH4_Low %>% mutate(Flag_CH4 = ifelse(CH4_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CH4, Run_Date, CH4_Curve) + +Flags_df_CH4 <- rbind(High_R2_Flags, Low_R2_Flags) +``` + + +```{r CO2, echo=FALSE} +stds_CO2 <- raw %>% + filter(str_detect(Type, "Standard")) %>% filter(!Conc_CO2 == "unknown") + +#Correct data class +stds_CO2[, "Conc_CO2"] <- as.numeric(stds_CO2[, "Conc_CO2"]) + +#get the area of the top of the low curve +CO2_low_std_crv_area_cutoff <-stds_CO2$CO2_Area[stds_CO2$Conc_CO2 == CO2_low_std_crv_cutoff] +#Separate Into Low and High + +mnmx_stds <- stds_CO2 %>% filter(Conc_CO2 > 0) %>% group_by(Run_Date) %>% mutate(CO2_Min = min(Conc_CO2), CO2_Max = max(Conc_CO2)) %>% dplyr::select(Run_Date, CO2_Min, CO2_Max) %>% unique() + +low_stds_CO2 <- stds_CO2 %>% + filter(!Conc_CO2 > CO2_low_std_crv_cutoff) + +low_stds_CO2$Conc_CO2 <- as.numeric(low_stds_CO2$Conc_CO2) + + +high_stds_CO2 <- stds_CO2 %>% + filter(!Conc_CO2 < CO2_low_std_crv_cutoff) + +high_stds_CO2$Conc_CO2 <- as.numeric(high_stds_CO2$Conc_CO2) + +#High Curve for CO2 +CO2_Curve <- ggplot(high_stds_CO2, aes(CO2_Area , Conc_CO2, color = Run_Date)) + geom_point(size = 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "High CO2 Std Curve") +CO2_Curve + + # Convert 'run date' to a factor for grouping + high_stds_CO2_grouped <- high_stds_CO2 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data <- high_stds_CO2_grouped %>% + group_by(Run_Date) %>% + group_split() + +#run regression and get coefficients by Run + +Slope_CO2_raw_list <- map(split_data, ~ .x %>% mutate(CO2_Curve = "High", + CO2_R2 = summary(lm(Conc_CO2 ~ CO2_Area , data = .))$adj.r.squared , + CO2_Slope = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[2], + CO2_Intercept = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[1])) + + Slope_CO2_raw <- bind_rows(Slope_CO2_raw_list) + + Slope_CO2_High <- Slope_CO2_raw %>% dplyr::select(Run_Date, CO2_Curve, CO2_R2, CO2_Slope, CO2_Intercept) %>% distinct() + + + +#low Curve for CO2 +CO2_Curve <- ggplot(low_stds_CO2, aes(CO2_Area , Conc_CO2, color = Run_Date)) + geom_point(size = + 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "Low CO2 Std Curve") +CO2_Curve + +low_CO2_lm <- lm(low_stds_CO2$CO2_Area ~ low_stds_CO2$Conc_CO2) +low_cf <- coef(low_CO2_lm) + + # Convert 'run date' to a factor for grouping + low_stds_CO2_grouped <- low_stds_CO2 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data_l <- low_stds_CO2_grouped %>% + group_by(Run_Date) %>% + group_split() + + +#run regression and get coefficients by Run + +Slope_CO2_raw_list_l <- map(split_data_l, ~ .x %>% mutate(CO2_Curve = "Low", + CO2_R2 = summary(lm(Conc_CO2 ~ CO2_Area , data = .))$adj.r.squared , + CO2_Slope = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[2], + CO2_Intercept = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[1])) + + Slope_CO2_raw_l <- bind_rows(Slope_CO2_raw_list_l) + + Slope_CO2_Low <- Slope_CO2_raw_l %>% dplyr::select(Run_Date, CO2_Curve, CO2_R2, CO2_Slope, CO2_Intercept) %>% distinct() + + Slope_CO2 <- rbind(Slope_CO2_High, Slope_CO2_Low) + + Slope_CO2_m <- left_join(Slope_CO2, mnmx_stds) + + + +#check r2 + +ifelse(Slope_CO2_High$CO2_R2 < r2_cutoff, paste0("High_R2 is Bad","-", Slope_CO2_High$Run_Date), paste0("High_R2 is Good","-", Slope_CO2_High$Run_Date)) + +ifelse(Slope_CO2_Low$CO2_R2 < r2_cutoff, paste0("Low_R2 is Bad","-", Slope_CO2_Low$Run_Date), paste0("Low_R2 is Good","-", Slope_CO2_Low$Run_Date)) + +High_R2_Flags <- Slope_CO2_High %>% mutate(Flag_CO2 = ifelse(CO2_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CO2, Run_Date, CO2_Curve) + + +Low_R2_Flags <- Slope_CO2_Low %>% mutate(Flag_CO2 = ifelse(CO2_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CO2, Run_Date, CO2_Curve) + +Flags_df_CO2 <- rbind(High_R2_Flags, Low_R2_Flags) +``` + + +```{r N20, echo=FALSE} +stds_N2O <- raw %>% + filter(str_detect(Type, "Standard")) %>% filter(!Conc_N2O == "unknown") + +#Correct data class +stds_N2O[, "Conc_N2O"] <- as.numeric(stds_N2O[, "Conc_N2O"]) + +#get the area of the top of the low curve +N2O_low_std_crv_area_cutoff <-stds_N2O$N2O_Area[stds_N2O$Conc_N2O == N2O_low_std_crv_cutoff] +#Separate Into Low and High + +mnmx_stds <- stds_N2O %>% filter(Conc_N2O > 0) %>% group_by(Run_Date) %>% mutate(N2O_Min = min(Conc_N2O), N2O_Max = max(Conc_N2O)) %>% dplyr::select(Run_Date, N2O_Min, N2O_Max) %>% unique() + +low_stds_N2O <- stds_N2O %>% + filter(!Conc_N2O > N2O_low_std_crv_cutoff) + +low_stds_N2O$Conc_N2O <- as.numeric(low_stds_N2O$Conc_N2O) + + +high_stds_N2O <- stds_N2O %>% + filter(!Conc_N2O < N2O_low_std_crv_cutoff) + +high_stds_N2O$Conc_N2O <- as.numeric(high_stds_N2O$Conc_N2O) + +#High Curve for N2O +N2O_Curve <- ggplot(high_stds_N2O, aes(N2O_Area , Conc_N2O, color = Run_Date)) + geom_point(size = 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "High N2O Std Curve") +N2O_Curve + + # Convert 'run date' to a factor for grouping + high_stds_N2O_grouped <- high_stds_N2O %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data <- high_stds_N2O_grouped %>% + group_by(Run_Date) %>% + group_split() + +#run regression and get coefficients by Run + +Slope_N2O_raw_list <- map(split_data, ~ .x %>% mutate(N2O_Curve = "High", + N2O_R2 = summary(lm(Conc_N2O ~ N2O_Area , data = .))$adj.r.squared , + N2O_Slope = coef(lm(Conc_N2O ~ N2O_Area , data = .))[2], + N2O_Intercept = coef(lm(Conc_N2O ~ N2O_Area , data = .))[1])) + + Slope_N2O_raw <- bind_rows(Slope_N2O_raw_list) + + Slope_N2O_High <- Slope_N2O_raw %>% dplyr::select(Run_Date, N2O_Curve, N2O_R2, N2O_Slope, N2O_Intercept) %>% distinct() + + + +#low Curve for N2O +N2O_Curve <- ggplot(low_stds_N2O, aes(N2O_Area , Conc_N2O, color = Run_Date)) + geom_point(size = + 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "Low N2O Std Curve") +N2O_Curve + +low_N2O_lm <- lm(low_stds_N2O$N2O_Area ~ low_stds_N2O$Conc_N2O) +low_cf <- coef(low_N2O_lm) + + # Convert 'run date' to a factor for grouping + low_stds_N2O_grouped <- low_stds_N2O %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data_l <- low_stds_N2O_grouped %>% + group_by(Run_Date) %>% + group_split() + + +#run regression and get coefficients by Run + +Slope_N2O_raw_list_l <- map(split_data_l, ~ .x %>% mutate(N2O_Curve = "Low", + N2O_R2 = summary(lm(Conc_N2O ~ N2O_Area , data = .))$adj.r.squared , + N2O_Slope = coef(lm(Conc_N2O ~ N2O_Area , data = .))[2], + N2O_Intercept = coef(lm(Conc_N2O ~ N2O_Area , data = .))[1])) + + Slope_N2O_raw_l <- bind_rows(Slope_N2O_raw_list_l) + + Slope_N2O_Low <- Slope_N2O_raw_l %>% dplyr::select(Run_Date, N2O_Curve, N2O_R2, N2O_Slope, N2O_Intercept) %>% distinct() + + Slope_N2O <- rbind(Slope_N2O_High, Slope_N2O_Low) + + Slope_N2O_m <- left_join(Slope_N2O, mnmx_stds) + + + +#check r2 + +ifelse(Slope_N2O_High$N2O_R2 < r2_cutoff, paste0("High_R2 is Bad","-", Slope_N2O_High$Run_Date), paste0("High_R2 is Good","-", Slope_N2O_High$Run_Date)) + +ifelse(Slope_N2O_Low$N2O_R2 < r2_cutoff, paste0("Low_R2 is Bad","-", Slope_N2O_Low$Run_Date), paste0("Low_R2 is Good","-", Slope_N2O_Low$Run_Date)) + +High_R2_Flags <- Slope_N2O_High %>% mutate(Flag_N2O = ifelse(N2O_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_N2O, Run_Date, N2O_Curve) + + +Low_R2_Flags <- Slope_N2O_Low %>% mutate(Flag_N2O = ifelse(N2O_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_N2O, Run_Date, N2O_Curve) + +Flags_df_N2O <- rbind(High_R2_Flags, Low_R2_Flags) + + +``` + +```{r log} +#add new standard curve data to log +Slope_CH4_1 <- Slope_CH4 %>% mutate(curve = paste0("Slope_CH4_", CH4_Curve), R2 = CH4_R2, slope = CH4_Slope, intercept = CH4_Intercept, Analysis = "CH4", Run_by = user, Curve_top = case_when( + CH4_Curve == "Low" ~ paste(CH4_low_std_crv_cutoff,"ppm"), + CH4_Curve == "High" ~ paste(CH4_high_std_crv_cutoff,"ppm"), + .default = as.character(CH4_mid_std_crv_cutoff) +)) %>% dplyr::select(Analysis, Run_Date, Run_by, Curve_top, curve, R2, slope, intercept) +Slope_CO2_1 <- Slope_CO2 %>% mutate(curve = paste0("Slope_CO2_", CO2_Curve), R2 = CO2_R2, slope = CO2_Slope, intercept = CO2_Intercept, Analysis = "CO2", Run_by = user, Curve_top = case_when( + CO2_Curve == "Low" ~ paste(CO2_low_std_crv_cutoff,"ppm"), + CO2_Curve == "High" ~ paste(CO2_high_std_crv_cutoff,"ppm"), + .default = as.character(CO2_mid_std_crv_cutoff) +)) %>% dplyr::select(Analysis, Run_Date, Run_by, Curve_top, curve, R2, slope, intercept) +Slope_N2O_1 <- Slope_N2O %>% mutate(curve = paste0("Slope_N2O_", N2O_Curve), R2 = N2O_R2, slope = N2O_Slope, intercept = N2O_Intercept, Analysis = "N2O", Run_by = user, Curve_top = case_when( + N2O_Curve == "Low" ~ paste(N2O_low_std_crv_cutoff,"ppm"), + N2O_Curve == "High" ~ paste(N2O_high_std_crv_cutoff,"ppm"), + .default = as.character(N2O_mid_std_crv_cutoff) +)) %>% dplyr::select(Analysis, Run_Date, Run_by, Curve_top, curve, R2, slope, intercept) + +Slope <- rbind(Slope_CH4_1, Slope_CO2_1, Slope_N2O_1) + + log <- read.csv(log_path) + log <- log[, -c(1)] + head(log) + + log <- rbind(log, Slope) + +#remove possible duplicates from multiple QAQC attempts + + unique_log <- log %>% + mutate(Run_Date = as.Date(Run_Date,tryFormats = c("%Y-%m-%d", "%m/%d/%Y", "%m/%d/%y")), curve= gsub("L","l",curve), curve= gsub("H","h",curve))%>% distinct(.keep_all = TRUE) + + Slopes_chk_CH4 <- ggplot(unique_log %>% filter( grepl("CH4",curve,ignore.case = T)), aes(x = Run_Date, y = slope, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + Slopes_chk_CH4 + + Slopes_chk_CO2 <- ggplot(unique_log %>% filter( grepl("CO2",curve,ignore.case = T)), aes(x = Run_Date, y = slope, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + Slopes_chk_CO2 + + Slopes_chk_N2O <- ggplot(unique_log %>% filter( grepl("N2O",curve,ignore.case = T)), aes(x = Run_Date, y = slope, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + Slopes_chk_N2O + + + int_chk_CH4 <- ggplot(unique_log %>% filter( grepl("CH4",curve,ignore.case = T)), aes(x = Run_Date, y = intercept, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + int_chk_CH4 + + int_chk_CO2 <- ggplot(unique_log %>% filter( grepl("CO2",curve,ignore.case = T)), aes(x = Run_Date, y = intercept, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + int_chk_CO2 + + int_chk_N2O <- ggplot(unique_log %>% filter( grepl("N2O",curve,ignore.case = T)), aes(x = Run_Date, y = intercept, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + int_chk_N2O + +``` + + +## Now calculate the CH4 in ppm +```{r Calculate Concetration, echo=FALSE} +#head(raw) + +#pull out Samples +Samples_1 <- raw %>% + filter(!str_detect(Type, "Lab air")) %>% + filter(!str_detect(Type, "Standard")) %>% + filter(!str_detect(Type, "Blank")) %>% + filter(!str_detect(Type, "Chk_STD")) %>% + filter(!str_detect(Type, "ChkStd")) %>% + filter(!str_detect(Type, "NA")) %>% + + mutate(CH4_Curve = ifelse(CH4_Area >= mean(CH4_low_std_crv_area_cutoff,na.rm = TRUE), "High", "Low"), CO2_Curve = ifelse(CO2_Area >= mean(CO2_low_std_crv_area_cutoff,na.rm = TRUE), "High", "Low"), N2O_Curve = ifelse(N2O_Area >= mean(N2O_low_std_crv_area_cutoff,na.rm = TRUE), "High", "Low")) +#head(Samples) + +Samples_2 <- merge(Samples_1, Slope_CH4_m) +Samples_2 <- merge(Samples_2, Slope_CO2_m) +Samples_2 <- merge(Samples_2, Slope_N2O_m) +#Calculate CH4 concentrations in ppm +Samples <- Samples_2 %>% + mutate(CH4_Conc_ppm = (CH4_Area*CH4_Slope) + CH4_Intercept ,CO2_Conc_ppm = (CO2_Area*CO2_Slope)+ CO2_Intercept, N2O_Conc_ppm = (N2O_Area*N2O_Slope) + N2O_Intercept ) + +##########make flags for any dilutions needed + + +Samples$CH4_Flag <- ifelse(Samples$CH4_Conc_ppm > Samples$CH4_Max, "ADL", ifelse(Samples$CH4_Conc_ppm < Samples$CH4_Min, "BDL", "Within Range")) +Samples$CO2_Flag <- ifelse(Samples$CO2_Conc_ppm > Samples$CO2_Max, "ADL", ifelse(Samples$CO2_Conc_ppm < Samples$CO2_Min, "BDL", "Within Range")) +Samples$N2O_Flag <- ifelse(Samples$N2O_Conc_ppm > Samples$N2O_Max, "ADL", ifelse(Samples$N2O_Conc_ppm < Samples$N2O_Min, "BDL", "Within Range")) +#head(Samples) + + + +``` + +# Aanlayze the Check Standards +```{r Asses Check Standards, echo=FALSE} + +chks_1 <- raw %>% + filter(!str_detect(Type, "Lab air")) %>% + filter(!str_detect(Type, "Standard")) %>% + filter(!str_detect(Type, "Blank")) %>% + filter(!str_detect(Type, "Sample")) %>% + filter(!str_detect(Type, "NA")) %>% + mutate(CH4_Curve = "Low",CO2_Curve = "Low",N2O_Curve = "Low") +#head(chks) + + +chks_2 <- merge(chks_1, Slope_CH4_m) +chks_2 <- merge(chks_2, Slope_CO2_m) +chks_2 <- merge(chks_2, Slope_N2O_m) + +chks <- chks_2 %>% + mutate(CH4_Conc_ppm = (CH4_Area*CH4_Slope) + CH4_Intercept ,CO2_Conc_ppm = (CO2_Area*CO2_Slope)+ CO2_Intercept, N2O_Conc_ppm = (N2O_Area*N2O_Slope) + N2O_Intercept ) + +#calculate percent difference of check standards +chks<- chks %>% mutate( + Ch4_diff = (((chks$CH4_Conc_ppm - level_CH4) / ((chks$CH4_Conc_ppm + level_CH4) /2)) * 100), + CH4_diff_flag = ifelse(abs(Ch4_diff) < 10, 'YES', 'NO, rerun'), + CO2_diff = (((chks$CO2_Conc_ppm - level_CO2) / ((chks$CO2_Conc_ppm + level_CO2) /2)) * 100), + CO2_diff_flag = ifelse(abs(CO2_diff) < 10, 'YES', 'NO, rerun'), + N2O_diff = (((chks$N2O_Conc_ppm - level_N2O) / ((chks$N2O_Conc_ppm + level_N2O) /2)) * 100), + N2O_diff_flag = ifelse(abs(N2O_diff) < 10, 'YES', 'NO, rerun'), + ) + +#calculate the percent of check standards that are within the range based on the flag +CH4_chks_percent <- (sum(chks$CH4_diff_flag == "YES") / nrow(chks)) * 100 +CO2_chks_percent <- (sum(chks$CO2_diff_flag == "YES") / nrow(chks)) * 100 +N2O_chks_percent <- (sum(chks$N2O_diff_flag == "YES") / nrow(chks)) * 100 +#report out if flags indicate need for rerun + +if (CH4_chks_percent >= chks_flag) { + message(">60% of CH4 Check Standards are within range of expected concentration - PROCEED") +} else { + message("<60% of CH4 Check Standards are within range of expected concentration - REASSESS") +} + +if (CO2_chks_percent >= chks_flag) { + message(">60% of CO2 Check Standards are within range of expected concentration - PROCEED") +} else { + message("<60% of CO2 Check Standards are within range of expected concentration - REASSESS") +} + +if (N2O_chks_percent >= chks_flag) { + message(">60% of N2O Check Standards are within range of expected concentration - PROCEED") +} else { + message("<60% of N2O Check Standards are within range of expected concentration - REASSESS") +} + +#now plot the Ch4 concentrations and the CO2 concentrations vs. the expected concentration +#then also make the color the percent difference between the expected and observed concentration + +ch4_chk <- ggplot(data = chks, aes(x = Run_Date, y = CH4_Conc_ppm, fill = + CH4_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c("NO, rerun" = "darkgrey", "YES" = "darkgreen")) + + theme_classic() + labs(x = " ", y = "Concentration (ppm)", title = + "Check Stds: CH4") + + theme(legend.position = "bottom") + geom_hline( + yintercept = level_CH4, + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "% Difference <10%")) + + +ch4_chk + +CO2_chk <- ggplot(data = chks, aes(x = Run_Date, y = CO2_Conc_ppm, fill = + CO2_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c("NO, rerun" = "darkgrey", "YES" = "darkgreen")) + + theme_classic() + labs(x = " ", y = "Concentration (ppm)", title = + "Check Stds: CO2") + + theme(legend.position = "bottom") + geom_hline( + yintercept = level_CO2, + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "% Difference <10%")) + + +CO2_chk + +N2O_chk <- ggplot(data = chks, aes(x = Run_Date, y = N2O_Conc_ppm, fill = + N2O_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c("NO, rerun" = "darkgrey", "YES" = "darkgreen")) + + theme_classic() + labs(x = " ", y = "Concentration (ppm)", title = + "Check Stds: N2O") + + theme(legend.position = "bottom") + geom_hline( + yintercept = level_N2O, + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "% Difference <10%")) + + +N2O_chk + +#Add Check Standard Flags + +flag_chk_CH4 <- ifelse(CH4_chks_percent >= chks_flag, + "", + "; CH4 Check Standards out Of Range") +flag_chk_CO2 <- ifelse(CO2_chks_percent >= chks_flag, + "", + "; CO2 Check Standards out Of Range") +flag_chk_N2O <- ifelse(N2O_chks_percent >= chks_flag, + "", + "; N2O Check Standards out Of Range") + +Flags_df_CH4 <- Flags_df_CH4 %>% mutate(Flag_CH4 = paste0(Flag_CH4, flag_chk_CH4)) +Flags_df_CO2 <- Flags_df_CO2 %>% mutate(Flag_CO2 = paste0(Flag_CO2,flag_chk_CO2)) +Flags_df_N2O <- Flags_df_N2O %>% mutate(Flag_N2O = paste0(Flag_N2O, flag_chk_N2O)) +``` + +# Analyze the Blanks +```{r Analyze Blanks, echo=FALSE} +cat("Assess Blanks") + +blanks <- raw %>% + filter(!str_detect(Type, "Lab air")) %>% + filter(!str_detect(Type, "Standard")) %>% + filter(!str_detect(Type, "Sample")) %>% + filter(!str_detect(Type, "Chk_STD")) %>% + filter(!str_detect(Type, "ChkStd")) %>% + filter(!str_detect(Type, "NA")) + + +#Pull out samples from df_all to calc quantile +samples_blanks <- raw %>% + filter(str_detect(Type, c("Sample"))) + +#Calculating the lowest 25% of sample concentrations to compare to the blank concentrations + +blk_flag_CH4 <- quantile(samples_blanks$CH4_Area, prob = c(.25)) #this gives you the lower 25% quartile of the data + +blk_flag_CO2 <- quantile(samples_blanks$CO2_Area, prob = c(.25)) #this gives you the lower 25% quartile of the data + +blk_flag_N2O <- quantile(samples_blanks$N2O_Area, prob = c(.25)) #this gives you the lower 25% quartile of the data + +blanks<-blanks %>% mutate(CH4_diff_flag = ifelse(blanks$CH4_Area <= blk_flag_CH4, 'YES', 'NO, rerun'), + CO2_diff_flag = ifelse(blanks$CO2_Area <= blk_flag_CO2, 'YES', 'NO, rerun'), + N2O_diff_flag = ifelse(blanks$N2O_Area <= blk_flag_N2O, 'YES', 'NO, rerun')) + +#calculate the percent of check standards that are within the range based on the flag +CH4_blks_percent <- (sum(blanks$CH4_diff_flag == "YES") / nrow(blanks)) * + 100 +CO2_blks_percent <- (sum(blanks$CO2_diff_flag == "YES") / nrow(blanks)) * + 100 +N2O_blks_percent <- (sum(blanks$N2O_diff_flag == "YES") / nrow(blanks)) * + 100 + +#report out if flags indicate need for rerun +if (CH4_blks_percent >= blks_flag) { + message(">60% of CH4 Blanks are below the lower 25% quartile of samples - PROCEED") +} else { + message("<60% of CH4 blaks are lower 25% quartile of samples - REASSESS") +} + +#report out if flags indicate need for rerun +if (CO2_blks_percent >= blks_flag) { + message(">60% of CO2 Blanks are below the lower 25% quartile of samples - PROCEED") +} else { + message("<60% of CO2 blaks are lower 25% quartile of samples - REASSESS") +} + +#report out if flags indicate need for rerun +if (N2O_blks_percent >= blks_flag) { + message(">60% of N2O Blanks are below the lower 25% quartile of samples - PROCEED") +} else { + message("<60% of N2O blaks are lower 25% quartile of samples - REASSESS") +} + + +#plotting the blanks compared to the lower 25% of conc (what the flag is) +CH4_blks_plot <- ggplot(data = blanks, aes(x = Run_Date, y = CH4_Area, fill = + CH4_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c( + "YES" = "deepskyblue3", + "NO, rerun" = "darkred" + )) + + theme_classic() + labs(x = " ", y = "CH4 Area", title = "CH4 Blanks") + + theme(legend.position = "bottom") + + geom_hline( + yintercept = as.numeric(blk_flag_CH4), + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "Blank Conc <25% Quartile Samples")) + +print(CH4_blks_plot) + +#CO2 +CO2_blks_plot <- ggplot(data = blanks, aes(x = Run_Date, y = CO2_Area, fill = + CO2_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c( + "YES" = "deepskyblue3", + "NO, rerun" = "darkred" + )) + + theme_classic() + labs(x = " ", y = "CO2 Area", title = "CO2 Blanks") + + theme(legend.position = "bottom") + + geom_hline( + yintercept = as.numeric(blk_flag_CO2), + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "Blank Conc <25% Quartile Samples")) + +print(CO2_blks_plot) + +#N2O +N2O_blks_plot <- ggplot(data = blanks, aes(x = Run_Date, y = N2O_Area, fill = + N2O_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c( + "YES" = "deepskyblue3", + "NO, rerun" = "darkred" + )) + + theme_classic() + labs(x = " ", y = "N2O Area", title = "N2O Blanks") + + theme(legend.position = "bottom") + + geom_hline( + yintercept = as.numeric(blk_flag_N2O), + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "Blank Conc <25% Quartile Samples")) + +print(N2O_blks_plot) +#find average of run blanks for flagging samples later +# Compute averages +blk_avg_CH4 <- mean(blanks$CH4_Area, na.rm = TRUE) +blk_avg_CO2 <- mean(blanks$CO2_Area, na.rm = TRUE) +blk_avg_N2O <- mean(blanks$N2O_Area, na.rm = TRUE) +# Create a data frame +blank_avgs <- data.frame(Test = c("CH4","CO2","N2O"), + Blank_Mean_Area = c(blk_avg_CH4,blk_avg_CO2,blk_avg_N2O)) + +# Pretty print +knitr::kable(blank_avgs, caption = "Mean Area of Blanks", digits = 4) + + +#write out a flag if more than 60% of the blanks are above the lower 25% quantile of samples +flag_blks_CH4 <- ifelse(CH4_blks_percent >= blks_flag, + "", + '; CH4 Blanks out of Range') + +flag_blks_CO2 <- ifelse(CO2_blks_percent >= blks_flag, + "", + '; CO2 Blanks out of Range') + +flag_blks_N2O <- ifelse(N2O_blks_percent >= blks_flag, + "", + '; N2O Blanks out of Range') + + + +Flags_df_CH4 <- Flags_df_CH4 %>% mutate(Flag_CH4 = paste0(Flag_CH4, flag_blks_CH4)) +Flags_df_CO2 <- Flags_df_CO2 %>% mutate(Flag_CO2 = paste0(Flag_CO2,flag_blks_CO2)) +Flags_df_N2O <- Flags_df_N2O %>% mutate(Flag_N2O = paste0(Flag_N2O, flag_blks_N2O)) + + +``` + +# Dilution correct samples and Check Range +```{r, echo=FALSE} + +#Correct if volume other than 12mL of Sample was added +Samples$CH4_Conc_ppm_dilcorr <- ((0.5 * Samples$CH4_Conc_ppm) * (exetainer_volume + Samples$Sample_Volume)) / + (Samples$Sample_Volume) +Samples$CO2_Conc_ppm_dilcorr <- ((0.5 * Samples$CO2_Conc_ppm) * (exetainer_volume + Samples$Sample_Volume)) / + (Samples$Sample_Volume) +Samples$N2O_Conc_ppm_dilcorr <- ((0.5 * Samples$N2O_Conc_ppm) * (exetainer_volume + Samples$Sample_Volume)) / + (Samples$Sample_Volume) +#check results +#head(Samples) + +#quick first look at the samples +ch4_samples <- ggplot(data = Samples, aes(x = Sample_ID, y = CH4_Conc_ppm, fill = + CH4_Flag)) + + geom_bar(stat = 'identity') + + scale_fill_manual(values = c("Within Range" = "darkgreen", + "ADL" = "darkred", + "BDL" = "darkblue")) + + theme_classic() + labs(x = " ", y = "CH4 (ppm)", title = "CH4: Green = Within Range (Not Dil Cor)") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + ch4_samples + + CO2_samples <- ggplot(data = Samples, aes(x = Sample_ID, y = CO2_Conc_ppm, fill = + CO2_Flag)) + + geom_bar(stat = 'identity') + + scale_fill_manual(values = c("Within Range" = "darkgreen", + "ADL" = "darkred", + "BDL" = "darkblue")) + + theme_classic() + labs(x = " ", y = "CO2 (ppm)", title = "CO2: Green = Within Range (Not Dil Cor)") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + CO2_samples + + N2O_samples <- ggplot(data = Samples, aes(x = Sample_ID, y = N2O_Conc_ppm, fill = + N2O_Flag)) + + geom_bar(stat = 'identity') + + scale_fill_manual(values = c("Within Range" = "darkgreen", + "ADL" = "darkred", + "BDL" = "darkblue")) + + theme_classic() + labs(x = " ", y = "N2O (ppm)", title = "N2O: Green = Within Range (Not Dil Cor)") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + N2O_samples +# #corrected for different dilutions +# ch4_samples_cor <- ggplot(data = Samples, aes(x = Sample_ID, y = CH4_Conc_ppm_dilcorr, fill = +# CH4_Flag)) + +# geom_bar(stat = 'identity') + +# scale_fill_manual(values = c("Within Range" = "green4", +# "ADL" = "red3", +# "BDL" = "blue3")) + +# theme_classic() + labs(x = " ", y = "CH4 (ppm)", title = "CH4: Green = Within Range") + +# theme(axis.text.x = element_text( +# angle = 90, +# vjust = 0.5, +# hjust = 1 +# )) + +# theme(legend.position = "none") +# + +# ch4_samples_cor + + +``` + + +# Calculate gas in water +```{r, echo=FALSE} + +# Convert ppm CH4 to total uM CH4 in the sample headspace +# use Ideal Gas Law: +# hdsp umol CH4 = ppm CH4*(PV/RT) +# P = 1 (pressure in atm) +# R = 0.082 (gas constant) +# V = 0.015 (gas syringe volume in L) +# T = "TempC" column value in Kelvin (equilibration temperature) + +#Calculate CH4 uM from ppm + +Samples$CH4_Conc_uM <- (Samples$CH4_Conc_ppm_dilcorr * (( 1 * volume_g )/(R * (TempC + CTK) )))/ volume_w + +Samples$CO2_Conc_uM <- (Samples$CO2_Conc_ppm_dilcorr * (( 1 * volume_g )/(R * (TempC + CTK) )))/ volume_w + +Samples$N2O_Conc_uM <- (Samples$N2O_Conc_ppm_dilcorr * (( 1 * volume_g )/(R * (TempC + CTK) )))/ volume_w +#old equation +#Samples$CH4_Conc_uM <- (Samples$CH4_Conc_ppm_dilcorr * ((1 * volume / 1000) / (R * (TempC + CTK)))) / (volume / 1000) + + +#quick first look at the samples +ch4_samples1 <- ggplot(data = Samples, aes(x = Sample_ID, y = CH4_Conc_uM)) + + geom_bar(stat = 'identity', fill = "darkblue") + + theme_classic() + + labs(x = " ", y = "CH4 (uM)", title = "CH4 Gas in Water") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + +ch4_samples1 + +#quick first look at the samples +CO2_samples1 <- ggplot(data = Samples, aes(x = Sample_ID, y = CO2_Conc_uM)) + + geom_bar(stat = 'identity', fill = "darkblue") + + theme_classic() + + labs(x = " ", y = "CO2 (uM)", title = "CO2 Gas in Water") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + +CO2_samples1 + +#quick first look at the samples +N2O_samples1 <- ggplot(data = Samples, aes(x = Sample_ID, y = N2O_Conc_uM)) + + geom_bar(stat = 'identity', fill = "darkblue") + + theme_classic() + + labs(x = " ", y = "N2O (uM)", title = "N2O Gas in Water") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + +N2O_samples1 + +``` + +# Merge samples with Metadata & check all samples are present +```{r check sample ids with metadata, echo=FALSE} + +cat("Merge Samples with Metadata") + +Samples_A <- Samples %>% filter(grepl("Ch", Sample_ID)) %>% mutate(Sample_Date = as.Date(substr(Sample_ID,1, 8), format = "%Y%m%d")) %>% mutate(Sample_ID = substring(Sample_ID, first = 10)) %>% mutate(Sample_ID = str_sub(Sample_ID, end = -3),Sample_ID=ifelse(grepl("cm",Sample_ID),str_sub(Sample_ID, end = -3),Sample_ID)) %>% mutate(Sample_ID = str_replace(Sample_ID, "_", "-")) +#check to see if all samples are present in the metadata +all_present <- all(metadata$Sample_Name %in% Samples_A$Sample_ID) + +if (all_present) { + message("All sample IDs are present in data") +} else { + message("Some sample IDs are missing from data.") + + # Optional: Which ones are missing? + missing_ids <- setdiff(metadata$Sample_Name, Samples_A$Sample_ID) + print(missing_ids) +} + + +#merge metadata with sample run data +merged_data1 <- metadata %>% + mutate(Sample_ID = paste0("\\b", Sample_ID, "\\b")) %>% + fuzzyjoin::regex_left_join(Samples_A, ., by = c(Sample_ID = "Sample_Name")) + +#might want to include a flag or something to see that all the samples are included? + +#add flags + +merged_2 <- merge(merged_data1, Flags_df_CH4) +merged_2 <- merge(merged_2, Flags_df_CO2) +merged_2 <- merge(merged_2, Flags_df_N2O) +merged_data <-merged_2 %>% mutate(Flags = paste0(Flag_CH4,Flag_CO2,Flag_N2O)) + + + +df_all_clean <- merged_data + +``` + +## Organize Data +```{r, echo=FALSE,include=FALSE} +#check results + head(Samples) + + #pull out what we need + + df_all_clean_cols <- df_all_clean %>% + dplyr::select( + Site, + Project, + Year, + Month, + Sample_Date, + Community, + Nickname, + Plot, + Depth_cm, + CO2_Treatment, + Temp_Treatment, + CH4_Conc_ppm_dilcorr, + CH4_Conc_uM, + CH4_Flag, + CO2_Conc_ppm_dilcorr, + CO2_Conc_uM, + CO2_Flag, + N2O_Conc_ppm_dilcorr, + N2O_Conc_uM, + N2O_Flag, + Flags, + Run_Date + ) + + final_data_labeled <- df_all_clean_cols %>% + mutate( + Run_notes = run_notes, #new column with notes about the run + Analysis_rundate = Run_Date) + + #rename columns + org_labeled_fin_data <- final_data_labeled %>% + rename( + CH4_Conc_ppm = CH4_Conc_ppm_dilcorr, + CH4_Conc_Flag = CH4_Flag, + CO2_Conc_ppm = CO2_Conc_ppm_dilcorr, + CO2_Conc_Flag = CO2_Flag, + N2O_Conc_ppm = N2O_Conc_ppm_dilcorr, + N2O_Conc_Flag = N2O_Flag, + QAQC_Flags = Flags + ) + + #Order Columns for Final Data Frame + All_Clean_Data <- org_labeled_fin_data %>% + dplyr::select( + Site, + Project, + Year, + Month, + Sample_Date, + Community, + Nickname, + Plot, + Depth_cm, + CO2_Treatment, + Temp_Treatment, + CO2_Conc_ppm, + CO2_Conc_uM, + CO2_Conc_Flag, + N2O_Conc_ppm, + N2O_Conc_uM, + N2O_Conc_Flag, + CH4_Conc_ppm, + CH4_Conc_uM, + CH4_Conc_Flag, + QAQC_Flags, + Analysis_rundate, + Run_notes + ) + head(All_Clean_Data) + +``` + + +## Visualize Data CH4 +```{r Visualize Data CH4, fig.height=10, echo=FALSE} +cat("Visualize Data") + +### Ammonia +CH4_forplot <- All_Clean_Data + +CH4_forplot$Depth_cm <- + as.numeric(CH4_forplot$Depth_cm) + +#group the data for plotting +CH4_forplot <- CH4_forplot %>% + group_by(Depth_cm) %>% + mutate(row_num = factor(row_number())) %>% # create row_num as factor per group + ungroup() %>% + mutate(Treatment = paste0("+", Temp_Treatment, " " ,"C")) %>% mutate(Chamber = factor(Plot, levels = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"))) %>% mutate(Depth1 = paste0(Depth_cm, " cm")) %>% mutate(Depth = factor(Depth1, levels = c("5 cm", "20 cm", "40 cm", "80 cm"))) + +#create plot +viz_CH4_plot <- ggplot(data = CH4_forplot, aes( + x = as.factor(Chamber), + y = CH4_Conc_uM, + fill = as.factor(Chamber) +)) + + geom_col(stat = "identity", + position = position_dodge2(padding = 0.1, + width = 0.5, + preserve = "single" )) + + facet_grid(Depth ~ ., + scales = "free_x") + + scale_fill_manual( + breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Ch1" = "blue4", + "Ch2" = "blue3", + "Ch3" = "turquoise4", + "Ch4" = "lightseagreen", + "Ch5" = "mediumseagreen", + "Ch6" = "limegreen", + "Ch7" = "yellowgreen", + "Ch8" = "yellow2", + "Ch9" = "darkgoldenrod2", + "Ch10" = "darkorange2", + "Ch11" = "orangered1", + "Ch12" = "red2"), + name = "Chamber:" + ) + + theme_classic() + + labs( + x = " ", + y = "CH4 Conc (uM)", + title = "GENX: Porewater CH4" + ) + + theme(legend.position = "right") + + scale_x_discrete(drop = TRUE, limits = rev) + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.key = element_rect("black"), + legend.position = "none" + ) + + coord_flip() +print(viz_CH4_plot) + +``` +\newpage + +\newpage +```{r Visualize CH4 Data by Rep, fig.height=8.5, echo=FALSE} + +#get replicate value and treatment info +CH4_forplot <- CH4_forplot %>% + mutate(Chamber = case_when( + Plot == "Ch1" ~ "Chamber 1", + Plot == "Ch2" ~ "Chamber 2", + Plot == "Ch3" ~ "Chamber 3", + Plot == "Ch4" ~ "Chamber 4", + Plot == "Ch5" ~ "Chamber 5", + Plot == "Ch6" ~ "Chamber 6", + Plot == "Ch7" ~ "Chamber 7", + Plot == "Ch8" ~ "Chamber 8", + Plot == "Ch9" ~ "Chamber 9", + Plot == "Ch10" ~ "Chamber 10", + Plot == "Ch11" ~ "Chamber 11", + Plot == "Ch12" ~ "Chamber 12" + + + ) + ) %>% mutate(Chamber = factor(levels = c( + "Chamber 1", + "Chamber 2", + "Chamber 3", + "Chamber 4", + "Chamber 5", + "Chamber 6", + "Chamber 7", + "Chamber 8", + "Chamber 9", + "Chamber 10", + "Chamber 11", + "Chamber 12" + ), Chamber)) + +#make plot +viz_CH4_plot_2 <- ggplot(data = CH4_forplot, + aes(x = CH4_Conc_uM, y = Depth_cm, color = Chamber, shape = as.factor(Sample_Date))) + + geom_point(size = 3) + + geom_path(linewidth = 1) + + scale_color_manual(breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Chamber 1" = "blue4", + "Chamber 2" = "blue3", + "Chamber 3" = "turquoise4", + "Chamber 4" = "lightseagreen", + "Chamber 5" = "mediumseagreen", + "Chamber 6" = "limegreen", + "Chamber 7" = "yellowgreen", + "Chamber 8" = "yellow2", + "Chamber 9" = "darkgoldenrod2", + "Chamber 10" = "darkorange2", + "Chamber 11" = "orangered1", + "Chamber 12" = "red2"), + name = "Chamber:") + + facet_wrap(~Chamber, ncol = 3, nrow = 4, scales = "free_x") + + labs(x = "CH4 Conc (uM)", + y = "Depth (cm)", + title = "GENX: Porewater CH4 by Chamber") + + scale_y_reverse(breaks = c(5, 20, 40, 80), + limits = c(85, 0)) + + theme_classic() + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.position = "none" + ) + + +viz_CH4_plot_2 + +``` + + +##Visualize Data N2O +```{r Visualize Data N2O, fig.height=10, echo=FALSE} +cat("Visualize Data") + +### Ammonia +N2O_forplot <- All_Clean_Data + +N2O_forplot$Depth_cm <- + as.numeric(N2O_forplot$Depth_cm) + +#group the data for plotting +N2O_forplot <- N2O_forplot %>% + group_by(Depth_cm) %>% + mutate(row_num = factor(row_number())) %>% # create row_num as factor per group + ungroup() %>% + mutate(Treatment = paste0("+", Temp_Treatment, " " ,"C")) %>% mutate(Chamber = factor(Plot, levels = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"))) %>% mutate(Depth1 = paste0(Depth_cm, " cm")) %>% mutate(Depth = factor(Depth1, levels = c("5 cm", "20 cm", "40 cm", "80 cm"))) + +#create plot +viz_N2O_plot <- ggplot(data = N2O_forplot, aes( + x = as.factor(Chamber), + y = N2O_Conc_uM, + fill = as.factor(Chamber) +)) + + geom_col(stat = "identity", + position = position_dodge2(padding = 0.1, + width = 0.5, + preserve = "single" )) + + facet_grid(Depth ~ ., + scales = "free_x") + + scale_fill_manual( + breaks = c( + "Ch1", "Ch2", "Ch3", "N2O", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Ch1" = "blue4", + "Ch2" = "blue3", + "Ch3" = "turquoise4", + "Ch4" = "lightseagreen", + "Ch5" = "mediumseagreen", + "Ch6" = "limegreen", + "Ch7" = "yellowgreen", + "Ch8" = "yellow2", + "Ch9" = "darkgoldenrod2", + "Ch10" = "darkorange2", + "Ch11" = "orangered1", + "Ch12" = "red2"), + name = "Chamber:" + ) + + theme_classic() + + labs( + x = " ", + y = "N2O Conc (uM)", + title = "GENX: Porewater N2O" + ) + + theme(legend.position = "right") + + scale_x_discrete(drop = TRUE, limits = rev) + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.key = element_rect("black"), + legend.position = "none" + ) + + coord_flip() +print(viz_N2O_plot) + +``` +\newpage + +```{r Visualize N2O Data by Rep, fig.height=8.5, echo=FALSE} + +#get replicate value and treatment info +N2O_forplot <- N2O_forplot %>% + mutate(Chamber = case_when( + Plot == "Ch1" ~ "Chamber 1", + Plot == "Ch2" ~ "Chamber 2", + Plot == "Ch3" ~ "Chamber 3", + Plot == "Ch4" ~ "Chamber 4", + Plot == "Ch5" ~ "Chamber 5", + Plot == "Ch6" ~ "Chamber 6", + Plot == "Ch7" ~ "Chamber 7", + Plot == "Ch8" ~ "Chamber 8", + Plot == "Ch9" ~ "Chamber 9", + Plot == "Ch10" ~ "Chamber 10", + Plot == "Ch11" ~ "Chamber 11", + Plot == "Ch12" ~ "Chamber 12" + + + ) + ) %>% mutate(Chamber = factor(levels = c( + "Chamber 1", + "Chamber 2", + "Chamber 3", + "Chamber 4", + "Chamber 5", + "Chamber 6", + "Chamber 7", + "Chamber 8", + "Chamber 9", + "Chamber 10", + "Chamber 11", + "Chamber 12" + ), Chamber)) + +#make plot +viz_N2O_plot_2 <- ggplot(data = N2O_forplot, + aes(x = N2O_Conc_uM, y = Depth_cm, color = Chamber, shape = as.factor(Sample_Date))) + + geom_point(size = 3) + + geom_path(linewidth = 1) + + scale_color_manual(breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Chamber 1" = "blue4", + "Chamber 2" = "blue3", + "Chamber 3" = "turquoise4", + "Chamber 4" = "lightseagreen", + "Chamber 5" = "mediumseagreen", + "Chamber 6" = "limegreen", + "Chamber 7" = "yellowgreen", + "Chamber 8" = "yellow2", + "Chamber 9" = "darkgoldenrod2", + "Chamber 10" = "darkorange2", + "Chamber 11" = "orangered1", + "Chamber 12" = "red2"), + name = "Chamber:") + + facet_wrap(~Chamber, ncol = 3, nrow = 4, scales = "free_x") + + labs(x = "N2O Conc (uM)", + y = "Depth (cm)", + title = "GENX: Porewater N2O by Chamber") + + scale_y_reverse(breaks = c(5, 20, 40, 80), + limits = c(85, 0)) + + #xlim() + + theme_classic() + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.position = "none" + ) + + +viz_N2O_plot_2 + +``` + +##Visualize Data CO2 +```{r Visualize Data CO2, fig.height=10, echo=FALSE} +cat("Visualize Data") + +### Ammonia +CO2_forplot <- All_Clean_Data + +CO2_forplot$Depth_cm <- + as.numeric(CO2_forplot$Depth_cm) + +#group the data for plotting +CO2_forplot <- CO2_forplot %>% + group_by(Depth_cm) %>% + mutate(row_num = factor(row_number())) %>% # create row_num as factor per group + ungroup() %>% + mutate(Treatment = paste0("+", Temp_Treatment, " " ,"C")) %>% mutate(Chamber = factor(Plot, levels = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"))) %>% mutate(Depth1 = paste0(Depth_cm, " cm")) %>% mutate(Depth = factor(Depth1, levels = c("5 cm", "20 cm", "40 cm", "80 cm"))) + +#create plot +viz_CO2_plot <- ggplot(data = CO2_forplot, aes( + x = as.factor(Chamber), + y = CO2_Conc_uM, + fill = as.factor(Chamber) +)) + + geom_col(stat = "identity", + position = position_dodge2(padding = 0.1, + width = 0.5, + preserve = "single" )) + + facet_grid(Depth ~ ., + scales = "free_x") + + scale_fill_manual( + breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Ch1" = "blue4", + "Ch2" = "blue3", + "Ch3" = "turquoise4", + "Ch4" = "lightseagreen", + "Ch5" = "mediumseagreen", + "Ch6" = "limegreen", + "Ch7" = "yellowgreen", + "Ch8" = "yellow2", + "Ch9" = "darkgoldenrod2", + "Ch10" = "darkorange2", + "Ch11" = "orangered1", + "Ch12" = "red2"), + name = "Chamber:" + ) + + theme_classic() + + labs( + x = " ", + y = "CO2 Conc (uM)", + title = "GENX: Porewater CO2" + ) + + theme(legend.position = "right") + + scale_x_discrete(drop = TRUE, limits = rev) + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.key = element_rect("black"), + legend.position = "none" + ) + + coord_flip() +print(viz_CO2_plot) + +``` +\newpage + +```{r Visualize CO2 Data by Rep, fig.height=8.5, echo=FALSE} + +#get replicate value and treatment info +CO2_forplot <- CO2_forplot %>% + mutate(Chamber = case_when( + Plot == "Ch1" ~ "Chamber 1", + Plot == "Ch2" ~ "Chamber 2", + Plot == "Ch3" ~ "Chamber 3", + Plot == "Ch4" ~ "Chamber 4", + Plot == "Ch5" ~ "Chamber 5", + Plot == "Ch6" ~ "Chamber 6", + Plot == "Ch7" ~ "Chamber 7", + Plot == "Ch8" ~ "Chamber 8", + Plot == "Ch9" ~ "Chamber 9", + Plot == "Ch10" ~ "Chamber 10", + Plot == "Ch11" ~ "Chamber 11", + Plot == "Ch12" ~ "Chamber 12" + + + ) + ) %>% mutate(Chamber = factor(levels = c( + "Chamber 1", + "Chamber 2", + "Chamber 3", + "Chamber 4", + "Chamber 5", + "Chamber 6", + "Chamber 7", + "Chamber 8", + "Chamber 9", + "Chamber 10", + "Chamber 11", + "Chamber 12" + ), Chamber)) + +#make plot +viz_CO2_plot_2 <- ggplot(data = CO2_forplot, + aes(x = CO2_Conc_uM, y = Depth_cm, color = Chamber, shape = as.factor(Sample_Date))) + + geom_point(size = 3) + + geom_path(linewidth = 1) + + scale_color_manual(breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Chamber 1" = "blue4", + "Chamber 2" = "blue3", + "Chamber 3" = "turquoise4", + "Chamber 4" = "lightseagreen", + "Chamber 5" = "mediumseagreen", + "Chamber 6" = "limegreen", + "Chamber 7" = "yellowgreen", + "Chamber 8" = "yellow2", + "Chamber 9" = "darkgoldenrod2", + "Chamber 10" = "darkorange2", + "Chamber 11" = "orangered1", + "Chamber 12" = "red2"), + name = "Chamber:") + + facet_wrap(~Chamber, ncol = 3, nrow = 4, scales = "free_x") + + labs(x = "CO2 Conc (uM)", + y = "Depth (cm)", + title = "GENX: Porewater CO2 by Chamber") + + scale_y_reverse(breaks = c(5, 20, 40, 80), + limits = c(85, 0)) + + theme_classic() + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.position = "none" + ) + + +viz_CO2_plot_2 + +``` + + +##Export Data +```{r, echo=FALSE} +write.csv(All_Clean_Data, final_path) +write.csv(unique_log, log_path) +#end +``` + +#end \ No newline at end of file diff --git a/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_GHG_Template(WIP).Rmd b/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_GHG_Template(WIP).Rmd new file mode 100644 index 0000000..3efac32 --- /dev/null +++ b/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_GHG_Template(WIP).Rmd @@ -0,0 +1,1604 @@ +--- +title: "GENX: Porewater Methane" +author: "Month 2026 Samples" +date: "`r Sys.Date()`" +output: + pdf_document: + toc: true + toc_depth: 1 + number_sections: true +output_dir: "To Be Reviewed/PDF" +--- + +```{r Run Setup,include=FALSE} +if (!require("pacman")) install.packages("pacman") +pacman::p_load( + dplyr, + purrr, + fuzzyjoin, + ggplot2, + ggpubr, + data.table, + stringr, + here) +``` +\newpage + +##Run Information +```{r run information, include=TRUE} +cat("Run Information: Melanie Giessner ") #lets you know what section you're in +#set the run date & user name +sample_year <- "2026" +sample_month <- "May" +user <- "Melanie Giessner" +#identify the files you want to read in +#read in as a list to accommodate multiple runs in a month + +#change dates +folder_path_rawdata <- paste0("Raw Data") +GHG_files <- list.files(path = folder_path_rawdata,pattern = "20260513" ,full.names = TRUE) +head(GHG_files) +#GHG_files <- c("Raw Data/20260417_GENX_GHGdata.csv","Raw Data/20260501_GENX_GHGdata.csv" ) + + +# Define the file path for QAQC log file - NO Need to change just check year +log_path <- "Processed Data/ShimadzuGC_Slope_QAQC.csv" + + +# Define final path for data be sure to change year and month and run number +final_path <- "Processed Data/GCReW_GENX_Porewater_CH4_20260513.csv" + +#Gas in Water Calculations +# "TempC" column value in Celsius (equilibration temperature) and volume of gas (in liters) in syringe (not changing currently) +TempC = 25 #Equilibration Temperature (Celsius) + +volume_g = 0.015 #volume of gas (in liters) in syringe when equilibrized +volume_w = 0.015 #volume of water (in liters) in syringe when equilibrized (should be equal to volume_g) + +#record any notes about the run or anything other info here: +run_notes <- "" + +#Metadata File Path + Raw_Metadata = here(".." , "GCReW", "GCReW_Project_Treatment_Metadata.csv") + +#Collection_Dates = "Raw Data/Sample_Collection_Dates_2024.csv" + +cat(run_notes) +``` + + +##Set Up + +```{r setup, include=FALSE} + +if (!require("pacman")) install.packages("pacman") +pacman::p_load( + dplyr, + purrr, + fuzzyjoin, + ggplot2, + ggpubr, + stringr, + here) + +##Low & High Standard Curve Cutoffs +CH4_low_std_crv_cutoff <- 10 +CH4_low_std_crv_area_cutoff <- 7000 +CH4_mid_std_crv_cutoff <- 100 +CH4_mid_std_crv_area_cutoff <- 70000 +CH4_high_std_crv_cutoff <- 10000 + +CO2_low_std_crv_cutoff <- 2000 +CO2_low_std_crv_area_cutoff <- 900000 +CO2_mid_std_crv_cutoff <- 20000 +CO2_mid_std_crv_area_cutoff <- 7000000 +CO2_high_std_crv_cutoff <- 50100 + +N2O_low_std_crv_cutoff <- 5 +N2O_low_std_crv_area_cutoff <- 13000 +N2O_mid_std_crv_cutoff <- 50.2 +N2O_mid_std_crv_area_cutoff <- 100000 +N2O_high_std_crv_cutoff <- 500 + +r2_cutoff <- 0.990 + +##Gas In Water Calculation +R <- 0.08206 +CTK <- 273.15 + +#Metadata file path +#Raw_Metadata = here(".." , "GCReW", "GCReW_Project_Treatment_Metadata.csv") + +##Detection Limits +adl_cutoff <- 20000 +bdl_cutoff <- 50 + +##Check Standard Concentration +level_CH4 <- 10 #ppm +level_CO2 <- 2000 #ppm +level_N2O <- 5 #ppm +chks_flag = 60 +blks_flag = 60 + +#Volumes +exetainer_volume =12 + + +``` + + +##Read in metadata and create similar sample IDs for matching to samples +```{r pull in metadata for later, include=FALSE} + +#read in the raw metadata file +raw_metadata <- read.csv(Raw_Metadata) + +#clean up columns in metadata file: + #Pull out only SMARTX Rows + #Create a Sample_Name column to match the SEAL +metadata <- raw_metadata %>% + filter(grepl("GENX", Project, ignore.case = TRUE)) %>% + mutate(Sample_Name = Sample.ID) %>% + mutate(Month = sample_month) %>% + mutate(Year = sample_year) %>% + rename( + Sample_ID = Sample.ID, + ) %>% + dplyr::select(-N_Treatment) + + +``` + +# Read in data files +```{r , include=FALSE} + +#Read in Nov Data +raw_list <- map(GHG_files, read.csv) + + +# Combining Files +raw <- bind_rows(raw_list) + + + +#rename column +colnames(raw)[1] <- "Sample_ID" + +#head(stds_ch4) + +``` + +# Assess standard curves +```{r , echo=FALSE} +stds_ch4 <- raw %>% + filter(str_detect(Type, "Standard")) %>% filter(!Conc_CH4 == "unknown") + +#Correct data class +stds_ch4[, "Conc_CH4"] <- as.numeric(stds_ch4[, "Conc_CH4"]) + +#get the area of the top of the low curve +CH4_low_std_crv_area_cutoff <-stds_ch4$CH4_Area[stds_ch4$Conc_CH4 == CH4_low_std_crv_cutoff] +#Separate Into Low and High + +mnmx_stds <- stds_ch4 %>% filter(Conc_CH4 > 0) %>% group_by(Run_Date) %>% mutate(CH4_Min = min(Conc_CH4), CH4_Max = max(Conc_CH4)) %>% dplyr::select(Run_Date, CH4_Min, CH4_Max) %>% unique() + +low_stds_ch4 <- stds_ch4 %>% + filter(!Conc_CH4 > CH4_low_std_crv_cutoff) + +low_stds_ch4$Conc_CH4 <- as.numeric(low_stds_ch4$Conc_CH4) + + +high_stds_ch4 <- stds_ch4 %>% + filter(!Conc_CH4 < CH4_low_std_crv_cutoff) + +high_stds_ch4$Conc_CH4 <- as.numeric(high_stds_ch4$Conc_CH4) + +#High Curve for CH4 +CH4_Curve <- ggplot(high_stds_ch4, aes(CH4_Area , Conc_CH4, color = Run_Date)) + geom_point(size = 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "High CH4 Std Curve") +CH4_Curve + + # Convert 'run date' to a factor for grouping + high_stds_ch4_grouped <- high_stds_ch4 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data <- high_stds_ch4_grouped %>% + group_by(Run_Date) %>% + group_split() + +#run regression and get coefficients by Run + +Slope_CH4_raw_list <- map(split_data, ~ .x %>% mutate(CH4_Curve = "High", + CH4_R2 = summary(lm(Conc_CH4 ~ CH4_Area , data = .))$adj.r.squared , + CH4_Slope = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[2], + CH4_Intercept = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[1])) + + Slope_CH4_raw <- bind_rows(Slope_CH4_raw_list) + + Slope_CH4_High <- Slope_CH4_raw %>% dplyr::select(Run_Date, CH4_Curve, CH4_R2, CH4_Slope, CH4_Intercept) %>% distinct() + + + +#low Curve for CH4 +CH4_Curve <- ggplot(low_stds_ch4, aes(CH4_Area , Conc_CH4, color = Run_Date)) + geom_point(size = + 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "Low CH4 Std Curve") +CH4_Curve + +low_CH4_lm <- lm(low_stds_ch4$CH4_Area ~ low_stds_ch4$Conc_CH4) +low_cf <- coef(low_CH4_lm) + + # Convert 'run date' to a factor for grouping + low_stds_ch4_grouped <- low_stds_ch4 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data_l <- low_stds_ch4_grouped %>% + group_by(Run_Date) %>% + group_split() + + +#run regression and get coefficients by Run + +Slope_CH4_raw_list_l <- map(split_data_l, ~ .x %>% mutate(CH4_Curve = "Low", + CH4_R2 = summary(lm(Conc_CH4 ~ CH4_Area , data = .))$adj.r.squared , + CH4_Slope = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[2], + CH4_Intercept = coef(lm(Conc_CH4 ~ CH4_Area , data = .))[1])) + + Slope_CH4_raw_l <- bind_rows(Slope_CH4_raw_list_l) + + Slope_CH4_Low <- Slope_CH4_raw_l %>% dplyr::select(Run_Date, CH4_Curve, CH4_R2, CH4_Slope, CH4_Intercept) %>% distinct() + + Slope_CH4 <- rbind(Slope_CH4_High, Slope_CH4_Low) + + Slope_CH4_m <- left_join(Slope_CH4, mnmx_stds) + + + +#check r2 + +ifelse(Slope_CH4_High$CH4_R2 < r2_cutoff, paste0("High_R2 is Bad","-", Slope_CH4_High$Run_Date), paste0("High_R2 is Good","-", Slope_CH4_High$Run_Date)) + +ifelse(Slope_CH4_Low$CH4_R2 < r2_cutoff, paste0("Low_R2 is Bad","-", Slope_CH4_Low$Run_Date), paste0("Low_R2 is Good","-", Slope_CH4_Low$Run_Date)) + +High_R2_Flags <- Slope_CH4_High %>% mutate(Flag_CH4 = ifelse(CH4_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CH4, Run_Date, CH4_Curve) + + +Low_R2_Flags <- Slope_CH4_Low %>% mutate(Flag_CH4 = ifelse(CH4_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CH4, Run_Date, CH4_Curve) + +Flags_df_CH4 <- rbind(High_R2_Flags, Low_R2_Flags) +``` + + +```{r CO2, echo=FALSE} +stds_CO2 <- raw %>% + filter(str_detect(Type, "Standard")) %>% filter(!Conc_CO2 == "unknown") + +#Correct data class +stds_CO2[, "Conc_CO2"] <- as.numeric(stds_CO2[, "Conc_CO2"]) + +#get the area of the top of the low curve +CO2_low_std_crv_area_cutoff <-stds_CO2$CO2_Area[stds_CO2$Conc_CO2 == CO2_low_std_crv_cutoff] +#Separate Into Low and High + +mnmx_stds <- stds_CO2 %>% filter(Conc_CO2 > 0) %>% group_by(Run_Date) %>% mutate(CO2_Min = min(Conc_CO2), CO2_Max = max(Conc_CO2)) %>% dplyr::select(Run_Date, CO2_Min, CO2_Max) %>% unique() + +low_stds_CO2 <- stds_CO2 %>% + filter(!Conc_CO2 > CO2_low_std_crv_cutoff) + +low_stds_CO2$Conc_CO2 <- as.numeric(low_stds_CO2$Conc_CO2) + + +high_stds_CO2 <- stds_CO2 %>% + filter(!Conc_CO2 < CO2_low_std_crv_cutoff) + +high_stds_CO2$Conc_CO2 <- as.numeric(high_stds_CO2$Conc_CO2) + +#High Curve for CO2 +CO2_Curve <- ggplot(high_stds_CO2, aes(CO2_Area , Conc_CO2, color = Run_Date)) + geom_point(size = 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "High CO2 Std Curve") +CO2_Curve + + # Convert 'run date' to a factor for grouping + high_stds_CO2_grouped <- high_stds_CO2 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data <- high_stds_CO2_grouped %>% + group_by(Run_Date) %>% + group_split() + +#run regression and get coefficients by Run + +Slope_CO2_raw_list <- map(split_data, ~ .x %>% mutate(CO2_Curve = "High", + CO2_R2 = summary(lm(Conc_CO2 ~ CO2_Area , data = .))$adj.r.squared , + CO2_Slope = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[2], + CO2_Intercept = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[1])) + + Slope_CO2_raw <- bind_rows(Slope_CO2_raw_list) + + Slope_CO2_High <- Slope_CO2_raw %>% dplyr::select(Run_Date, CO2_Curve, CO2_R2, CO2_Slope, CO2_Intercept) %>% distinct() + + + +#low Curve for CO2 +CO2_Curve <- ggplot(low_stds_CO2, aes(CO2_Area , Conc_CO2, color = Run_Date)) + geom_point(size = + 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "Low CO2 Std Curve") +CO2_Curve + +low_CO2_lm <- lm(low_stds_CO2$CO2_Area ~ low_stds_CO2$Conc_CO2) +low_cf <- coef(low_CO2_lm) + + # Convert 'run date' to a factor for grouping + low_stds_CO2_grouped <- low_stds_CO2 %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data_l <- low_stds_CO2_grouped %>% + group_by(Run_Date) %>% + group_split() + + +#run regression and get coefficients by Run + +Slope_CO2_raw_list_l <- map(split_data_l, ~ .x %>% mutate(CO2_Curve = "Low", + CO2_R2 = summary(lm(Conc_CO2 ~ CO2_Area , data = .))$adj.r.squared , + CO2_Slope = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[2], + CO2_Intercept = coef(lm(Conc_CO2 ~ CO2_Area , data = .))[1])) + + Slope_CO2_raw_l <- bind_rows(Slope_CO2_raw_list_l) + + Slope_CO2_Low <- Slope_CO2_raw_l %>% dplyr::select(Run_Date, CO2_Curve, CO2_R2, CO2_Slope, CO2_Intercept) %>% distinct() + + Slope_CO2 <- rbind(Slope_CO2_High, Slope_CO2_Low) + + Slope_CO2_m <- left_join(Slope_CO2, mnmx_stds) + + + +#check r2 + +ifelse(Slope_CO2_High$CO2_R2 < r2_cutoff, paste0("High_R2 is Bad","-", Slope_CO2_High$Run_Date), paste0("High_R2 is Good","-", Slope_CO2_High$Run_Date)) + +ifelse(Slope_CO2_Low$CO2_R2 < r2_cutoff, paste0("Low_R2 is Bad","-", Slope_CO2_Low$Run_Date), paste0("Low_R2 is Good","-", Slope_CO2_Low$Run_Date)) + +High_R2_Flags <- Slope_CO2_High %>% mutate(Flag_CO2 = ifelse(CO2_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CO2, Run_Date, CO2_Curve) + + +Low_R2_Flags <- Slope_CO2_Low %>% mutate(Flag_CO2 = ifelse(CO2_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_CO2, Run_Date, CO2_Curve) + +Flags_df_CO2 <- rbind(High_R2_Flags, Low_R2_Flags) +``` + + +```{r N20, echo=FALSE} +stds_N2O <- raw %>% + filter(str_detect(Type, "Standard")) %>% filter(!Conc_N2O == "unknown") + +#Correct data class +stds_N2O[, "Conc_N2O"] <- as.numeric(stds_N2O[, "Conc_N2O"]) + +#get the area of the top of the low curve +N2O_low_std_crv_area_cutoff <-stds_N2O$N2O_Area[stds_N2O$Conc_N2O == N2O_low_std_crv_cutoff] +#Separate Into Low and High + +mnmx_stds <- stds_N2O %>% filter(Conc_N2O > 0) %>% group_by(Run_Date) %>% mutate(N2O_Min = min(Conc_N2O), N2O_Max = max(Conc_N2O)) %>% dplyr::select(Run_Date, N2O_Min, N2O_Max) %>% unique() + +low_stds_N2O <- stds_N2O %>% + filter(!Conc_N2O > N2O_low_std_crv_cutoff) + +low_stds_N2O$Conc_N2O <- as.numeric(low_stds_N2O$Conc_N2O) + + +high_stds_N2O <- stds_N2O %>% + filter(!Conc_N2O < N2O_low_std_crv_cutoff) + +high_stds_N2O$Conc_N2O <- as.numeric(high_stds_N2O$Conc_N2O) + +#High Curve for N2O +N2O_Curve <- ggplot(high_stds_N2O, aes(N2O_Area , Conc_N2O, color = Run_Date)) + geom_point(size = 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "High N2O Std Curve") +N2O_Curve + + # Convert 'run date' to a factor for grouping + high_stds_N2O_grouped <- high_stds_N2O %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data <- high_stds_N2O_grouped %>% + group_by(Run_Date) %>% + group_split() + +#run regression and get coefficients by Run + +Slope_N2O_raw_list <- map(split_data, ~ .x %>% mutate(N2O_Curve = "High", + N2O_R2 = summary(lm(Conc_N2O ~ N2O_Area , data = .))$adj.r.squared , + N2O_Slope = coef(lm(Conc_N2O ~ N2O_Area , data = .))[2], + N2O_Intercept = coef(lm(Conc_N2O ~ N2O_Area , data = .))[1])) + + Slope_N2O_raw <- bind_rows(Slope_N2O_raw_list) + + Slope_N2O_High <- Slope_N2O_raw %>% dplyr::select(Run_Date, N2O_Curve, N2O_R2, N2O_Slope, N2O_Intercept) %>% distinct() + + + +#low Curve for N2O +N2O_Curve <- ggplot(low_stds_N2O, aes(N2O_Area , Conc_N2O, color = Run_Date)) + geom_point(size = + 4) + + geom_smooth(method = "lm", se = FALSE) + labs(title = "Low N2O Std Curve") +N2O_Curve + +low_N2O_lm <- lm(low_stds_N2O$N2O_Area ~ low_stds_N2O$Conc_N2O) +low_cf <- coef(low_N2O_lm) + + # Convert 'run date' to a factor for grouping + low_stds_N2O_grouped <- low_stds_N2O %>% + mutate(Run_Date = as.factor(Run_Date)) + + + split_data_l <- low_stds_N2O_grouped %>% + group_by(Run_Date) %>% + group_split() + + +#run regression and get coefficients by Run + +Slope_N2O_raw_list_l <- map(split_data_l, ~ .x %>% mutate(N2O_Curve = "Low", + N2O_R2 = summary(lm(Conc_N2O ~ N2O_Area , data = .))$adj.r.squared , + N2O_Slope = coef(lm(Conc_N2O ~ N2O_Area , data = .))[2], + N2O_Intercept = coef(lm(Conc_N2O ~ N2O_Area , data = .))[1])) + + Slope_N2O_raw_l <- bind_rows(Slope_N2O_raw_list_l) + + Slope_N2O_Low <- Slope_N2O_raw_l %>% dplyr::select(Run_Date, N2O_Curve, N2O_R2, N2O_Slope, N2O_Intercept) %>% distinct() + + Slope_N2O <- rbind(Slope_N2O_High, Slope_N2O_Low) + + Slope_N2O_m <- left_join(Slope_N2O, mnmx_stds) + + + +#check r2 + +ifelse(Slope_N2O_High$N2O_R2 < r2_cutoff, paste0("High_R2 is Bad","-", Slope_N2O_High$Run_Date), paste0("High_R2 is Good","-", Slope_N2O_High$Run_Date)) + +ifelse(Slope_N2O_Low$N2O_R2 < r2_cutoff, paste0("Low_R2 is Bad","-", Slope_N2O_Low$Run_Date), paste0("Low_R2 is Good","-", Slope_N2O_Low$Run_Date)) + +High_R2_Flags <- Slope_N2O_High %>% mutate(Flag_N2O = ifelse(N2O_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_N2O, Run_Date, N2O_Curve) + + +Low_R2_Flags <- Slope_N2O_Low %>% mutate(Flag_N2O = ifelse(N2O_R2 < r2_cutoff,"R2 is Bad", "")) %>% dplyr::select(Flag_N2O, Run_Date, N2O_Curve) + +Flags_df_N2O <- rbind(High_R2_Flags, Low_R2_Flags) + + +``` + +```{r log} +#add new standard curve data to log +Slope_CH4_1 <- Slope_CH4 %>% mutate(curve = paste0("Slope_CH4_", CH4_Curve), R2 = CH4_R2, slope = CH4_Slope, intercept = CH4_Intercept, Analysis = "CH4", Run_by = user, Curve_top = case_when( + CH4_Curve == "Low" ~ paste(CH4_low_std_crv_cutoff,"ppm"), + CH4_Curve == "High" ~ paste(CH4_high_std_crv_cutoff,"ppm"), + .default = as.character(CH4_mid_std_crv_cutoff) +)) %>% dplyr::select(Analysis, Run_Date, Run_by, Curve_top, curve, R2, slope, intercept) +Slope_CO2_1 <- Slope_CO2 %>% mutate(curve = paste0("Slope_CO2_", CO2_Curve), R2 = CO2_R2, slope = CO2_Slope, intercept = CO2_Intercept, Analysis = "CO2", Run_by = user, Curve_top = case_when( + CO2_Curve == "Low" ~ paste(CO2_low_std_crv_cutoff,"ppm"), + CO2_Curve == "High" ~ paste(CO2_high_std_crv_cutoff,"ppm"), + .default = as.character(CO2_mid_std_crv_cutoff) +)) %>% dplyr::select(Analysis, Run_Date, Run_by, Curve_top, curve, R2, slope, intercept) +Slope_N2O_1 <- Slope_N2O %>% mutate(curve = paste0("Slope_N2O_", N2O_Curve), R2 = N2O_R2, slope = N2O_Slope, intercept = N2O_Intercept, Analysis = "N2O", Run_by = user, Curve_top = case_when( + N2O_Curve == "Low" ~ paste(N2O_low_std_crv_cutoff,"ppm"), + N2O_Curve == "High" ~ paste(N2O_high_std_crv_cutoff,"ppm"), + .default = as.character(N2O_mid_std_crv_cutoff) +)) %>% dplyr::select(Analysis, Run_Date, Run_by, Curve_top, curve, R2, slope, intercept) + +Slope <- rbind(Slope_CH4_1, Slope_CO2_1, Slope_N2O_1) + + log <- read.csv(log_path) + log <- log[, -c(1)] + head(log) + + log <- rbind(log, Slope) + +#remove possible duplicates from multiple QAQC attempts + + unique_log <- log %>% + mutate(Run_Date = as.Date(Run_Date,tryFormats = c("%Y-%m-%d", "%m/%d/%Y", "%m/%d/%y")), curve= gsub("L","l",curve), curve= gsub("H","h",curve))%>% distinct(.keep_all = TRUE) + + Slopes_chk_CH4 <- ggplot(unique_log %>% filter( grepl("CH4",curve,ignore.case = T)), aes(x = Run_Date, y = slope, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + Slopes_chk_CH4 + + Slopes_chk_CO2 <- ggplot(unique_log %>% filter( grepl("CO2",curve,ignore.case = T)), aes(x = Run_Date, y = slope, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + Slopes_chk_CO2 + + Slopes_chk_N2O <- ggplot(unique_log %>% filter( grepl("N2O",curve,ignore.case = T)), aes(x = Run_Date, y = slope, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + Slopes_chk_N2O + + + int_chk_CH4 <- ggplot(unique_log %>% filter( grepl("CH4",curve,ignore.case = T)), aes(x = Run_Date, y = intercept, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + int_chk_CH4 + + int_chk_CO2 <- ggplot(unique_log %>% filter( grepl("CO2",curve,ignore.case = T)), aes(x = Run_Date, y = intercept, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + int_chk_CO2 + + int_chk_N2O <- ggplot(unique_log %>% filter( grepl("N2O",curve,ignore.case = T)), aes(x = Run_Date, y = intercept, col = curve)) + + geom_point(size = 4) + + #ylim(400, 800) + + theme_bw() + + int_chk_N2O + +``` + + +## Now calculate the CH4 in ppm +```{r Calculate Concetration, echo=FALSE} +#head(raw) + +#pull out Samples +Samples_1 <- raw %>% + filter(!str_detect(Type, "Lab air")) %>% + filter(!str_detect(Type, "Standard")) %>% + filter(!str_detect(Type, "Blank")) %>% + filter(!str_detect(Type, "Chk_STD")) %>% + filter(!str_detect(Type, "ChkStd")) %>% + filter(!str_detect(Type, "NA")) %>% + + mutate(CH4_Curve = ifelse(CH4_Area >= mean(CH4_low_std_crv_area_cutoff,na.rm = TRUE), "High", "Low"), CO2_Curve = ifelse(CO2_Area >= mean(CO2_low_std_crv_area_cutoff,na.rm = TRUE), "High", "Low"), N2O_Curve = ifelse(N2O_Area >= mean(N2O_low_std_crv_area_cutoff,na.rm = TRUE), "High", "Low")) +#head(Samples) + +Samples_2 <- merge(Samples_1, Slope_CH4_m) +Samples_2 <- merge(Samples_2, Slope_CO2_m) +Samples_2 <- merge(Samples_2, Slope_N2O_m) +#Calculate CH4 concentrations in ppm +Samples <- Samples_2 %>% + mutate(CH4_Conc_ppm = (CH4_Area*CH4_Slope) + CH4_Intercept ,CO2_Conc_ppm = (CO2_Area*CO2_Slope)+ CO2_Intercept, N2O_Conc_ppm = (N2O_Area*N2O_Slope) + N2O_Intercept ) + +##########make flags for any dilutions needed + + +Samples$CH4_Flag <- ifelse(Samples$CH4_Conc_ppm > Samples$CH4_Max, "ADL", ifelse(Samples$CH4_Conc_ppm < Samples$CH4_Min, "BDL", "Within Range")) +Samples$CO2_Flag <- ifelse(Samples$CO2_Conc_ppm > Samples$CO2_Max, "ADL", ifelse(Samples$CO2_Conc_ppm < Samples$CO2_Min, "BDL", "Within Range")) +Samples$N2O_Flag <- ifelse(Samples$N2O_Conc_ppm > Samples$N2O_Max, "ADL", ifelse(Samples$N2O_Conc_ppm < Samples$N2O_Min, "BDL", "Within Range")) +#head(Samples) + + + +``` + +# Aanlayze the Check Standards +```{r Asses Check Standards, echo=FALSE} + +chks_1 <- raw %>% + filter(!str_detect(Type, "Lab air")) %>% + filter(!str_detect(Type, "Standard")) %>% + filter(!str_detect(Type, "Blank")) %>% + filter(!str_detect(Type, "Sample")) %>% + filter(!str_detect(Type, "NA")) %>% + mutate(CH4_Curve = "Low",CO2_Curve = "Low",N2O_Curve = "Low") +#head(chks) + + +chks_2 <- merge(chks_1, Slope_CH4_m) +chks_2 <- merge(chks_2, Slope_CO2_m) +chks_2 <- merge(chks_2, Slope_N2O_m) + +chks <- chks_2 %>% + mutate(CH4_Conc_ppm = (CH4_Area*CH4_Slope) + CH4_Intercept ,CO2_Conc_ppm = (CO2_Area*CO2_Slope)+ CO2_Intercept, N2O_Conc_ppm = (N2O_Area*N2O_Slope) + N2O_Intercept ) + +#calculate percent difference of check standards +chks<- chks %>% mutate( + Ch4_diff = (((chks$CH4_Conc_ppm - level_CH4) / ((chks$CH4_Conc_ppm + level_CH4) /2)) * 100), + CH4_diff_flag = ifelse(abs(Ch4_diff) < 10, 'YES', 'NO, rerun'), + CO2_diff = (((chks$CO2_Conc_ppm - level_CO2) / ((chks$CO2_Conc_ppm + level_CO2) /2)) * 100), + CO2_diff_flag = ifelse(abs(CO2_diff) < 10, 'YES', 'NO, rerun'), + N2O_diff = (((chks$N2O_Conc_ppm - level_N2O) / ((chks$N2O_Conc_ppm + level_N2O) /2)) * 100), + N2O_diff_flag = ifelse(abs(N2O_diff) < 10, 'YES', 'NO, rerun'), + ) + +#calculate the percent of check standards that are within the range based on the flag +CH4_chks_percent <- (sum(chks$CH4_diff_flag == "YES") / nrow(chks)) * 100 +CO2_chks_percent <- (sum(chks$CO2_diff_flag == "YES") / nrow(chks)) * 100 +N2O_chks_percent <- (sum(chks$N2O_diff_flag == "YES") / nrow(chks)) * 100 +#report out if flags indicate need for rerun + +if (CH4_chks_percent >= chks_flag) { + message(">60% of CH4 Check Standards are within range of expected concentration - PROCEED") +} else { + message("<60% of CH4 Check Standards are within range of expected concentration - REASSESS") +} + +if (CO2_chks_percent >= chks_flag) { + message(">60% of CO2 Check Standards are within range of expected concentration - PROCEED") +} else { + message("<60% of CO2 Check Standards are within range of expected concentration - REASSESS") +} + +if (N2O_chks_percent >= chks_flag) { + message(">60% of N2O Check Standards are within range of expected concentration - PROCEED") +} else { + message("<60% of N2O Check Standards are within range of expected concentration - REASSESS") +} + +#now plot the Ch4 concentrations and the CO2 concentrations vs. the expected concentration +#then also make the color the percent difference between the expected and observed concentration + +ch4_chk <- ggplot(data = chks, aes(x = Run_Date, y = CH4_Conc_ppm, fill = + CH4_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c("NO, rerun" = "darkgrey", "YES" = "darkgreen")) + + theme_classic() + labs(x = " ", y = "Concentration (ppm)", title = + "Check Stds: CH4") + + theme(legend.position = "bottom") + geom_hline( + yintercept = level_CH4, + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "% Difference <10%")) + + +ch4_chk + +CO2_chk <- ggplot(data = chks, aes(x = Run_Date, y = CO2_Conc_ppm, fill = + CO2_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c("NO, rerun" = "darkgrey", "YES" = "darkgreen")) + + theme_classic() + labs(x = " ", y = "Concentration (ppm)", title = + "Check Stds: CO2") + + theme(legend.position = "bottom") + geom_hline( + yintercept = level_CO2, + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "% Difference <10%")) + + +CO2_chk + +N2O_chk <- ggplot(data = chks, aes(x = Run_Date, y = N2O_Conc_ppm, fill = + N2O_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c("NO, rerun" = "darkgrey", "YES" = "darkgreen")) + + theme_classic() + labs(x = " ", y = "Concentration (ppm)", title = + "Check Stds: N2O") + + theme(legend.position = "bottom") + geom_hline( + yintercept = level_N2O, + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "% Difference <10%")) + + +N2O_chk + +#Add Check Standard Flags + +flag_chk_CH4 <- ifelse(CH4_chks_percent >= chks_flag, + "", + "; CH4 Check Standards out Of Range") +flag_chk_CO2 <- ifelse(CO2_chks_percent >= chks_flag, + "", + "; CO2 Check Standards out Of Range") +flag_chk_N2O <- ifelse(N2O_chks_percent >= chks_flag, + "", + "; N2O Check Standards out Of Range") + +Flags_df_CH4 <- Flags_df_CH4 %>% mutate(Flag_CH4 = paste0(Flag_CH4, flag_chk_CH4)) +Flags_df_CO2 <- Flags_df_CO2 %>% mutate(Flag_CO2 = paste0(Flag_CO2,flag_chk_CO2)) +Flags_df_N2O <- Flags_df_N2O %>% mutate(Flag_N2O = paste0(Flag_N2O, flag_chk_N2O)) +``` + +# Analyze the Blanks +```{r Analyze Blanks, echo=FALSE} +cat("Assess Blanks") + +blanks <- raw %>% + filter(!str_detect(Type, "Lab air")) %>% + filter(!str_detect(Type, "Standard")) %>% + filter(!str_detect(Type, "Sample")) %>% + filter(!str_detect(Type, "Chk_STD")) %>% + filter(!str_detect(Type, "ChkStd")) %>% + filter(!str_detect(Type, "NA")) + + +#Pull out samples from df_all to calc quantile +samples_blanks <- raw %>% + filter(str_detect(Type, c("Sample"))) + +#Calculating the lowest 25% of sample concentrations to compare to the blank concentrations + +blk_flag_CH4 <- quantile(samples_blanks$CH4_Area, prob = c(.25)) #this gives you the lower 25% quartile of the data + +blk_flag_CO2 <- quantile(samples_blanks$CO2_Area, prob = c(.25)) #this gives you the lower 25% quartile of the data + +blk_flag_N2O <- quantile(samples_blanks$N2O_Area, prob = c(.25)) #this gives you the lower 25% quartile of the data + +blanks<-blanks %>% mutate(CH4_diff_flag = ifelse(blanks$CH4_Area <= blk_flag_CH4, 'YES', 'NO, rerun'), + CO2_diff_flag = ifelse(blanks$CO2_Area <= blk_flag_CO2, 'YES', 'NO, rerun'), + N2O_diff_flag = ifelse(blanks$N2O_Area <= blk_flag_N2O, 'YES', 'NO, rerun')) + +#calculate the percent of check standards that are within the range based on the flag +CH4_blks_percent <- (sum(blanks$CH4_diff_flag == "YES") / nrow(blanks)) * + 100 +CO2_blks_percent <- (sum(blanks$CO2_diff_flag == "YES") / nrow(blanks)) * + 100 +N2O_blks_percent <- (sum(blanks$N2O_diff_flag == "YES") / nrow(blanks)) * + 100 + +#report out if flags indicate need for rerun +if (CH4_blks_percent >= blks_flag) { + message(">60% of CH4 Blanks are below the lower 25% quartile of samples - PROCEED") +} else { + message("<60% of CH4 blaks are lower 25% quartile of samples - REASSESS") +} + +#report out if flags indicate need for rerun +if (CO2_blks_percent >= blks_flag) { + message(">60% of CO2 Blanks are below the lower 25% quartile of samples - PROCEED") +} else { + message("<60% of CO2 blaks are lower 25% quartile of samples - REASSESS") +} + +#report out if flags indicate need for rerun +if (N2O_blks_percent >= blks_flag) { + message(">60% of N2O Blanks are below the lower 25% quartile of samples - PROCEED") +} else { + message("<60% of N2O blaks are lower 25% quartile of samples - REASSESS") +} + + +#plotting the blanks compared to the lower 25% of conc (what the flag is) +CH4_blks_plot <- ggplot(data = blanks, aes(x = Run_Date, y = CH4_Area, fill = + CH4_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c( + "YES" = "deepskyblue3", + "NO, rerun" = "darkred" + )) + + theme_classic() + labs(x = " ", y = "CH4 Area", title = "CH4 Blanks") + + theme(legend.position = "bottom") + + geom_hline( + yintercept = as.numeric(blk_flag_CH4), + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "Blank Conc <25% Quartile Samples")) + +print(CH4_blks_plot) + +#CO2 +CO2_blks_plot <- ggplot(data = blanks, aes(x = Run_Date, y = CO2_Area, fill = + CO2_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c( + "YES" = "deepskyblue3", + "NO, rerun" = "darkred" + )) + + theme_classic() + labs(x = " ", y = "CO2 Area", title = "CO2 Blanks") + + theme(legend.position = "bottom") + + geom_hline( + yintercept = as.numeric(blk_flag_CO2), + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "Blank Conc <25% Quartile Samples")) + +print(CO2_blks_plot) + +#N2O +N2O_blks_plot <- ggplot(data = blanks, aes(x = Run_Date, y = N2O_Area, fill = + N2O_diff_flag)) + + geom_bar(stat = 'identity', + position = position_dodge2(preserve = "single")) + + scale_fill_manual(values = c( + "YES" = "deepskyblue3", + "NO, rerun" = "darkred" + )) + + theme_classic() + labs(x = " ", y = "N2O Area", title = "N2O Blanks") + + theme(legend.position = "bottom") + + geom_hline( + yintercept = as.numeric(blk_flag_N2O), + linetype = "dashed", + color = "black", + linewidth = 1 + ) + + guides(fill = guide_legend(title = "Blank Conc <25% Quartile Samples")) + +print(N2O_blks_plot) +#find average of run blanks for flagging samples later +# Compute averages +blk_avg_CH4 <- mean(blanks$CH4_Area, na.rm = TRUE) +blk_avg_CO2 <- mean(blanks$CO2_Area, na.rm = TRUE) +blk_avg_N2O <- mean(blanks$N2O_Area, na.rm = TRUE) +# Create a data frame +blank_avgs <- data.frame(Test = c("CH4","CO2","N2O"), + Blank_Mean_Area = c(blk_avg_CH4,blk_avg_CO2,blk_avg_N2O)) + +# Pretty print +knitr::kable(blank_avgs, caption = "Mean Area of Blanks", digits = 4) + + +#write out a flag if more than 60% of the blanks are above the lower 25% quantile of samples +flag_blks_CH4 <- ifelse(CH4_blks_percent >= blks_flag, + "", + '; CH4 Blanks out of Range') + +flag_blks_CO2 <- ifelse(CO2_blks_percent >= blks_flag, + "", + '; CO2 Blanks out of Range') + +flag_blks_N2O <- ifelse(N2O_blks_percent >= blks_flag, + "", + '; N2O Blanks out of Range') + + + +Flags_df_CH4 <- Flags_df_CH4 %>% mutate(Flag_CH4 = paste0(Flag_CH4, flag_blks_CH4)) +Flags_df_CO2 <- Flags_df_CO2 %>% mutate(Flag_CO2 = paste0(Flag_CO2,flag_blks_CO2)) +Flags_df_N2O <- Flags_df_N2O %>% mutate(Flag_N2O = paste0(Flag_N2O, flag_blks_N2O)) + + +``` + +# Dilution correct samples and Check Range +```{r, echo=FALSE} + +#Correct if volume other than 12mL of Sample was added +Samples$CH4_Conc_ppm_dilcorr <- ((0.5 * Samples$CH4_Conc_ppm) * (exetainer_volume + Samples$Sample_Volume)) / + (Samples$Sample_Volume) +Samples$CO2_Conc_ppm_dilcorr <- ((0.5 * Samples$CO2_Conc_ppm) * (exetainer_volume + Samples$Sample_Volume)) / + (Samples$Sample_Volume) +Samples$N2O_Conc_ppm_dilcorr <- ((0.5 * Samples$N2O_Conc_ppm) * (exetainer_volume + Samples$Sample_Volume)) / + (Samples$Sample_Volume) +#check results +#head(Samples) + +#quick first look at the samples +ch4_samples <- ggplot(data = Samples, aes(x = Sample_ID, y = CH4_Conc_ppm, fill = + CH4_Flag)) + + geom_bar(stat = 'identity') + + scale_fill_manual(values = c("Within Range" = "darkgreen", + "ADL" = "darkred", + "BDL" = "darkblue")) + + theme_classic() + labs(x = " ", y = "CH4 (ppm)", title = "CH4: Green = Within Range (Not Dil Cor)") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + ch4_samples + + CO2_samples <- ggplot(data = Samples, aes(x = Sample_ID, y = CO2_Conc_ppm, fill = + CO2_Flag)) + + geom_bar(stat = 'identity') + + scale_fill_manual(values = c("Within Range" = "darkgreen", + "ADL" = "darkred", + "BDL" = "darkblue")) + + theme_classic() + labs(x = " ", y = "CO2 (ppm)", title = "CO2: Green = Within Range (Not Dil Cor)") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + CO2_samples + + N2O_samples <- ggplot(data = Samples, aes(x = Sample_ID, y = N2O_Conc_ppm, fill = + N2O_Flag)) + + geom_bar(stat = 'identity') + + scale_fill_manual(values = c("Within Range" = "darkgreen", + "ADL" = "darkred", + "BDL" = "darkblue")) + + theme_classic() + labs(x = " ", y = "N2O (ppm)", title = "N2O: Green = Within Range (Not Dil Cor)") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + N2O_samples +# #corrected for different dilutions +# ch4_samples_cor <- ggplot(data = Samples, aes(x = Sample_ID, y = CH4_Conc_ppm_dilcorr, fill = +# CH4_Flag)) + +# geom_bar(stat = 'identity') + +# scale_fill_manual(values = c("Within Range" = "green4", +# "ADL" = "red3", +# "BDL" = "blue3")) + +# theme_classic() + labs(x = " ", y = "CH4 (ppm)", title = "CH4: Green = Within Range") + +# theme(axis.text.x = element_text( +# angle = 90, +# vjust = 0.5, +# hjust = 1 +# )) + +# theme(legend.position = "none") +# + +# ch4_samples_cor + + +``` + + +# Calculate gas in water +```{r, echo=FALSE} + +# Convert ppm CH4 to total uM CH4 in the sample headspace +# use Ideal Gas Law: +# hdsp umol CH4 = ppm CH4*(PV/RT) +# P = 1 (pressure in atm) +# R = 0.082 (gas constant) +# V = 0.015 (gas syringe volume in L) +# T = "TempC" column value in Kelvin (equilibration temperature) + +#Calculate CH4 uM from ppm + +Samples$CH4_Conc_uM <- (Samples$CH4_Conc_ppm_dilcorr * (( 1 * volume_g )/(R * (TempC + CTK) )))/ volume_w + +Samples$CO2_Conc_uM <- (Samples$CO2_Conc_ppm_dilcorr * (( 1 * volume_g )/(R * (TempC + CTK) )))/ volume_w + +Samples$N2O_Conc_uM <- (Samples$N2O_Conc_ppm_dilcorr * (( 1 * volume_g )/(R * (TempC + CTK) )))/ volume_w +#old equation +#Samples$CH4_Conc_uM <- (Samples$CH4_Conc_ppm_dilcorr * ((1 * volume / 1000) / (R * (TempC + CTK)))) / (volume / 1000) + + +#quick first look at the samples +ch4_samples1 <- ggplot(data = Samples, aes(x = Sample_ID, y = CH4_Conc_uM)) + + geom_bar(stat = 'identity', fill = "darkblue") + + theme_classic() + + labs(x = " ", y = "CH4 (uM)", title = "CH4 Gas in Water") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + +ch4_samples1 + +#quick first look at the samples +CO2_samples1 <- ggplot(data = Samples, aes(x = Sample_ID, y = CO2_Conc_uM)) + + geom_bar(stat = 'identity', fill = "darkblue") + + theme_classic() + + labs(x = " ", y = "CO2 (uM)", title = "CO2 Gas in Water") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + +CO2_samples1 + +#quick first look at the samples +N2O_samples1 <- ggplot(data = Samples, aes(x = Sample_ID, y = N2O_Conc_uM)) + + geom_bar(stat = 'identity', fill = "darkblue") + + theme_classic() + + labs(x = " ", y = "N2O (uM)", title = "N2O Gas in Water") + + theme(axis.text.x = element_text( + angle = 90, + vjust = 0.5, + hjust = 1 + )) + + theme(legend.position = "none") + + +N2O_samples1 + +``` + +# Merge samples with Metadata & check all samples are present +```{r check sample ids with metadata, echo=FALSE} + +cat("Merge Samples with Metadata") + +Samples_A <- Samples %>% filter(grepl("Ch", Sample_ID)) %>% mutate(Sample_Date = as.Date(substr(Sample_ID,1, 8), format = "%Y%m%d")) %>% mutate(Sample_ID = substring(Sample_ID, first = 10)) %>% mutate(Sample_ID = str_sub(Sample_ID, end = -3),Sample_ID=ifelse(grepl("cm",Sample_ID),str_sub(Sample_ID, end = -3),Sample_ID)) %>% mutate(Sample_ID = str_replace(Sample_ID, "_", "-")) +#check to see if all samples are present in the metadata +all_present <- all(metadata$Sample_Name %in% Samples_A$Sample_ID) + +if (all_present) { + message("All sample IDs are present in data") +} else { + message("Some sample IDs are missing from data.") + + # Optional: Which ones are missing? + missing_ids <- setdiff(metadata$Sample_Name, Samples_A$Sample_ID) + print(missing_ids) +} + + +#merge metadata with sample run data +merged_data1 <- metadata %>% + mutate(Sample_ID = paste0("\\b", Sample_ID, "\\b")) %>% + fuzzyjoin::regex_left_join(Samples_A, ., by = c(Sample_ID = "Sample_Name")) + +#might want to include a flag or something to see that all the samples are included? + +#add flags + +merged_2 <- merge(merged_data1, Flags_df_CH4) +merged_2 <- merge(merged_2, Flags_df_CO2) +merged_2 <- merge(merged_2, Flags_df_N2O) +merged_data <-merged_2 %>% mutate(Flags = paste0(Flag_CH4,Flag_CO2,Flag_N2O)) + + + +df_all_clean <- merged_data + +``` + +## Organize Data +```{r, echo=FALSE,include=FALSE} +#check results + head(Samples) + + #pull out what we need + + df_all_clean_cols <- df_all_clean %>% + dplyr::select( + Site, + Project, + Year, + Month, + Sample_Date, + Community, + Nickname, + Plot, + Depth_cm, + CO2_Treatment, + Temp_Treatment, + CH4_Conc_ppm_dilcorr, + CH4_Conc_uM, + CH4_Flag, + CO2_Conc_ppm_dilcorr, + CO2_Conc_uM, + CO2_Flag, + N2O_Conc_ppm_dilcorr, + N2O_Conc_uM, + N2O_Flag, + Flags, + Run_Date + ) + + final_data_labeled <- df_all_clean_cols %>% + mutate( + Run_notes = run_notes, #new column with notes about the run + Analysis_rundate = Run_Date) + + #rename columns + org_labeled_fin_data <- final_data_labeled %>% + rename( + CH4_Conc_ppm = CH4_Conc_ppm_dilcorr, + CH4_Conc_Flag = CH4_Flag, + CO2_Conc_ppm = CO2_Conc_ppm_dilcorr, + CO2_Conc_Flag = CO2_Flag, + N2O_Conc_ppm = N2O_Conc_ppm_dilcorr, + N2O_Conc_Flag = N2O_Flag, + QAQC_Flags = Flags + ) + + #Order Columns for Final Data Frame + All_Clean_Data <- org_labeled_fin_data %>% + dplyr::select( + Site, + Project, + Year, + Month, + Sample_Date, + Community, + Nickname, + Plot, + Depth_cm, + CO2_Treatment, + Temp_Treatment, + CO2_Conc_ppm, + CO2_Conc_uM, + CO2_Conc_Flag, + N2O_Conc_ppm, + N2O_Conc_uM, + N2O_Conc_Flag, + CH4_Conc_ppm, + CH4_Conc_uM, + CH4_Conc_Flag, + QAQC_Flags, + Analysis_rundate, + Run_notes + ) + head(All_Clean_Data) + +``` + + +## Visualize Data CH4 +```{r Visualize Data CH4, fig.height=10, echo=FALSE} +cat("Visualize Data") + +### Ammonia +CH4_forplot <- All_Clean_Data + +CH4_forplot$Depth_cm <- + as.numeric(CH4_forplot$Depth_cm) + +#group the data for plotting +CH4_forplot <- CH4_forplot %>% + group_by(Depth_cm) %>% + mutate(row_num = factor(row_number())) %>% # create row_num as factor per group + ungroup() %>% + mutate(Treatment = paste0("+", Temp_Treatment, " " ,"C")) %>% mutate(Chamber = factor(Plot, levels = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"))) %>% mutate(Depth1 = paste0(Depth_cm, " cm")) %>% mutate(Depth = factor(Depth1, levels = c("5 cm", "20 cm", "40 cm", "80 cm"))) + +#create plot +viz_CH4_plot <- ggplot(data = CH4_forplot, aes( + x = as.factor(Chamber), + y = CH4_Conc_uM, + fill = as.factor(Chamber) +)) + + geom_col(stat = "identity", + position = position_dodge2(padding = 0.1, + width = 0.5, + preserve = "single" )) + + facet_grid(Depth ~ ., + scales = "free_x") + + scale_fill_manual( + breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Ch1" = "blue4", + "Ch2" = "blue3", + "Ch3" = "turquoise4", + "Ch4" = "lightseagreen", + "Ch5" = "mediumseagreen", + "Ch6" = "limegreen", + "Ch7" = "yellowgreen", + "Ch8" = "yellow2", + "Ch9" = "darkgoldenrod2", + "Ch10" = "darkorange2", + "Ch11" = "orangered1", + "Ch12" = "red2"), + name = "Chamber:" + ) + + theme_classic() + + labs( + x = " ", + y = "CH4 Conc (uM)", + title = "GENX: Porewater CH4" + ) + + theme(legend.position = "right") + + scale_x_discrete(drop = TRUE, limits = rev) + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.key = element_rect("black"), + legend.position = "none" + ) + + coord_flip() +print(viz_CH4_plot) + +``` +\newpage + +\newpage +```{r Visualize CH4 Data by Rep, fig.height=8.5, echo=FALSE} + +#get replicate value and treatment info +CH4_forplot <- CH4_forplot %>% + mutate(Chamber = case_when( + Plot == "Ch1" ~ "Chamber 1", + Plot == "Ch2" ~ "Chamber 2", + Plot == "Ch3" ~ "Chamber 3", + Plot == "Ch4" ~ "Chamber 4", + Plot == "Ch5" ~ "Chamber 5", + Plot == "Ch6" ~ "Chamber 6", + Plot == "Ch7" ~ "Chamber 7", + Plot == "Ch8" ~ "Chamber 8", + Plot == "Ch9" ~ "Chamber 9", + Plot == "Ch10" ~ "Chamber 10", + Plot == "Ch11" ~ "Chamber 11", + Plot == "Ch12" ~ "Chamber 12" + + + ) + ) %>% mutate(Chamber = factor(levels = c( + "Chamber 1", + "Chamber 2", + "Chamber 3", + "Chamber 4", + "Chamber 5", + "Chamber 6", + "Chamber 7", + "Chamber 8", + "Chamber 9", + "Chamber 10", + "Chamber 11", + "Chamber 12" + ), Chamber)) + +#make plot +viz_CH4_plot_2 <- ggplot(data = CH4_forplot, + aes(x = CH4_Conc_uM, y = Depth_cm, color = Chamber, shape = as.factor(Sample_Date))) + + geom_point(size = 3) + + geom_path(linewidth = 1) + + scale_color_manual(breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Chamber 1" = "blue4", + "Chamber 2" = "blue3", + "Chamber 3" = "turquoise4", + "Chamber 4" = "lightseagreen", + "Chamber 5" = "mediumseagreen", + "Chamber 6" = "limegreen", + "Chamber 7" = "yellowgreen", + "Chamber 8" = "yellow2", + "Chamber 9" = "darkgoldenrod2", + "Chamber 10" = "darkorange2", + "Chamber 11" = "orangered1", + "Chamber 12" = "red2"), + name = "Chamber:") + + facet_wrap(~Chamber, ncol = 3, nrow = 4, scales = "free_x") + + labs(x = "CH4 Conc (uM)", + y = "Depth (cm)", + title = "GENX: Porewater CH4 by Chamber") + + scale_y_reverse(breaks = c(5, 20, 40, 80), + limits = c(85, 0)) + + theme_classic() + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.position = "none" + ) + + +viz_CH4_plot_2 + +``` + + +##Visualize Data N2O +```{r Visualize Data N2O, fig.height=10, echo=FALSE} +cat("Visualize Data") + +### Ammonia +N2O_forplot <- All_Clean_Data + +N2O_forplot$Depth_cm <- + as.numeric(N2O_forplot$Depth_cm) + +#group the data for plotting +N2O_forplot <- N2O_forplot %>% + group_by(Depth_cm) %>% + mutate(row_num = factor(row_number())) %>% # create row_num as factor per group + ungroup() %>% + mutate(Treatment = paste0("+", Temp_Treatment, " " ,"C")) %>% mutate(Chamber = factor(Plot, levels = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"))) %>% mutate(Depth1 = paste0(Depth_cm, " cm")) %>% mutate(Depth = factor(Depth1, levels = c("5 cm", "20 cm", "40 cm", "80 cm"))) + +#create plot +viz_N2O_plot <- ggplot(data = N2O_forplot, aes( + x = as.factor(Chamber), + y = N2O_Conc_uM, + fill = as.factor(Chamber) +)) + + geom_col(stat = "identity", + position = position_dodge2(padding = 0.1, + width = 0.5, + preserve = "single" )) + + facet_grid(Depth ~ ., + scales = "free_x") + + scale_fill_manual( + breaks = c( + "Ch1", "Ch2", "Ch3", "N2O", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Ch1" = "blue4", + "Ch2" = "blue3", + "Ch3" = "turquoise4", + "Ch4" = "lightseagreen", + "Ch5" = "mediumseagreen", + "Ch6" = "limegreen", + "Ch7" = "yellowgreen", + "Ch8" = "yellow2", + "Ch9" = "darkgoldenrod2", + "Ch10" = "darkorange2", + "Ch11" = "orangered1", + "Ch12" = "red2"), + name = "Chamber:" + ) + + theme_classic() + + labs( + x = " ", + y = "N2O Conc (uM)", + title = "GENX: Porewater N2O" + ) + + theme(legend.position = "right") + + scale_x_discrete(drop = TRUE, limits = rev) + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.key = element_rect("black"), + legend.position = "none" + ) + + coord_flip() +print(viz_N2O_plot) + +``` +\newpage + +```{r Visualize N2O Data by Rep, fig.height=8.5, echo=FALSE} + +#get replicate value and treatment info +N2O_forplot <- N2O_forplot %>% + mutate(Chamber = case_when( + Plot == "Ch1" ~ "Chamber 1", + Plot == "Ch2" ~ "Chamber 2", + Plot == "Ch3" ~ "Chamber 3", + Plot == "Ch4" ~ "Chamber 4", + Plot == "Ch5" ~ "Chamber 5", + Plot == "Ch6" ~ "Chamber 6", + Plot == "Ch7" ~ "Chamber 7", + Plot == "Ch8" ~ "Chamber 8", + Plot == "Ch9" ~ "Chamber 9", + Plot == "Ch10" ~ "Chamber 10", + Plot == "Ch11" ~ "Chamber 11", + Plot == "Ch12" ~ "Chamber 12" + + + ) + ) %>% mutate(Chamber = factor(levels = c( + "Chamber 1", + "Chamber 2", + "Chamber 3", + "Chamber 4", + "Chamber 5", + "Chamber 6", + "Chamber 7", + "Chamber 8", + "Chamber 9", + "Chamber 10", + "Chamber 11", + "Chamber 12" + ), Chamber)) + +#make plot +viz_N2O_plot_2 <- ggplot(data = N2O_forplot, + aes(x = N2O_Conc_uM, y = Depth_cm, color = Chamber, shape = as.factor(Sample_Date))) + + geom_point(size = 3) + + geom_path(linewidth = 1) + + scale_color_manual(breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Chamber 1" = "blue4", + "Chamber 2" = "blue3", + "Chamber 3" = "turquoise4", + "Chamber 4" = "lightseagreen", + "Chamber 5" = "mediumseagreen", + "Chamber 6" = "limegreen", + "Chamber 7" = "yellowgreen", + "Chamber 8" = "yellow2", + "Chamber 9" = "darkgoldenrod2", + "Chamber 10" = "darkorange2", + "Chamber 11" = "orangered1", + "Chamber 12" = "red2"), + name = "Chamber:") + + facet_wrap(~Chamber, ncol = 3, nrow = 4, scales = "free_x") + + labs(x = "N2O Conc (uM)", + y = "Depth (cm)", + title = "GENX: Porewater N2O by Chamber") + + scale_y_reverse(breaks = c(5, 20, 40, 80), + limits = c(85, 0)) + + #xlim() + + theme_classic() + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.position = "none" + ) + + +viz_N2O_plot_2 + +``` + +##Visualize Data CO2 +```{r Visualize Data CO2, fig.height=10, echo=FALSE} +cat("Visualize Data") + +### Ammonia +CO2_forplot <- All_Clean_Data + +CO2_forplot$Depth_cm <- + as.numeric(CO2_forplot$Depth_cm) + +#group the data for plotting +CO2_forplot <- CO2_forplot %>% + group_by(Depth_cm) %>% + mutate(row_num = factor(row_number())) %>% # create row_num as factor per group + ungroup() %>% + mutate(Treatment = paste0("+", Temp_Treatment, " " ,"C")) %>% mutate(Chamber = factor(Plot, levels = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"))) %>% mutate(Depth1 = paste0(Depth_cm, " cm")) %>% mutate(Depth = factor(Depth1, levels = c("5 cm", "20 cm", "40 cm", "80 cm"))) + +#create plot +viz_CO2_plot <- ggplot(data = CO2_forplot, aes( + x = as.factor(Chamber), + y = CO2_Conc_uM, + fill = as.factor(Chamber) +)) + + geom_col(stat = "identity", + position = position_dodge2(padding = 0.1, + width = 0.5, + preserve = "single" )) + + facet_grid(Depth ~ ., + scales = "free_x") + + scale_fill_manual( + breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Ch1" = "blue4", + "Ch2" = "blue3", + "Ch3" = "turquoise4", + "Ch4" = "lightseagreen", + "Ch5" = "mediumseagreen", + "Ch6" = "limegreen", + "Ch7" = "yellowgreen", + "Ch8" = "yellow2", + "Ch9" = "darkgoldenrod2", + "Ch10" = "darkorange2", + "Ch11" = "orangered1", + "Ch12" = "red2"), + name = "Chamber:" + ) + + theme_classic() + + labs( + x = " ", + y = "CO2 Conc (uM)", + title = "GENX: Porewater CO2" + ) + + theme(legend.position = "right") + + scale_x_discrete(drop = TRUE, limits = rev) + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.key = element_rect("black"), + legend.position = "none" + ) + + coord_flip() +print(viz_CO2_plot) + +``` +\newpage + +```{r Visualize CO2 Data by Rep, fig.height=8.5, echo=FALSE} + +#get replicate value and treatment info +CO2_forplot <- CO2_forplot %>% + mutate(Chamber = case_when( + Plot == "Ch1" ~ "Chamber 1", + Plot == "Ch2" ~ "Chamber 2", + Plot == "Ch3" ~ "Chamber 3", + Plot == "Ch4" ~ "Chamber 4", + Plot == "Ch5" ~ "Chamber 5", + Plot == "Ch6" ~ "Chamber 6", + Plot == "Ch7" ~ "Chamber 7", + Plot == "Ch8" ~ "Chamber 8", + Plot == "Ch9" ~ "Chamber 9", + Plot == "Ch10" ~ "Chamber 10", + Plot == "Ch11" ~ "Chamber 11", + Plot == "Ch12" ~ "Chamber 12" + + + ) + ) %>% mutate(Chamber = factor(levels = c( + "Chamber 1", + "Chamber 2", + "Chamber 3", + "Chamber 4", + "Chamber 5", + "Chamber 6", + "Chamber 7", + "Chamber 8", + "Chamber 9", + "Chamber 10", + "Chamber 11", + "Chamber 12" + ), Chamber)) + +#make plot +viz_CO2_plot_2 <- ggplot(data = CO2_forplot, + aes(x = CO2_Conc_uM, y = Depth_cm, color = Chamber, shape = as.factor(Sample_Date))) + + geom_point(size = 3) + + geom_path(linewidth = 1) + + scale_color_manual(breaks = c( + "Ch1", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8", "Ch9", "Ch10", "Ch11", "Ch12"), + values = c( + "Chamber 1" = "blue4", + "Chamber 2" = "blue3", + "Chamber 3" = "turquoise4", + "Chamber 4" = "lightseagreen", + "Chamber 5" = "mediumseagreen", + "Chamber 6" = "limegreen", + "Chamber 7" = "yellowgreen", + "Chamber 8" = "yellow2", + "Chamber 9" = "darkgoldenrod2", + "Chamber 10" = "darkorange2", + "Chamber 11" = "orangered1", + "Chamber 12" = "red2"), + name = "Chamber:") + + facet_wrap(~Chamber, ncol = 3, nrow = 4, scales = "free_x") + + labs(x = "CO2 Conc (uM)", + y = "Depth (cm)", + title = "GENX: Porewater CO2 by Chamber") + + scale_y_reverse(breaks = c(5, 20, 40, 80), + limits = c(85, 0)) + + theme_classic() + + theme( + axis.text.x = element_text(angle = 0, hjust = 0.5), + panel.border = element_rect( + color = "black", + fill = NA, + linewidth = 0.8), + legend.position = "none" + ) + + +viz_CO2_plot_2 + +``` + + +##Export Data +```{r, echo=FALSE} +write.csv(All_Clean_Data, final_path) +write.csv(unique_log, log_path) +#end +``` + +#end \ No newline at end of file diff --git a/GENX (WIP)/Porewater/CH4/2026/Processed Data/GCReW_GENX_Porewater_CH4_202604.csv b/GENX (WIP)/Porewater/CH4/2026/Processed Data/GCReW_GENX_Porewater_CH4_202604.csv index 83ad3fc..beec69a 100644 --- a/GENX (WIP)/Porewater/CH4/2026/Processed Data/GCReW_GENX_Porewater_CH4_202604.csv +++ b/GENX (WIP)/Porewater/CH4/2026/Processed Data/GCReW_GENX_Porewater_CH4_202604.csv @@ -1,98 +1,98 @@ -"","Run_Date","N2O_Curve","CO2_Curve","CH4_Curve","Sample_ID","N2O_Area","CO2_Area","CH4_Area","N2O_Conc_uM","CO2_Conc_uM","CH4_Conc_uM","N2O_Flag","CO2_Flag","CH4_Flag","Notes" -"1","4/17/2026","Low","High","High","20260407_Ch1_5cm",1369,2332417,25398,0.00952569744901996,192.352967606554,1.64757514823941,"BDL","Within Range","Within Range","" -"2","4/17/2026","Low","High","High","20260407_Ch1_20cm",1563,5681339,624718,0.0120420166013176,607.131261800241,41.7785940837735,"BDL","Within Range","Within Range","" -"3","4/17/2026","Low","High","High","20260407_Ch2_5cm",914,4398411,42482,0.00362402108667237,448.235149136728,2.79153551581377,"BDL","Within Range","Within Range","" -"4","4/17/2026","Low","High","High","20260407_Ch2_20cm",838,5654070,387957,0.00263824657340112,603.753879674182,25.9248595609877,"BDL","Within Range","Within Range","" -"5","4/17/2026","Low","High","High","20260407_Ch3_5cm",519,3328082,93172,-0.00149941223888214,315.670330712759,6.1857845811582,"BDL","Within Range","Within Range","" -"6","4/17/2026","Low","High","High","20260407_Ch3_20cm",2257,3974376,193118,0.0210436943935577,395.716603175245,12.878260751703,"BDL","Within Range","Within Range","" -"7","4/17/2026","Low","High","High","20260407_Ch4_5cm",1771,11845080,223103,0.0147399257955337,1370.53691228469,14.8860839559711,"BDL","Within Range","Within Range","" -"8","4/17/2026","Low","High","High","20260407_Ch4_20cm",3304,10974498,1500056,0.0346240353855971,1262.71161300459,100.392032402189,"BDL","Within Range","Within Range","" -"9","4/17/2026","Low","High","High","20260407_Ch5_5cm",1560,4983553,127097,0.012003104449478,520.707485196237,8.45743381260049,"BDL","Within Range","Within Range","" -"10","4/17/2026","Low","High","High","20260407_Ch5_20cm",1688,6286950,653402,0.0136633562613032,682.138770940476,43.6993011303377,"BDL","Within Range","Within Range","" -"11","4/17/2026","Low","High","High","20260407_Ch6_5cm",403,5551128,83013,-0.00300401544334877,591.004073270543,5.50552858875666,"BDL","Within Range","Within Range","" -"12","4/17/2026","Low","High","High","20260407_Ch6_20cm",1915,3925339,622115,0.0166077090838371,389.643161269947,41.604294807445,"BDL","Within Range","Within Range","" -"13","4/17/2026","Low","High","High","20260407_Ch7_5cm",1782,5381762,321804,0.0148826036856124,570.02737074525,21.4951937803657,"BDL","Within Range","Within Range","" -"14","4/17/2026","Low","High","High","20260407_Ch7_20cm",968,5498922,1653900,0.00432443981978615,584.538137179265,110.693568271371,"BDL","Within Range","Within Range","" -"15","4/17/2026","Low","High","High","20260407_Ch8_5cm",723,5732389,1987579,0.00114661408621437,613.454022353813,133.037021297117,"BDL","Within Range","Within Range","" -"16","4/17/2026","Low","High","High","20260407_Ch8_20cm",756,4994775,2451964,0.00157464775645057,522.09737782958,164.132668411143,"BDL","Within Range","Within Range","" -"17","4/17/2026","Low","High","High","20260407_Ch9_5cm",900,5456123,59123,0.00344243104475398,579.237298218789,3.90583219556119,"BDL","Within Range","Within Range","" -"18","4/17/2026","Low","High","High","20260407_Ch9_20cm",1336,4226664,836481,0.00909766377878377,426.963549591297,55.9584395133362,"BDL","Within Range","Within Range","" -"19","4/17/2026","Low","High","High","20260407_Ch10_5cm",1225,4271770,398377,0.00765791416071655,432.55012035583,26.6225923536665,"BDL","Within Range","Within Range","" -"20","4/17/2026","Low","High","High","20260407_Ch10_20cm",302,1804287,871663,-0.00431405788861714,126.941811266541,58.3142586219759,"BDL","Within Range","Within Range","" -"21","4/17/2026","Low","High","High","20260407_Ch11_5cm",1023,3543188,323742,0.00503782927017982,342.312127610635,21.6249640444935,"BDL","Within Range","Within Range","" -"22","4/17/2026","Low","High","High","20260407_Ch11_20cm",1269,3470542,508208,0.00822862572103148,333.3146102125,33.9769772243677,"BDL","Within Range","Within Range","" -"23","4/17/2026","Low","High","High","20260407_Ch12_5cm",612,3216563,128992,-0.000293135531852846,301.858226223557,8.58432475714237,"BDL","Within Range","Within Range","" -"24","4/17/2026","Low","High","High","20260407_Ch12_20cm",2479,6687104,4749280,0.0239231936296921,731.699553047309,317.963062686163,"BDL","Within Range","ADL","" -"25","4/17/2026","Low","High","High","20260414_Ch1_5cm",996,2031048,49362,0.00468761990362293,155.027129697264,3.25222664955947,"BDL","Within Range","Within Range","" -"26","4/17/2026","Low","High","High","20260414_Ch1_20cm",1472,3513261,485033,0.0108616813288481,338.605540831267,32.4251578894031,"BDL","Within Range","Within Range","" -"27","4/17/2026","Low","High","High","20260414_Ch2_5cm",835,2706812,20246,0.00259933442156147,238.723387537101,1.30259248529496,"BDL","Within Range","Within Range","" -"28","4/17/2026","Low","High","High","20260414_Ch2_20cm",1680,3920769,394236,0.0135595905230641,389.077147249774,26.3453071814513,"BDL","Within Range","Within Range","" -"29","4/17/2026","Low","High","High","20260414_Ch3_5cm",676,3758823,153534,0.000536990374059782,369.019443418066,10.2276796705707,"BDL","Within Range","Within Range","" -"30","4/17/2026","Low","High","High","20260414_Ch3_20cm",854,3870647,314418,0.00284577804987928,382.869323460036,21.0006204207951,"BDL","Within Range","Within Range","" -"31","4/17/2026","Low","High","High","20260414_Ch4_5cm",1091,6570390,190777,0.00591983804521198,717.244025618327,12.7215052365723,"BDL","Within Range","Within Range","" -"32","4/17/2026","Low","High","High","20260414_Ch4_20cm",0,5182593,930695,-0.00823121450714236,545.35943937024,62.267095686987,"BDL","Within Range","Within Range","" -"33","4/17/2026","Low","High","High","20260414_Ch5_5cm",569,2979592,77672,-0.000850876374887894,272.50835568212,5.14789031181832,"BDL","Within Range","Within Range","" -"34","4/17/2026","Low","High","High","20260414_Ch5_20cm",1288,3337865,504293,0.00847506934934929,316.881997049597,33.7148252202086,"BDL","Within Range","Within Range","" -"35","4/17/2026","Low","High","High","20260414_Ch6_5cm",1054,3058783,51327,0.00543992150585625,282.316499286388,3.38380485854353,"BDL","Within Range","Within Range","" -"36","4/17/2026","Low","High","High","20260414_Ch6_20cm",1637,2234991,461108,0.0130018496800291,180.286341363807,30.8231178639865,"BDL","Within Range","Within Range","" -"37","4/17/2026","Low","High","High","20260414_Ch7_5cm",1900,2830084,219367,0.0164131483246388,253.991151277745,14.6359179565999,"BDL","Within Range","Within Range","" -"38","4/17/2026","Low","High","High","20260414_Ch7_20cm",548,3134140,1142095,-0.00112326143776548,291.649785614213,76.422634302371,"BDL","Within Range","Within Range","" -"39","4/17/2026","Low","High","High","20260414_Ch8_5cm",937,2397842,348051,0.00392234758410972,200.456133311107,23.2527170634214,"BDL","Within Range","Within Range","" -"40","4/17/2026","Low","High","High","20260414_Ch8_20cm",490,3825366,2932777,-0.00187556303999879,377.261078198013,196.328349528828,"BDL","Within Range","Within Range","" -"41","4/17/2026","Low","High","High","20260414_Ch9_5cm",674,2824237,34243,0.000511048939500012,253.266975353029,2.23984449096917,"BDL","Within Range","Within Range","" -"42","4/17/2026","Low","High","High","20260414_Ch9_20cm",0,2683447,792495,-0.00823121450714236,235.82953248648,53.0130964597114,"BDL","Within Range","Within Range","" -"43","4/17/2026","Low","High","High","20260414_Ch10_5cm",1613,2682002,311846,0.0126905524653119,235.650563064346,20.8283969330053,"BDL","Within Range","Within Range","" -"44","4/17/2026","Low","High","High","20260414_Ch10_20cm",1803,3718376,2593088,0.01515498874849,364.009909703859,173.58246137026,"BDL","Within Range","Within Range","" -"45","4/17/2026","Low","High","High","20260414_Ch11_5cm",1596,2510979,342613,0.0124700502715538,214.46863401139,22.8885835771846,"BDL","Within Range","Within Range","" -"46","4/17/2026","Low","High","High","20260414_Ch11_20cm",820,3149990,1060317,0.0024047736623632,293.612875815469,70.9467041373337,"BDL","Within Range","Within Range","" -"47","4/17/2026","Low","High","High","20260414_Ch12_5cm",2042,3154034,385225,0.0182549901783824,294.1137424889,25.7419223259015,"BDL","Within Range","Within Range","" -"48","4/17/2026","Low","High","High","20260414_Ch12_20cm",1206,4129533,4593162,0.00741147053239874,414.933460358605,307.509257683531,"BDL","Within Range","ADL","" -"49","5/1/2026","Low","High","High","20260421_Ch1_5cm",789,3293148,46717,0.0153601826955028,354.405330828399,3.13454690883903,"BDL","Within Range","Within Range","" -"50","5/1/2026","Low","High","High","20260421_Ch1_20cm",936,7242728,749810,0.01836416483503,889.822849576726,50.8555624415898,"BDL","Within Range","Within Range","" -"51","5/1/2026","Low","High","High","20260421_Ch2_5cm",729,4893445,39186,0.0141340675365121,571.346638258656,2.62339551353692,"BDL","Within Range","Within Range","" -"52","5/1/2026","Low","High","High","20260421_Ch2_20cm",1179,4779565,266535,0.0233299312289423,555.908706368414,18.0542491280024,"BDL","Within Range","Within Range","not overpressurized" -"53","5/1/2026","Low","High","High","20260421_Ch3_5cm",611,5321526,133925,0.0117227077238304,629.378648458044,9.05361355091928,"BDL","Within Range","Within Range","" -"54","5/1/2026","Low","High","High","20260421_Ch3_20cm",2279,5129871,229154,0.0458087091437715,603.397292325061,15.5170893473905,"BDL","Within Range","Within Range","" -"55","5/1/2026","Low","High","High","20260421_Ch4_5cm",4960,9354970,163198,0.100595621498005,1176.16503548915,11.0404592280775,"Within Range","Within Range","Within Range","" -"56","5/1/2026","Low","High","High","20260421_Ch4_20cm",2187,8315653,966342,0.0439286658999858,1035.27194575988,65.5522340559247,"BDL","Within Range","Within Range","" -"57","5/1/2026","Low","High","High","20260421_Ch5_5cm",0,5193337,129852,-0.000763231645224771,612.000943408184,8.77716691261553,"BDL","Within Range","Within Range","" -"58","5/1/2026","Low","High","High","20260421_Ch5_20cm",536,4569012,440949,0.010190063775092,527.365477765622,29.8922466662074,"BDL","Within Range","Within Range","" -"59","5/1/2026","Low","High","High","20260421_Ch6_5cm",636,5236305,41832,0.0122335890400765,617.825820976324,2.80298741261664,"BDL","Within Range","Within Range","" -"60","5/1/2026","Low","High","High","20260421_Ch6_20cm",500,3623203,409852,0.00945439467969764,399.148627368912,27.7816006776654,"BDL","Within Range","Within Range","" -"61","5/1/2026","Low","High","High","20260421_Ch7_5cm",533,5208296,192867,0.0101287580171425,614.028832617405,13.0541826044177,"BDL","Within Range","Within Range","" -"62","5/1/2026","Low","High","High","20260421_Ch7_20cm",435,4506237,1023989,0.00812610325745772,518.855500821383,69.4649076032598,"BDL","Within Range","Within Range","" -"63","5/1/2026","Low","High","High","20260421_Ch8_5cm",109,4678590,948999,0.00146421089360831,542.220216970652,64.3751130031131,"BDL","Within Range","Within Range","" -"64","5/1/2026","Low","High","High","20260421_Ch8_20cm",257,5691307,2952947,0.00448862828578534,679.507326823915,200.389030983842,"BDL","Within Range","Within Range","" -"65","5/1/2026","Low","High","High","20260421_Ch9_5cm",532,5741020,33372,0.0101083227644927,686.246577860617,2.22878202100121,"BDL","Within Range","Within Range","" -"66","5/1/2026","Low","High","High","20260421_Ch9_20cm",611,4663974,815812,0.0117227077238304,540.23882592299,55.3353147178784,"BDL","Within Range","Within Range","" -"67","5/1/2026","Low","High","High","20260421_Ch10_5cm",479,5622170,442178,0.00902525437405089,670.134897098804,29.9756625558404,"BDL","Within Range","Within Range","" -"68","5/1/2026","Low","High","High","20260421_Ch10_20cm",273,4977713,2356528,0.00481559232818286,582.770274055344,159.908297477709,"BDL","Within Range","Within Range","" -"69","5/1/2026","Low","High","High","20260421_Ch11_5cm",501,3543875,151943,0.00947482993234748,388.394673549198,10.2765488637002,"BDL","Within Range","Within Range","" -"70","5/1/2026","Low","High","High","20260421_Ch11_20cm",345,4595900,1402984,0.00628693051897169,531.010499829767,95.1884267989208,"BDL","Within Range","Within Range","" -"71","5/1/2026","Low","High","High","20260421_Ch12_5cm",538,5820575,353535,0.0102309342803917,697.031304516115,23.9591981907143,"BDL","Within Range","Within Range","" -"72","5/1/2026","Low","High","High","20260421_Ch12_20cm",614,6756870,5550583,0.0117840134817799,823.95840707296,376.698321368518,"BDL","Within Range","Within Range","" -"73","5/1/2026","Low","High","High","20260429_Ch1_5cm",476,4574572,127086,0.00896394861610136,528.119208897601,8.58943025620793,"BDL","Within Range","Within Range","" -"74","5/1/2026","Low","High","High","20260429_Ch1_20cm",362,4736962,563452,0.00663432981401905,550.133309351203,38.2068900573499,"BDL","Within Range","Within Range","" -"75","5/1/2026","Low","High","High","20260429_Ch2_5cm",2553,3790749,53998,0.051407968369829,421.861691440588,3.62873005970806,"Within Range","Within Range","Within Range","" -"76","5/1/2026","Low","High","High","20260429_Ch2_20cm",2322,3996541,317271,0.0466874250077149,449.759503870835,21.4978525262294,"BDL","Within Range","Within Range","" -"77","5/1/2026","Low","High","High","20260429_Ch3_5cm",877,4298660,155733,0.0171584849286891,490.715708162614,10.5337874493057,"BDL","Within Range","Within Range","" -"78","5/1/2026","Low","High","High","20260429_Ch3_20cm",1089,4060446,254868,0.0214907584904562,458.422667178227,17.2623750967994,"BDL","Within Range","Within Range","" -"79","5/1/2026","Low","High","High","20260429_Ch4_5cm",902,6896598,197491,0.0176693662449353,842.900375347983,13.368027253452,"BDL","Within Range","Within Range","" -"80","5/1/2026","Low","High","High","20260429_Ch4_20cm",370,6258346,965849,0.00679781183521781,756.376921670337,65.5187726779027,"BDL","Within Range","Within Range","" -"81","5/1/2026","Low","High","High","20260429_Ch5_5cm",228,3597955,70219,0.00389600595893985,395.725928876071,4.72969763150404,"BDL","Within Range","Within Range","" -"82","5/1/2026","Low","High","High","20260429_Ch5_20cm",978,3833300,442145,0.0192224454463235,427.63003917383,29.9734227475752,"BDL","Within Range","Within Range","" -"83","5/1/2026","Low","High","High","20260429_Ch6_5cm",413,4221912,26001,0.00767652769916114,480.311507278242,1.72849030213627,"BDL","Within Range","Within Range","" -"84","5/1/2026","Low","High","High","20260429_Ch6_20cm",297,3133545,427195,0.00530603839177914,332.769044882859,28.958721730477,"BDL","Within Range","Within Range","" -"85","5/1/2026","Low","High","High","20260429_Ch7_5cm",1256,4014428,170489,0.0249034456829803,452.184321992724,11.5353211087239,"BDL","Within Range","Within Range","" -"86","5/1/2026","Low","High","High","20260429_Ch7_20cm",904,3501039,1087884,0.0177102367502349,382.587690317284,73.8016515154665,"BDL","Within Range","Within Range","" -"87","5/1/2026","Low","High","High","20260429_Ch8_5cm",0,3581552,771111,-0.000763231645224771,393.50228647358,52.301324740266,"BDL","Within Range","Within Range","" -"88","5/1/2026","Low","High","High","20260429_Ch8_20cm",1740,4165440,2972711,0.0347941079655052,472.655984888835,201.730472515744,"BDL","Within Range","Within Range","" -"89","5/1/2026","Low","High","High","20260429_Ch9_5cm",1585,3533048,32928,0.0316266438047793,386.926931289138,2.19864641888806,"BDL","Within Range","Within Range","" -"90","5/1/2026","Low","High","High","20260429_Ch9_20cm",76,3095032,783951,0.000789847556163435,327.548101162373,53.172813774349,"BDL","Within Range","Within Range","" -"91","5/1/2026","Low","High","High","20260429_Ch10_5cm",0,4099932,354772,-0.000763231645224771,463.775513846809,24.0431570641692,"BDL","Within Range","Within Range","" -"92","5/1/2026","Low","High","High","20260429_Ch10_20cm",511,3494551,2116955,0.00967918245884593,381.708156579104,143.647764583444,"BDL","Within Range","Within Range","" -"93","5/1/2026","Low","High","High","20260429_Ch11_5cm",68,3128505,173462,0.000626365534964676,332.085806590561,11.7371074715221,"BDL","Within Range","Within Range","" -"94","5/1/2026","Low","High","High","20260429_Ch11_20cm",307,2948892,1190284,0.00551039091827759,307.736901948816,80.7518444352561,"BDL","Within Range","Within Range","" -"95","5/1/2026","Low","High","High","20260429_Ch12_5cm",0,3614387,329007,-0.000763231645224771,397.953502610005,22.2944097928959,"BDL","Within Range","Within Range","" -"96","5/1/2026","Low","High","High","20260429_Ch12_20cm",0,4525742,5208888,-0.000763231645224771,521.499660125204,353.506464242272,"BDL","Within Range","Within Range","" -"97","5/1/2026","Low","High","High","20260407_Ch12_20cm_2",1072,3468333,4516223,0.0211433591954089,378.153961827626,306.493228121314,"BDL","Within Range","Within Range","" +"","Site","Project","Year","Month","Sample_Date","Community","Nickname","Plot","Depth_cm","CO2_Treatment","Temp_Treatment","CO2_Conc_ppm","CO2_Conc_uM","CO2_Conc_Flag","N2O_Conc_ppm","N2O_Conc_uM","N2O_Conc_Flag","CH4_Conc_ppm","CH4_Conc_uM","CH4_Conc_Flag","QAQC_Flags","Analysis_rundate","Run_notes" +"1","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch1",5,"Ambient",0,4706.14406017284,192.352967606554,"Within Range",0.23305751414454,0.00952569744901996,"BDL",40.3098849685284,1.64757514823941,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"2","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch1",20,"Ambient",0,14854.1881990132,607.131261800241,"Within Range",0.294622254108974,0.0120420166013176,"BDL",1022.16297900788,41.7785940837735,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"3","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch2",5,"Ambient",0,10966.6058752224,448.235149136728,"Within Range",0.0886659848465116,0.00362402108667237,"BDL",68.2982355301122,2.79153551581377,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"4","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch2",20,"Ambient",0,14771.5565295918,603.753879674182,"Within Range",0.0645478392934343,0.00263824657340112,"BDL",634.282513817582,25.9248595609877,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"5","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch3",5,"Ambient",0.75,7723.24997291087,315.670330712759,"Within Range",-0.0366849032254035,-0.00149941223888214,"BDL",151.342574675902,6.1857845811582,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"6","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch3",20,"Ambient",0.75,9681.67720372355,395.716603175245,"Within Range",0.514859004291023,0.0210436943935577,"BDL",315.081961542447,12.878260751703,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"7","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch4",5,"Ambient",1.5,33531.8151274337,1370.53691228469,"Within Range",0.360629810359502,0.0147399257955337,"BDL",364.205743536657,14.8860839559711,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"8","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch4",20,"Ambient",1.5,30893.7409762651,1262.71161300459,"Within Range",0.847118193686706,0.0346240353855971,"BDL",2456.21043884607,100.392032402189,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"9","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch5",5,"Ambient",2.25,12739.7277465258,520.707485196237,"Within Range",0.293670222047669,0.012003104449478,"BDL",206.921174114074,8.45743381260049,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"10","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch5",20,"Ambient",2.25,16689.3360940574,682.138770940476,"Within Range",0.334290256663378,0.0136633562613032,"BDL",1069.15536062276,43.6993011303377,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"11","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch6",5,"Ambient",2.25,14459.6173564069,591.004073270543,"Within Range",-0.0734968095958899,-0.00300401544334877,"BDL",134.699302997424,5.50552858875666,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"12","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch6",20,"Ambient",2.25,9533.083226188,389.643161269947,"Within Range",0.406327349302175,0.0166077090838371,"BDL",1017.89853997067,41.604294807445,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"13","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch7",5,"Ambient",3,13946.3973878264,570.02737074525,"Within Range",0.364120594584289,0.0148826036856124,"BDL",525.905473622051,21.4951937803657,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"14","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch7",20,"Ambient",3,14301.4205419358,584.538137179265,"Within Range",0.105802561950014,0.00432443981978615,"BDL",2708.24976241176,110.693568271371,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"15","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch8",5,"Ambient",3.75,15008.8820537186,613.454022353813,"Within Range",0.028053276943383,0.00114661408621437,"BDL",3254.90890705228,133.037021297117,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"16","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch8",20,"Ambient",3.75,12773.7331223829,522.09737782958,"Within Range",0.0385256296177456,0.00157464775645057,"BDL",4015.70088642135,164.132668411143,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"17","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch9",5,"Ambient",3.75,14171.7292140702,579.237298218789,"Within Range",0.0842231685604184,0.00344243104475398,"BDL",95.560828698885,3.90583219556119,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"18","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch9",20,"Ambient",3.75,10446.1709004115,426.963549591297,"Within Range",0.222585161470178,0.00909766377878377,"BDL",1369.08975727835,55.9584395133362,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"19","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch10",5,"Ambient",4.5,10582.8529965985,432.55012035583,"Within Range",0.187359975201867,0.00765791416071655,"BDL",651.35337619476,26.6225923536665,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"20","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch10",20,"Ambient",4.5,3105.78234644951,126.941811266541,"Within Range",-0.105548555659848,-0.00431405788861714,"BDL",1426.72767284014,58.3142586219759,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"21","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch11",5,"Ambient",5.25,8375.0732111139,342.312127610635,"Within Range",0.123256483073951,0.00503782927017982,"BDL",529.080457430782,21.6249640444935,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"22","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch11",20,"Ambient",5.25,8154.93824992036,333.3146102125,"Within Range",0.201323112101017,0.00822862572103148,"BDL",831.287146420076,33.9769772243677,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"23","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch12",5,"Ambient",6,7385.32041399031,301.858226223557,"Within Range",-0.00717190932492726,-0.000293135531852846,"BDL",210.025711945624,8.58432475714237,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"24","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch12",20,"Ambient",6,17901.899556071,731.699553047309,"Within Range",0.585309376827643,0.0239231936296921,"BDL",7779.34438669852,317.963062686163,"ADL","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"25","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch1",5,"Ambient",0,3792.92305530077,155.027129697264,"Within Range",0.1146881945222,0.00468761990362293,"BDL",79.5695918789588,3.25222664955947,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"26","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch1",20,"Ambient",0,8284.38715842499,338.605540831267,"Within Range",0.265743948249369,0.0108616813288481,"BDL",793.320041276977,32.4251578894031,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"27","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch2",5,"Ambient",0,5840.65151820295,238.723387537101,"Within Range",0.0635958072321285,0.00259933442156147,"BDL",31.8694739352061,1.30259248529496,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"28","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch2",20,"Ambient",0,9519.2350201938,389.077147249774,"Within Range",0.331751504499896,0.0135595905230641,"BDL",644.569264764444,26.3453071814513,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"29","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch3",5,"Ambient",0.75,9028.49944734121,369.019443418066,"Within Range",0.0131381079829273,0.000536990374059782,"BDL",250.232343851641,10.2276796705707,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"30","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch3",20,"Ambient",0.75,9367.35323007538,382.869323460036,"Within Range",0.0696253436203979,0.00284577804987928,"BDL",513.805148332432,21.0006204207951,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"31","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch4",5,"Ambient",1.5,17548.2278898988,717.244025618327,"Within Range",0.144835876463547,0.00591983804521198,"BDL",311.246751482469,12.7215052365723,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"32","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch4",20,"Ambient",1.5,13342.8671165663,545.35943937024,"Within Range",-0.201386449831287,-0.00823121450714236,"BDL",1523.43853155891,62.267095686987,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"33","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch5",5,"Ambient",2.25,6667.24093419797,272.50835568212,"Within Range",-0.0208177022036421,-0.000850876374887894,"BDL",125.949257320216,5.14789031181832,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"34","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch5",20,"Ambient",2.25,7752.89483051289,316.881997049597,"Within Range",0.207352648489287,0.00847506934934929,"BDL",824.873285939591,33.7148252202086,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"35","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch6",5,"Ambient",2.25,6907.20882935913,282.316499286388,"Within Range",0.133094147707443,0.00543992150585625,"BDL",82.7888092082442,3.38380485854353,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"36","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch6",20,"Ambient",2.25,4410.91970192542,180.286341363807,"Within Range",0.318105711621181,0.0130018496800291,"BDL",754.12422722957,30.8231178639865,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"37","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch7",5,"Ambient",3,6214.19551148889,253.991151277745,"Within Range",0.401567188995646,0.0164131483246388,"BDL",358.085134914667,14.6359179565999,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"38","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch7",20,"Ambient",3,7135.55877664682,291.649785614213,"Within Range",-0.0274819266327818,-0.00112326143776548,"BDL",1869.77061471969,76.422634302371,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"39","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch8",5,"Ambient",3.75,4904.39764379874,200.456133311107,"Within Range",0.0959648973165218,0.00392234758410972,"BDL",568.905370437193,23.2527170634214,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"40","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch8",20,"Ambient",3.75,9230.14084153638,377.261078198013,"Within Range",-0.0458878798180251,-0.00187556303999879,"BDL",4803.40650563036,196.328349528828,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"41","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch9",5,"Ambient",3.75,6196.47768644555,253.266975353029,"Within Range",0.0125034199420569,0.000511048939500012,"BDL",54.8004586466605,2.23984449096917,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"42","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch9",20,"Ambient",3.75,5769.84991359586,235.82953248648,"Within Range",-0.201386449831287,-0.00823121450714236,"BDL",1297.02843745853,53.0130964597114,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"43","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch10",5,"Ambient",4.5,5765.47121388872,235.650563064346,"Within Range",0.310489455130736,0.0126905524653119,"BDL",509.591495929927,20.8283969330053,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"44","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch10",20,"Ambient",4.5,8905.93524868754,364.009909703859,"Within Range",0.370784819013429,0.01515498874849,"BDL",4246.90130696999,173.58246137026,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"45","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch11",5,"Ambient",5.25,5247.23013429448,214.46863401139,"Within Range",0.305094606783337,0.0124700502715538,"BDL",559.996411741695,22.8885835771846,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"46","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch11",20,"Ambient",5.25,7183.5881125348,293.612875815469,"Within Range",0.0588356469256002,0.0024047736623632,"BDL",1735.79547235109,70.9467041373337,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"47","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch12",5,"Ambient",6,7195.84241123075,294.1137424889,"Within Range",0.446630039897449,0.0182549901783824,"BDL",629.806736848825,25.7419223259015,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"48","GCReW","GENX","2026","April",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch12",20,"Ambient",6,10151.8404635576,414.933460358605,"Within Range",0.181330438813598,0.00741147053239874,"BDL",7523.57961773497,307.509257683531,"ADL","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","4/17/2026","" +"49","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch1",5,"Ambient",0,8670.94780665514,354.405330828399,"Within Range",0.375805132902701,0.0153601826955028,"BDL",76.6904171010215,3.13454690883903,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"50","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch1",20,"Ambient",0,21770.5740142627,889.822849576726,"Within Range",0.449301127680997,0.01836416483503,"BDL",1244.24180239724,50.8555624415898,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"51","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch2",5,"Ambient",0,13978.6748361509,571.346638258656,"Within Range",0.345806767687069,0.0141340675365121,"BDL",64.1844904559464,2.62339551353692,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"52","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch2",20,"Ambient",0,13600.9674767551,555.908706368414,"Within Range",0.570794506804304,0.0233299312289423,"BDL",441.718671418791,18.0542491280024,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"53","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch3",5,"Ambient",0.75,15398.4969657391,629.378648458044,"Within Range",0.286809982762995,0.0117227077238304,"BDL",221.507420269752,9.05361355091928,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"54","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch3",20,"Ambient",0.75,14762.8321961132,603.397292325061,"Within Range",1.12076453575754,0.0458087091437715,"BDL",379.644040703142,15.5170893473905,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"55","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch4",5,"Ambient",1.5,28776.2760534693,1176.16503548915,"Within Range",2.46119148814266,0.100595621498005,"Within Range",270.117962120938,11.0404592280775,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"56","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch4",20,"Ambient",1.5,25329.1590913589,1035.27194575988,"Within Range",1.07476704242691,0.0439286658999858,"BDL",1603.81334778449,65.5522340559247,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"57","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch5",5,"Ambient",2.25,14973.3307496029,612.000943408184,"Within Range",-0.0186733696828502,-0.000763231645224771,"BDL",214.743824568598,8.77716691261553,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"58","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch5",20,"Ambient",2.25,12902.623451089,527.365477765622,"Within Range",0.249312026243455,0.010190063775092,"BDL",731.34935657005,29.8922466662074,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"59","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch6",5,"Ambient",2.25,15115.8433050869,617.825820976324,"Within Range",0.299309301602841,0.0122335890400765,"BDL",68.5784198016997,2.80298741261664,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"60","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch6",20,"Ambient",2.25,9765.64575629838,399.148627368912,"Within Range",0.231313007114077,0.00945439467969764,"BDL",679.70989290229,27.7816006776654,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"61","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch7",5,"Ambient",3,15022.9454702668,614.028832617405,"Within Range",0.247812107982674,0.0101287580171425,"BDL",319.386098840197,13.0541826044177,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"62","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch7",20,"Ambient",3,12694.4167467856,518.855500821383,"Within Range",0.198814778130476,0.00812610325745772,"BDL",1699.54155828889,69.4649076032598,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"63","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch8",5,"Ambient",3.75,13266.062308025,542.220216970652,"Within Range",0.0358236604588799,0.00146421089360831,"BDL",1575.01368163052,64.3751130031131,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"64","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch8",20,"Ambient",3.75,16624.9546849587,679.507326823915,"Within Range",0.10981962799077,0.00448862828578534,"BDL",4902.75590557754,200.389030983842,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"65","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch9",5,"Ambient",3.75,16789.8384745411,686.246577860617,"Within Range",0.24731213522908,0.0101083227644927,"BDL",54.5298021656175,2.22878202100121,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"66","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch9",20,"Ambient",3.75,13217.58522017,540.23882592299,"Within Range",0.286809982762995,0.0117227077238304,"BDL",1353.8442682621,55.3353147178784,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"67","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch10",5,"Ambient",4.5,16395.6470479149,670.134897098804,"Within Range",0.220813579288606,0.00902525437405089,"BDL",733.390225491415,29.9756625558404,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"68","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch10",20,"Ambient",4.5,14258.1676686198,582.770274055344,"Within Range",0.117819192048272,0.00481559232818286,"BDL",3912.34662875785,159.908297477709,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"69","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch11",5,"Ambient",5.25,9502.53748964798,388.394673549198,"Within Range",0.231812979867671,0.00947482993234748,"BDL",251.427986767025,10.2765488637002,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"70","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch11",20,"Ambient",5.25,12991.8032498195,531.010499829767,"Within Range",0.153817230307029,0.00628693051897169,"BDL",2328.89804067506,95.1884267989208,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"71","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch12",5,"Ambient",6,17053.6996352078,697.031304516115,"Within Range",0.250311971750643,0.0102309342803917,"BDL",586.190271222474,23.9591981907143,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"72","GCReW","GENX","2026","April",2026-04-21,"SCAM, SPPA, DISP","GENX","Ch12",20,"Ambient",6,20159.122115586,823.95840707296,"Within Range",0.288309901023776,0.0117840134817799,"BDL",9216.37232658489,376.698321368518,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"73","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch1",5,"Ambient",0,12921.0643794192,528.119208897601,"Within Range",0.219313661027824,0.00896394861610136,"BDL",210.150624050702,8.58943025620793,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"74","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch1",20,"Ambient",0,13459.665521782,550.133309351203,"Within Range",0.162316767118125,0.00663432981401905,"BDL",934.776993245344,38.2068900573499,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"75","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch2",5,"Ambient",0,10321.3478746451,421.861691440588,"Within Range",1.25775707024226,0.051407968369829,"Within Range",88.7811954707987,3.62873005970806,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"76","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch2",20,"Ambient",0,11003.9010262501,449.759503870835,"Within Range",1.14226336416208,0.0466874250077149,"BDL",525.970523000856,21.4978525262294,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"77","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch3",5,"Ambient",0.75,12005.9432611754,490.715708162614,"Within Range",0.41980273521896,0.0171584849286891,"BDL",257.721634620542,10.5337874493057,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"78","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch3",20,"Ambient",0.75,11215.8556170666,458.422667178227,"Within Range",0.525796958980857,0.0214907584904562,"BDL",422.344531707187,17.2623750967994,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"79","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch4",5,"Ambient",1.5,20622.5598914347,842.900375347983,"Within Range",0.432302054058806,0.0176693662449353,"BDL",327.064681340107,13.368027253452,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"80","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch4",20,"Ambient",1.5,18505.6607208247,756.376921670337,"Within Range",0.166316549146876,0.00679781183521781,"BDL",1602.9946753856,65.5187726779027,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"81","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch5",5,"Ambient",2.25,9681.9053680825,395.725928876071,"Within Range",0.0953204181365485,0.00389600595893985,"BDL",115.71767616523,4.72969763150404,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"82","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch5",20,"Ambient",2.25,10462.4773605043,427.63003917383,"Within Range",0.470299983331939,0.0192224454463235,"BDL",733.335425919075,29.9734227475752,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"83","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch6",5,"Ambient",2.25,11751.3921159444,480.311507278242,"Within Range",0.187815377551411,0.00767652769916114,"BDL",42.289570416733,1.72849030213627,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"84","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch6",20,"Ambient",2.25,8141.5903454535,332.769044882859,"Within Range",0.129818538134524,0.00530603839177914,"BDL",708.509559056258,28.958721730477,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"85","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch7",5,"Ambient",3,11063.2270847108,452.184321992724,"Within Range",0.60929240883103,0.0249034456829803,"BDL",282.225346421728,11.5353211087239,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"86","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch7",20,"Ambient",3,9360.46274037614,382.587690317284,"Within Range",0.433301999565994,0.0177102367502349,"BDL",1805.64515448954,73.8016515154665,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"87","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch8",5,"Ambient",3.75,9627.50131279475,393.50228647358,"Within Range",-0.0186733696828502,-0.000763231645224771,"BDL",1279.61409604572,52.301324740266,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"88","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch8",20,"Ambient",3.75,11564.0906582714,472.655984888835,"Within Range",0.851279221570456,0.0347941079655052,"BDL",4935.57586762949,201.730472515744,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"89","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch9",5,"Ambient",3.75,9466.62743011006,386.926931289138,"Within Range",0.773783444763408,0.0316266438047793,"BDL",53.7924988286883,2.19864641888806,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"90","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch9",20,"Ambient",3.75,8013.85374962974,327.548101162373,"Within Range",0.0193245595902827,0.000789847556163435,"BDL",1300.93611146502,53.172813774349,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"91","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch10",5,"Ambient",4.5,11346.8193753481,463.775513846809,"Within Range",-0.0186733696828502,-0.000763231645224771,"BDL",588.244424888648,24.0431570641692,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"92","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch10",20,"Ambient",4.5,9338.94390170596,381.708156579104,"Within Range",0.236812707403609,0.00967918245884593,"BDL",3514.51335772604,143.647764583444,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"93","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch11",5,"Ambient",5.25,8124.87410826212,332.085806590561,"Within Range",0.0153247775615319,0.000626365534964676,"BDL",287.162289711571,11.7371074715221,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"94","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch11",20,"Ambient",5.25,7529.14920535421,307.736901948816,"Within Range",0.134818265670463,0.00551039091827759,"BDL",1975.68988805157,80.7518444352561,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"95","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch12",5,"Ambient",6,9736.40560806837,397.953502610005,"Within Range",-0.0186733696828502,-0.000763231645224771,"BDL",545.459243636442,22.2944097928959,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"96","GCReW","GENX","2026","April",2026-04-29,"SCAM, SPPA, DISP","GENX","Ch12",20,"Ambient",6,12759.109248059,521.499660125204,"Within Range",-0.0186733696828502,-0.000763231645224771,"BDL",8648.95596687317,353.506464242272,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" +"97","GCReW","GENX","2026","April",2026-04-07,"SCAM, SPPA, DISP","GENX","Ch12",20,"Ambient",6,9251.98630117348,378.153961827626,"Within Range",0.517297422169761,0.0211433591954089,"BDL",7498.72124643618,306.493228121314,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/1/2026","" diff --git a/GENX (WIP)/Porewater/CH4/2026/Processed Data/GCReW_GENX_Porewater_CH4_20260406.csv b/GENX (WIP)/Porewater/CH4/2026/Processed Data/GCReW_GENX_Porewater_CH4_20260406.csv index 157b35c..0f9ee08 100644 --- a/GENX (WIP)/Porewater/CH4/2026/Processed Data/GCReW_GENX_Porewater_CH4_20260406.csv +++ b/GENX (WIP)/Porewater/CH4/2026/Processed Data/GCReW_GENX_Porewater_CH4_20260406.csv @@ -1,49 +1,49 @@ -"","Run_Date","N2O_Curve","CO2_Curve","CH4_Curve","Sample_ID","N2O_Area","CO2_Area","CH4_Area","N2O_Conc_uM","CO2_Conc_uM","CH4_Conc_uM","N2O_Flag","CO2_Flag","CH4_Flag","Notes" -"1","4/6/2026","Low","High","High","20260325_Ch1_5cm",1224,3462478,101933,0.0188262217860668,335.536369875606,6.25914981039121,"BDL","Within Range","Within Range","" -"2","4/6/2026","Low","High","High","20260325_Ch1_20cm",1357,6153472,672612,0.0208988140616179,654.168394981559,44.3745864539409,"BDL","Within Range","Within Range","" -"3","4/6/2026","Low","High","High","20260325_Ch2_5cm",946,2801315,10714,0.014494036428148,257.250165738724,0.166666969445668,"BDL","Within Range","Within Range","" -"4","4/6/2026","Low","High","High","20260325_Ch2_20cm",980,6873734,423468,0.0150238720474618,739.452323398665,27.7343520189599,"BDL","Within Range","Within Range","" -"5","4/6/2026","Low","High","High","20260325_Ch3_5cm",830,4483393,114451,0.0126863619622538,456.419662038667,7.09522234136564,"BDL","Within Range","Within Range","" -"6","4/6/2026","Low","High","High","20260325_Ch3_20cm",799,6223159,411729,0.0122032765446442,662.419810604767,26.9503086061856,"BDL","Within Range","Within Range","" -"7","4/6/2026","Low","High","High","20260325_Ch4_5cm",1011,9529321,151395,0.0155069574650714,1053.89191845352,9.56269826278433,"BDL","Within Range","Within Range","" -"8","4/6/2026","Low","High","High","20260325_Ch4_20cm",690,8128044,1027491,0.0105046858827264,887.971173834841,68.0768219324258,"BDL","Within Range","Within Range","" -"9","4/6/2026","Low","High","High","20260325_Ch5_5cm",713,3116640,70165,0.0108631040957916,294.586794254631,4.13737699013273,"BDL","Within Range","Within Range","" -"10","4/6/2026","Low","High","High","20260325_Ch5_20cm",444,5243133,629588,0.00667116934298526,546.378054645264,41.5010296099847,"BDL","Within Range","Within Range","" -"11","4/6/2026","Low","High","High","20260325_Ch6_5cm",718,3534851,49699,0.0109410210986318,344.105826200293,2.77046051634118,"BDL","Within Range","Within Range","" -"12","4/6/2026","Low","High","High","20260325_Ch6_20cm",672,3901534,429950,0.0102241846725014,387.523591851917,28.1672823709151,"BDL","Within Range","Within Range","" -"13","4/6/2026","Low","High","High","20260325_Ch7_5cm",571,3486462,287921,0.00865026121512802,338.376238894319,18.6812186625139,"BDL","Within Range","Within Range","" -"14","4/6/2026","Low","High","High","20260401_Ch2_5cm",529,3876713,25740,0.00799575839126979,384.584616330175,1.17024788096682,"BDL","Within Range","Within Range","" -"15","4/6/2026","Low","High","High","20260325_Ch8_5cm",685,4400549,1442336,0.0104267688798861,446.610367968194,95.7841640886877,"BDL","Within Range","Within Range","" -"16","4/6/2026","Low","High","High","20260325_Ch8_20cm",2952,4746722,2038202,0.0457543379676628,487.599609871745,135.581831027624,"BDL","Within Range","Within Range","" -"17","4/6/2026","Low","High","High","20260325_Ch9_5cm",1607,3266861,23462,0.0247946642036312,312.373984208767,1.01810111426609,"BDL","Within Range","Within Range","" -"18","4/6/2026","Low","High","High","20260325_Ch9_20cm",2030,5205933,1098266,0.0313864426439177,541.973321177281,72.803857671339,"BDL","Within Range","Within Range","" -"19","4/6/2026","Low","High","High","20260325_Ch10_5cm",1412,4068545,347906,0.0217559010928608,407.298832207328,22.6875943431738,"BDL","Within Range","Within Range","" -"20","4/6/2026","Low","High","High","20260325_Ch10_20cm",761,5509877,2192395,0.0116111073230581,577.962361746975,145.880323739602,"BDL","Within Range","Within Range","" -"21","4/6/2026","Low","High","High","20260325_Ch11_5cm",786,3522384,380097,0.0120006923372595,342.62964845445,24.8376191749838,"BDL","Within Range","Within Range","" -"22","4/6/2026","Low","High","High","20260325_Ch11_20cm",722,7145163,1323773,0.0110033547009041,771.591366422352,87.86538573033,"BDL","Within Range","Within Range","" -"23","4/6/2026","Low","High","High","20260325_Ch12_5cm",607,3633619,281491,0.00921126363557794,355.800630371415,18.2517613710803,"BDL","Within Range","Within Range","" -"24","4/6/2026","Low","High","High","20260325_Ch12_20cm",1783,6532193,3749487,0.0275373427036086,699.011541855967,249.877915159959,"BDL","Within Range","Within Range","" -"25","4/6/2026","Low","High","High","20260401_Ch1_5cm",981,2685011,53896,0.0150394554480298,243.478979683339,3.05077657421781,"BDL","Within Range","Within Range","" -"26","4/6/2026","Low","High","High","20260401_Ch1_20cm",1537,5267488,600340,0.0237038261638675,549.261852591843,39.547566645778,"BDL","Within Range","Within Range","" -"27","4/6/2026","Low","High","High","20260401_Ch8_20cm",448,3710828,1862353,0.00673350294525748,364.942702046939,123.836942187608,"BDL","Within Range","Within Range","" -"28","4/6/2026","Low","High","High","20260401_Ch9_5cm",330,1475540,48713,0.00489466167822719,100.26937236466,2.70460594567967,"BDL","Within Range","Within Range","" -"29","4/6/2026","Low","High","High","20260401_Ch3_5cm",1501,4149399,136903,0.0231428237434175,416.872496718626,8.59478301123605,"BDL","Within Range","Within Range","" -"30","4/6/2026","Low","High","High","20260401_Ch3_20cm",691,4722789,257758,0.0105202692832944,484.765779600529,16.6666431910503,"BDL","Within Range","Within Range","" -"31","4/6/2026","Low","High","High","20260401_Ch4_5cm",790,8181810,179793,0.0120630259395317,894.337434577841,11.4593900453863,"BDL","Within Range","Within Range","" -"32","4/6/2026","Low","High","High","20260401_Ch4_20cm",649,7465326,813910,0.00986576645943618,809.500847102724,53.8118269461621,"BDL","Within Range","Within Range","" -"33","4/6/2026","Low","High","High","20260401_Ch5_5cm",1483,1801213,68954,0.0228623225331926,138.831274588274,4.05649475375232,"BDL","Within Range","Within Range","" -"34","4/6/2026","Low","High","High","20260401_Ch5_20cm",0,2356385,230758,-0.000247860509230376,204.567422139001,14.8633233047817,"BDL","Within Range","Within Range","" -"35","4/6/2026","Low","High","High","20260401_Ch8_5cm",572,3690358,1483247,0.00866584461569607,362.518914571412,98.516594454137,"BDL","Within Range","Within Range","" -"36","4/6/2026","Low","High","High","20260401_Ch6_20cm",353,1511579,108042,0.00525307989129242,104.536635521989,6.66716763206582,"BDL","Within Range","Within Range","" -"37","4/6/2026","Low","High","High","20260401_Ch7_5cm",142,1475543,153426,0.00196498237143318,100.269727585101,9.69834799200698,"BDL","Within Range","Within Range","" -"38","4/6/2026","Low","High","High","20260401_Ch7_20cm",753,5023484,1543412,0.0114864401185137,520.370116432656,102.534992267372,"BDL","Within Range","Within Range","" -"39","4/6/2026","Low","High","High","20260401_Ch10_5cm",360,2109492,291106,0.00536216369526879,175.333608695165,18.8939436194682,"BDL","Within Range","Within Range","" -"40","4/6/2026","Low","High","High","20260401_Ch10_20cm",5077,4449484,2284596,0.0788690641747759,452.404605394424,152.038393992708,"Within Range","Within Range","Within Range","" -"41","4/6/2026","Low","High","High","20260401_Ch9_20cm",281,1673856,307416,0.00413107505039258,123.751338021556,19.9832824100252,"BDL","Within Range","Within Range","" -"42","4/6/2026","Low","High","High","20260401_Ch12_20cm",635,4336739,2670410,0.00964759885148343,439.05482918884,177.806766533478,"BDL","Within Range","Within Range","" -"43","4/6/2026","Low","Low","High","20260401_Ch11_5cm",0,601058,60128,-0.000247860509230376,53.6279259734554,3.46700951981876,"BDL","Within Range","Within Range","" -"44","4/6/2026","Low","Low","High","20260401_Ch6_5cm",330,783856,15654,0.00489466167822719,70.4593038266269,0.496607719007393,"BDL","Within Range","Within Range","" -"45","4/6/2026","Low","Low","High","20260401_Ch11_20cm",632,573733,69147,0.00960084864977927,51.1119389285319,4.06938515145787,"BDL","Within Range","Within Range","" -"46","4/6/2026","Low","Low","High","20260401_Ch12_5cm",116,343234,108056,0.0015598139566638,29.8884257403232,6.66810268682166,"BDL","Within Range","Within Range","" -"47","4/6/2026","Low","Low","Low","20260401_Ch2_20cm",0,185151,1605,-0.000247860509230376,15.3327155839598,0.0937516862870162,"BDL","BDL","BDL","not over pressurized" -"48","4/6/2026","Low","Low","Low","20260325_Ch7_20cm",494,603194,2998,0.00745033937138792,53.8246011181198,0.185347503283257,"BDL","Within Range","Within Range","" +"","Site","Project","Year","Month","Sample_Date","Community","Nickname","Plot","Depth_cm","CO2_Treatment","Temp_Treatment","CO2_Conc_ppm","CO2_Conc_uM","CO2_Conc_Flag","N2O_Conc_ppm","N2O_Conc_uM","N2O_Conc_Flag","CH4_Conc_ppm","CH4_Conc_uM","CH4_Conc_Flag","QAQC_Flags","Analysis_rundate","Run_notes" +"1","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch1",5,"Ambient",0,8209.29624175049,335.536369875606,"Within Range",0.460605900373827,0.0188262217860668,"BDL",153.137542240345,6.25914981039121,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"2","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch1",20,"Ambient",0,16005.0075894455,654.168394981559,"Within Range",0.5113143347074,0.0208988140616179,"BDL",1085.67701897896,44.3745864539409,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"3","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch2",5,"Ambient",0,6293.93117524494,257.250165738724,"Within Range",0.354613834623954,0.014494036428148,"BDL",4.07770557451494,0.166666969445668,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"4","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch2",20,"Ambient",0,18091.5803007609,739.452323398665,"Within Range",0.367576893025017,0.0150238720474618,"BDL",678.553898288404,27.7343520189599,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"5","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch3",5,"Ambient",0.75,11166.8497147542,456.419662038667,"Within Range",0.310386929490913,0.0126863619622538,"BDL",173.593050800874,7.09522234136564,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"6","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch3",20,"Ambient",0.75,16206.8882836004,662.419810604767,"Within Range",0.298567670360531,0.0122032765446442,"BDL",659.371343967262,26.9503086061856,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"7","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch4",5,"Ambient",1.5,25784.7188624564,1053.89191845352,"Within Range",0.379396152155399,0.0155069574650714,"BDL",233.962783047253,9.56269826278433,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"8","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch4",20,"Ambient",1.5,21725.2705655951,887.971173834841,"Within Range",0.257009630192415,0.0105046858827264,"BDL",1665.58039191807,68.0768219324258,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"9","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch5",5,"Ambient",2.25,7207.4161851379,294.586794254631,"Within Range",0.265778757934311,0.0108631040957916,"BDL",101.225847404839,4.13737699013273,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"10","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch5",20,"Ambient",2.25,13367.7887504034,546.378054645264,"Within Range",0.163218089996483,0.00667116934298526,"BDL",1015.37203413248,41.5010296099847,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"11","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch6",5,"Ambient",2.25,8418.95817981751,344.105826200293,"Within Range",0.267685090052114,0.0109410210986318,"BDL",67.7826106098409,2.77046051634118,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"12","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch6",20,"Ambient",2.25,9481.22544020785,387.523591851917,"Within Range",0.250146834568322,0.0102241846725014,"BDL",689.146054103178,28.1672823709151,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"13","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch7",5,"Ambient",3,8278.77701389756,338.376238894319,"Within Range",0.211638925788692,0.00865026121512802,"BDL",457.058226547392,18.6812186625139,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"14","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch2",5,"Ambient",0,9409.31990962654,384.584616330175,"Within Range",0.195625735999143,0.00799575839126979,"BDL",28.6315058325836,1.17024788096682,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"15","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch8",5,"Ambient",3.75,10926.8536720694,446.610367968194,"Within Range",0.255103298074611,0.0104267688798861,"BDL",2343.47346180085,95.7841640886877,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"16","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch8",20,"Ambient",3.75,11929.7042114484,487.599609871745,"Within Range",1.11943428028671,0.0457543379676628,"BDL",3317.17070288792,135.581831027624,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"17","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch9",5,"Ambient",3.75,7642.60093633471,312.373984208767,"Within Range",0.606630940597575,0.0247946642036312,"BDL",24.9090542827447,1.01810111426609,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"18","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch9",20,"Ambient",3.75,13260.0217088811,541.973321177281,"Within Range",0.76790663776375,0.0313864426439177,"BDL",1781.23294171608,72.803857671339,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"19","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch10",5,"Ambient",4.5,9965.05020826378,407.298832207328,"Within Range",0.532283988003239,0.0217559010928608,"BDL",555.078971155422,22.6875943431738,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"20","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch10",20,"Ambient",4.5,14140.5363773879,577.962361746975,"Within Range",0.284079546265224,0.0116111073230581,"BDL",3569.13557199429,145.880323739602,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"21","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch11",5,"Ambient",5.25,8382.84173609014,342.62964845445,"Within Range",0.293611206854242,0.0120006923372595,"BDL",607.681885045179,24.8376191749838,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"22","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch11",20,"Ambient",5.25,18877.9002016575,771.591366422352,"Within Range",0.269210155746357,0.0110033547009041,"BDL",2149.73113383616,87.86538573033,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"23","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch12",5,"Ambient",6,8705.08546898618,355.800630371415,"Within Range",0.225364517036877,0.00921126363557794,"BDL",446.55104328775,18.2517613710803,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"24","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch12",20,"Ambient",6,17102.1484962295,699.011541855967,"Within Range",0.673733831144258,0.0275373427036086,"BDL",6113.56029922953,249.877915159959,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"25","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch1",5,"Ambient",0,5957.00273445974,243.478979683339,"Within Range",0.367958159448578,0.0150394554480298,"BDL",74.6408762615855,3.05077657421781,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"26","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch1",20,"Ambient",0,13438.3442960022,549.261852591843,"Within Range",0.579942290948326,0.0237038261638675,"BDL",967.5782400457,39.547566645778,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"27","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch8",20,"Ambient",3.75,8928.7571224511,364.942702046939,"Within Range",0.164743155690726,0.00673350294525748,"BDL",3029.81803274409,123.836942187608,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"28","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch9",5,"Ambient",3.75,2453.20941518516,100.26937236466,"Within Range",0.119753717710564,0.00489466167822719,"BDL",66.1714002375226,2.70460594567967,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"29","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch3",5,"Ambient",0.75,10199.2812936198,416.872496718626,"Within Range",0.566216699700141,0.0231428237434175,"BDL",210.28158556689,8.59478301123605,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"30","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch3",20,"Ambient",0.75,11860.3711844389,484.765779600529,"Within Range",0.257390896615976,0.0105202692832944,"BDL",407.769242307799,16.6666431910503,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"31","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch4",5,"Ambient",1.5,21881.0287041566,894.337434577841,"Within Range",0.295136272548485,0.0120630259395317,"BDL",280.36760267514,11.4593900453863,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"32","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch4",20,"Ambient",1.5,19805.4007208754,809.500847102724,"Within Range",0.241377706826426,0.00986576645943618,"BDL",1316.57032850009,53.8118269461621,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"33","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch5",5,"Ambient",2.25,3396.67220318761,138.831274588274,"Within Range",0.559353904076048,0.0228623225331926,"BDL",99.2469673228126,4.05649475375232,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"34","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch5",20,"Ambient",2.25,5004.98521329559,204.567422139001,"Within Range",-0.00606420206446661,-0.000247860509230376,"BDL",363.648877142894,14.8633233047817,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"35","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch8",5,"Ambient",3.75,8869.45627997902,362.518914571412,"Within Range",0.212020192212253,0.00866584461569607,"BDL",2410.32561955127,98.516594454137,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"36","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch6",20,"Ambient",2.25,2557.61308210511,104.536635521989,"Within Range",0.12852284545246,0.00525307989129242,"BDL",163.120183380805,6.66716763206582,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"37","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch7",5,"Ambient",3,2453.2181060756,100.269727585101,"Within Range",0.0480756300811525,0.00196498237143318,"BDL",237.281614960213,9.69834799200698,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"38","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch7",20,"Ambient",3,12731.4736185934,520.370116432656,"Within Range",0.281029414876739,0.0114864401185137,"BDL",2508.64049992706,102.534992267372,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"39","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch10",5,"Ambient",4.5,4289.74520838794,175.333608695165,"Within Range",0.131191710417385,0.00536216369526879,"BDL",462.262795549252,18.8939436194682,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"40","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch10",20,"Ambient",4.5,11068.6165800504,452.404605394424,"Within Range",1.9296254303532,0.0788690641747759,"Within Range",3719.80008268205,152.038393992708,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"41","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch9",20,"Ambient",3.75,3027.72362503827,123.751338021556,"Within Range",0.101071662956089,0.00413107505039258,"BDL",488.914764284052,19.9832824100252,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"42","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch12",20,"Ambient",6,10741.9984322969,439.05482918884,"Within Range",0.236039976896576,0.00964759885148343,"BDL",4350.25395548695,177.806766533478,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"43","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch11",5,"Ambient",5.25,1312.07097254457,53.6279259734554,"Within Range",-0.00606420206446661,-0.000247860509230376,"BDL",84.824510176685,3.46700951981876,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"44","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch6",5,"Ambient",2.25,1723.87064423068,70.4593038266269,"Within Range",0.119753717710564,0.00489466167822719,"BDL",12.1500983120938,0.496607719007393,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"45","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch11",20,"Ambient",5.25,1250.51435798192,51.1119389285319,"Within Range",0.234896177625894,0.00960084864977927,"BDL",99.5623462293618,4.06938515145787,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"46","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch12",5,"Ambient",6,731.255873075213,29.8884257403232,"Within Range",0.0381627030685743,0.0015598139566638,"BDL",163.143060607187,6.66810268682166,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"47","GCReW","GENX","2026","March & April",2026-04-01,"SCAM, SPPA, DISP","GENX","Ch2",20,"Ambient",0,375.133117360407,15.3327155839598,"BDL",-0.00606420206446661,-0.000247860509230376,"BDL",2.29374647576685,0.0937516862870162,"BDL","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" +"48","GCReW","GENX","2026","March & April",2026-03-25,"SCAM, SPPA, DISP","GENX","Ch7",20,"Ambient",3,1316.88286380553,53.8246011181198,"Within Range",0.182281411174518,0.00745033937138792,"BDL",4.53474704600629,0.185347503283257,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range","4/6/2026","" diff --git a/GENX (WIP)/Porewater/CH4/2026/Processed Data/GCReW_GENX_Porewater_CH4_20260513.csv b/GENX (WIP)/Porewater/CH4/2026/Processed Data/GCReW_GENX_Porewater_CH4_20260513.csv new file mode 100644 index 0000000..a0e2afa --- /dev/null +++ b/GENX (WIP)/Porewater/CH4/2026/Processed Data/GCReW_GENX_Porewater_CH4_20260513.csv @@ -0,0 +1,26 @@ +"","Site","Project","Year","Month","Sample_Date","Community","Nickname","Plot","Depth_cm","CO2_Treatment","Temp_Treatment","CO2_Conc_ppm","CO2_Conc_uM","CO2_Conc_Flag","N2O_Conc_ppm","N2O_Conc_uM","N2O_Conc_Flag","CH4_Conc_ppm","CH4_Conc_uM","CH4_Conc_Flag","QAQC_Flags","Analysis_rundate","Run_notes" +"1","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch1",5,"Ambient",0,18992.0388108379,776.256523271276,"Within Range",0.826863625657559,0.0337961758432243,"BDL",209.77762513805,8.57418477140226,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"2","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch1",20,"Ambient",0,17561.119548515,717.770942933327,"Within Range",0.942933197641396,0.0385402564184147,"BDL",846.393353879382,34.5944092019963,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"3","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch2",5,"Ambient",0,13705.3719415704,560.176002137904,"Within Range",0.785144669179383,0.0320910080919992,"BDL",40.2423055742433,1.64481299372956,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"4","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch2",20,"Ambient",0,16069.1412374258,656.789712424188,"Within Range",0.7958842025302,0.032529962166572,"BDL",482.413135099162,19.7175430590829,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"5","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch3",5,"Ambient",0.75,19072.2006396499,779.532956262615,"Within Range",0.0234639192213919,0.000959034495376127,"BDL",245.661355266981,10.0408508765701,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"6","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch3",20,"Ambient",0.75,14674.5091242756,599.787287030099,"Within Range",0.20273151438504,0.0082861909709371,"BDL",334.961411916899,13.6907882104932,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"7","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch4",5,"Ambient",1.5,26399.8844999884,1079.03541904252,"Within Range",0.206862104135355,0.0084550194611574,"BDL",272.116685194725,11.1221525017535,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"8","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch4",20,"Ambient",1.5,21159.6039456027,864.850833352211,"Within Range",0.315083555593594,0.0128783259049292,"BDL",1036.814905279,42.3774583478858,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"9","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch5",5,"Ambient",2.25,16034.0644572367,655.356028568106,"Within Range",0.568288707287872,0.0232275123554335,"BDL",120.245875066147,4.91477749420424,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"10","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch5",20,"Ambient",2.25,14696.8076611635,600.698689165013,"Within Range",0.693445576722401,0.0283430156091086,"BDL",553.659707955775,22.6295851779684,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"11","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch6",5,"Ambient",2.25,17794.189730901,727.297158167994,"Within Range",0.191991981034223,0.00784723689636432,"BDL",16.9106088611348,0.691182793574219,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"12","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch6",20,"Ambient",2.25,13789.3705922197,563.609256522121,"Within Range",0.218840814411267,0.00894462208279626,"BDL",601.052005505168,24.5666378815748,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"13","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch7",5,"Ambient",3,19585.4975541116,800.51280377633,"Within Range",0.315909673543657,0.0129120916029733,"BDL",266.077435487381,10.8753118635428,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"14","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch7",20,"Ambient",3,16385.0571102831,669.70205741005,"Within Range",0.253537768313909,0.0103627814006468,"BDL",1677.69582241628,68.5720126831473,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"15","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch8",5,"Ambient",3.75,15310.0820104851,625.764887636774,"Within Range",0.564571176512589,0.0230755667142353,"BDL",1628.1540187403,66.5471037904719,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"16","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch8",20,"Ambient",3.75,19229.4098695729,785.958527074767,"Within Range",0.442718778878312,0.0180951262527365,"BDL",4140.90638640334,169.250159328179,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"17","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch9",5,"Ambient",3.75,16174.8499847061,661.110317782068,"Within Range",0.286995545291456,0.0117302921714312,"BDL",20.0156389542971,0.818093858193327,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"18","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch9",20,"Ambient",3.75,14847.9554780341,606.876513462482,"Within Range",0.232058701612273,0.00948487325150122,"BDL",1199.60236532662,49.0310266681346,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"19","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch10",5,"Ambient",4.5,18321.4226329093,748.846607573793,"Within Range",0.0234639192213919,0.000959034495376127,"BDL",565.281585297938,23.1046030625341,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"20","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch10",20,"Ambient",4.5,17564.9085296811,717.925808947241,"Within Range",0.260972829864475,0.0106666726830433,"BDL",3424.00973254087,139.94863411465,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"21","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch11",5,"Ambient",5.25,11552.0202702456,472.162635147042,"Within Range",0.25684224011416,0.010497844192823,"BDL",151.510957491143,6.19266684693488,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"22","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch11",20,"Ambient",5.25,13374.0944291621,546.635784966843,"Within Range",0.16555620663221,0.00676673455895441,"BDL",1945.54694777306,79.5198200983839,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"23","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch12",5,"Ambient",6,17686.0458934521,722.877024020869,"Within Range",0.139533491205229,0.00570311507056652,"BDL",325.937206809538,13.3219442884847,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"24","GCReW","GENX","2026","May",2026-05-05,"SCAM, SPPA, DISP","GENX","Ch12",20,"Ambient",6,21673.5419250597,885.856882944037,"Within Range",0.254363886263972,0.0103965470986908,"BDL",9092.50261130928,371.635427622556,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" +"25","GCReW","GENX","2026","May",2026-04-14,"SCAM, SPPA, DISP","GENX","Ch12",20,"Ambient",6,17784.5785400391,726.904322534215,"Within Range",0.229993406737116,0.00940045900639107,"BDL",7256.59775936264,296.596979585282,"Within Range","; CH4 Check Standards out Of Range; CO2 Check Standards out Of Range; N2O Check Standards out Of Range","5/13/2026","" diff --git a/GENX (WIP)/Porewater/CH4/2026/Processed Data/ShimadzuGC_Slope_QAQC - Copy.csv b/GENX (WIP)/Porewater/CH4/2026/Processed Data/ShimadzuGC_Slope_QAQC - Copy.csv new file mode 100644 index 0000000..e44774b --- /dev/null +++ b/GENX (WIP)/Porewater/CH4/2026/Processed Data/ShimadzuGC_Slope_QAQC - Copy.csv @@ -0,0 +1,81 @@ +,Analysis,Run_Date,Run_by,Curve_top,curve,slope,intercept,R2 +1,CH4,7/9/2024,Alia Al-Haj,10 ppm,Slope_CH4_low,0.001594508,-0.209011794,0.996021498 +2,CH4,7/9/2024,Alia Al-Haj,100 ppm,Slope_CH4_high,0.001562326,0.096462426,0.99965305 +3,N2O,7/9/2024,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000192023,0.07848462,0.994078525 +4,N2O,7/9/2024,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000282245,-0.4992549,0.996064359 +5,CO2,7/9/2024,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.000282245,-0.4992549,NA +6,CO2,7/9/2024,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.001549502,38.64567509,0.99969067 +7,CO2,7/9/2024,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.001589347,-22.53271377,0.998033031 +8,CO2,7/9/2024,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.001549502,38.64567509,0.99969067 +9,CH4,7/9/2024,Alia Al-Haj,10 ppm,Slope_CH4_low,0.001594508,-0.209011794,0.996021498 +10,CH4,7/9/2024,Alia Al-Haj,100 ppm,Slope_CH4_high,0.001562326,0.096462426,0.99965305 +11,N2O,7/9/2024,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000192023,0.07848462,0.994078525 +12,N2O,7/9/2024,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000282245,-0.4992549,0.996064359 +13,CO2,7/9/2024,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.001589347,-22.53271377,0.998033031 +14,CO2,7/9/2024,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.001549502,38.64567509,0.99969067 +15,CH4,6/3/2025,Alia Al-Haj,10 ppm,Slope_CH4_low,0.001635071,-0.415802812,0.998936972 +16,CH4,6/3/2025,Alia Al-Haj,100 ppm,Slope_CH4_high,0.001610517,-0.260179312,0.999589693 +17,N2O,6/3/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000332544,0.02720789,0.998943899 +18,N2O,6/3/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000374813,-0.364855129,0.999519714 +19,CO2,6/3/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.00436988,-39.16440688,0.999556381 +20,CO2,6/3/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.005427037,-410.701602,0.997695695 +21,CH4,9/23/2025,Alia Al-Haj,10 ppm,Slope_CH4_low,0.001699272,-0.36364615,0.999365585 +22,CH4,9/23/2025,Alia Al-Haj,100 ppm,Slope_CH4_high,0.001645721,-0.302217089,0.999820016 +23,N2O,9/23/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000307201,-0.129813571,0.996864375 +24,N2O,9/23/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.00039424,-1.239997568,0.996491404 +25,CO2,9/23/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.014290722,-133.2216274,0.992711707 +26,CO2,9/23/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.019925561,-758.9107959,0.993153873 +27,CH4,9/24/2025,Alia Al-Haj,10 ppm,Slope_CH4_low,0.001699272,-0.36364615,0.999365585 +28,CH4,9/24/2025,Alia Al-Haj,100 ppm,Slope_CH4_high,0.001645721,-0.302217089,0.999820016 +29,N2O,9/24/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000307201,-0.129813571,0.996864375 +30,N2O,9/24/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.00039424,-1.239997568,0.996491404 +31,CO2,9/24/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.014290722,-133.2216274,0.992711707 +32,CO2,9/24/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.019925561,-758.9107959,0.993153873 +33,CH4,9/24/2025,Alia Al-Haj,10 ppm,Slope_CH4_low,0.001696157,-0.374152258,0.998989143 +34,CH4,9/24/2025,Alia Al-Haj,100 ppm,Slope_CH4_high,0.001674034,-0.444470486,0.999847769 +35,N2O,9/24/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.00030473,-0.128294418,0.996339544 +36,N2O,9/24/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000390151,-1.194079817,0.995910931 +37,CO2,9/24/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.030108212,-111.5177493,0.997665945 +38,CO2,9/24/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.03615844,-461.2407842,0.997105868 +39,CH4,9/30/2025,Alia Al-Haj,10 ppm,Slope_CH4_low,0.001651161,-0.418451745,0.999069805 +40,CH4,9/30/2025,Alia Al-Haj,100 ppm,Slope_CH4_high,0.001653724,-0.733668141,0.99965238 +41,N2O,9/30/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000338477,-0.110108749,0.997794532 +42,N2O,9/30/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000432669,-1.385832789,0.995237819 +43,CO2,9/30/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.112693619,-328.4347803,0.924017275 +44,CO2,9/30/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.164084335,-1184.21134,0.992753219 +45,CH4,10/2/2025,Alia Al-Haj,10 ppm,Slope_CH4_low,0.001579414,-0.579743712,0.99556935 +46,CH4,10/2/2025,Alia Al-Haj,100 ppm,Slope_CH4_high,0.001609223,-0.93744807,0.999588886 +47,N2O,10/2/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000342319,-0.113011403,0.996718446 +48,N2O,10/2/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000430913,-1.093446824,0.998159291 +49,CO2,10/2/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.007639638,-84.45916741,0.990777611 +50,CO2,10/2/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.009554308,-523.2397059,0.99603398 +51,CH4,10/7/2025,Alia Al-Haj,10 ppm,Slope_CH4_low,0.00165936,-0.312663578,0.999071246 +52,CH4,10/7/2025,Alia Al-Haj,100 ppm,Slope_CH4_high,0.001646187,-0.137654017,0.999539695 +53,N2O,10/7/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000336766,-0.06088351,0.998663728 +54,N2O,10/7/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000430927,-1.058115228,0.997680069 +55,CO2,10/7/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.015447726,-97.53592352,0.99373914 +56,CO2,10/7/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.021712672,-679.3005284,0.995487146 +57,CH4,10/8/2025,Alia Al-Haj,10 ppm,Slope_CH4_low,0.001688226,-0.341546607,0.998896003 +58,CH4,10/8/2025,Alia Al-Haj,100 ppm,Slope_CH4_high,0.001673795,-5.829652752,0.999908126 +59,N2O,10/8/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000376812,-0.053248093,0.994890434 +60,N2O,10/8/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000686765,-14.1991256,0.978836198 +61,CO2,10/8/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.027385279,-68.87873048,0.998032791 +62,CO2,10/8/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.03698406,-969.5293802,0.991611983 +63,CH4,10/8/2025,Alia Al-Haj,10 ppm,Slope_CH4_low,0.001688226,-0.341546607,0.998896003 +64,CH4,10/8/2025,Alia Al-Haj,100 ppm,Slope_CH4_high,0.001673795,-5.829652752,0.999908126 +65,N2O,10/8/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000376812,-0.053248093,0.994890434 +66,N2O,10/8/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000686765,-14.1991256,0.978836198 +67,CO2,10/8/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.027385279,-68.87873048,0.998032791 +68,CO2,10/8/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.03698406,-969.5293802,0.991611983 +69,CH4,4/17/2026,Melanie Giessner,1006 ppm,Slope_Ch4_high,0.001638279,-1.299113367,0.999758978 +70,CH4,5/1/2026,Melanie Giessner,1006 ppm,Slope_Ch4_high,0.001660593,-0.887510807,0.999759399 +71,CH4,4/17/2026,Melanie Giessner,10 ppm,Slope_Ch4_low,0.001625316,-0.404115804,0.998255093 +72,CH4,5/1/2026,Melanie Giessner,10 ppm,Slope_Ch4_low,0.001647438,-0.249557906,0.995051473 +73,CO2,4/17/2026,Melanie Giessner,50100 ppm,Slope_CO2_high,0.003030242,-2361.643922,0.990992597 +74,CO2,5/1/2026,Melanie Giessner,50100 ppm,Slope_CO2_high,0.003316714,-2251.481375,0.991163753 +75,CO2,4/17/2026,Melanie Giessner,2000 ppm,Slope_CO2_low,0.002299249,-77.47054427,0.985266372 +76,CO2,5/1/2026,Melanie Giessner,2000 ppm,Slope_CO2_low,0.002476474,-68.93842628,0.991306453 +77,N2O,4/17/2026,Melanie Giessner,500 ppm,Slope_N2O_high,0.000644078,-26.70949765,0.988891523 +78,N2O,5/1/2026,Melanie Giessner,500 ppm,Slope_N2O_high,0.000828482,-14.5876556,0.99587692 +79,N2O,4/17/2026,Melanie Giessner,5 ppm,Slope_N2O_low,0.000317344,-0.20138645,0.996257109 +80,N2O,5/1/2026,Melanie Giessner,5 ppm,Slope_N2O_low,0.000499973,-0.01867337,0.999019434 diff --git a/GENX (WIP)/Porewater/CH4/2026/Processed Data/ShimadzuGC_Slope_QAQC.csv b/GENX (WIP)/Porewater/CH4/2026/Processed Data/ShimadzuGC_Slope_QAQC.csv index 3ddabac..d4027f3 100644 --- a/GENX (WIP)/Porewater/CH4/2026/Processed Data/ShimadzuGC_Slope_QAQC.csv +++ b/GENX (WIP)/Porewater/CH4/2026/Processed Data/ShimadzuGC_Slope_QAQC.csv @@ -1,86 +1,74 @@ -"","Analysis","Run_Date","Run_by","Curve_top","curve","slope","intercept","R2" -"1","CH4",NA,"Alia Al-Haj","10 ppm","Slope_Ch4_low",0.001594508,-0.209011794,0.996021498 -"2","CH4",NA,"Alia Al-Haj","100 ppm","Slope_Ch4_high",0.001562326,0.096462426,0.99965305 -"3","N2O",NA,"Alia Al-Haj","5 ppm","Slope_N2O_low",0.000192023,0.07848462,0.994078525 -"4","N2O",NA,"Alia Al-Haj","50.2 ppm","Slope_N2O_high",0.000282245,-0.4992549,0.996064359 -"5","CO2",NA,"Alia Al-Haj","2000 ppm","Slope_CO2_low",0.000282245,-0.4992549,NA -"6","CO2",NA,"Alia Al-Haj","20000 ppm","Slope_CO2_high",0.001549502,38.64567509,0.99969067 -"7","CO2",NA,"Alia Al-Haj","2000 ppm","Slope_CO2_low",0.001589347,-22.53271377,0.998033031 -"8","CH4",NA,"Alia Al-Haj","10 ppm","Slope_Ch4_low",0.001635071,-0.415802812,0.998936972 -"9","CH4",NA,"Alia Al-Haj","100 ppm","Slope_Ch4_high",0.001610517,-0.260179312,0.999589693 -"10","N2O",NA,"Alia Al-Haj","5 ppm","Slope_N2O_low",0.000332544,0.02720789,0.998943899 -"11","N2O",NA,"Alia Al-Haj","50.2 ppm","Slope_N2O_high",0.000374813,-0.364855129,0.999519714 -"12","CO2",NA,"Alia Al-Haj","2000 ppm","Slope_CO2_low",0.00436988,-39.16440688,0.999556381 -"13","CO2",NA,"Alia Al-Haj","20000 ppm","Slope_CO2_high",0.005427037,-410.701602,0.997695695 -"14","CH4",NA,"Alia Al-Haj","10 ppm","Slope_Ch4_low",0.001699272,-0.36364615,0.999365585 -"15","CH4",NA,"Alia Al-Haj","100 ppm","Slope_Ch4_high",0.001645721,-0.302217089,0.999820016 -"16","N2O",NA,"Alia Al-Haj","5 ppm","Slope_N2O_low",0.000307201,-0.129813571,0.996864375 -"17","N2O",NA,"Alia Al-Haj","50.2 ppm","Slope_N2O_high",0.00039424,-1.239997568,0.996491404 -"18","CO2",NA,"Alia Al-Haj","2000 ppm","Slope_CO2_low",0.014290722,-133.2216274,0.992711707 -"19","CO2",NA,"Alia Al-Haj","20000 ppm","Slope_CO2_high",0.019925561,-758.9107959,0.993153873 -"20","CH4",NA,"Alia Al-Haj","10 ppm","Slope_Ch4_low",0.001696157,-0.374152258,0.998989143 -"21","CH4",NA,"Alia Al-Haj","100 ppm","Slope_Ch4_high",0.001674034,-0.444470486,0.999847769 -"22","N2O",NA,"Alia Al-Haj","5 ppm","Slope_N2O_low",0.00030473,-0.128294418,0.996339544 -"23","N2O",NA,"Alia Al-Haj","50.2 ppm","Slope_N2O_high",0.000390151,-1.194079817,0.995910931 -"24","CO2",NA,"Alia Al-Haj","2000 ppm","Slope_CO2_low",0.030108212,-111.5177493,0.997665945 -"25","CO2",NA,"Alia Al-Haj","20000 ppm","Slope_CO2_high",0.03615844,-461.2407842,0.997105868 -"26","CH4",NA,"Alia Al-Haj","10 ppm","Slope_Ch4_low",0.001651161,-0.418451745,0.999069805 -"27","CH4",NA,"Alia Al-Haj","100 ppm","Slope_Ch4_high",0.001653724,-0.733668141,0.99965238 -"28","N2O",NA,"Alia Al-Haj","5 ppm","Slope_N2O_low",0.000338477,-0.110108749,0.997794532 -"29","N2O",NA,"Alia Al-Haj","50.2 ppm","Slope_N2O_high",0.000432669,-1.385832789,0.995237819 -"30","CO2",NA,"Alia Al-Haj","2000 ppm","Slope_CO2_low",0.112693619,-328.4347803,0.924017275 -"31","CO2",NA,"Alia Al-Haj","20000 ppm","Slope_CO2_high",0.164084335,-1184.21134,0.992753219 -"32","CH4",NA,"Alia Al-Haj","10 ppm","Slope_Ch4_low",0.001579414,-0.579743712,0.99556935 -"33","CH4",NA,"Alia Al-Haj","100 ppm","Slope_Ch4_high",0.001609223,-0.93744807,0.999588886 -"34","N2O",NA,"Alia Al-Haj","5 ppm","Slope_N2O_low",0.000342319,-0.113011403,0.996718446 -"35","N2O",NA,"Alia Al-Haj","50.2 ppm","Slope_N2O_high",0.000430913,-1.093446824,0.998159291 -"36","CO2",NA,"Alia Al-Haj","2000 ppm","Slope_CO2_low",0.007639638,-84.45916741,0.990777611 -"37","CO2",NA,"Alia Al-Haj","20000 ppm","Slope_CO2_high",0.009554308,-523.2397059,0.99603398 -"38","CH4",NA,"Alia Al-Haj","10 ppm","Slope_Ch4_low",0.00165936,-0.312663578,0.999071246 -"39","CH4",NA,"Alia Al-Haj","100 ppm","Slope_Ch4_high",0.001646187,-0.137654017,0.999539695 -"40","N2O",NA,"Alia Al-Haj","5 ppm","Slope_N2O_low",0.000336766,-0.06088351,0.998663728 -"41","N2O",NA,"Alia Al-Haj","50.2 ppm","Slope_N2O_high",0.000430927,-1.058115228,0.997680069 -"42","CO2",NA,"Alia Al-Haj","2000 ppm","Slope_CO2_low",0.015447726,-97.53592352,0.99373914 -"43","CO2",NA,"Alia Al-Haj","20000 ppm","Slope_CO2_high",0.021712672,-679.3005284,0.995487146 -"44","CH4",NA,"Alia Al-Haj","10 ppm","Slope_Ch4_low",0.001688226,-0.341546607,0.998896003 -"45","CH4",NA,"Alia Al-Haj","100 ppm","Slope_Ch4_high",0.001673795,-5.829652752,0.999908126 -"46","N2O",NA,"Alia Al-Haj","5 ppm","Slope_N2O_low",0.000376812,-0.053248093,0.994890434 -"47","N2O",NA,"Alia Al-Haj","50.2 ppm","Slope_N2O_high",0.000686765,-14.1991256,0.978836198 -"48","CO2",NA,"Alia Al-Haj","2000 ppm","Slope_CO2_low",0.027385279,-68.87873048,0.998032791 -"49","CO2",NA,"Alia Al-Haj","20000 ppm","Slope_CO2_high",0.03698406,-969.5293802,0.991611983 -"50","CH4",NA,"Melanie Giessner","1006 ppm","Slope_Ch4_high",0.00163827853907655,-1.29911336693767,0.999758978498107 -"51","CH4",NA,"Melanie Giessner","1006 ppm","Slope_Ch4_high",0.00166059310119176,-0.887510807353799,0.999759398782963 -"52","CH4",NA,"Melanie Giessner","10 ppm","Slope_Ch4_low",0.00162531566412859,-0.404115803545286,0.998255092920635 -"53","CH4",NA,"Melanie Giessner","10 ppm","Slope_Ch4_low",0.001647438270003,-0.249557905607749,0.995051472554768 -"54","CO2",NA,"Melanie Giessner","50100 ppm","Slope_CO2_high",0.00303024201185944,-2361.64392240232,0.990992596749143 -"55","CO2",NA,"Melanie Giessner","50100 ppm","Slope_CO2_high",0.003316713728449,-2251.48137475922,0.99116375263879 -"56","CO2",NA,"Melanie Giessner","2000 ppm","Slope_CO2_low",0.00229924941233948,-77.4705442683676,0.985266371742737 -"57","CO2",NA,"Melanie Giessner","2000 ppm","Slope_CO2_low",0.00247647434485168,-68.9384262763201,0.991306452816991 -"58","N2O",NA,"Melanie Giessner","500 ppm","Slope_N2O_high",0.000644077772770428,-26.7094976529205,0.98889152320231 -"59","N2O",NA,"Melanie Giessner","500 ppm","Slope_N2O_high",0.000828481814375763,-14.5876555955748,0.995876920382143 -"60","N2O",NA,"Melanie Giessner","5 ppm","Slope_N2O_low",0.000317344020435228,-0.201386449831287,0.996257109013672 -"61","N2O",NA,"Melanie Giessner","5 ppm","Slope_N2O_low",0.000499972753593854,-0.0186733696828502,0.999019433709326 -"62","CH4",NA,"Melanie Giessner","1006 ppm","Slope_Ch4_high",0.00163827853907655,-1.29911336693767,0.999758978498107 -"63","CH4",NA,"Melanie Giessner","1006 ppm","Slope_Ch4_high",0.00166059310119176,-0.887510807353799,0.999759398782963 -"64","CH4",NA,"Melanie Giessner","10 ppm","Slope_Ch4_low",0.00162531566412859,-0.404115803545286,0.998255092920635 -"65","CH4",NA,"Melanie Giessner","10 ppm","Slope_Ch4_low",0.001647438270003,-0.249557905607749,0.995051472554768 -"66","CO2",NA,"Melanie Giessner","50100 ppm","Slope_CO2_high",0.00303024201185944,-2361.64392240232,0.990992596749143 -"67","CO2",NA,"Melanie Giessner","50100 ppm","Slope_CO2_high",0.003316713728449,-2251.48137475922,0.99116375263879 -"68","CO2",NA,"Melanie Giessner","2000 ppm","Slope_CO2_low",0.00229924941233948,-77.4705442683676,0.985266371742737 -"69","CO2",NA,"Melanie Giessner","2000 ppm","Slope_CO2_low",0.00247647434485168,-68.9384262763201,0.991306452816991 -"70","N2O",NA,"Melanie Giessner","500 ppm","Slope_N2O_high",0.000644077772770428,-26.7094976529205,0.98889152320231 -"71","N2O",NA,"Melanie Giessner","500 ppm","Slope_N2O_high",0.000828481814375763,-14.5876555955748,0.995876920382143 -"72","N2O",NA,"Melanie Giessner","5 ppm","Slope_N2O_low",0.000317344020435228,-0.201386449831287,0.996257109013672 -"73","N2O",NA,"Melanie Giessner","5 ppm","Slope_N2O_low",0.000499972753593854,-0.0186733696828502,0.999019433709326 -"74","CH4",2026-04-17,"Melanie Giessner","1006 ppm","Slope_Ch4_high",0.00163827853907655,-1.29911336693767,0.999758978498107 -"75","CH4",2026-05-01,"Melanie Giessner","1006 ppm","Slope_Ch4_high",0.00166059310119176,-0.887510807353799,0.999759398782963 -"76","CH4",2026-04-17,"Melanie Giessner","10 ppm","Slope_Ch4_low",0.00162531566412859,-0.404115803545286,0.998255092920635 -"77","CH4",2026-05-01,"Melanie Giessner","10 ppm","Slope_Ch4_low",0.001647438270003,-0.249557905607749,0.995051472554768 -"78","CO2",2026-04-17,"Melanie Giessner","50100 ppm","Slope_CO2_high",0.00303024201185944,-2361.64392240232,0.990992596749143 -"79","CO2",2026-05-01,"Melanie Giessner","50100 ppm","Slope_CO2_high",0.003316713728449,-2251.48137475922,0.99116375263879 -"80","CO2",2026-04-17,"Melanie Giessner","2000 ppm","Slope_CO2_low",0.00229924941233948,-77.4705442683676,0.985266371742737 -"81","CO2",2026-05-01,"Melanie Giessner","2000 ppm","Slope_CO2_low",0.00247647434485168,-68.9384262763201,0.991306452816991 -"82","N2O",2026-04-17,"Melanie Giessner","500 ppm","Slope_N2O_high",0.000644077772770428,-26.7094976529205,0.98889152320231 -"83","N2O",2026-05-01,"Melanie Giessner","500 ppm","Slope_N2O_high",0.000828481814375763,-14.5876555955748,0.995876920382143 -"84","N2O",2026-04-17,"Melanie Giessner","5 ppm","Slope_N2O_low",0.000317344020435228,-0.201386449831287,0.996257109013672 -"85","N2O",2026-05-01,"Melanie Giessner","5 ppm","Slope_N2O_low",0.000499972753593854,-0.0186733696828502,0.999019433709326 +,Analysis,Run_Date,Run_by,Curve_top,curve,slope,intercept,R2 +1,CH4,7/9/2024,Alia Al-Haj,10 ppm,Slope_Ch4_low,0.001594508,-0.209011794,0.996021498 +2,CH4,7/9/2024,Alia Al-Haj,100 ppm,Slope_Ch4_high,0.001562326,0.096462426,0.99965305 +3,N2O,7/9/2024,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000192023,0.07848462,0.994078525 +4,N2O,7/9/2024,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000282245,-0.4992549,0.996064359 +5,CO2,7/9/2024,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.000282245,-0.4992549,NA +6,CO2,7/9/2024,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.001549502,38.64567509,0.99969067 +7,CO2,7/9/2024,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.001589347,-22.53271377,0.998033031 +8,CH4,6/3/2025,Alia Al-Haj,10 ppm,Slope_Ch4_low,0.001635071,-0.415802812,0.998936972 +9,CH4,6/3/2025,Alia Al-Haj,100 ppm,Slope_Ch4_high,0.001610517,-0.260179312,0.999589693 +10,N2O,6/3/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000332544,0.02720789,0.998943899 +11,N2O,6/3/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000374813,-0.364855129,0.999519714 +12,CO2,6/3/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.00436988,-39.16440688,0.999556381 +13,CO2,6/3/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.005427037,-410.701602,0.997695695 +14,CH4,9/23/2025,Alia Al-Haj,10 ppm,Slope_Ch4_low,0.001699272,-0.36364615,0.999365585 +15,CH4,9/23/2025,Alia Al-Haj,100 ppm,Slope_Ch4_high,0.001645721,-0.302217089,0.999820016 +16,N2O,9/23/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000307201,-0.129813571,0.996864375 +17,N2O,9/23/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.00039424,-1.239997568,0.996491404 +18,CO2,9/23/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.014290722,-133.2216274,0.992711707 +19,CO2,9/23/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.019925561,-758.9107959,0.993153873 +20,CH4,9/24/2025,Alia Al-Haj,10 ppm,Slope_Ch4_low,0.001699272,-0.36364615,0.999365585 +21,CH4,9/24/2025,Alia Al-Haj,100 ppm,Slope_Ch4_high,0.001645721,-0.302217089,0.999820016 +22,N2O,9/24/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000307201,-0.129813571,0.996864375 +23,N2O,9/24/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.00039424,-1.239997568,0.996491404 +24,CO2,9/24/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.014290722,-133.2216274,0.992711707 +25,CO2,9/24/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.019925561,-758.9107959,0.993153873 +26,CH4,9/24/2025,Alia Al-Haj,10 ppm,Slope_Ch4_low,0.001696157,-0.374152258,0.998989143 +27,CH4,9/24/2025,Alia Al-Haj,100 ppm,Slope_Ch4_high,0.001674034,-0.444470486,0.999847769 +28,N2O,9/24/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.00030473,-0.128294418,0.996339544 +29,N2O,9/24/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000390151,-1.194079817,0.995910931 +30,CO2,9/24/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.030108212,-111.5177493,0.997665945 +31,CO2,9/24/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.03615844,-461.2407842,0.997105868 +32,CH4,9/30/2025,Alia Al-Haj,10 ppm,Slope_Ch4_low,0.001651161,-0.418451745,0.999069805 +33,CH4,9/30/2025,Alia Al-Haj,100 ppm,Slope_Ch4_high,0.001653724,-0.733668141,0.99965238 +34,N2O,9/30/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000338477,-0.110108749,0.997794532 +35,N2O,9/30/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000432669,-1.385832789,0.995237819 +36,CO2,9/30/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.112693619,-328.4347803,0.924017275 +37,CO2,9/30/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.164084335,-1184.21134,0.992753219 +38,CH4,10/2/2025,Alia Al-Haj,10 ppm,Slope_Ch4_low,0.001579414,-0.579743712,0.99556935 +39,CH4,10/2/2025,Alia Al-Haj,100 ppm,Slope_Ch4_high,0.001609223,-0.93744807,0.999588886 +40,N2O,10/2/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000342319,-0.113011403,0.996718446 +41,N2O,10/2/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000430913,-1.093446824,0.998159291 +42,CO2,10/2/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.007639638,-84.45916741,0.990777611 +43,CO2,10/2/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.009554308,-523.2397059,0.99603398 +44,CH4,10/7/2025,Alia Al-Haj,10 ppm,Slope_Ch4_low,0.00165936,-0.312663578,0.999071246 +45,CH4,10/7/2025,Alia Al-Haj,100 ppm,Slope_Ch4_high,0.001646187,-0.137654017,0.999539695 +46,N2O,10/7/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000336766,-0.06088351,0.998663728 +47,N2O,10/7/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000430927,-1.058115228,0.997680069 +48,CO2,10/7/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.015447726,-97.53592352,0.99373914 +49,CO2,10/7/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.021712672,-679.3005284,0.995487146 +50,CH4,10/8/2025,Alia Al-Haj,10 ppm,Slope_Ch4_low,0.001688226,-0.341546607,0.998896003 +51,CH4,10/8/2025,Alia Al-Haj,100 ppm,Slope_Ch4_high,0.001673795,-5.829652752,0.999908126 +52,N2O,10/8/2025,Alia Al-Haj,5 ppm,Slope_N2O_low,0.000376812,-0.053248093,0.994890434 +53,N2O,10/8/2025,Alia Al-Haj,50.2 ppm,Slope_N2O_high,0.000686765,-14.1991256,0.978836198 +54,CO2,10/8/2025,Alia Al-Haj,2000 ppm,Slope_CO2_low,0.027385279,-68.87873048,0.998032791 +55,CO2,10/8/2025,Alia Al-Haj,20000 ppm,Slope_CO2_high,0.03698406,-969.5293802,0.991611983 +56,CH4,4/17/2026,Melanie Giessner,1006 ppm,Slope_Ch4_high,0.001638279,-1.299113367,0.999758978 +57,CH4,5/1/2026,Melanie Giessner,1006 ppm,Slope_Ch4_high,0.001660593,-0.887510807,0.999759399 +58,CH4,4/17/2026,Melanie Giessner,10 ppm,Slope_Ch4_low,0.001625316,-0.404115804,0.998255093 +59,CH4,5/1/2026,Melanie Giessner,10 ppm,Slope_Ch4_low,0.001647438,-0.249557906,0.995051473 +60,CO2,4/17/2026,Melanie Giessner,50100 ppm,Slope_CO2_high,0.003030242,-2361.643922,0.990992597 +61,CO2,5/1/2026,Melanie Giessner,50100 ppm,Slope_CO2_high,0.003316714,-2251.481375,0.991163753 +62,CO2,4/17/2026,Melanie Giessner,2000 ppm,Slope_CO2_low,0.002299249,-77.47054427,0.985266372 +63,CO2,5/1/2026,Melanie Giessner,2000 ppm,Slope_CO2_low,0.002476474,-68.93842628,0.991306453 +64,N2O,4/17/2026,Melanie Giessner,500 ppm,Slope_N2O_high,0.000644078,-26.70949765,0.988891523 +65,N2O,5/1/2026,Melanie Giessner,500 ppm,Slope_N2O_high,0.000828482,-14.5876556,0.99587692 +66,N2O,4/17/2026,Melanie Giessner,5 ppm,Slope_N2O_low,0.000317344,-0.20138645,0.996257109 +67,N2O,5/1/2026,Melanie Giessner,5 ppm,Slope_N2O_low,0.000499973,-0.01867337,0.999019434 +68,CH4,5/13/2026,Melanie Giessner,10000 ppm,Slope_Ch4_high,0.001691193,-15.37764524,0.999557975 +69,CH4,5/13/2026,Melanie Giessner,10 ppm,Slope_Ch4_low,0.001637608,-0.130836277,0.996445125 +70,CO2,5/13/2026,Melanie Giessner,50100 ppm,Slope_CO2_high,0.004784067,-2249.424956,0.992742912 +71,CO2,5/13/2026,Melanie Giessner,2000 ppm,Slope_CO2_low,0.003456996,-52.11328454,0.998953113 +72,N2O,5/13/2026,Melanie Giessner,500 ppm,Slope_N2O_high,0.000774215,-17.75508643,0.994043829 +73,N2O,5/13/2026,Melanie Giessner,5 ppm,Slope_N2O_low,0.000413059,0.023463919,0.996932107 diff --git a/GENX (WIP)/Porewater/CH4/2026/Raw Data/20260513_GENX_GHGdata.csv b/GENX (WIP)/Porewater/CH4/2026/Raw Data/20260513_GENX_GHGdata.csv new file mode 100644 index 0000000..d104c42 --- /dev/null +++ b/GENX (WIP)/Porewater/CH4/2026/Raw Data/20260513_GENX_GHGdata.csv @@ -0,0 +1,73 @@ +Sample ID,Type,Conc_CO2,Conc_CH4,Conc_N2O,CO2_Area,CH4_Area,N2O_Area,Notes,Run_Date,Sample_Volume +20260513_LabAir,Lab air,unknown,unknown,unknown,150922,1220,835,,5/13/2026, +20260513_Blank1,Blank,unknown,unknown,unknown,9100,79,33,,5/13/2026, +20260513_Blank2,Blank,unknown,unknown,unknown,8930,118,23,,5/13/2026, +20260513_0ppm,Standard,0,0,0,9793,69,0,,5/13/2026, +20260513_3mlLowTri,Standard,500,2.5,1.25,159880,1617,3042,,5/13/2026, +20260513_6mlLowTri,Standard,1000,5,2.5,312003,3179,5885,,5/13/2026, +20260513_9mlLowTri,Standard,1500,7.5,3.75,455887,4638,8897,,5/13/2026, +20260513_12mlLowTri,Standard,2000,10,5,594104,5968,11742,,5/13/2026, +20260513_3mlMidTri,Standard,5000,25,12.55,1412650,14927,28472,,5/13/2026, +20260513_6mlMidTri,Standard,10000,50,25.1,2616172,29097,53475,,5/13/2026, +20260513_9mlMidTri,Standard,15000,75,37.65,3816462,44597,79390,,5/13/2026, +20260513_12mlMidTri,Standard,20000,100,50.2,4867987,59218,102751,,5/13/2026, +20260513_3mlHighTri,Standard,12525,251.5,125,3498924,159617,214421,,5/13/2026, +20260513_6mlHighTri,Standard,25050,503,250,5932879,296981,360910,,5/13/2026, +20260513_9mlHighTri,Standard,37575,754.5,375,8259256,441704,505295,,5/13/2026, +20260513_12mlHighTri,Standard,50100,1006,500,10587934,599693,649969,,5/13/2026, +20260513_3ml_10000CH4,Standard,unknown,2500,unknown,58116,1523429,4964,,5/13/2026, +20260513_6ml_10000CH4,Standard,unknown,5000,unknown,166817,3047885,1822,,5/13/2026, +20260513_9ml_10000CH4,Standard,unknown,7500,unknown,15358,4493466,597,,5/13/2026, +20260513_12ml_10000CH4,Standard,unknown,10000,unknown,10185,5833568,289,,5/13/2026, +Blank3,Blank,unknown,unknown,unknown,7965,7619,178,,5/13/2026, +Blank4,Blank,unknown,unknown,unknown,10899,1001,316,,5/13/2026, +ChkStd_12mLLowTri1,Standard,2000,10,5,583661,6381,12460,,5/13/2026, +Blank5,Blank,unknown,unknown,unknown,10231,336,196,,5/13/2026, +STEEP_GWI_WC_B_T0,Sample,unknown,unknown,unknown,7492304,838,3862,,5/13/2026, +STEEP_GWI_WC_B_T1,Sample,unknown,unknown,unknown,7054612,1331,3938,,5/13/2026, +STEEP_GWI_WC_B_T2,Sample,unknown,unknown,unknown,7388265,1022,5115,,5/13/2026, +STEEP_GWI_WC_B_T3,Sample,unknown,unknown,unknown,5933054,396,6228,,5/13/2026, +STEEP_GWI_WC_B_T4,Sample,unknown,unknown,unknown,7551227,699,9293,,5/13/2026, +STEEP_GWI_WC_B_T5,Sample,unknown,unknown,unknown,7126026,669,3983,,5/13/2026, +STEEP_GWI_WC_B_T6,Sample,unknown,unknown,unknown,8240573,880,3364,,5/13/2026, +STEEP_GWI_WC_C_T0,Sample,unknown,unknown,unknown,10848235,1304,3420,,5/13/2026, +STEEP_GWI_WC_C_T1,Sample,unknown,unknown,unknown,8512642,1007,8956,,5/13/2026, +STEEP_GWI_WC_C_T2,Sample,unknown,unknown,unknown,7987736,49737,8984,,5/13/2026, +ChkStd_12mLLowTri2,ChkStd,unknown,unknown,unknown,600113,6149,35617,,5/13/2026, +Blank 6,Blank,unknown,unknown,unknown,21281,98,543,,5/13/2026, +STEEP_GWI_WC_C_T3,Sample,unknown,unknown,unknown,9192745,92429,3617,,5/13/2026, +STEEP_GWI_WC_C_T4,Sample,unknown,unknown,unknown,8490556,1505,5873,,5/13/2026, +STEEP_GWI_WC_C_T5,Sample,unknown,unknown,unknown,8496229,1320,14234,,5/13/2026, +STEEP_GWI_WC_C_T6,Sample,unknown,unknown,unknown,12944409,84,11049,,5/13/2026, +20260505_Ch1_5cm,Sample,unknown,unknown,unknown,4440043,133134,1945,,5/13/2026,12 +20260505_Ch1_20cm,Sample,unknown,unknown,unknown,4140942,509564,2226,,5/13/2026,12 +20260505_Ch2_5cm,Sample,unknown,unknown,unknown,3334986,32888,1844,,5/13/2026,12 +20260505_Ch2_20cm,Sample,unknown,unknown,unknown,3829078,294343,1870,,5/13/2026,12 +20260505_Ch3_5cm,Sample,unknown,unknown,unknown,4456799,154352,0,,5/13/2026,12 +20260505_Ch3_20cm,Sample,unknown,unknown,unknown,3537562,207155,434,,5/13/2026,12 +ChkStd_12mLLowTri3,ChkStd,unknown,unknown,unknown,503979,6133,12063,,5/13/2026, +Blank7,Blank,unknown,unknown,unknown,13357,133,131,,5/13/2026, +20260505_Ch4_5cm,Sample,unknown,unknown,unknown,5988484,169995,444,,5/13/2026,12 +20260505_Ch4_20cm,Sample,unknown,unknown,unknown,4893123,622160,706,,5/13/2026,12 +20260505_Ch5_5cm,Sample,unknown,unknown,unknown,3821746,80194,1319,,5/13/2026,12 +20260505_Ch5_20cm,Sample,unknown,unknown,unknown,3542223,336471,1622,,5/13/2026,12 +20260505_Ch6_5cm,Sample,unknown,unknown,unknown,4189660,19092,408,,5/13/2026,12 +20260505_Ch6_20cm,Sample,unknown,unknown,unknown,3352544,364494,473,,5/13/2026,12 +20260505_Ch7_5cm,Sample,unknown,unknown,unknown,4564092,166424,708,,5/13/2026,12 +20260505_Ch7_20cm,Sample,unknown,unknown,unknown,3895113,1001112,557,,5/13/2026,12 +20260505_Ch8_5cm,Sample,unknown,unknown,unknown,3670414,971818,1310,,5/13/2026,12 +20260505_Ch8_20cm,Sample,unknown,unknown,unknown,4489660,2457605,1015,,5/13/2026,12 +ChkStd_12mLLowTri4,ChkStd,unknown,unknown,unknown,576218,10529,13100,,5/13/2026, +Blank 8,Blank,unknown,unknown,unknown,13150,408,0,,5/13/2026, +20260505_Ch9_5cm,Sample,unknown,unknown,unknown,3851174,20928,638,,5/13/2026,12 +20260505_Ch9_20cm,Sample,unknown,unknown,unknown,3573817,718416,505,,5/13/2026,12 +20260505_Ch10_5cm,Sample,unknown,unknown,unknown,4299866,343343,0,,5/13/2026,12 +20260505_Ch10_20cm,Sample,unknown,unknown,unknown,4141734,2033705,575,,5/13/2026,12 +20260505_Ch11_5cm,Sample,unknown,unknown,unknown,2884877,98681,565,,5/13/2026,12 +20260505_Ch11_20cm,Sample,unknown,unknown,unknown,3265740,1159492,344,,5/13/2026,12 +20260505_Ch12_5cm,Sample,unknown,unknown,unknown,4167055,201819,281,,5/13/2026,12 +20260505_Ch12_20cm,Sample,unknown,unknown,unknown,5000550,5385477,559,,5/13/2026,12 +20260414_Ch12_20cm_2,Sample,unknown,unknown,unknown,4187651,4299909,500,,5/13/2026,12 +ChkStd_12mLLowTri5,ChkStd,unknown,unknown,unknown,374468,13943,18743,,5/13/2026, +Blank 9,Blank,unknown,unknown,unknown,11426,606,0,,5/13/2026, +Blank 10,Blank,unknown,unknown,unknown,6527,160,0,,5/13/2026, diff --git a/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_CH4_202604.pdf b/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_CH4_202604.pdf deleted file mode 100644 index e7a2711..0000000 Binary files a/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_CH4_202604.pdf and /dev/null differ diff --git a/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_CH4_20260406.pdf b/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_CH4_20260406.pdf deleted file mode 100644 index 533fa4b..0000000 Binary files a/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_CH4_20260406.pdf and /dev/null differ diff --git a/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_GHG_202604.pdf b/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_GHG_202604.pdf new file mode 100644 index 0000000..5c63b57 Binary files /dev/null and b/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_GHG_202604.pdf differ diff --git a/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_GHG_20260406.pdf b/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_GHG_20260406.pdf new file mode 100644 index 0000000..dc529a5 Binary files /dev/null and b/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_GHG_20260406.pdf differ diff --git a/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_GHG_20260513.pdf b/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_GHG_20260513.pdf new file mode 100644 index 0000000..604307e Binary files /dev/null and b/GENX (WIP)/Porewater/CH4/2026/Run Summaries to be Reviewed/GCReW_GENX_Porewater_GHG_20260513.pdf differ diff --git a/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_CH4_202604.Rmd b/GENX (WIP)/Porewater/CH4/2026/retired code/GCReW_GENX_Porewater_CH4_202604.Rmd similarity index 100% rename from GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_CH4_202604.Rmd rename to GENX (WIP)/Porewater/CH4/2026/retired code/GCReW_GENX_Porewater_CH4_202604.Rmd diff --git a/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_CH4_20260406.Rmd b/GENX (WIP)/Porewater/CH4/2026/retired code/GCReW_GENX_Porewater_CH4_20260406.Rmd similarity index 100% rename from GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_CH4_20260406.Rmd rename to GENX (WIP)/Porewater/CH4/2026/retired code/GCReW_GENX_Porewater_CH4_20260406.Rmd diff --git a/GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_CH4_Template(WIP).Rmd b/GENX (WIP)/Porewater/CH4/2026/retired code/GCReW_GENX_Porewater_CH4_Template(WIP).Rmd similarity index 100% rename from GENX (WIP)/Porewater/CH4/2026/GCReW_GENX_Porewater_CH4_Template(WIP).Rmd rename to GENX (WIP)/Porewater/CH4/2026/retired code/GCReW_GENX_Porewater_CH4_Template(WIP).Rmd