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

count_facet

Facetted count occurrence search.


Description

Facetted count occurrence search.

Usage

count_facet(keys = NULL, by = "country", countries = 10, removezeros = FALSE)

Arguments

keys

(numeric) GBIF keys, a vector. optional

by

(character) One of georeferenced, basisOfRecord, country, or publishingCountry. default: country

countries

(numeric) Number of countries to facet on, or a vector of country names. default: 10

removezeros

(logical) remove zeros or not? default: FALSE

Examples

## Not run: 
# Select number of countries to facet on
count_facet(by='country', countries=3, removezeros = TRUE)
# Or, pass in country names
count_facet(by='country', countries='AR', removezeros = TRUE)

spplist <- c('Geothlypis trichas','Tiaris olivacea','Pterodroma axillaris',
             'Calidris ferruginea','Pterodroma macroptera',
             'Gallirallus australis',
             'Falco cenchroides','Telespiza cantans','Oreomystis bairdi',
             'Cistothorus palustris')
keys <- sapply(spplist,
  function(x) name_backbone(x, rank="species")$usageKey)
count_facet(keys, by='country', countries=3, removezeros = TRUE)
count_facet(keys, by='country', countries=3, removezeros = FALSE)
count_facet(by='country', countries=20, removezeros = TRUE)
count_facet(keys, by='basisOfRecord', countries=5, removezeros = TRUE)

# Pass in country names instead
countries <- isocodes$code[1:10]
count_facet(by='country', countries=countries, removezeros = TRUE)

# get occurrences by georeferenced state
## across all records
count_facet(by='georeferenced')

## by keys
count_facet(keys, by='georeferenced')

# by basisOfRecord
count_facet(by="basisOfRecord")

## End(Not run)

rgbif

Interface to the Global 'Biodiversity' Information Facility API

v3.5.2
MIT + file LICENSE
Authors
Scott Chamberlain [aut, cre] (<https://orcid.org/0000-0003-1444-9135>), Damiano Oldoni [aut] (<https://orcid.org/0000-0003-3445-7562>), Vijay Barve [ctb] (<https://orcid.org/0000-0002-4852-2567>), Peter Desmet [ctb] (<https://orcid.org/0000-0002-8442-8025>), Laurens Geffert [ctb], Dan Mcglinn [ctb] (<https://orcid.org/0000-0003-2359-3526>), Karthik Ram [ctb] (<https://orcid.org/0000-0002-0233-1757>), 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.