inbo / riparias-prep

Preparatory scripts and data management for the RIPARIAS workflow
MIT License
0 stars 1 forks source link

Automatically retrieve GBIF keys from LIFE RIPARIAS target species list #50

Closed damianooldoni closed 1 year ago

damianooldoni commented 2 years ago

This code below shows you how simple it is to get all RIPARIAS target species automatically now that the checklist is published and available on GBIF.

library(rgbif)
library(dplyr)

riparias_checklist <- rgbif::name_usage(
  datasetKey = "fd004d9a-2ea4-4244-bb60-0df508d20a15", 
)

gbif_backbone_keys <- 
  riparias_checklist$data %>%
  dplyr::filter(origin == "SOURCE") %>%
  pull(.data$nubKey)

gbif_backbone_keys
#>  [1] 8721209 9442269 8930656 2227300 2227289 4417558 8979506 8971201 2869311
#> [10] 5384931 5328593 2703231 2891770 3628745 3112110 5329260 5361785 2766030
#> [19] 3088310 5361762 3034825 5421039 5384932 7532688 2882443 5420991 5362054
#> [28] 2865565 3642949

Just close the issue once this step is implemented.

timadriaens commented 2 years ago

to be implemented in dashboard code @jrhillae