Learn R Programming

dataRetrieval (version 2.5.1)

readWQPdata: General Data Import from Water Quality Portal

Description

Imports data from Water Quality Portal web service. This function gets the data from here: http://www.waterqualitydata.us. because it allows for other agencies rather than the USGS.

Usage

readWQPdata(..., zip = FALSE)

Arguments

zip
logical to request data via downloading zip file. Default set to FALSE.
...

Value

A data frame with at least the following columns:
Name Type
Description OrganizationIdentifier
character A designator used to uniquely identify a unique business establishment within a context.
OrganizationFormalName character
The legal designator (i.e. formal name) of an organization. ActivityIdentifier
character Designator that uniquely identifies an activity within an organization.
ActivityTypeCode character
The text describing the type of activity. ActivityMediaName
character Name or code indicating the environmental medium where the sample was taken.
ActivityMediaSubdivisionName character
Name or code indicating the environmental matrix as a subdivision of the sample media. ActivityStartDate
character The calendar date on which the field activity is started.
ActivityStartTime/Time character
The time of day that is reported when the field activity began, based on a 24-hour timescale. ActivityStartTime/TimeZoneCode
character The time zone for which the time of day is reported. Any of the longitudinal divisions of the earth's surface in which a standard time is kept.
ActivityEndDate character
The calendar date when the field activity is completed. ActivityEndTime/Time
character The time of day that is reported when the field activity ended, based on a 24-hour timescale.
ActivityEndTime/TimeZoneCode character
The time zone for which the time of day is reported. Any of the longitudinal divisions of the earth's surface in which a standard time is kept. ActivityDepthHeightMeasure/MeasureValue
character A measurement of the vertical location (measured from a reference point) at which an activity occurred. Measure value is given in the units stored in ActivityDepthHeightMeasure/MeasureUnitCode.
ActivityDepthHeightMeasure/MeasureUnitCode character
The code that represents the unit for measuring the item. ActivityDepthAltitudeReferencePointText
character The reference used to indicate the datum or reference used to establish the depth/altitude of an activity.
ActivityTopDepthHeightMeasure/MeasureValue character
A measurement of the upper vertical location of a vertical location range (measured from a reference point) at which an activity occurred. Measure value is given in the units stored in ActivityTopDepthHeightMeasure/MeasureUnitCode. ActivityTopDepthHeightMeasure/MeasureUnitCode
character The code that represents the unit for measuring the item.
ActivityBottomDepthHeightMeasure/MeasureValue character
A measurement of the lower vertical location of a vertical location range (measured from a reference point) at which an activity occurred. Measure value is given in the units stored in ActivityBottomDepthHeightMeasure/MeasureUnitCode. ActivityBottomDepthHeightMeasure/MeasureUnitCode
character The code that represents the unit for measuring the item.
ProjectIdentifier character
A designator used to uniquely identify a data collection project within a context of an organization. ActivityConductingOrganizationText
character A name of the Organization conducting an activity.
MonitoringLocationIdentifier character
A designator used to describe the unique name, number, or code assigned to identify the monitoring location. ActivityCommentText
character General comments concerning the activity.
SampleAquifer * character
A code that designates the aquifer associated with groundwater samples. HydrologicCondition *
character Hydrologic condition is the hydrologic condition that is represented by the sample collected (i.e. ? normal, falling, rising, peak stage).
HydrologicEvent * character
A hydrologic event that is represented by the sample collected (i.e. - storm, drought, snowmelt). SampleCollectionMethod/MethodIdentifier
character The identification number or code assigned by the method publisher.
SampleCollectionMethod/MethodIdentifierContext character
Identifies the source or data system that created or defined the identifier. SampleCollectionMethod/MethodName
character The title that appears on the method from the method publisher.
SampleCollectionEquipmentName character
The name for the equipment used in collecting the sample. ResultDetectionConditionText
character The textual descriptor of a result.
CharacteristicName character
The object, property, or substance which is evaluated or enumerated by either a direct field measurement, a direct field observation, or by laboratory analysis of material collected in the field. ResultSampleFractionText
character The text name of the portion of the sample associated with results obtained from a physically-partitioned sample.
ResultMeasureValue numeric
The reportable measure of the result for the chemical, microbiological or other characteristic being analyzed. Measure value is given in the units stored in ResultMeasure/MeasureUnitCode. MeasureQualifierCode
character A code used to identify any qualifying issues that affect the results.
ResultMeasure/MeasureUnitCode character
The code that represents the unit for measuring the item. ResultStatusIdentifier
character Indicates the acceptability of the result with respect to QA/QC criteria.
StatisticalBaseCode character
The code for the method used to calculate derived results. ResultValueTypeName
character A name that qualifies the process which was used in the determination of the result value (e.g., actual, estimated, calculated).
ResultWeightBasisText character
The name that represents the form of the sample or portion of the sample which is associated with the result value (e.g., wet weight, dry weight, ash-free dry weight). ResultTimeBasisText
character The period of time (in days) over which a measurement was made. For example, BOD can be measured as 5 day or 20 day BOD.
ResultTemperatureBasisText character
The name that represents the controlled temperature at which the sample was maintained during analysis, e.g. 25 deg BOD analysis. ResultParticleSizeBasisText
character User defined free text describing the particle size class for which the associated result is defined.
PrecisionValue character
A measure of mutual agreement among individual measurements of the same property usually under prescribed similar conditions. ResultCommentText
character Free text with general comments concerning the result.
USGSPCode * character
5-digit number used in the US Geological Survey computerized data system, National Water Information System (NWIS), to uniquely identify a specific constituent. ResultDepthHeightMeasure/MeasureValue +
character A measurement of the vertical location (measured from a reference point) at which a result occurred.
ResultDepthHeightMeasure/MeasureUnitCode + character
The code that represents the unit for measuring the item. ResultDepthAltitudeReferencePointText +
character The reference used to indicate the datum or reference used to establish the depth/altitude of a result.
SubjectTaxonomicName character
The name of the organism from which a tissue sample was taken. SampleTissueAnatomyName *
character The name of the anatomy from which a tissue sample was taken.
ResultAnalyticalMethod/MethodIdentifier character
The identification number or code assigned by the method publisher. ResultAnalyticalMethod/MethodIdentifierContext
character Identifies the source or data system that created or defined the identifier.
ResultAnalyticalMethod/MethodName character
The title that appears on the method from the method publisher. MethodDescriptionText *
character A brief summary that provides general information about the method.
LaboratoryName character
The name of Lab responsible for the result. AnalysisStartDate
character The calendar date on which the analysis began.
ResultLaboratoryCommentText character
Remarks which further describe the laboratory procedures which produced the result. DetectionQuantitationLimitTypeName
character Text describing the type of detection or quantitation level used in the analysis of a characteristic.
DetectionQuantitationLimitMeasure/MeasureValue numeric
Constituent concentration that, when processed through the complete method, produces a signal that is statistically different from a blank. Measure value is given in the units stored in DetectionQuantitationLimitMeasure/MeasureUnitCode. DetectionQuantitationLimitMeasure/MeasureUnitCode
character The code that represents the unit for measuring the item.
PreparationStartDate character
The calendar date when the preparation/extraction of the sample for analysis began. ActivityStartDateTime
POSIXct Activity start date and time converted to POSIXct UTC.
ActivityEndDateTime POSIXct
Activity end date and time converted to POSIXct UTC. Name
* = elements only in NWIS + = elements only in STORETThere are also several useful attributes attached to the data frame:
Name Type
Description url
character The url used to generate the data
siteInfo data.frame
A data frame containing information on the requested sites variableInfo
data.frame A data frame containing information on the requested parameters
queryTime POSIXct
The time the data was returned Name

Examples

Run this code
## Not run: 
# nameToUse <- "pH"
# pHData <- readWQPdata(siteid="USGS-04024315",characteristicName=nameToUse)
# pHDataExpanded2 <- readWQPdata(bBox=c(-90.10,42.67,-88.64,43.35),characteristicName=nameToUse)
# startDate <- as.Date("2013-01-01")
# nutrientDaneCounty <- readWQPdata(countycode="US:55:025",startDate=startDate,
#                         characteristicType="Nutrient")
# 
#                         
# ## End(Not run)

Run the code above in your browser using DataLab