dataToRanges | R Documentation |
Creates a named list with the ranges of Longitude, Latitude, and Time (UTC) data for use in functions like formatURL. Can also specify an amount to buffer the min and max values by for each coordinate
dataToRanges(data, buffer = c(0, 0, 0))
data |
a data frame with longitude, latitude, and time (UTC) columns |
buffer |
a vector of the amount to buffer the min and max values of Longitude, Latitude, and UTC by (in that order) |
a list with the ranges of coordinates for Longitude, Latitude, and UTC. Ranges are listed as c(left, right), so if your data spans across the dateline
Taiki Sakai taiki.sakai@noaa.gov
gps <- data.frame(Latitude = c(32, 32.1, 32.2, 32.2, 32.2),
Longitude = c(-110, -110.1, -110.2, -110.3, -110.4),
UTC = as.POSIXct(c('2000-01-01 00:00:00', '2000-01-01 00:00:10',
'2000-01-01 00:00:20', '2000-01-01 00:00:30',
'2000-01-01 00:00:40')))
dataToRanges(gps)
dataToRanges(gps, buffer = c(.05, .05, 86400))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.