GetSiteInfo: GetSiteInfo

Description Usage Arguments Value Examples

View source: R/GetSiteInfo.R

Description

This function gets the table variables measured at a specific site from the WaterML web service

Usage

1
GetSiteInfo(server, siteCode)

Arguments

server

The URL of the web service ending with .asmx or .wsdl, for example: http://hydroportal.cuahsi.org/ipswich/cuahsi_1_1.asmx?WSDL

siteCode

The full site code, for example: IRWA:FB-BV. To get a list of available site codes, see GetSites() function and use the FullSiteCode field.

Value

a data.frame of data values with the following columns:

Name Type Description
SiteID character The site ID in the original database
SiteName character The name of the site
SiteCode character A short unique code of the site
FullSiteCode character The complete unique code of the site
in the format NETWORK:CODE, for example SNOTEL:879.
Latitude numeric The WGS84 latitude in decimal degrees
Longitude numeric The WGS84 longitude in decimal degrees
Elevation numeric The elevation of the site above sea level in meters
State character Only for sites in the USA: the state of the site
County character Only for sites in the USA: The county of the site
Comments character Additional comments about the sites
(note: this field is often empty)
VariableCode character Short code of the variable
FullVariableCode character The full variable code, for example: SNOTEL:SNWD.
Use this value as the variableCode parameter in GetValues().
VariableName character The name of the variable
ValueType character the type of observation:
Field Observation or Derived Value
DataType character the aggregate data type:
Average, Continuous, Sporadic..
GeneralCategory character the general category of the measurements:
Climate, Water Quality..
SampleMedium character the sample medium:
for example water, atmosphere, soil..
UnitName character The name of the measurement units
UnitType character the type of the measurement units
UnitAbbreviation character The abbreviation of the measurement units
(m, cm, in..)
NoDataValue numeric The value that indicates missing data
IsRegular boolean TRUE if the measurements are regular, FALSE otherwise
TimeUnitName character The name of the time units
TimeUnitAbbreviation character The time units abbreviation
TimeSupport character The length of the time period over which
one measurement is taken
Speciation character The chemical sample speciation
(as nitrogen, as phosphorus..)
methodID character The ID of the sensor or measurement method
methodCode character The code of the sensor or measurement method.
Usually the same as methodID.
methodDescription character The description of the sensor or
of the data collection instrumentation / measurement method.
methodLink character The hyperlink of the website
of the sensor or measurement method.
sourceID character The ID of the data source or author
organization character The name of the organization collecting the data
sourceDescription character The description of organization collecting the data
citation character Instruction how to cite the data
qualityControlLevelID character The ID of the quality control level.
Usually 0 means raw data and 1 means quality controlled data.
qualityControlLevelCode: character The code of the quality control level. Usually same as qualityControlLevelID.
qualityControlLevelDefinition: character The quality control level definition.
valueCount: character The number of observations in this time series
beginDateTime: POSIXct The local date and time of the first available
observation in this time series.
endDateTime: POSIXct The local date and time of the last available
observation in this time series.
beginDateTimeUTC: POSIXct The UTC date and time of the last available observation in this time series.
endDateTimeUTC: POSIXct The UTC date and time of the last available observation in this time series.

The output data.frame also has attributes with information about the status: download.time, parse.time, download.status, parse.status These attributes can be used for troubleshooting WaterOneFlow/WaterML server errors. If parse status is "NO_SERIES_FOUND", then this site doesn't have any available data.

Examples

1
2
server <- "http://hydroportal.cuahsi.org/SNOTEL/cuahsi_1_1.asmx"
siteInfo <- GetSiteInfo(server, siteCode="SNOTEL:879")

Example output

[1] "downloading SiteInfo from: http://hydroportal.cuahsi.org/SNOTEL/cuahsi_1_1.asmx"
[1] "Could not resolve host: hydroportal.cuahsi.org"

WaterML documentation built on April 10, 2021, 9:05 a.m.