Giter VIP home page Giter VIP logo

flora's Introduction

flora

R package to query the Brazilian Flora 2020 dataset.

Developer

Data

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.

Installation

Install devtools and shiny

install.packages("devtools")
install.packages("shiny")
install.packages("dplyr")
install.packages("httr")
library("devtools")

Install flora

install_github("gustavobio/flora")

Usage

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"

Web application

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

Click on the screenshot for an expanded view

flora's People

Contributors

gustavobio avatar

Watchers

James Cloos avatar Alexandre Adalardo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.