sp_extract_gridded: Extract environmental data - gridded data based

Description Usage Arguments Details Author(s) Examples

View source: R/sp_extract_gridded.R

Description

Extract environmental data - gridded data based

Usage

1
2
3
4
5
6
7
sp_extract_gridded(
  x,
  from = "noaa_sst",
  latitude = NULL,
  longitude = NULL,
  origin = as.Date("1800-1-1")
)

Arguments

x

input data.frame

from

Data source, only noaa_sst for now, from http://www.esrl.noaa.gov/psd/data/gridded/data.noaa.oisst.v2.html

latitude

Latitude variable name

longitude

Longitude variable name

origin

Date origin, Default: 1800-1-1

Details

Works for the use case of finding locations for point based stations, floats/buoys type data

Author(s)

Tom Webb, Scott Chamberlain

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
library("spocc")
res <- occ(query = 'Mola mola', from = 'obis', limit = 200)
res_df <- occ2df(res)
sp_extract_gridded(x=res_df)

# pass in lat/lon variable names if needed
names(res_df)[2] <- "mylong"
head(res_df)
sp_extract_gridded(res_df, latitude = "latitude", longitude = "mylong")

## End(Not run)

ropenscilabs/spenv documentation built on Sept. 22, 2020, 4:46 p.m.