Skip to contents

This function is wrapper of the occ function from the spocc package.

Usage

get_records(species_name, aoi_sf, providers = NULL)

Arguments

species_name

Species name.

aoi_sf

The spatial area of interest as an sf object.

providers

The providers argument allows you to specify multiple data sources (e.g., "gbif", "inat", etc.).

Value

An sf object

Examples


nc = st_read(system.file("shape/nc.shp", package="sf"))
#> Reading layer `nc' from data source 
#>   `/home/runner/work/_temp/Library/sf/shape/nc.shp' using driver `ESRI Shapefile'
#> Simple feature collection with 100 features and 14 fields
#> Geometry type: MULTIPOLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
#> Geodetic CRS:  NAD27

records <- get_records("Lynx rufus", nc, providers = c("gbif",
"inat"))
#> Error in occ(query = species_name, from = providers, geometry = bbox,     has_coord = TRUE, limit = 1e+05): could not find function "occ"