Skip to contents

[Stable] This function acquires data from GBIF https://www.gbif.org (via rgbif), iNaturalist https://www.inaturalist.org/ and OBIS https://obis.org/ and crops to an eLTER site boundary, which is obtained from the DEIMS-SDR sites API.

Usage

get_site_speciesOccurrences(
  deimsid,
  list_DS,
  show_map = FALSE,
  limit = 500,
  exclude_inat_from_gbif = TRUE
)

Arguments

deimsid

A character. The DEIMS.iD of the site from DEIMS-SDR website. DEIMS.iD information here.

list_DS

A character. Data source to get data from, any combination of gbif, inat and/or obis.

show_map

A boolean. If TRUE a Leaflet map with occurrences is shown. Default FALSE.

limit

A numeric. Number of records to return. This is passed across all sources. Default: 500 for each source. BEWARE: if you have a lot of species to query for (e.g., n = 10), that's 10 * 500 = 5000, which can take a while to collect. So, when you first query, set the limit to something smallish so that you can get a result quickly, then do more as needed.

exclude_inat_from_gbif

A boolean. If TRUE, when list_DS contains both "gbif" and "inat", filter out gbif records originating from iNaturalist (in order to avoid duplicates). Default TRUE.

Value

The output of the function is a list of sf one for each of the repositories specified in the list_DS parameter.

The function output

Map of first 100 occurrences acquired from iNaturalist and OBIS in the marine site Gulf of Venice

Author

Alessandro Oggioni, PhD (2020) oggioni.a@irea.cnr.it

Paolo Tagliolato, PhD (2020) tagliolato.p@irea.cnr.it

Martina Zilioli zilioli.m@irea.cnr.it

Examples

if (FALSE) {
# terrestrial site Saldur River Catchment
occ_SRC <- get_site_speciesOccurrences(
  deimsid =
    "https://deims.org/97ff6180-e5d1-45f2-a559-8a7872eb26b1",
  list_DS = c("gbif", "inat"),
  show_map = FALSE,
  limit = 10
)
occ_SRC

# marine site Gulf of Venice only obis
occ_GoV <- get_site_speciesOccurrences(
  deimsid =
    "https://deims.org/758087d7-231f-4f07-bd7e-6922e0c283fd",
  list_DS = "obis",
  show_map = FALSE,
  limit = 10
)
occ_GoV

# marine site Gulf of Venice, all repositories are invoked
# gbif, inat and obis
occ_GoV_all <- get_site_speciesOccurrences(
  deimsid =
    "https://deims.org/758087d7-231f-4f07-bd7e-6922e0c283fd",
  list_DS = c("gbif", "inat", "obis"),
  show_map = TRUE,
  limit = 10
)
occ_GoV_all
}