2.3 Data Analysis
The 20-year trends in water quality variables were analyzed to allow for (1) comparison against different environmental variables to understand possible drivers of change and (2) evaluation of spatial variability in water quality trends. Mann-Kendall (MK) testing and Sen Slope Estimators were calculated and applied to annual average FC concentrations and annual average salinity values for the water quality sampling stations, and total annual precipitation for the terrestrial weather stations. Fecal indicator bacteria concentrations are highly variable in space and time, with samples collected consecutively over the span of a few minutes sometimes varying by an order of magnitude over a few minutes (Boehm, 2007). Accordingly, the annual arithmetic mean was selected to represent the central tendency in long-term FC data, with the annual time step selected to average out the effects of seasonal variation. Similarly, using total annual precipitation informed us of the overall freshwater load over the years and allowed us to explore long-term drivers of baseflow FC concentrations. MK testing and Sen Slope Estimation analysis have been used in numerous environmental, hydrological, and water quality studies (Hirsch et al., 1982; Cailas et al., 1986; Hipel et al., 1988; Zetterqvist, 1991; Burn et al., 2002; Meals et al., 2011; Mustapha, 2013) due to their robustness against non-normal data with missing values. Statistical analyses and mapping were conducted in R with the ‘trend’ package version 1.1.4 (Pohlert, 2020) and the ‘sf’ package version 0.9 (Pebesma et al., 2022).