Broad taxon concept queries

If you want to query all taxa, you can use spp_taxonconcept() with query_taxon = "" (assuming your token is already set up):

res_cms <- spp_taxonconcept("", taxonomy = "CMS") #slow
#>  → Retrieving info from page 1 ........................✔ 
#>  ── 10 pages available, retrieving info from 9 more ────────────────────────
#>  → Retrieving info from page 2 ........................✔ 
#>  → Retrieving info from page 3 ........................✔ 
#>  → Retrieving info from page 4 ........................✔ 
#>  → Retrieving info from page 5 ........................✔ 
#>  → Retrieving info from page 6 ........................✔ 
#>  → Retrieving info from page 7 ........................✔ 
#>  → Retrieving info from page 8 ........................✔ 
#>  → Retrieving info from page 9 ........................✔ 
#>  → Retrieving info from page 10 .......................✔
dim(res_cms$general)
#>  [1] 2863    7

Alternatively, you can retrieve, for example, the first three pages of results returned by the API.

#>  → Retrieving info from page 1 ........................✔ 
#>  ── 154 pages available, retrieving info from 1 more ───────────────────────
#>  → Retrieving info from page 2 ........................✔
dim(res_cites$general)
#>  [1] 1000    8

Retrieving information for a set of taxon_concept ID

All spp_ functions (i.e. spp_distributions(), spp_eu_legislation(), spp_cites_legislation() and spp_references()) can handle a vector of taxon_id which allows bulk analysis. Below we exemplify this feature for the four functions.

spp_distributions()

vc_txn <- c('4521', '3210', '10255')
res1 <- spp_distributions(taxon_id = vc_txn, verbose = FALSE)
## Number of countries concerned per taxon ID
table(res1$distributions$taxon_id)
#>  
#>  10255  3210  4521 
#>     15     8    42

spp_cites_legislation()

res2 <- spp_cites_legislation(taxon_id = vc_txn, verbose = FALSE)
res2$cites_listings
#>    taxon_id   id taxon_concept_id is_current appendix change_type
#>  1     4521 3666             4521       TRUE       II           +
#>  2     4521 3665             4521       TRUE        I           +
#>  3     4521 3645             4521       TRUE        I          R+
#>  4     3210 4661             3210       TRUE       II           +
#>  5    10255 4645            10255       TRUE        I           +
#>    effective_at
#>  1   2007-09-13
#>  2   2007-09-13
#>  3   1990-01-18
#>  4   1987-10-22
#>  5   2005-01-12

spp_eu_legislation()

res3 <- spp_eu_legislation(taxon_id = vc_txn, verbose = FALSE)
res3$eu_listings
#>    taxon_id    id taxon_concept_id is_current annex change_type
#>  1     4521 27868             4521       TRUE     B           +
#>  2     4521 27801             4521       TRUE     A           +
#>  3     3210 27900             3210       TRUE     B           +
#>  4    10255 27846            10255       TRUE     A           +
#>    effective_at
#>  1   2017-02-04
#>  2   2017-02-04
#>  3   2017-02-04
#>  4   2017-02-04

spp_references()

res4 <- spp_references(taxon_id = vc_txn, verbose = FALSE)
## Number of references per taxon ID
table(res4$references$taxon_id)
#>  
#>  10255  3210  4521 
#>      1     3    15