Title: | An R package for mining global plant diversity and distribution data |
---|---|
Description: | Produces diversity estimates and species lists with associated global distribution for any vascular plant family and genus from 'Plants of the World Online' database <https://powo.science.kew.org/>, by interacting with the source code of each plant taxon page. It also creates global maps of species richness, graphics of species discoveries and nomenclatural changes over time. For more details |
Authors: | Debora C. Zuanny [aut, cre, cph]
|
Maintainer: | Debora Zuanny <[email protected]> |
License: | MIT + file LICENSE |
Version: | 2.0 |
Built: | 2025-02-22 05:30:21 UTC |
Source: | https://github.com/dboslab/expowo |
Produces graphics of the dynamics of species description and
historical nomenclature changes within any family or genus provided. It is
designed to create graphics based on the dataframe resulted from
powoSpecies
. The graph type can be selected by two arguments
(spp_acc and spp_changes) and then multiple graphs for any different
taxonomic groups within the input data can be produced automatically in a
single run.
accGraph(inputdf = NULL, verbose = TRUE, spp_acc = TRUE, spp_changes = TRUE, spp_changes_col = NULL, genus_plots = TRUE, save = FALSE, dir = "results_accGraph", filename = "cumulative_discovery_", format = "pdf")
accGraph(inputdf = NULL, verbose = TRUE, spp_acc = TRUE, spp_changes = TRUE, spp_changes_col = NULL, genus_plots = TRUE, save = FALSE, dir = "results_accGraph", filename = "cumulative_discovery_", format = "pdf")
inputdf |
A dataframe generated using |
verbose |
Logical, if |
spp_acc |
Logical. Setting to |
spp_changes |
Logical. Setting to |
spp_changes_col |
Define the name of a column in the main input data
for which the species changes will be considered. For example, if densities
and jitters should be presented for each genus in the same graphic, then set
|
genus_plots |
Logical. If |
save |
Logical, if |
dir |
Pathway to the computer's directory, where the file will be saved
provided that the argument |
filename |
Name of the output file to be saved. The default is to create a file entitled cumulative_discovery_. |
format |
A character vector related to the file format of the graph to be saved. The default is "pdf" to save the output in Portable Document Format (.pdf), but you can also choose "jpg" to save in Joint Photographic Experts Group (.jpg), "tiff" to save in Tag Image File Format (.tiff) or "png" to save in Portable Network Graphics (.png). |
Objects of class c("gg", "ggplot") and saves the output on disk.
Debora Zuanny & Domingos Cardoso
## Not run: library(expowo) accGraph(inputdf = "output", verbose = TRUE, spp_acc = TRUE, spp_changes = TRUE, spp_changes_col = "genus", genus_plots = TRUE, save = FALSE, dir = "results_accGraph", filename = "cumulative_discovery_Cyperaceae", format = "pdf") ## End(Not run)
## Not run: library(expowo) accGraph(inputdf = "output", verbose = TRUE, spp_acc = TRUE, spp_changes = TRUE, spp_changes_col = "genus", genus_plots = TRUE, save = FALSE, dir = "results_accGraph", filename = "cumulative_discovery_Cyperaceae", format = "pdf") ## End(Not run)
Complete list of all non-hybrid species and
associated data of Lecythidaceae, Aristolochiaceae, Martyniaceae,
Cabombaceae, and Begoniaceae, as retrieved from POWO database in November 2022
using the expowo
's function powoSpecies
.
data(angioData)
data(angioData)
data.frame
Complete list of all genera and associated data of
Lecythidaceae, Aristolochiaceae, Begoniaceae, Martyniaceae, Dipterocarpaceae,
and Fagaceae, as retrieved from POWO database in January 2023 using the
expowo
's function powoGenera
.
data(angioGenera)
data(angioGenera)
data.frame
Countries and associated classification of botanical divisions according to the World Geographical Scheme for Recording Plant Distributions.
data(botregions)
data(botregions)
data.frame
https://www.tdwg.org/standards/wgsrpd/
Produces a spreadsheet with extra data about the
publication, adding the corrected year of publication and the counting of
synonyms of each species. It is an optional function to be used after run
expowo's powoSpecies
and to use as input data in the expowo's
accGraph
.
get_year_pubs(inputdf = NULL, verbose = TRUE, save = FALSE, dir = "results_POWO_with_year_pubs", filename = "POWO_with_year_pubs")
get_year_pubs(inputdf = NULL, verbose = TRUE, save = FALSE, dir = "results_POWO_with_year_pubs", filename = "POWO_with_year_pubs")
inputdf |
A dataframe generated using |
verbose |
Logical, if |
save |
Logical, if |
dir |
Pathway to the computer's directory, where the file will be saved
provided that the argument |
filename |
Name of the output file to be saved. The default is to create a file entitled POWO_with_year_pubs. |
Objects of class dataframe and saves the output on disk.
Debora Zuanny & Domingos Cardoso
## Not run: library(expowo) output <- powoSpecies(family = "Fabaceae", genus = NULL, synonyms = TRUE, country = NULL, save = FALSE, dir = "Fabaceae_results_powoSpecies", filename = "Fabaceae_spp") output_year_pubs <- get_year_pubs(inputdf = output, verbose = TRUE, save = FALSE, dir = "results_POWO_with_year_pubs", filename = "POWO_with_year_pubs") ## End(Not run)
## Not run: library(expowo) output <- powoSpecies(family = "Fabaceae", genus = NULL, synonyms = TRUE, country = NULL, save = FALSE, dir = "Fabaceae_results_powoSpecies", filename = "Fabaceae_spp") output_year_pubs <- get_year_pubs(inputdf = output, verbose = TRUE, save = FALSE, dir = "results_POWO_with_year_pubs", filename = "POWO_with_year_pubs") ## End(Not run)
Produces a CSV file listing all mega-diverse genera for any plant family at Plants of the World Online (POWO) based on a provided numeric value as the threshold to be considered mega-diverse. Frodin (2004) suggests 500 species as the threshold.
megaGen(family, thld = 500, verbose = TRUE, save = FALSE, dir = "results_megaGen", filename = "output")
megaGen(family, thld = 500, verbose = TRUE, save = FALSE, dir = "results_megaGen", filename = "output")
family |
Either one family name or a vector of multiple families that is present in POWO. |
thld |
A defined threshold of species number for a genus to be considered megadiverse. The default value is 500 based on Frodin (2004). |
verbose |
Logical, if |
save |
Logical, if |
dir |
Pathway to the computer's directory, where the file will be saved
provided that the argument |
filename |
Name of the output file to be saved. The default is to create a file entitled output. |
A table with the following fields: family, genus, authors, scientific_name, species_number (counting of species within each genus), kew_id (each genus code within Kew's databases), powo_uri (URI to access each genus in POWO).
Debora Zuanny & Domingos Cardoso
## Not run: library(expowo) megaGen(family = "Cyperaceae", thld = 500, save = FALSE, dir = "results_megaGen", filename = "Cyperaceae_big_genera") ## End(Not run)
## Not run: library(expowo) megaGen(family = "Cyperaceae", thld = 500, save = FALSE, dir = "results_megaGen", filename = "Cyperaceae_big_genera") ## End(Not run)
Complete list of the vascular plants (APG IV-based families of
flowering plants, gymnosperms, ferns and lycophytes) and associated
URI addresses as retrieved with the function get_pow
of the package
taxize.
data(POWOcodes)
data(POWOcodes)
data.frame
Produces a CSV file listing the number of species and genera within the target botanical families of vascular plants available at Plants of the World Online (POWO).
powoFam(family, verbose = TRUE, save = FALSE, dir = "results_powoFam", filename = "output")
powoFam(family, verbose = TRUE, save = FALSE, dir = "results_powoFam", filename = "output")
family |
Either one family name or a vector of multiple families that is present in POWO. |
verbose |
Logical, if |
save |
Logical, if |
dir |
Pathway to the computer's directory, where the file will be saved
provided that the argument |
filename |
Name of the output file to be saved. The default is to create a file entitled output. |
A table with the following fields: family, genus_number (counting of genera within the specified plant family), species_number (countig of species within each genus), kew_id (the family code used in Kew's database), powo_uri (the URI to access the family in POWO).
Debora Zuanny & Domingos Cardoso
## Not run: library(expowo) powoFam(family = "Lecythidaceae", save = FALSE, dir = "results_powoFam", filename = "Lecythidaceae_spp_number") ## End(Not run)
## Not run: library(expowo) powoFam(family = "Lecythidaceae", save = FALSE, dir = "results_powoFam", filename = "Lecythidaceae_spp_number") ## End(Not run)
Produces a CSV file listing all genera with associated number of accepted species and geographical distribution for any vascular plant family at Plants of the World Online (POWO).
powoGenera(family, genus = NULL, hybrid = FALSE, country = NULL, verbose = TRUE, rerun = FALSE, save = FALSE, dir = "results_powoGenera", filename = "output")
powoGenera(family, genus = NULL, hybrid = FALSE, country = NULL, verbose = TRUE, rerun = FALSE, save = FALSE, dir = "results_powoGenera", filename = "output")
family |
Either one family name or a vector of multiple families that is present in POWO. |
genus |
Either one genus name or a vector of multiple genera that is present in POWO. If any genus name is not provided, then the function will search all accepted genera known for the target family. |
hybrid |
Logical, if |
country |
Either one country name or a vector of multiple countries. If country names are provided, then the function will return only the genera that are native to such countries, according to POWO. |
verbose |
Logical, if |
rerun |
Logical, if |
save |
Logical, if |
dir |
Pathway to the computer's directory, where the file will be saved
provided that the argument |
filename |
Name of the output file to be saved. The default is to create a file entitled output. |
A table with the following fields: family, genus, authors, scientific_name, publication (information about the protologue of the genus), species_number, native_to_country (original distribution according to political country), native_to_botanical_countries (original distribution according to botanical country), introduced_to_country (exotic distribution according to political country), introduced_to_botanical_countries (exotic distribution according to botanical country), kew_id (genus code within Kew's databases), powo_uri (URI to access each genus in POWO).
Debora Zuanny & Domingos Cardoso
## Not run: library(expowo) powoGenera(family = "Lecythidaceae", verbose = TRUE, save = FALSE, dir = "results_powoGenera", filename = "Lecythidaceae_genera") powoGenera(family = "Lecythidaceae", genus = "Bertholletia", country = c("Argentina", "Brazil", "French Guiana"), verbose = TRUE, save = FALSE, dir = "results_powoGenera", filename = "Lecythidaceae_search") ## End(Not run)
## Not run: library(expowo) powoGenera(family = "Lecythidaceae", verbose = TRUE, save = FALSE, dir = "results_powoGenera", filename = "Lecythidaceae_genera") powoGenera(family = "Lecythidaceae", genus = "Bertholletia", country = c("Argentina", "Brazil", "French Guiana"), verbose = TRUE, save = FALSE, dir = "results_powoGenera", filename = "Lecythidaceae_search") ## End(Not run)
Produces global-scale maps of species richness at political
country and botanical country levels. Despite being originally designed to
create maps for all input data of any specified taxonomic group
(genus or family) from the search results with powoSpecies
, the
function is also useful for any dataframe-formatted input data that has at
least a column with species and one or two columns with associated
distribution in the countries and/or botanical regions. Multiple richness
maps for any different taxonomic groups within the input data can be produced
automatically in a single run by just specifying a column name with the
associated taxonomic classification.
powoMap(inputdf = NULL, botctrs = FALSE, distcol = NULL, taxclas = NULL, verbose = TRUE, save = FALSE, vir_color = "viridis", bre_color = NULL, leg_title = "SR", dpi = 600, dir = "results_powoMap", filename = "global_richness_map", format = "jpg")
powoMap(inputdf = NULL, botctrs = FALSE, distcol = NULL, taxclas = NULL, verbose = TRUE, save = FALSE, vir_color = "viridis", bre_color = NULL, leg_title = "SR", dpi = 600, dir = "results_powoMap", filename = "global_richness_map", format = "jpg")
inputdf |
A dataframe with a species column and the associated global
distribution at country or botanical country level. The species name must be
as a binomial, i.e. must contain both the genus name and specific epithet,
but the authorship is optional. Each species must be as a single row with its
corresponding full distribution in all countries and/or botanical regions
within a single cell of their respective columns, where the country names or
botanical regions are separated by a comma. This is, for example, the
standard dataframe from the search results with the
function |
botctrs |
Logical. If |
distcol |
Column name with the full global distribution data for each
species at political country level or the level 3 of botanical subdivision of
the World Geographical Scheme
for Recording Plant Distributions. If the species distribution is given with
botanical subdivisions, then you must also change the argument |
taxclas |
A character vector with the column name for the corresponding
taxonomic classification of each species in any higher taxonomic level. If
provided, the function will produce, in a single run, all global richness
maps for every distinct group within the input data. The default is
|
verbose |
Logical. If |
save |
Logical, if |
vir_color |
A character vector with the name or code of any of the color palettes from Viridis package. |
bre_color |
A character vector with the name or code of any of the color palettes from RColorBrewer package. |
leg_title |
A character vector to be displayed in the output map as a legend. Default is to create a title called SR, an acronym for species richness. |
dpi |
One number in the range of 72-4000 referring to the image resolution in the format of dots per inch in the output file. Default is to create an output with 600 dpi. |
dir |
Pathway to the computer's directory, where the map file will be
saved provided that the argument |
filename |
Name of the output file to be saved. The default is to create a file entitled global_richness_map. |
format |
A character vector related to the file format of the global map to be saved. The default is "jpg" to save the output in Joint Photographic Experts Group (.jpg), but you can also choose "pdf" to save in Portable Document Format (.pdf), "tiff" to save in Tag Image File Format (.tiff) or "png" to save in Portable Network Graphics (.png). |
One or a list of objects of class c("gg", "ggplot").
Debora Zuanny & Domingos Cardoso
## Not run: library(expowo) mapspdist <- powoSpecies(family = "Martyniaceae", hybridspp = FALSE, country = NULL, verbose = TRUE, save = FALSE, dir = "results_powoSpecies", filename = "Martyniaceae_spp") # To create multiple maps for each genus within the input data according to # political countries. powoMap(inputdf = mapspdist, botctrs = FALSE, distcol = "native_to_country", taxclas = "genus", verbose = FALSE, save = FALSE, vir_color = "viridis", bre_color = NULL, leg_title = "SR", dpi = 600, dir = "results_powoMap", filename = "global_richness_country_map", format = "jpg") # To create multiple maps for each genus within the input data according to # botanical country subdivisions. powoMap(inputdf = mapspdist, botctrs = TRUE, distcol = "native_to_botanical_countries", taxclas = "genus", verbose = FALSE, save = FALSE, vir_color = "viridis", bre_color = NULL, leg_title = "SR", dpi = 600, dir = "results_powoMap", filename = "global_richness_botcountry_map", format = "jpg") ## End(Not run)
## Not run: library(expowo) mapspdist <- powoSpecies(family = "Martyniaceae", hybridspp = FALSE, country = NULL, verbose = TRUE, save = FALSE, dir = "results_powoSpecies", filename = "Martyniaceae_spp") # To create multiple maps for each genus within the input data according to # political countries. powoMap(inputdf = mapspdist, botctrs = FALSE, distcol = "native_to_country", taxclas = "genus", verbose = FALSE, save = FALSE, vir_color = "viridis", bre_color = NULL, leg_title = "SR", dpi = 600, dir = "results_powoMap", filename = "global_richness_country_map", format = "jpg") # To create multiple maps for each genus within the input data according to # botanical country subdivisions. powoMap(inputdf = mapspdist, botctrs = TRUE, distcol = "native_to_botanical_countries", taxclas = "genus", verbose = FALSE, save = FALSE, vir_color = "viridis", bre_color = NULL, leg_title = "SR", dpi = 600, dir = "results_powoMap", filename = "global_richness_botcountry_map", format = "jpg") ## End(Not run)
Produces a CSV file listing the geographical distribution at country and botanical subdivisions of all target species of vascular plants at Plants of the World Online (POWO).
powoSpDist(family, species = NULL, verbose = TRUE, save = FALSE, dir = "results_powoSpDist", filename = "output")
powoSpDist(family, species = NULL, verbose = TRUE, save = FALSE, dir = "results_powoSpDist", filename = "output")
family |
Either one family name or a vector of multiple families that is present in POWO. |
species |
Either one non-hybrid species name or a vector of multiple species that is present in POWO. If any species name is not provided, then the function will search any species from all accepted genera known for the target family. |
verbose |
Logical, if |
save |
Logical, if |
dir |
Pathway to the computer's directory, where the file will be saved
provided that the argument |
filename |
Name of the output file to be saved. The default is to create a file entitled output. |
A table with the following fields: family, genus, species, taxon_name, authors, scientific_name, native_to_country (original distribution according to political country), native_to_botanical_countries (original distribution according to botanical country), introduced_to_country (exotic distribution according to political country), introduced_to_botanical_countries (exotic distribution according to botanical country), kew_id (each species code within Kew's databases), powo_uri (URI to access each species in POWO).
Debora Zuanny & Domingos Cardoso
## Not run: library(expowo) powoSpDist(family = "Lecythidaceae", species = "Lecythis pisonis", save = FALSE, dir = "results_powoSpDist", filename = "L_pisonis_distribution") ## End(Not run)
## Not run: library(expowo) powoSpDist(family = "Lecythidaceae", species = "Lecythis pisonis", save = FALSE, dir = "results_powoSpDist", filename = "L_pisonis_distribution") ## End(Not run)
Produces a CSV file listing all accepted species and associated geographical distribution from any target genus or family of vascular plants at Plants of the World Online (POWO).
powoSpecies(family, genus = NULL, hybrid = FALSE, synonyms = FALSE, country = NULL, verbose = TRUE, rerun = FALSE, save = FALSE, dir = "results_powoSpecies", filename = "output")
powoSpecies(family, genus = NULL, hybrid = FALSE, synonyms = FALSE, country = NULL, verbose = TRUE, rerun = FALSE, save = FALSE, dir = "results_powoSpecies", filename = "output")
family |
Either one family name or a vector of multiple families that is present in POWO. |
genus |
Either one genus name or a vector of multiple genera that is present in POWO. If any genus name is not provided, then the function will search any species from all accepted genera known for the target family. |
hybrid |
Logical, if |
synonyms |
Logical, if |
country |
Either one country name or a vector of multiple countries. If country names are provided, then the function will return only the species that are native to such countries, according to POWO. |
verbose |
Logical, if |
rerun |
Logical, if |
save |
Logical, if |
dir |
Pathway to the computer's directory, where the file will be saved
provided that the argument |
filename |
Name of the output file to be saved. The default is to create a file entitled output. |
A table with the following fields: family, genus, species, taxon_name, authors, scientific_name, publication (information about the protologue of the species), native_to_country (original distribution according to political country), native_to_botanical_countries (original distribution according to botanical country), introduced_to_country (exotic distribution according to political country), introduced_to_botanical_countries (exotic distribution according to botanical country), kew_id (each species code within Kew's databases), powo_uri (the URI to access each species in POWO).
Debora Zuanny & Domingos Cardoso
## Not run: library(expowo) powoSpecies(family = "Martyniaceae", synonyms = TRUE, country = c("Argentina", "Brazil", "French Guiana"), save = FALSE, dir = "Martyniaceae_results_powoSpecies", filename = "Martyniaceae_spp") ## End(Not run)
## Not run: library(expowo) powoSpecies(family = "Martyniaceae", synonyms = TRUE, country = c("Argentina", "Brazil", "French Guiana"), save = FALSE, dir = "Martyniaceae_results_powoSpecies", filename = "Martyniaceae_spp") ## End(Not run)
Uses fwrite
to fastly write a CSV file within a current
date subfolder of a provided specific directory.
saveCSV(df, dir = "results", filename = "output", verbose = TRUE, append = FALSE, save = TRUE, foldername = NULL)
saveCSV(df, dir = "results", filename = "output", verbose = TRUE, append = FALSE, save = TRUE, foldername = NULL)
df |
Any input list of same length vectors (e.g. |
dir |
Pathway to the computer's directory, where the file will be saved
provided that the argument |
filename |
Name of the output file to be saved. The default is to create a file entitled output. |
verbose |
Logical, if |
append |
Logical, if |
save |
Logical, if |
foldername |
A parameter only for internal use with
expowo's main functions. You must keep
this always as |
Debora Zuanny & Domingos Cardoso
library(expowo) res <- powoGenera(family = "Lecythidaceae", verbose = TRUE, save = FALSE) saveCSV(res, dir = "results_powoGenera", filename = "Lecythidaceae_search", append = FALSE)
library(expowo) res <- powoGenera(family = "Lecythidaceae", verbose = TRUE, save = FALSE) saveCSV(res, dir = "results_powoGenera", filename = "Lecythidaceae_search", append = FALSE)
Produces a CSV file listing the top most diverse genera of any target botanical family of vascular plants at Plants of the World Online (POWO).
topGen(family, limit = 10, verbose = TRUE, save = FALSE, dir = "results_topGen", filename = "output")
topGen(family, limit = 10, verbose = TRUE, save = FALSE, dir = "results_topGen", filename = "output")
family |
Either one family name or a vector of multiple families that is present in POWO. |
limit |
A defined numerical value to limit the most diverse genera to be selected within each plant family. The default is to select the top ten richest genera. |
verbose |
Logical, if |
save |
Logical, if |
dir |
Pathway to the computer's directory, where the file will be saved
provided that the argument |
filename |
Name of the output file to be saved. The default is to create a file entitled output. |
A table with the following fields: family, genus, authors, scientific_name, species_number (counting of species within each genus), kew_id (each genus code within Kew's databases), powo_uri (URI to access each genus in POWO).
Debora Zuanny & Domingos Cardoso
## Not run: library(expowo) topGen(family = "Lecythidaceae", limit = 10, save = FALSE, dir = "results_topGen", filename = "Lecythidaceae_top_ten") ## End(Not run)
## Not run: library(expowo) topGen(family = "Lecythidaceae", limit = 10, save = FALSE, dir = "results_topGen", filename = "Lecythidaceae_top_ten") ## End(Not run)