Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nbn_search

Search UK National Biodiversity Network


Description

Search UK National Biodiversity Network

Usage

nbn_search(
  sci_com,
  fq = NULL,
  order = NULL,
  sort = NULL,
  start = 0,
  rows = 25,
  facets = NULL,
  q = NULL,
  ...
)

Arguments

sci_com

(character) The query terms(s), a scientific or common name

fq

(character) Filters to be applied to the original query. These are additional params of the form fq=INDEXEDFIELD:VALUE e.g. fq=rank:kingdom. See https://species-ws.nbnatlas.org/indexFields for all the fields that are queryable.

order

(character) Supports "asc" or "desc"

sort

(character) The indexed field to sort by

start

(integer) Record offset, to enable paging

rows

(integer) Number of records to return

facets

(list) Comma separated list of the fields to create facets on e.g. facets=basis_of_record.

q

Deprecated, see sci

...

Further args passed on to crul::HttpClient.

Value

a list with slots for metadata (meta) with list of response attributes, and data (data) with a data.frame of results

Author(s)

Scott Chamberlain,

References

https://api.nbnatlas.org/

See Also

Examples

## Not run: 
x <- nbn_search(sci_com = "Vulpes")
x$meta$totalRecords
x$meta$pageSize
x$meta$urlParameters
x$meta$queryTitle
head(x$data)

nbn_search(sci_com = "blackbird", start = 4)

# debug curl stuff
nbn_search(sci_com = "blackbird", verbose = TRUE)

## End(Not run)

taxize

Taxonomic Information from Around the Web

v0.9.100
MIT + file LICENSE
Authors
Scott Chamberlain [aut] (<https://orcid.org/0000-0003-1444-9135>), Eduard Szoecs [aut], Zachary Foster [aut, cre], Zebulun Arendsee [aut], Carl Boettiger [ctb], Karthik Ram [ctb], Ignasi Bartomeus [ctb], John Baumgartner [ctb], James O'Donnell [ctb], Jari Oksanen [ctb], Bastian Greshake Tzovaras [ctb], Philippe Marchand [ctb], Vinh Tran [ctb], Maëlle Salmon [ctb], Gaopeng Li [ctb], Matthias Grenié [ctb], rOpenSci [fnd] (https://ropensci.org/)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.