Bulk analysis with rcites

rcites team

15-08-2018

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  2 / 6      
Retrieving info from page  3 / 6      
Retrieving info from page  4 / 6      
Retrieving info from page  5 / 6      
Retrieving info from page  6 / 6      
#>  Done!
dim(res_cms$general)
#>  [1] 2518    7

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

res_cites <- spp_taxonconcept("", page = 1:2)
#>  Retrieving info from page  2 / 154      
#>  Done!
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()

#>  
#>  10255  3210  4521 
#>     15     8    42

spp_cites_legislation()

#>    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()

#>    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()

#>  
#>  10255  3210  4521 
#>      1     3    15