formatURL | R Documentation |
This creates a properly formatted URL for downloading environmental data either from an ERDDAP or HYCOM server. This URL can be pasted into a browser or submitted to something like httr::GET to actually download the data. Also see edinfoToURL
formatURL(
base,
dataset,
fileType,
vars,
ranges,
stride = 1,
style = c("erddap", "hycom")
)
base |
the base URL to download from |
dataset |
the specific datased ID to download |
fileType |
the type of file to download, usually a netcdf |
vars |
a vector of variables to download |
ranges |
a list of three vectors specifying the range of data to download,
must a list with named vectors |
stride |
the stride for all dimensions, a value of 1 gets every data point, 2 gets every other, etc. |
style |
either |
a properly formatted URL that can be used to download environmental data
Taiki Sakai taiki.sakai@noaa.gov
formatURL(
base = "https://upwell.pfeg.noaa.gov/erddap/griddap/",
dataset = "jplMURSST41",
fileType = "nc",
vars = "analysed_sst",
ranges = list(
Latitude = c(30, 31),
Longitude = c(-118, -117),
UTC = as.POSIXct(c('2005-01-01 00:00:00', '2005-01-02 00:00:00'), tz='UTC')
),
stride=1,
style = 'erddap'
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.