data-retrieval | R Documentation |
The user should be most interested in pore.pressure
and
pore.temperature
to get pore-fluid pressure and temperature
data.
pore.pressure(sta4, year, jday, start. = NULL, end. = NULL, ...) pore.temperature(sta4, year, jday, start. = NULL, end. = NULL, ...) unavco_dataload( sta, year, jday, dattype = c("pp", "pt"), localfile = NULL, quiet = FALSE ) ## Default S3 method: unavco_dataload( sta, year, jday, dattype = c("pp", "pt"), localfile = NULL, quiet = FALSE ) unavco_temploader(file, dattype = c("pp", "pt"), ...) ## Default S3 method: unavco_temploader(file, dattype = c("pp", "pt"), ...) unavco_downloader( url.toget, temp, PLUGIN, quiet = FALSE, remove.temp = FALSE, ... ) ## Default S3 method: unavco_downloader( url.toget, temp, PLUGIN, quiet = FALSE, remove.temp = FALSE, ... ) dlCatcher(FUN) unavco_path(sta4, year, jday, type = c("pp", "pt"), url.check = FALSE)
sta4 |
character; 4-character station name (e.g. B084). |
year |
numeric; the year of data |
jday |
numeric; Julian date (the day of |
start. |
xx; |
end. |
xx; |
... |
additional parameters |
sta |
character; |
dattype |
character; |
localfile |
character; |
quiet |
logical; should the functions not be verbose? |
file |
character; the file to be loaded |
url.toget |
character; the URL to download |
temp |
character; file for temporary writing |
PLUGIN |
function (not used) |
remove.temp |
logical; should temporary files be deleted? |
FUN |
a function to try, and catch exceptions from |
type |
character; the type of data to generate download data for |
url.check |
logical; should the urls be tested for existence? |
pore.pressure
and pore.temperature
both use
unavco_dataload
and unavco_dataload
to
download, reads-in, and process data from the UNAVCO archive.
These functions will return all data for the specified year and (Julian) day(s).
unavco_temploader
loads and process data downloaded from the UNAVCO archive
unavco_downloader
is the downloader for the UNAVCO data archive
download.file
is used with cacheOK==FALSE
, and mode=="w"
.
dlCatcher
handles exceptions.
unavco_path
generates the appropriate path for
UNAVCO data retrieval; it returns the appropriate url to download a .txt.gz data file
from the UNAVCO data archive.
If url.check==TRUE
the function url.exists
is used
to test the status of each link; this can add a substantial amount
of processing time for large numbers of urls.
read.https
and XXX to load data files from
the source (github)
consistent
unavco-methods
## Not run: # Download data, also makes it consistent xpp <- pore.pressure("B084", 2010, 94) xpt <- pore.temperature("B084", 2010, 94) # window in on the El Mayor quake: st <- as.POSIXct("2010-04-04", tz='UTC') + 79200 redo <- FALSE if (!exists('xppw') | redo) xppw <- pore.pressure("B084", 2010, 94, start.=st) if (!exists('xptw') | redo) xptw <- pore.temperature("B084", 2010, 94, start.=st) layout(matrix(1:4,ncol=2)) plot(xpp, type='l') plot(xpt, type='l') plot(xppw, type='l') plot(xptw, type='l') layout(matrix(1)) # Can also manually subset: unavco_window(as.data.frame(xpp), start. = st, end. = st+10) ## End(Not run) unavco_path("B084", 2010, 1) unavco_path("B084", 2010, 1:10) # use vectors for multiple urls unavco_path("B084",2010, 1:10, "pt") # Also try: # unavco_path("B084",2010, 1:10, "pt", TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.