R package to query the Brazilian Flora 2020 dataset.
The dataset included in the package was kindly made available by the Brazilian Flora 2020, which is a joint effort by hundreds of taxonomists to provide an improved checklist of plants and fungi that occur in Brazil.
install.packages("devtools")
install.packages("shiny")
install.packages("dplyr")
install.packages("httr")
library("devtools")
install_github("gustavobio/flora")
The main function is get.taxa
, which will fix misspelled names, replace synonyms, and get taxonomic information for a vector of names.
library(flora)
get.taxa(c("Miconia albicans", "Myrcia lingua", "Cofea arabica"))
id scientific.name accepted.name family taxon.rank taxon.status
1 9668 Miconia albicans (Sw.) Triana <NA> Melastomataceae species accepted
2 10699 Myrcia guianensis (Aubl.) DC. <NA> Myrtaceae species accepted
3 24410 Coffea arabica L. <NA> Rubiaceae species accepted
search.str threat.status notes original.search
1 Miconia albicans <NA> Miconia albicans
2 Myrcia guianensis LC replaced synonym Myrcia lingua
3 Coffea arabica <NA> Coffea arabica
There are several arguments to get.taxa
. For instance, you can get the states of Brazil where the taxa occur:
get.taxa(c("Miconia albicans", "Myrcia lingua", "Cofea arabica"), states = TRUE)
id scientific.name accepted.name family taxon.rank taxon.status
1 9668 Miconia albicans (Sw.) Triana <NA> Melastomataceae species accepted
2 10699 Myrcia guianensis (Aubl.) DC. <NA> Myrtaceae species accepted
3 24410 Coffea arabica L. <NA> Rubiaceae species accepted
search.str threat.status notes original.search
1 Miconia albicans <NA> Miconia albicans
2 Myrcia guianensis LC replaced synonym Myrcia lingua
3 Coffea arabica <NA> Coffea arabica
occurrence
1 AC;AL;AM;AP;BA;CE;DF;ES;GO;MA;MG;MS;MT;PA;PB;PE;PI;PR;RJ;RN;RO;RR;SE;SP;TO
2 AC;AL;AM;AP;BA;CE;ES;GO;MG;MS;MT;PA;PE;RJ;RN;RS;SC;SP
3 AC;AL;BA;CE;DF;ES;GO;MG;MS;PB;PE;PR;RJ;RS;SC;SE;SP
Other arguments include life.form
, habitat
, vernacular
, and establishment
.
get.taxa
will automatically fix misspelled names when possible, but you can also use suggest.names
for that:
suggest.names("Cofea arabyca")
[1] "Coffea arabica"
If you have names with authors, you can try to remove them with remove.authors
remove.authors("Symplocos phaeoclados var. acuminata Gontsch.")
[1] "Symplocos phaeoclados var. acuminata"
The function lower.taxa
gets all names, accepted or not, which descends from a family or genus:
lower.taxa("Rapanea")
[1] "Rapanea" "Rapanea ferruginea" "Rapanea gardneriana" "Rapanea guianensis"
[5] "Rapanea leuconeura" "Rapanea parvifolia" "Rapanea umbellata" "Rapanea venosa"
[9] "Rapanea intermedia" "Rapanea oblonga" "Rapanea perforata" "Rapanea schwackeana"
[13] "Rapanea congesta" "Rapanea hermogenesii" "Rapanea lineata" "Rapanea lancifolia"
[17] "Rapanea loefgrenii" "Rapanea quaternata" "Rapanea matensis" "Rapanea villicaulis"
[21] "Rapanea villosissima" "Rapanea acuminata" "Rapanea megapotamica" "Rapanea lorentziana"
[25] "Rapanea laetevirens" "Rapanea balansae" "Rapanea emarginella" "Rapanea glazioviana"
[29] "Rapanea parvula" "Rapanea squarrosa" "Rapanea glaucorubens" "Rapanea ovalifolia"
[33] "Rapanea umbrosa" "Rapanea glomeriflora" "Rapanea oblongifolia" "Rapanea lauriformis"
[37] "Rapanea depauperata" "Rapanea paulensis" "Rapanea wettsteinii"
You may also search for a species using vernacular names:
vernacular("Pimenta", exact = TRUE)
id search.str family vernacular.name locality
1 7697 Erythroxylum daphnites Erythroxylaceae pimenta Minas Gerais
2 110560 Xylopia brasiliensis Annonaceae Pimenta <NA>
3 110583 Xylopia sericea Annonaceae Pimenta <NA>
Smaller things like casing and missplaced whitespaces are also covered:
fixCase("myrcia lingua")
[1] "Myrcia lingua"
trim("Myrcia lingua ")
[1] "Myrcia lingua"
standardize.names("Myrcia sp01")
[1] "Myrcia sp.1"
standardize.names("Myrcia sp2")
[1] "Myrcia sp.2"
standardize.names("Myrcia sp.3")
[1] "Myrcia sp.3"
There is a local web application included where one can simply paste names into a textbox and get taxonomic information, links to the original data source, search within the results and export to a csv file.
web.flora()