Learn R Programming

dataRetrieval (version 1.4.0)

getWQPInfo: Import Metadata for Water Quality Portal Data

Description

Populates INFO data frame for EGRET study. If siteNumber or parameter code (for USGS) or characteristic name (for non-USGS) is provided, the function will make a call to the Water Quality Portal to get metadata information. staAbbrev - station abbreviation, will be used in naming output files and for structuring batch jobs constitAbbrev - constitute abbreviation

Usage

getWQPInfo(siteNumber, parameterCd, interactive = FALSE)

Arguments

siteNumber

string site number.

parameterCd

string USGS parameter code or characteristic name.

interactive

logical Option for interactive mode. If true, there is user interaction for error handling and data checks.

Value

INFO dataframe with agency, site, dateTime, value, and code columns

Examples

Run this code
# NOT RUN {
# These examples require an internet connection to run
# Automatically gets information about site 01594440 and temperature, no interaction with user
nameToUse <- 'Specific conductance'
pcodeToUse <- '00095'
# }
# NOT RUN {
INFO <- getWQPInfo('USGS-04024315',pcodeToUse,interactive=TRUE)
INFO2 <- getWQPInfo('WIDNR_WQX-10032762',nameToUse)
# To adjust the label names:
INFO$shortName <- "Little"
INFO$paramShortName <- "SC"
# }

Run the code above in your browser using DataLab