spenv
- add environmental data to spatial data
Docs: https://sckott.github.io/spenv/
sp_mutate
- get env data for occ data input - not ready yetsp_extract_gridded
- extract env gridded datasp_extract_pt
- extract env point datasp_query
- query for env data - not ready yetfind_locs
- find locations/stations/etc. based on occ data input - internal fxn used in sp_mutate
List of datasources on Google Sheets
I want data…
file <- system.file("examples", "obis_mola_mola.csv", package = "spenv") dat <- read.csv(file) head(dat)
res <- sp_extract_pt(x = dat[1:10,], radius = 100) res[[1]]
library("spocc") res <- occ(query = 'Mola mola', from = 'obis', limit = 200) res_df <- occ2df(res) out <- sp_extract_gridded(res_df) head(out) #> # A tibble: 6 x 8 #> name longitude latitude prov date key lon_adj sst #> <chr> <dbl> <dbl> <chr> <date> <chr> <dbl> <dbl> #> 1 Mola m… 7.73 43.1 obis 2012-06-02 00001054-19a2-441b-… 7.73 20.5 #> 2 Mola m… 4.06 43.4 obis 2012-05-25 0000642b-51de-4042-… 4.06 16.2 #> 3 Mola m… -2.14 49.2 obis 2001-08-05 000a320e-4e86-4259-… 358. 17.4 #> 4 Mola m… 4.21 43.2 obis 2012-05-25 001099b7-7a24-4072-… 4.21 16.2 #> 5 Mola m… -2.09 44.4 obis 2012-07-03 0018922a-8b1c-4bb2-… 358. 20.0 #> 6 Mola m… 6.19 42.9 obis 2012-06-27 0018a5aa-d260-4af1-… 6.19 20.5
Map it
“map”
spenv
in R doing citation(package = 'spenv')