downloadEnv | R Documentation |
Downloads environmental data matching the coordinates in a set of data
downloadEnv(
data,
edinfo,
fileName = NULL,
buffer = c(0, 0, 0),
timeout = 120,
progress = TRUE,
...
)
data |
Data containing Longitude, Latitude, and UTC to download matching environmental data for |
edinfo |
either a edinfo object from getEdinfo or erddapToEdinfo or an ERDDAP dataset ID |
fileName |
name of the file to save downloaded data. If left as the default
|
buffer |
numeric vector of the amount to buffer the Longitude, Latitude, and UTC coordinates by |
timeout |
number of seconds before timeout stops download attempt |
progress |
logical flag to show download progress |
... |
not used |
if download is successful, invisibly returns the filename. If it fails returns
FALSE
.
If successful, the file name of downloaded data. If not, returns FALSE
Taiki Sakai taiki.sakai@noaa.gov
data <- data.frame(Latitude = 32, Longitude = -117,
UTC = as.POSIXct('2000-01-01 00:00:00', tz='UTC'))
## Not run:
# not run because download could take time
# download jplMURSST41 dataset
edi <- erddapToEdinfo('jplMURSST41')
ncFile <- downloadEnv(data, edi, 'sstData.nc')
# browse suggested sst datasets, then download
edi <- browseEdinfo(var='sst')
ncFile <- downloadEnv(data, edi, 'sstData.nc')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.