reshape

logical, reshape the expanded data. If TRUE, then return a wide data frame with all water-quality in a single row for each sample.
If FALSE (default), then return a long data frame with each water-quality result in a single row. This
argument is only applicable to expanded data. Data requested using expanded=FALSE is always returned in the wide format.

tz

character to set timezone attribute of dateTime. Default is "UTC", and converts the
date times to UTC, properly accounting for daylight savings times based on the data's provided tz_cd column.
Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles",
"America/Anchorage", as well as the following which do not use daylight savings time: "America/Honolulu",
"America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla". See also OlsonNames()
for more information on time zones.

Details

Valid parameter code groups are "All," or group codes:

Code

Description

INF

Information

PHY

Physical

INM

Inorganics, Major, Metals (major cations)

INN

Inorganics, Major, Non-metals (major anions)

NUT

Nutrient

MBI

Microbiological

BIO

Biological

IMN

Inorganics, Minor, Non-metals

IMM

Inorganics, Minor, Metals

TOX

Toxicity

OPE

Organics, pesticide

OPC

Organics, PCBs

OOT

Organics, other

RAD

Radiochemical

SED

Sediment

POP

Population/community

If more than one parameter group is requested, only sites that data for all requested groups are returned.

Value

A data frame with at least the following columns:

Name

Type

Description

agency_cd

character

The NWIS code for the agency reporting the data

site_no

character

The USGS site number

sample_dt

Date

The date the sample was collected

sample_tm

character

The reported sample collection time

startDateTime

POSIXct

Combining sample_dt and sample_tm, a date/time column is created, and converted into UTC
(unless the tz argument specifies a different time zone)

endDateTime

POSIXct

If any sample_end_dt and sample_end_dt exist, this column is created similar to startDateTime

Further columns will be included depending on the requested output format (expanded = TRUE or FALSE).