Skip to contents

Load local water quality file


read_importwq(xlsx, download_latest = FALSE, na = c("", "NULL"), all = FALSE)



chr string path for local excel file, to overwrite if not current


logical passed to read_dlcurrent to download raw data and compare with existing in xlsx if available


chr vector of strings to interpret as NA, passed to read_xlsx


logical indicating if all water quality parameters are returned, see details


A data.frame of formatted water quality data.


Loads the "RWMDataSpreadsheet" worksheet from the file located at xlsx. The file is downloaded from The files can be viewed at

Water quality parameters returned by default are total nitrogen (tn), Secchi depth (sd), chlorophyll-a (chla), salinity (top, mid, and bottom depths, Sal_ prefix), water temperature (top, mid, and bottom depths, Temp_Water_ prefix), turbidity (Turbidity_JTU-NTU), and water color (Color_345_F45). Additional qualifier columns for each that include the _Q suffix are also returned, excluding salinity and water temperature. All other water quality parameters and qualifiers can be returned by setting all = T.


if (FALSE) {
# file path
xlsx <- '~/Desktop/RWMDataSpreadsheet_ThroughCurrentReportMonth.xlsx'

# load and assign to object
epcdata <- read_importwq(xlsx, download_latest = T)

# get all water quality parameters
epcdataall <- read_importwq(xlsx, download_latest = T, all = T)