Search for a command to run...
This repository contains the code used to analyze estuarine alkalinity dynamics across the conterminous United States, as described in “Alkalinity Source–Sink Behavior in U.S. Estuaries: Roles of Freshwater Input and Internal Processes.” The code supports the full analytical workflow, including data processing, statistical modeling, and figure generation. Specifically, it was used to (1) compile and quality-control paired alkalinity–salinity observations from multiple publicly available datasets, (2) fit generalized additive models (GAMs) to characterize alkalinity–salinity relationships, (3) quantify non-conservative alkalinity behavior (ΔAlk) across defined salinity intervals, (4) estimate freshwater endmember alkalinity, (5) perform bootstrap resampling to assess uncertainty, and (6) evaluate relationships between alkalinity dynamics and environmental drivers such as freshwater alkalinity, tidal wetland productivity, and benthic macrofaunal biomass. All original input data are publicly available from the U.S. Environmental Protection Agency Water Quality Portal, the Chesapeake Bay Program Water Quality Database, and the NOAA National Estuarine Research Reserve System, as cited in the manuscript. This repository includes the processed datasets and scripts necessary to reproduce the primary results and figures presented in the study.