Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Otoliths authored Aug 4, 2020
1 parent 30cc7f8 commit b3d2d5c
Show file tree
Hide file tree
Showing 13 changed files with 124 additions and 68 deletions.
39 changes: 21 additions & 18 deletions man/SP2000-package.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -15,62 +15,65 @@ This package is designed for mining the checklist of animals, plants, fungi and

\examples{
\dontrun{
#Note: You need to apply for the apiKey <http://sp2000.org.cn/api/document>
# Note: You need to apply for the apiKey <http://sp2000.org.cn/api/document>
to run search_* functions of this package.

##Load "SP2000"
## Load "SP2000"

library('SP2000')

##Set your key
## Set your key

set_search_key <- "your apiKey"

##Search family IDs via family name, supports Latin and Chinese names
## 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
## Search taxon IDs via familyID ,scientificName and commonName

taxonid <- search_taxon_id(query = familyid$familyIDs,name = "familyID")
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
## Download detailed lists via species or infraspecies ID

query <- taxonid[["3851c5311bed46c19529cb155d37aa9b"]][["data"]][["namecode"]]

checklist1 <- search_checklist(query = taxonid$taxonIDs)
checklist <- search_checklist(query = query)

checklist1 <- list_df(checklist1,db = "colchina")

##Get Catalogue of Life Global checklist via species name and id
## Get Catalogue of Life Global checklist via species name and id

checklist2 <- get_col_global(query = queries, option = "name")
x <- get_col_global(query = "Anguilla", response = "full")

str(checklist2)
str(x)

checklist2 <- list_df(checklist2,db = "colglobal")
x[["Anguilla"]][["meta"]][["total_number_of_results"]] [1]

##Find synonyms via species name from Catalogue of Life Global
## Find synonyms via species name from Catalogue of Life Global

find_synonyms(query = queries)

##Search Catalogue of Life Taiwan checklist
## Search Catalogue of Life Taiwan checklist

get_col_taiwan(query = "Anguilla",tree = "name",option = "contain")
get_col_taiwan(query = "Anguillidae", level = "family")

##Query Redlist of Chinese Biodiversity
## Query Redlist of Chinese Biodiversity

get_redlist_china(query = "Anguilla", option = "Scientific Names")

}
}

\references{
Ding LY, Li H, Tao J, Zhang JL, Huang MR, Yang K, Wang J, He DM, Ding CZ (2020) SP2000: A package written in R and Python for downloading catalogue of life. Biodiversity Science.
Ding LY, Li H, Tao J, Zhang JL, Huang MR, Yang K, Wang J, He DM, Ding CZ (2020) SP2000: An open source R package for querying the catalogue of life. Biodiversity Science.

https://cran.r-project.org/package=SP2000

Expand Down
6 changes: 6 additions & 0 deletions man/api_key.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/download_col_china.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions man/find_synonyms.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 14 additions & 7 deletions man/get_col_global.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 12 additions & 7 deletions man/get_col_taiwan.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/get_province.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 19 additions & 5 deletions man/get_redlist_china.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions man/list_df.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/open_url.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions man/search_checklist.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions man/search_family_id.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b3d2d5c

Please sign in to comment.