Data query to obtain water quality data from the Water Quality Portal.
The Water Quality Portal (WQP) houses a wealth of current and historical water quality data data. To download WQP data, you can go to their website (https://www.waterqualitydata.us/) or you can use this R script. This script was developed to download water column data from a user provided HUC. The query can be adjusted slightly to expand the search to groundwater or even sediment.
To get started, begin by specifying the user inputs listed at the top of the file: eight-digit HUC, start date, end date, water quality parameters of interest, and your computer username. Be sure to follow the formatting guidelines provided within the script. Once the user-specified inputs are provided, click on "Source" and watch the console to see if you run into any errors. If the script ran successfully, there will be an Excel file of water quality data in your Downloads folder.