R/get_nodes_data.R

Defines functions get_nodes_data

get_nodes_data = function() {

  L = httr::GET("https://api.gbif.org/v1/node?limit=1000") %>%
    httr::content() %>%
    pluck("results")

  tibble(
    node_title = L %>% map(~.x$title) %>% gbifapi::empty_fill_chr(),
    gbif_region = L %>% map(~.x$gbifRegion) %>% gbifapi::empty_fill_chr(),
    participation_status = L %>% map(~.x$participationStatus) %>% gbifapi::empty_fill_chr(),
    type = L %>% map(~.x$type) %>% gbifapi::empty_fill_chr(),
    country = L %>% map(~.x$country) %>% gbifapi::empty_fill_chr()
  )

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