Facetted count occurrence search.

Share:

Description

Facetted count occurrence search.

Usage

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

Arguments

keys

(numeric) GBIF keys, a vector.

by

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

countries

(numeric) Number of countries to facet on, or a vector of country names

removezeros

(logical) Default is FALSE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## 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)

# 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
out <- count_facet(keys, by='georeferenced')
library("reshape2")
dcast(out, .id ~ georeferenced)

# by basisOfRecord
count_facet(by="basisOfRecord")

## End(Not run)

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