Learn R Programming

rgbif (version 0.7.0)

occ_count: Get number of occurrence records.

Description

Get number of occurrence records.

Usage

occ_count(taxonKey = NULL, georeferenced = NULL, basisOfRecord = NULL,
  datasetKey = NULL, date = NULL, catalogNumber = NULL, country = NULL,
  hostCountry = NULL, year = NULL, from = 2000, to = 2012,
  type = "count", publishingCountry = "US", callopts = list(),
  nubKey = NULL, protocol = NULL)

Arguments

nubKey
Species key. PARAMETER NAME CHANGED TO taxonKey.
taxonKey
Species key
georeferenced
Return only occurence records with lat/long data (TRUE) or all records (FALSE, default).
basisOfRecord
Basis of record
datasetKey
Dataset key
date
Collection date
year
Year data were collected in
catalogNumber
Catalog number. PARAMETER GONE.
country
Country data was collected in, two letter abbreviation. See http://countrycode.org/ for abbreviations.
protocol
Protocol. E.g., 'DWC_ARCHIVE'
hostCountry
Country that hosted the data. PARAMETER GONE.
publishingCountry
Publishing country, two letter ISO country code
from
Year to start at
to
Year to end at
type
One of count (default), schema, basis_of_record, countries, or year.
callopts
Pass on options to httr::GET for more refined control of http calls, and error handling

Value

  • A single numeric value, or a list of numerics.

References

http://www.gbif.org/developer/summary

Examples

Run this code
occ_count(basisOfRecord='OBSERVATION')
occ_count(georeferenced=TRUE)
occ_count(country='DE')
occ_count(country='CA', georeferenced=TRUE, basisOfRecord='OBSERVATION')
occ_count(datasetKey='9e7ea106-0bf8-4087-bb61-dfe4f29e0f17')
occ_count(year=2012)
occ_count(taxonKey=2435099)
occ_count(taxonKey=2435099, georeferenced=TRUE)
occ_count(protocol='DWC_ARCHIVE')

# Just schema
occ_count(type='schema')

# Counts by basisOfRecord types
occ_count(type='basisOfRecord')

# Counts by countries. publishingCountry must be supplied (default to US)
occ_count(type='countries')

# Counts by year. from and to years have to be supplied, default to 2000 and 2012
occ_count(type='year', from=2000, to=2012)

# Counts by publishingCountry, must supply a country (default to US)
occ_count(type='publishingCountry')
occ_count(type='publishingCountry', country='BZ')

Run the code above in your browser using DataLab