R/get_infraspecies_count.R

Defines functions get_infraspecies_count

get_infraspecies_count = function(taxonkeys) {

  taxonkeys %>%
    map(~
          gbifapi::page_api("https://www.gbif.org/api/species/search?highertaxon_key=" %+% .x %+% "&status=ACCEPTED&status=DOUBTFUL") %>%
          pluck("count")
    ) %>%
    flatten_dbl()

}
jhnwllr/gbifapi documentation built on April 30, 2022, 12:55 p.m.