Package xtractomatic

Similar documents
Package xtractomatic

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package grec. R topics documented: August 13, Type Package

Package docxtools. July 6, 2018

Package robotstxt. November 12, 2017

Package nngeo. September 29, 2018

Package fastdummies. January 8, 2018

Package opencage. January 16, 2018

Package githubinstall

Package vinereg. August 10, 2018

Package tidytransit. March 4, 2019

Package censusr. R topics documented: June 14, Type Package Title Collect Data from the Census API Version 0.0.

Package jpmesh. December 4, 2017

Package lumberjack. R topics documented: July 20, 2018

Package TrafficBDE. March 1, 2018

Package rnrfa. April 13, 2018

Package ezsummary. August 29, 2016

Package sfdct. August 29, 2017

Package statsdk. September 30, 2017

Package bisect. April 16, 2018

Package calpassapi. August 25, 2018

Package fitbitscraper

Package GetITRData. October 22, 2017

Package angstroms. May 1, 2017

Package nlgeocoder. October 8, 2018

Package preprosim. July 26, 2016

Package canvasxpress

Package splithalf. March 17, 2018

Package catenary. May 4, 2018

Package fingertipsr. May 25, Type Package Version Title Fingertips Data for Public Health

Package qualmap. R topics documented: September 12, Type Package

Package oec. R topics documented: May 11, Type Package

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package facerec. May 14, 2018

Package datasets.load

Package sdmpredictors

Package ECctmc. May 1, 2018

Package cancensus. February 4, 2018

Package postal. July 27, 2018

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package TrajDataMining

Package reval. May 26, 2015

Package BANEScarparkinglite

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package rgho. R topics documented: January 18, 2017

Package gtrendsr. October 19, 2017

Package WordR. September 7, 2017

Package knitrprogressbar

Package GetHFData. November 28, 2017

Package guardianapi. February 3, 2019

Package bsam. July 1, 2017

Package fastqcr. April 11, 2017

Package repec. August 31, 2018

Package rnaturalearth

Package rbgm. May 18, 2018

Package validara. October 19, 2017

Package climber. R topics documented:

Package barcoder. October 26, 2018

Package loggit. April 9, 2018

Package darksky. September 20, 2017

Package readxl. April 18, 2017

Package gtrendsr. August 4, 2018

Package IsoCorrectoR. R topics documented:

Package cregulome. September 13, 2018

Package ggseas. June 12, 2018

Package internetarchive

Package tiler. June 9, 2018

Package liftr. R topics documented: May 14, Type Package

Package reconstructr

Package SEMrushR. November 3, 2018

Package kirby21.base

Package rmapzen. October 7, 2018

Package editdata. October 7, 2017

Package rpostgislt. March 2, 2018

Package dkanr. July 12, 2018

Package mapsapi. March 12, 2018

Package quickreg. R topics documented:

Package marinespeed. February 17, 2017

Package benchmarkme. R topics documented: February 26, Type Package Title Crowd Sourced System Benchmarks Version 0.2.

Package scrubr. August 29, 2016

Package weco. May 4, 2018

Package desplot. R topics documented: April 3, 2018

Package omu. August 2, 2018

Package ezknitr. September 16, 2016

Package ggmosaic. February 9, 2017

Package rollply. R topics documented: August 29, Title Moving-Window Add-on for 'plyr' Version 0.5.0

Package waver. January 29, 2018

Package states. May 4, 2018

Package leaflet.minicharts

Package vip. June 15, 2018

Package rsppfp. November 20, 2018

Package messaging. May 27, 2018

Package edfreader. R topics documented: May 21, 2017

Package virustotal. May 1, 2017

Package geogrid. August 19, 2018

Package kdtools. April 26, 2018

Package svalues. July 15, 2018

Package ggloop. October 20, 2016

Package projector. February 27, 2018

Transcription:

Package xtractomatic March 12, 2018 Version 3.4.2 Title Accessing Environmental Data from ERD's ERDDAP Server Contains three functions that access environmental data from ERD's ERDDAP service <http://coastwatch.pfeg.noaa.gov/erddap>. The xtracto() function extracts data along a trajectory for a given ``radius'' around the point. The xtracto_3d() function extracts data in a box. The xtractogon() function extracts data in a polygon. There are also two helper functions to obtain information about available data, and plotting functions to plot the results. Depends R (>= 3.3.0) License CC0 LazyData true URL https://github.com/rmendels/xtractomatic BugReports http://www.github.com/rmendels/xtractomatic/issues Imports dplyr, httr, ncdf4, readr, sp, stats, utils Suggests DT, ggplot2, knitr, lubridate, mapdata, reshape2, rmarkdown, webshot VignetteBuilder knitr RoxygenNote 6.0.1 NeedsCompilation no Author Roy Mendelssohn [aut, cre], Cindy Bessey [ctb], Dave Foley [ctb] Maintainer Roy Mendelssohn <roy.mendelssohn@noaa.gov> Repository CRAN Date/Publication 2018-03-12 21:18:48 UTC 1

2 getinfo R topics documented: colors............................................ 2 getinfo............................................ 2 Marlintag38606....................................... 4 mbnms............................................ 4 searchdata.......................................... 5 xtracto............................................ 6 xtractogon.......................................... 7 xtractomatic......................................... 8 xtracto_3d......................................... 10 Index 11 colors cmocean colors The cmocean color palette by Kristen Thyng as of late 2017 str(colors) List of 18 $ algae $ amp $ balance $ curl $ deep $ delta $ dense $ gray $ haline $ ice $ matter $ oxy $ phase $ solar $ speed $ tempo $ thermal $ turbid colors Format An object of class list of length 18. getinfo Extract dataset information for a given dtype name or number getinfo displays the dataset information for a given dtype or dtypename getinfo(dtype) Arguments dtype - character string or integer (1-138) for given dataset

getinfo 3 Value prints out dataset information Details getinfo gives the dataset information for the given dataset. This includes: dtypename,datasetname,longname,varname. It will return the following information about any dataset that matches the string: dtypename datasetname longname varname hasalt latsouth lon360 minlongitude maxlongitude longitudespacing minlatitude maxlatitude latitudespacing minaltitude maxaltitude mintime maxtime timespacing infourl Examples getinfo('atsstamday')

4 mbnms Marlintag38606 Marlin Tag Data Telemetry data of a blue marlin tagged in the Pacific Ocean in 2003 Marlintag38606 Format A data frame with 152 obs. of 7 variables: date time of observation given as YYYY-MM-DD lon longitude of observation lat latitude of observation lowlon low error on longitude higlon high error on longitude lowlat low error on latitude higlat high error on latitude Source Dr. Mike Musyl, Pelagic Research Group LLC mbnms MBNMS Boundaries A dataset containing the latitudes and longitudes of a polygon that define boundaries of the Monterey Bay National Marine Sanctuary. mbnms Format A data frame with 6666 obs. of 2 variables: Longitude Longitudes of a boundary polygon Latitude Latitudes of a boundary polygon

searchdata 5 Source http://sanctuaries.noaa.gov/library/imast_gis.html searchdata Extract dataset information based on a list of character strings searchdata finds the all datasets that contain the supplied string in the given dataset field searchdata(searchlist = list(list("varname", "chl"))) Arguments searchlist - A list of lists each list will contain the field to search and the search string Value Details dataframe with any matching information searchdata will search for the given string in any of the fields dtypename,datasetname,longname,varname. Over the list of searches provided, the search sequentially refines the search result based on the next list in the list of lists. It will return the following information about any dataset that matches the string: dtypename datasetname longname varname hasalt latsouth lon360 minlongitude maxlongitude longitudespacing minlatitude maxlatitude latitudespacing minaltitude

6 xtracto maxaltitude mintime maxtime timespacing infourl Examples list1 <- 'varname:x_wind' list2 <- 'datasetname:8day' mylist <- c(list1, list2) searchresult <- searchdata(mylist) xtracto Extract environmental data along a trajectory using ERDDAP. xtracto uses the ERD ERDDAP data web service to extact environmental data along a longitude, latitude and time trajectory xtracto(dtype, xpos, ypos, tpos = NA, xlen = 0, ylen = 0, verbose = FALSE) Arguments dtype xpos ypos tpos xlen ylen verbose - number or string identifying the ERDDAP parameter to extract - a real array with the longitudes of the trajectory (in decimal degrees East, either 0-360 or -180 to 180) - a real array with the latitudes of the trajectory (in decimal degrees N; -90 to 90) - character array with the times of the trajectory in "YYYY-MM-DD". Default is NA for no time. - optional real array defining the longitude box around the given point (xlen/2 around the point). Default 0. - optional real array defining the latitude box around the given point (tlen/2 around the point). Default 0. - optional logical for verbose download out, default FALSE

xtractogon 7 Value A dataframe containing: Examples column 1 = mean of data within search radius column 2 = standard deviation of data within search radius column 3 = number of points found within search radius column 4 = time of returned value column 5 = min longitude of call (decimal degrees) column 6 = max longitude of call (decimal degrees) column 7 = min latitude of call (decimal degrees) column 8 = max latitude of call (decimal degrees) column 9 = requested time in tag column 10 = median of data within search radius column 11 = median absolute deviation of data within search radius xpos <- c(230, 235) ypos <- c(40, 45) tpos <- c('2006-01-15', '2006-01-20') xlen <- 0.025 ylen <- 0.025 extract <- xtracto('erdmbsstd8day', xpos, ypos, tpos = tpos, xlen = xlen, ylen = ylen) xtractogon Extract environmental data in a polygon using ERDDAP. xtractogon uses the ERD ERDDAP data web service to extact environmental data inside a polygon defined by vectors of latitudes and longitudes xtractogon(dtype, xpos, ypos, tpos = NA, verbose = FALSE) Arguments dtype - number or string identifying the ERDDAP parameter to extract xpos - array giving longitudes (in decimal degrees East, either 0-360 or -180 to 180) of polygon ypos tpos verbose - array giving latitudes (in decimal degrees N; -90 to 90)of polygon - 2-element array giving min and max time (specify both minimum and maximum dates). For the last available time, use "last". Default NA. - logical for verbose download out, default FALSE

8 xtractomatic Value Details structure with data and dimensions extract$data - the masked data array dimensions (lon,lat,time) extract$varname - the name of the parameter extracted extract$datasetname - ERDDAP dataset name extract$longitude - the longitudes on some scale as request extract$latitude - the latitudes always going south to north extract$time - the times of the extracts xtractogon extracts the data from the smallest bounding box that contains the polygon, and then uses the function "point.in.polygon" from the "sp" package to mask out the areas outside of the polygon. Examples tpos <- c("2014-09-01", "2014-10-01") xpos <- mbnms$longitude ypos <- mbnms$latitude sanctchl <- xtractogon('erdvh3chlamday', xpos, ypos, tpos = tpos ) xtractomatic xtractomatic: Routines to simplify data extraction using ERD s ERD- DAP web service. The xtractomatic package is a set of routines to simplify accessing data using ERD s ERDDAP data web service. The package contains three main functions and two helper functions. Main Functions xtracto - Extracts an environmental variable along a track defined by its longitude, latitude and time. xtracto_3d - Extracts an environmental variable in a 3D (longitude,latitude, time) bounding box xtractogon - Extracts an environmental variable in a spatial polygon through time. Plotting Functions plottrack - Plots the results of a call to xtracto() plotbbox - Plots the results of a call to xtracto_3d() and xtractogon()

xtractomatic 9 Helper Functions searchdata - Searches to see if given string is contained in the datasetname, varname, or dtypename. See?searchData. getinfo - Returns information about a given environmental variable. See?getInfo. @section Details: When the xtractomatic package is loaded ("library(xtractomatic)") a data structure called erddapstruct is automatically loaded into memory, and is explicitly used in searchdata and getinfo, as well implicitly in the other functions. Not all ERDDAP variables are accessed in the routines, and this structure defines information about the datasets, including: dtypename datasetname longname varname hasalt latsouth lon360 minlongitude maxlongitude longitudespacing minlatitude maxlatitude latitudespacing minaltitude maxaltitude mintime maxtime timespacing infourl Besides the terse help documents, more detail in using the functions are given in the included vignette "Usingxtractomatic". The datasets used in the vignette are included in the "data" directory.

10 xtracto_3d xtracto_3d Extract environmental data in a 3-D bounding box using ERDDAP. xtracto_3d uses the ERD ERDDAP data web service to extact environmental data in a given longitude, latitude and time bounding box xtracto_3d(dtype, xpos, ypos, tpos = NA, verbose = FALSE) Arguments Value dtype xpos - number or string identifying the ERDDAP parameter to extract - 2-element array giving min and max longitude (in decimal degrees East, either 0-360 or -180 to 180) ypos - 2-element array giving min and max latitude (in decimal degrees N; -90 to 90) tpos verbose structure with data and dimensions: Examples - 2-element array giving min and max time (specify both minimum and maximum dates). For the last available time, use "last". Default NA. - logical for verbose download output, default FALSE extract$data - the data array dimensions (lon,lat,time) extract$varname - the name of the parameter extracted extract$datasetname - ERDDAP dataset name extract$longitude - the longitudes on some scale as request extract$latitude - the latitudes always going south to north extract$time - the times of the extracts xpos <- c(-130., -125.) ypos <- c(30., 35.) tpos <- c('2015-01-16', '2015-02-16') extract <- xtracto_3d('mhsstdmday', xpos, ypos, tpos = tpos) xpos <- c(230, 231) ypos <- c(40, 41) tpos <- c('2006-05-05', '2006-05-06') extract <- xtracto_3d('erdmbsstd8day', xpos, ypos, tpos = tpos, verbose=true)

Index Topic datasets colors, 2 Marlintag38606, 4 mbnms, 4 colors, 2 getinfo, 2 Marlintag38606, 4 mbnms, 4 searchdata, 5 xtracto, 6 xtracto_3d, 10 xtractogon, 7 xtractomatic, 8 xtractomatic-package (xtractomatic), 8 11