Learn R Programming

IRISMustangMetrics (version 1.0.0)

createBssUrl: Create URL to retrieve measurements from the MUSTANG BSS

Description

The createBssUrl method of the IrisClient returns a URL that can be used to make a request of the MUSTANG BSS (Backend Storage System).

Usage

createBssUrl(obj, network, station, location, channel, 
             starttime, endtime, metricName, constraint, url)

Arguments

obj
an IrisClient object
network
a character string with the two letter seismic network code
station
a character string with the station code
location
a character string with the location code
channel
a character string with the three letter channel code
starttime
a POSIXct class specifying the starttime (GMT)
endtime
a POSIXct class specifying the endtime (GMT)
metricName
a character string containing one or more comma separated metric names
constraint
a character string containing value constraints
url
optional url of the BSS measurements service

Value

  • A character string containing a BSS request URL

Details

The default MUSTANG measurement service when url is not specified is:

http://service.iris.edu/mustang/measurements/1/query?

See Also

getSingleValueMetrics

Examples

Run this code
# Open a connection to IRIS DMC webservices (including the BSS)
iris <- new("IrisClient", debug=TRUE)

starttime <- as.POSIXct("2013-06-01", tz="GMT")
endtime <- starttime + 30*24*3600
metricName <- "sample_max,sample_min,sample_mean"

# Get the measurement dataframe
url <- createBssUrl(iris,"IU","ANMO","00","BHZ",
                    starttime,endtime,metricName)

# This URL can be pasted into a web browser to see the BSS return values

Run the code above in your browser using DataLab