Skip to content
Status and Trends Analysis and Reporting
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



Install this package from GitHub


1. Get station location information

To get the stations you'll use the GetStations() function which will require a shapefile of the area with which to do the analysis, and whether or not you would like to exclude tribal lands from the analysis. Optionally, you can tell the function what the name of your stations database connection is. The default is "STATIONS".

example: GetStations(polygon = "your-shapefile-here", exclude.tribal.lands = TRUE, = "STATIONS")

This will return the raw station data from the stations database containing all of the stations within your desired area.

2. Get water quality monitoring data

Make sure you have the AWQMSdata package installed, devtools::install_github("TravisPritchardODEQ/AWQMSdata").

Use the GetData() function to retrieve water quality monitoring data from the AWQMS database. This function requires the parameters you wish to query (temp, bacteria (ecoli, fecal coliform, enterococcus), DO, TSS, TP, and pH), the stations dataframe from GetStations(), and the start and end date (YYYY-MM-DD, %Y-%m-%d) of your desired timeframe.

This will return the raw data retrieved from AWQMS using the AWQMS_Data() function.

example: GetData(parameters = c("parameter1", "parameter2"), stations = result-of-GetStations(), = "2010-01-01", = "2019-01-01", = "AWQMS")

3. Clean data for analysis

Use the CleanData() function to remove unnecessary variable, check the data for quality, and add the datetime and sample id columns for future use. This function only requires the output from GetData().

You can’t perform that action at this time.