Get data for specific GBIF occurrences.

Share:

Description

Get data for specific GBIF occurrences.

Usage

1
2
occ_get(key = NULL, return = "all", verbatim = FALSE,
  fields = "minimal", ...)

Arguments

key

Occurrence key

return

One of data, hier, meta, or all. If 'data', a data.frame with the data. 'hier' returns the classifications in a list for each record. meta returns the metadata for the entire call. 'all' gives all data back in a list. Ignored if verbatim=TRUE.

verbatim

Return verbatim object (TRUE) or cleaned up object (FALSE, default).

fields

(character) Default ('minimal') will return just taxon name, key, latitude, and longitute. 'all' returns all fields. Or specify each field you want returned by name, e.g. fields = c('name','decimalLatitude','altitude').

...

Further named parameters, such as query, path, etc, passed on to modify_url within GET call. Unnamed parameters will be combined with config.

Value

A data.frame or list of data.frame's.

References

http://www.gbif.org/developer/occurrence#occurrence

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
occ_get(key=766766824, return='data')
occ_get(key=766766824, 'hier')
occ_get(key=766766824, 'all')

# many occurrences
occ_get(key=c(101010, 240713150, 855998194), return='data')

# Verbatim data
occ_get(key=766766824, verbatim=TRUE)
occ_get(key=766766824, fields='all', verbatim=TRUE)
occ_get(key=766766824, fields=c('scientificName', 'lastCrawled', 'county'), verbatim=TRUE)
occ_get(key=c(766766824, 620594291, 766420684), verbatim=TRUE)
occ_get(key=c(766766824, 620594291, 766420684), fields='all', verbatim=TRUE)
occ_get(key=c(766766824, 620594291, 766420684),
   fields=c('scientificName', 'decimalLatitude', 'basisOfRecord'), verbatim=TRUE)

# Pass in curl options
library("httr")
occ_get(key=766766824, config=verbose())
# occ_get(key=766766824, config=progress())

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.