powoMap | R Documentation |
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")
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
megaGen
topGen
powoSpecies
powoFam
powoGenera
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.