- Notifications
You must be signed in to change notification settings - Fork4
xtractomactic using rerddap
License
rmendels/rerddapXtracto
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
rerddapXtracto - R package for accessing environmental data using 'rerddap'
rxtracto()now works in coordinate space for projected data
tidy_grid()function to convert result of 'rxtracto_3D()' or 'rxtractogon()' to "tidy"" long-format
rxtracto()option to use the ERDDAP "Interpolate service", which can greatlyspeed up extracts for large tracks.
rxtracto() major rewrite of this function to reduce the number of requests made to the ERDDAP server, and to improve overall speed.
rerddapXtracto is anR package developed to subset and extract satellite and other oceanographic related data from a remoteERDDAP server. The program can extract data for a moving point in time along a user-supplied set of longitude, latitude, time and depth points; in a 3D bounding box; or within a polygon (through time).
There are also two plotting functions,plotTrack() andplotBox() that make use of theplotdap package. See the newrerdapXtracto vignette.
There are three main data extraction functions in thererddapXtracto package:
rxtracto <- function(dataInfo, parameter = NULL, xcoord = NULL, ycoord = NULL, zcoord = NULL, tcoord = NULL, xlen = 0., ylen = 0., zlen = 0., xName = 'longitude', yName = 'latitude', zName = 'altitude', tName = 'time', interp = NULL, verbose = FALSE, progress_bar = FALSE)rxtracto_3D <- function(dataInfo, parameter = NULL, xcoord = NULL, ycoord = NULL, zcoord = NULL, tcoord = NULL, xName = 'longitude', yName = 'latitude', zName = 'altitude', tName = 'time', verbose = FALSE)rxtractogon <- function(dataInfo, parameter, xcoord = NULL, ycoord = NULL, zcoord = NULL, tcoord = NULL, xName = 'longitude', yName = 'latitude', zName = 'altitude', tName = 'time', verbose = FALSE)
and two functions for producing maps:
plotTrack <- function(resp, xcoord, ycoord, tcoord, plotColor = 'viridis', myFunc = NA, mapData = NULL, crs = NULL, animate = FALSE, cumulative = FALSE, name = NA, shape = 20, size = .5)plotBBox <- function(resp, plotColor = 'viridis', time = NA, myFunc = NA, mapData = NULL, crs = NULL, animate = FALSE, cumulative = FALSE, name = NA, maxpixels = 10000)
and function to convert result of 'rxtracto_3D()' or 'rxtractogon()' to "tidy"" long-format:
- 'tidy_grid(response)`
For data requests that cross the dateline for datasets that areon a (-180, 180) longitude grid, there are some important caveats:
- Request must be on a (0, 360) longitude grid
- Several of the checks that the request makes sense are disabled if the requestcross the dateline and the dataset is on a (-180, 180) longitude grid.
- User therefore has more responsibility to check that the request makes sensefor the dataset being accessed.
rerddapXtracto uses thererddap,ncdf4 ,parsedate,plotdap andsp packages , and these packages (and the packages imported by these packages) must be installed first orrerddapXtracto will fail to install.
install.packages("ncdf4") install.packages("parsedate") install.packages("plotdap") install.packages("rerddap") install.packages("sp")# Required legalese“The United States Department of Commerce (DOC) GitHub project code is providedon an ‘as is’ basis and the user assumes responsibility for its use.DOC has relinquished control of the information and no longer has responsibilityto protect the integrity, confidentiality, or availability of the information.Any claims against the Department of Commerce stemming from the use of itsGitHub project will be governed by all applicable Federal law. Any reference tospecific commercial products, processes, or services by service mark, trademark,manufacturer, or otherwise, does not constitute or imply their endorsement,recommendation or favoring by the Department of Commerce. The Department ofCommerce seal and logo, or the seal and logo of a DOC bureau, shall not be usedin any manner to imply endorsement of any commercial product or activity by DOCor the United States Government.”About
xtractomactic using rerddap
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.