knitr::opts_chunk$set(echo = TRUE)
library(dplyr)

get_site_speciesOccurrences(), map_occ_gbif2elter and save_occ_eLTER_reporting_Archive() are delivered only with devwithImprovements branch __

Starting from the eLTER site id (DEIMS.iD), by ReLTER get_site_speciesOccurrences function, anyone can retrieve occurrence records from GBIF (via rgbif R package), iNaturalist and OBIS carried out within the boundaries of the site.

What the output of the ReLTER get_site_speciesOccurrences() is?

The user sets the parameters of the function and, through these choose, defines the output.

The parameters of the function are:

The output are two type: a map and a table(s), for each external data service selected.

# DEIMS.iD of eLTER site Gulf Of Venice (GOV)
GOVid <- "https://deims.org/758087d7-231f-4f07-bd7e-6922e0c283fd"

# Compose the function with choosen parameters
resGOV <- ReLTER::get_site_speciesOccurrences(
  deimsid = GOVid,
  list_DS = c("gbif", "inat", "obis"),
  show_map = TRUE,
  limit = 20
)
# iNat table
knitr::kable(
  resGOV$inat[c(1:10)],
  caption = "The first 10 occurrence records of iNaturalist on the selected eLTER site."
)
# OBIS table
knitr::kable(
  resGOV$obis[c(1:10)],
  caption = "The first 10 occurrence records of OBIS on the selected eLTER site."
)

How to trasform external service data schemas into eLTER data-reporting template?

The structure of species occurrence records reflects the exporting schema of the original data publisher. Fields mapping among the three data source schemas (i.e., GBIF, iNaturalist, OBIS) and the eLTER data-reporting template (@Peterseil2021) was carried out so as to design functions to structure fetched data in three simplified output data formats. These output data formats result i) harmonised to eLTER data-reporting requirements/template and ii) more readable since only essential attributes are maintained.

Using 2 other R functions, developed for solve this issue, data from external data service can be exported into eLTER data-reporting template.

Below an example for the eLTER Saldur River Catchment site, where the external data service to be queried are GBIF and iNaturalist.

saldurid <- "https://deims.org/97ff6180-e5d1-45f2-a559-8a7872eb26b1"

resSaldur <- ReLTER::get_site_speciesOccurrences(
  deimsid = saldurid,
  list_DS = c("gbif", "inat"),
  show_map = FALSE,
  limit = 20,
  exclude_inat_from_gbif = TRUE
)

# GBIF
tblSaldur_gbif <- tibble::as_tibble(resSaldur$gbif)
if (nrow(tblSaldur_gbif) > 0) {
  outGbif <- tblSaldur_gbif %>%
    ReLTER::map_occ_gbif2elter(deimsid = saldurid)
  ReLTER::save_occ_eLTER_reporting_Archive(outGbif)
}
# iNaturalist
tblSaldur_inat <- tibble::as_tibble(resSaldur$inat)
outInat <- tblSaldur_inat %>%
  ReLTER::map_occ_inat2elter(deimsid = saldurid)
ReLTER::save_occ_eLTER_reporting_Archive(outInat)

The eLTER useful archive created are:

References

::: {#refs} :::



oggioniale/ReLTER documentation built on Jan. 4, 2024, 3:48 p.m.