# NOT RUN {
# Note: You need to apply for the apiKey <http://sp2000.org.cn/api/document>
to run search_* functions of this package.
## Load "SP2000"
library('SP2000')
## Set your key
set_search_key("your apiKey",db = "sp2000")
## Search family IDs via family name, supports Latin and Chinese names
familyid <- search_family_id(query = "Anguillidae")
## Search taxon IDs via familyID ,scientificName and commonName
query <- familyid$Anguillidae$data$record_id
taxonid <- search_taxon_id(query = query,name = "familyID")
queries = c("Anguilla marmorata","Anguilla japonica",
"Anguilla bicolor","Anguilla nebulosa",
"Anguilla luzonensis")
search_taxon_id(query = queries,name = "scientificName")
## Download detailed lists via species or infraspecies ID
query <- taxonid[["3851c5311bed46c19529cb155d37aa9b"]][["data"]][["namecode"]]
checklist <- search_checklist(query = query)
## Get Catalogue of Life Global checklist via species name and id
x <- get_col_global(query = "Anguilla", response = "full")
str(x)
x[["Anguilla"]][["meta"]][["total_number_of_results"]] [1]
## Find synonyms via species name from Catalogue of Life Global
find_synonyms(query = queries)
## Search Catalogue of Life Taiwan checklist
get_col_taiwan(query = "Anguillidae", level = "family")
## Query Redlist of Chinese Biodiversity
get_redlist_china(query = "Anguilla", option = "Scientific Names")
# }
Run the code above in your browser using DataLab