occ_get: Get data for specific GBIF occurrences.

Description Usage Arguments Value References Examples

Description

Get data for specific GBIF occurrences.

Usage

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

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').

curlopts

list of named curl options passed on to HttpClient. see curl_options for curl options

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
occ_get(key=766766824, curlopts = list(verbose=TRUE))

## End(Not run)


Search within the rgbif package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.