Title: | Impact Indicators of Alien Taxa |
---|---|
Description: | Compute impact indicators of alien taxa using GBIF occurrence cube and EICAT assessment of alien species. Aggregates species impact of various scores due to mecahnism. Aggregates site impact of various scores due to species. |
Authors: | Mukhtar Muhammed Yahaya [aut, cre]
|
Maintainer: | Mukhtar Muhammed Yahaya <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.1 |
Built: | 2025-02-20 15:23:45 UTC |
Source: | https://github.com/b-cubed-eu/impIndicator |
EICAT data of acacia taxa An example of EICAT data containing species name, impact category and mechanism.
eicat_acacia
eicat_acacia
A dataframe object containing 138 observations and 3 variables
species scientific name
EICAT impact category
mecahnism of impact
Jansen, C., Kumschick, S. A global impact assessment of Acacia species introduced to South Africa. Biol Invasions 24, 175–187 (2022). https://doi.org/10.1007/s10530-021-02642-0
Other Data:
southAfrica_sf
,
taxa_Acacia
head(eicat_acacia,10)
head(eicat_acacia,10)
Aggregate species impact categories from impact data.
impact_cat( impact_data, species_list, trans = 1, col_category = NULL, col_species = NULL, col_mechanism = NULL )
impact_cat( impact_data, species_list, trans = 1, col_category = NULL, col_species = NULL, col_mechanism = NULL )
impact_data |
The dataframe of species impact which contains columns of |
species_list |
The vector of species' list to aggregate their impact categories |
trans |
Numeric. The type of transformation to convert the EICAT categories to numerical values. 1 converts ("MC", "MN", "MO", "MR", "MV") to (0,1,2,3,4) 2 converts ("MC", "MN", "MO", "MR", "MV") to (1,2,3,4,5) and 3 converts ("MC", "MN", "MO", "MR", "MV") to (1,10,100,1000,10000) |
col_category |
The name of the column containing the impact categories. The first two letters each categories must be an EICAT short names (e.g "MC -Minimal concern") |
col_species |
The name of the column containing species names |
col_mechanism |
The name of the column containing mechanisms of impact |
The dataframe containing the aggregated species impact. max - maximum impact of a species. mean - mean impact of a species. max_mech - sum of maximum impact per categories of a species
Other Prepare data:
taxa_cube()
# define species list species_list <- c( "Acacia adunca", "Acacia baileyana", "Acacia binervata", "Acacia crassiuscula", "Acacia cultriformis", "Acacia cyclops", "Acacia dealbata", "Acacia decurrens", "Acacia elata" ) agg_impact <- impact_cat( impact_data = eicat_acacia, species_list = species_list, trans = 1 )
# define species list species_list <- c( "Acacia adunca", "Acacia baileyana", "Acacia binervata", "Acacia crassiuscula", "Acacia cultriformis", "Acacia cyclops", "Acacia dealbata", "Acacia decurrens", "Acacia elata" ) agg_impact <- impact_cat( impact_data = eicat_acacia, species_list = species_list, trans = 1 )
Compute impact indicators of alien taxa
impact_indicator( cube, impact_data = NULL, method = NULL, trans = 1, col_category = NULL, col_species = NULL, col_mechanism = NULL )
impact_indicator( cube, impact_data = NULL, method = NULL, trans = 1, col_category = NULL, col_species = NULL, col_mechanism = NULL )
cube |
The data cube of class |
impact_data |
The dataframe of species impact which contains columns of |
method |
The method of computing the indicator. The method used in the aggregation of within and across species in a site. The method can be precautionary, precautionary cumulative, mean, mean cumulative or cumulative. |
trans |
Numeric. The method of transformation to convert the EICAT categories to numerical values. 1 converts ("MC", "MN", "MO", "MR", "MV") to (0,1,2,3,4) 2 converts ("MC", "MN", "MO", "MR", "MV") to (1,2,3,4,5) and 3 converts ("MC", "MN", "MO", "MR", "MV") to (1,10,100,1000,10000) |
col_category |
The name of the column containing the impact categories. The first two letters of each categories must be an EICAT short names (e.g "MC - Minimal concern") |
col_species |
The name of the column containing species names |
col_mechanism |
The name of the column containing mechanisms of impact |
A dataframe of the invasive alien impact trend (class impact_indicator
)
Other Indicator function:
site_impact()
,
species_impact()
acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) impact_value <- impact_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean cumulative", trans = 1 )
acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) impact_value <- impact_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean cumulative", trans = 1 )
Produces a ggplot object to show the trend of the impact.
## S3 method for class 'impact_indicator' plot( x, linewidth = 2, colour = "red", title_lab = "Impact indicator", y_lab = "impact score", text_size = 14, ... )
## S3 method for class 'impact_indicator' plot( x, linewidth = 2, colour = "red", title_lab = "Impact indicator", y_lab = "impact score", text_size = 14, ... )
x |
A dataframe of impact indicator. Must be a class of "impact_indicator" |
linewidth |
The width size of the line. Default is 2 |
colour |
The colour of the line Default is "red" |
title_lab |
Title of the plot. Default is "Impact indicator" |
y_lab |
Label of the y-axis. Default is "impact score" |
text_size |
The size of the text of the plot. Default is "14" |
... |
Additional arguments passed to geom_line |
The ggplot object of the impact indicator, with the y- and x-axes representing the impact score and time respectively.
Other Plot:
plot.site_impact()
,
plot.species_impact()
# create data_cube acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) # compute impact indicator impact_value <- impact_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean cumulative", trans = 1 ) # plot impact indicator plot(impact_value)
# create data_cube acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) # compute impact indicator impact_value <- impact_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean cumulative", trans = 1 ) # plot impact indicator plot(impact_value)
Produces the yearly impact map of a region
## S3 method for class 'site_impact' plot( x, region = NULL, first_year = NULL, last_year = NULL, title_lab = "Impact map", text_size = 14, ... )
## S3 method for class 'site_impact' plot( x, region = NULL, first_year = NULL, last_year = NULL, title_lab = "Impact map", text_size = 14, ... )
x |
A dataframe of impact indicator. Must be a class of "site_impact" |
region |
sf or character. The shapefile of the region of study or a character which represent the name of a country. It is not compulsory but makes the plot more comprehensible. |
first_year |
The first year the impact map should include.
Default starts from the first year included in |
last_year |
The last year the impact map should include.
Default ends in the last year included in |
title_lab |
Title of the plot. Default is "Impact map" |
text_size |
The size of the text of the plot. Default is "14" |
... |
Additional arguments passed to geom_tile |
The ggplot of species yearly impact on the region.
Other Plot:
plot.impact_indicator()
,
plot.species_impact()
# define cube for taxa acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) # compute site impact siteImpact <- site_impact( cube = acacia_cube, impact_data = eicat_acacia, method = "precautionary cumulative", trans = 1 ) # visualise site impact plot(x=siteImpact, region= southAfrica_sf, first_year = 2021)
# define cube for taxa acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) # compute site impact siteImpact <- site_impact( cube = acacia_cube, impact_data = eicat_acacia, method = "precautionary cumulative", trans = 1 ) # visualise site impact plot(x=siteImpact, region= southAfrica_sf, first_year = 2021)
Produces a ggplot to show the trend of the species impact.
## S3 method for class 'species_impact' plot( x, alien_species = "all", linewidth = 1.5, title_lab = "Species impact", y_lab = "impact score", text_size = 14, ... )
## S3 method for class 'species_impact' plot( x, alien_species = "all", linewidth = 1.5, title_lab = "Species impact", y_lab = "impact score", text_size = 14, ... )
x |
A dataframe of impact indicator. Must be a class of "species_impact" |
alien_species |
The character vector containing names of the alien species to be included in the plot. Default is "all" which plot all species in the data frame |
linewidth |
The width size of the line. Default is 1.5 |
title_lab |
Title of the plot. Default is "Species impact" |
y_lab |
Label of the y-axis. Default is "impact score" |
text_size |
The size of the text of the plot. Default is "14" |
... |
Additional arguments passed to geom_line |
The ggplot object of the species impact, with the y- and x-axes representing the impact score and time respectively.
Other Plot:
plot.impact_indicator()
,
plot.site_impact()
# create data cube acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) # compute species impact speciesImpact <- species_impact( cube = acacia_cube, impact_data = eicat_acacia, method = "mean", trans = 1 ) # visualise species impact plot(speciesImpact)
# create data cube acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) # compute species impact speciesImpact <- species_impact( cube = acacia_cube, impact_data = eicat_acacia, method = "mean", trans = 1 ) # visualise species impact plot(speciesImpact)
Compute site impact indicator
site_impact( cube, impact_data = NULL, method = NULL, trans = 1, col_category = NULL, col_species = NULL, col_mechanism = NULL )
site_impact( cube, impact_data = NULL, method = NULL, trans = 1, col_category = NULL, col_species = NULL, col_mechanism = NULL )
cube |
The data cube of class |
impact_data |
The dataframe of species impact which contains columns of |
method |
The method of computing the indicator. The method used in the aggregation of within and across species in a site. The method can be precautionary, precautionary cumulative, mean, mean cumulative or cumulative. |
trans |
Numeric. The method of transformation to convert the EICAT categories to numerical values. 1 converts ("MC", "MN", "MO", "MR", "MV") to (0,1,2,3,4) 2 converts ("MC", "MN", "MO", "MR", "MV") to (1,2,3,4,5) and 3 converts ("MC", "MN", "MO", "MR", "MV") to (1,10,100,1000,10000) |
col_category |
The name of the column containing the impact categories. The first two letters each categories must be an EICAT short names (e.g "MC - Minimal concern") |
col_species |
The name of the column containing species names |
col_mechanism |
The name of the column containing mechanisms of impact |
The dataframe of impact indicator per sites (class site_impact
)
Other Indicator function:
impact_indicator()
,
species_impact()
# define cube for taxa acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) siteImpact <- site_impact( cube = acacia_cube, impact_data = eicat_acacia, method = "precautionary cumulative", trans = 1 )
# define cube for taxa acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) siteImpact <- site_impact( cube = acacia_cube, impact_data = eicat_acacia, method = "precautionary cumulative", trans = 1 )
South African sf An example of region sf for impact indicator.
southAfrica_sf
southAfrica_sf
A 'sf' object of South African map
geometry of polygon
Other Data:
eicat_acacia
,
taxa_Acacia
sf::plot_sf(southAfrica_sf)
sf::plot_sf(southAfrica_sf)
Compute species impact indicator
species_impact( cube, impact_data = NULL, method = NULL, trans = 1, col_category = NULL, col_species = NULL, col_mechanism = NULL )
species_impact( cube, impact_data = NULL, method = NULL, trans = 1, col_category = NULL, col_species = NULL, col_mechanism = NULL )
cube |
The data cube of class |
impact_data |
The dataframe of species impact which contains columns of |
method |
The method of computing the indicator. The method used in the aggregation of within impact of species. The method can be "max", "mean" or "max_mech". |
trans |
Numeric. The method of transformation to convert the EICAT categories to numerical values. 1 converts ("MC", "MN", "MO", "MR", "MV") to (0,1,2,3,4) 2 converts ("MC", "MN", "MO", "MR", "MV") to (1,2,3,4,5) and 3 converts ("MC", "MN", "MO", "MR", "MV") to (1,10,100,1000,10000) |
col_category |
The name of the column containing the impact categories. The first two letters each categories must be an EICAT short names (e.g "MC - Minimal concern") |
col_species |
The name of the column containing species names |
col_mechanism |
The name of the column containing mechanisms of impact |
A dataframe of impact indicator per species (class species_impact
)
Other Indicator function:
impact_indicator()
,
site_impact()
acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) speciesImpact <- species_impact( cube = acacia_cube, impact_data = eicat_acacia, method = "mean", trans = 1 )
acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) speciesImpact <- species_impact( cube = acacia_cube, impact_data = eicat_acacia, method = "mean", trans = 1 )
GBIF occurrences data of acacia in South Africa An example of occurrence data from GBIF containing required column for impact indicator.
taxa_Acacia
taxa_Acacia
A dataframe object containing 19,100 rows and 6 variables
geographic latitude in decimal
geographic longitude in decimal
scientific name of species
GBIF species identification number
radius of the uncertainty circle around geographic point
year occurrence was recorded
https://doi.org/10.15468/dl.b6gda5
Other Data:
eicat_acacia
,
southAfrica_sf
head(taxa_Acacia,10)
head(taxa_Acacia,10)
Prepare data cube to calculate species impact .
The function taxa_cube
can take in the scientific name of the
taxa of interest as in character or GBIF occurrences data containing
necessary columns. The GBIF occurrences is downloaded if scientific
names is given.
taxa_cube( taxa, region, limit = 500, country = NULL, res = 0.25, first_year = NULL, last_year = NULL )
taxa_cube( taxa, region, limit = 500, country = NULL, res = 0.25, first_year = NULL, last_year = NULL )
taxa |
Character or dataframe. The character should be the scientific name of the focal taxa while the dataframe is the GBIF occurrences data which must contain "decimalLatitude","decimalLongitude","species","speciesKey", "coordinateUncertaintyInMeters","dateIdentified", and "year". |
region |
sf or character. The shapefile of the region of study or a character which represent the name of a country |
limit |
Number of records to return from GBIF download. Default is set to 500 |
country |
Two-letter country code (ISO-3166-1) of Country for which the GBIP occurrences data should be downloaded. |
res |
The resolution of grid cells to be used. Default is 0.25 |
first_year |
The year from which the occurrence should start from |
last_year |
The year at which the occurrence should end |
A data cube of sim_cubes
Other Prepare data:
impact_cat()
acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, first_year = 2010 )
acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, first_year = 2010 )