Learn R Programming

bdvis (version 0.2.37)

taxotree: Treemap based on taxonomic hierarchy of records

Description

Draws a treemap (https://en.wikipedia.org/wiki/Treemapping) based on the taxonomic information of the records.

Usage

taxotree(
  indf,
  n = 30,
  title = NA,
  legend = NA,
  sum1 = "Family",
  sum2 = "Genus"
)

Value

No return value, called for plotting the graph

Arguments

indf

input data frame containing biodiversity data set

n

maximum number of rectangles to be plotted in the treemap. Default is 30

title

title for the tree. Default is "Records per <sum1>"

legend

legend title. Default is "Number of <sum2>"

sum1

Taxonomic level whose density will be represented with different cell sizes

sum2

Taxonomic level whose density will be represented with a color gradient

Details

This function builds a treemap of the taxonomic information present in the data set. It represents this information at two levels (with the arguments sum1 and sum2). The first level (sum1) will be represented with cell sizes and is a reflection of the number of records in that group. If, for example, "Family" is selected as value for sum1, the size of the cells in the treemap will be directly proportional to the number of records for that taxonomic family. The second level (sum2) will be represented by color and is a reflection of the number of sub-groups in a particular cell. If, for example, "Genus" is selected as value for sum2, the color of the cell will depend on the number of different genera for that particular cell.

References

Otegui, J., Arino, A. H., Encinas, M. A., & Pando, F. (2013). Assessing the Primary Data Hosted by the Spanish Node of the Global Biodiversity Information Facility (GBIF). PLoS ONE, 8(1), e55144. doi:10.1371/journal.pone.0055144

Examples

Run this code
if (FALSE) {
 taxotree(inat)
}

Run the code above in your browser using DataLab