if (FALSE) {
## 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)"))
}
}
Run the code above in your browser using DataLab