# Introduction and setup

In the vignettes “Get started with rcites”, we explained how to get a token and set it up for general access to the CITES Species+ database. Also, we very briefly introduced to how to code the key features of rcites. With this article, we aim to further introduce to the functionality and workflows of rcites. For this, we use the African bush elephant (Loxodonta africana, hereafter “elephant”) as a case study. The elephant not only is a highly endangered species that is illegally traded globally but also a flagship species of nature conservation and the logo species of CITES.

library(rcites)
set_token("8QW6Qgh57sBG2k0gtt")

# Retrieve the taxon id

In order to access information about the elephant, we first need to retrieve its Species+ taxon identifier. For this, we use the spp_taxonconcept() function and the elephant’s scientific name, Loxodonta africana, as query_taxon argument.

elephant_taxonconcept <- spp_taxonconcept(query_taxon = "Loxodonta africana")
elephant_taxonconcept

As the first column of the output shows, the taxon identifier of the elephant is 4521. This taxon_id will be used for all next function coding.

Beyond the taxon identifier, the output also provides information about the taxon classification and other names, both synonyms and common names if any, in different languages.

## Map the elephant’s distribution

Before giving more insights into the legislation status of the elephant, we have a look at where the elephant actually occurs naturally. For this, we can access the elephant’s distribution information with the spp_distributions() function. Thereafter, we can map the distribution with the help of the rworldmap package.

library(rworldmap)

par(las = 1)
elephant_distr <- spp_distributions(taxon_id = "4521",
verbose = FALSE)$distributions map2 <- joinCountryData2Map(elephant_distr, joinCode="ISO2", nameJoinColumn = "iso_code2", nameCountryColumn = "name") plot(c(-23, 62), c(45, -40), type = "n", main = "Loxodonta africana", xlab = "Longitude", ylab = "Latitude") plot(map2, add = TRUE) plot(map2[!is.na(map2$iso_code2),], col = "#cba74d", add = TRUE)

## Access the legislation status

The functions spp_cites_legislation() and spp_eu_legislation() provide access to the legislation status information of the elephant.

First, we have a look at the CITES legislation status:

elephant_cites <- spp_cites_legislation(taxon_id = "4521")
elephant_cites

We can do the same for the elephant’s legislation status in the European Union:

elephant_eu <- spp_eu_legislation(taxon_id = "4521")
elephant_eu

With the combination of map2 and the legislation data, one might be able to illustrate the elephant’s trade directions. This and other use examples of the rcites data output will be added bit by bit.

## Access the elephant’s Species+ reference data

Last but not least, it is important to identify which references the Species+ information about the elephant is based on. For this, we can access the Species+ reference data with the spp_references() function.

elephant_refs <- spp_references(taxon_id = "4521", verbose = FALSE)
elephant_refs
dim(elephant_refs\$references)