View source: R/aux_getFDSNdata.R
| aux_getFDSNdata | R Documentation | 
The function accesses the specified FDSN internet data base(s) and downloads seismic data based on the network and station IDs and time constraints.
aux_getFDSNdata(
  start,
  duration,
  channel = "BHZ",
  network,
  station,
  url,
  link_only = FALSE,
  eseis = TRUE
)
| start | 
 | 
| duration | 
 | 
| channel | 
 | 
| network | 
 | 
| station | 
 | 
| url | 
 | 
| link_only | 
 | 
| eseis | 
 | 
A convenient way to get all the required input data is using the 
function aux_getFDSNstation before. It will return all the 
information in a structured way.
It is possible to use the function to process more than one data set. In 
this case, the arguments network, station and url 
must match pairwise. The arguments start, duration and 
channel will be treated as constants if not also provided as 
vectors.
List object with imported seismic data for each provided 
set of input arguments.
Michael Dietze
aux_get_FDSNstation, read_mseed
## Not run: 
## get stations < 0.6 degrees away from Piz Chengalo collapse
x <- aux_getFDSNstation(centre = c(46.3, 9.6),
                        radius = 0.6,
                        access = TRUE)
## sort statiions by distance
x <- x[order(x$distance),]
## download available data
d <- aux_getFDSNdata(start = as.POSIXct(x = "2017-08-23 07:30:00", 
                                        tz = "UTC"),
                     duration = 180, 
                     network = x$network_ID, 
                     station = x$station_code, 
                     url = x$network_url)
## remove stations without available data
x <- x[!unlist(lapply(d, is.null)),]
d <- d[!unlist(lapply(d, is.null))]
## generate plots of the three nearest stations
par(mfcol = c(3, 1))
for(i in 1:3) {
  plot_signal(data = d[[i]],
              main = paste(x$ID[i], 
                           " | ",
                           round(x$distance[i], 2),
                           "distance (DD)"))
} 
## End(Not run)
                     
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.