Spin up a download request for GBIF occurrence data.

Description

Spin up a download request for GBIF occurrence data.

Usage

1
2
3
occ_download(..., type = "and", user = getOption("gbif_user"),
  pwd = getOption("gbif_pwd"), email = getOption("gbif_email"),
  callopts = list())

Arguments

...

One or more of query arguments to kick of a download job. See Details.

type

(charcter) One of equals (=), and (&), or (|), lessThan (<), lessThanOrEquals (<=), greaterThan (>), greaterThanOrEquals (>=), in, within, not (!), like

user

(character) User name within GBIF's website. Required. Set in your .Rprofile file with the option gbif_user

pwd

(character) User password within GBIF's website. Required. Set in your .Rprofile file with the option gbif_pwd

email

(character) Email address to recieve download notice done email. Required. Set in your .Rprofile file with the option gbif_email

callopts

Further named arguments passed on to POST

Details

Argument passed have to be passed as character (e.g., 'country = US'), with a space between key ('country'), operator ('='), and value ('US'). See the type parameter for possible options for the operator. This character string is parsed internally.

Acceptable arguments to ... are:

  • taxonKey = 'TAXON_KEY'

  • scientificName = 'SCIENTIFIC_NAME'

  • country = 'COUNTRY'

  • publishingCountry = 'PUBLISHING_COUNTRY'

  • hasCoordinate = 'HAS_COORDINATE'

  • hasGeospatialIssue = 'HAS_GEOSPATIAL_ISSUE'

  • typeStatus = 'TYPE_STATUS'

  • recordNumber = 'RECORD_NUMBER'

  • lastInterpreted = 'LAST_INTERPRETED'

  • continent = 'CONTINENT'

  • geometry = 'GEOMETRY'

  • basisOfRecord = 'BASIS_OF_RECORD'

  • datasetKey = 'DATASET_KEY'

  • eventDate = 'EVENT_DATE'

  • catalogNumber = 'CATALOG_NUMBER'

  • year = 'YEAR'

  • month = 'MONTH'

  • decimalLatitude = 'DECIMAL_LATITUDE'

  • decimalLongitude = 'DECIMAL_LONGITUDE'

  • elevation = 'ELEVATION'

  • depth = 'DEPTH'

  • institutionCode = 'INSTITUTION_CODE'

  • collectionCode = 'COLLECTION_CODE'

  • issue = 'ISSUE'

  • mediatype = 'MEDIA_TYPE'

  • recordedBy = 'RECORDED_BY'

References

See the API docs http://www.gbif.org/developer/occurrence#download for more info, and the predicates docs http://www.gbif.org/developer/occurrence#predicates.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
# occ_download("basisOfRecord = LITERATURE")
# occ_download('taxonKey = 3119195')
# occ_download('decimalLatitude > 50')
# occ_download('elevation >= 9000')
# occ_download('decimalLatitude >= 65')
# occ_download("country = US")
# occ_download("institutionCode = TLMF")
# occ_download("catalogNumber = Bird.27847588")

# res <- occ_download('taxonKey = 7264332', 'hasCoordinate = TRUE')

# pass output directly, or later, to occ_download_meta for more information
# occ_download('decimalLatitude > 75') %>% occ_download_meta

# Multiple queries
# occ_download('decimalLatitude >= 65', 'decimalLatitude <= -65', type="or")
# gg <- occ_download('depth = 80', 'taxonKey = 2343454', type="or")

## End(Not run)

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