Download species records by hexagon of a hexagonal grid of a specified resolution
get_records_by_hexagon.Rd
This function is wrapper of the occ function from the spocc package.
Arguments
- species_name
(
character
) Species name.- aoi_sf
(
character
) The spatial area of interest as an sf object.- res
(
numeric
) The option for the resolution of image to download. Should between 1 and 16.- providers
(
character
) The providers argument allows you to specify multiple data sources (e.g., "gbif", "inat", etc.).
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
rec_hex <- get_records_by_hexagon("Lynx rufus", nc, res = 6,
providers = c("gbif", "inat"))
#> Error in occ(query = species_name, from = providers, geometry = bbox, has_coords = TRUE, limit = 1e+05): could not find function "occ"