README.md

spenv

Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept. Build Status

spenv - add environmental data to spatial data

Docs: https://sckott.github.io/spenv/

Package API

Data sources

List of datasources on Google Sheets

Use cases

I want data...

Install

remotes::install_github("sckott/spenv")
library("spenv")

Example: pt env 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]]

Example: gridded env data

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"

Contributors

Meta



sckott/spenv documentation built on Sept. 23, 2020, 4:09 a.m.