| Title: | Impact Indicators of Alien Taxa |
|---|---|
| Description: | The negative impact of alien species is recognised as a major threat to biodiversity. However, in the absence of evidence-based impact indicators that follow the Findable, Accessible, Interoperable, and Reusable (FAIR) Data Principles with standardised workflows, the impacts of alien species are not systematically estimated over time, a major gap for policy. We develop the impIndicator R package, using an open-source workflow for computing impact indicators of alien species, by combining occurrence data from the Global Biodiversity Information Facility (GBIF) with Environmental Impact Classification for Alien Taxa (EICAT) assessments. |
| Authors: | Mukhtar Muhammed Yahaya [aut, cre] (ORCID: <https://orcid.org/0009-0008-9200-0863>, affiliation: Stellenbosch University (SU)), Sabrina Kumschick [aut, ctb] (ORCID: <https://orcid.org/0000-0001-8034-5831>, affiliation: Stellenbosch University (SU)), Sandra MacFadyen [aut, ctb] (ORCID: <https://orcid.org/0000-0002-5316-440X>, affiliation: Stellenbosch University (SU)), Pietro Landi [aut, ctb] (ORCID: <https://orcid.org/0000-0002-6373-2992>, affiliation: Stellenbosch University (SU)), Cang Hui [aut, ctb] (ORCID: <https://orcid.org/0000-0002-3660-8160>, affiliation: Stellenbosch University (SU)), Ward Langeraert [ctb] (ORCID: <https://orcid.org/0000-0002-5900-8109>, affiliation: Research Institute for Nature and Forest (INBO)), Stellenbosch University (SU) [cph], European Union's Horizon Europe Research and Innovation Programme (ID No 101059592) [fnd] |
| Maintainer: | Mukhtar Muhammed Yahaya <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.6.1 |
| Built: | 2026-06-03 13:36:57 UTC |
| Source: | https://github.com/b-cubed-eu/impIndicator |
Combines occurrences cube and impact data using the given method (e.g., mean cumulative) to compute the impact indicator of all species over a given region
compute_regional_indicator( cube, impact_data = NULL, method = NULL, trans = 1, ci_type = c("perc", "bca", "norm", "basic", "none"), confidence_level = 0.95, boot_args = list(samples = 1000, seed = NA), ci_args = list(no_bias = TRUE), col_category = NULL, col_species = NULL, col_mechanism = NULL, region = NULL )compute_regional_indicator( cube, impact_data = NULL, method = NULL, trans = 1, ci_type = c("perc", "bca", "norm", "basic", "none"), confidence_level = 0.95, boot_args = list(samples = 1000, seed = NA), ci_args = list(no_bias = TRUE), col_category = NULL, col_species = NULL, col_mechanism = NULL, region = NULL )
cube |
A data cube object (class 'processed_cube' or 'sim_cube', processed
from |
impact_data |
A dataframe of species impact which contains columns of
|
method |
A method of computing the indicator. The method used in the aggregation of within and across species in a site proposed by Boulesnane-Genguant et al. (submitted). The method can be one of
|
trans |
Numeric:
|
ci_type |
A character vector specifying the type of confidence intervals to compute. Options include:
|
confidence_level |
The confidence level for the calculated intervals. Default is 0.95 (95 % confidence level). |
boot_args |
(Optional) Named list of additional arguments passed to
|
ci_args |
(Optional) Named list of additional arguments passed to
|
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. |
region |
The shape file of the specific region to calculate the indicator on. If NULL (default), the indicator is calculated for all cells in the cube. |
A list of class impact_indicator, with the following components:
method: method used in computing the indicator
num_cells: number of cells (sites) in the indicator
num_species: number of species in the indicator
names_species: names of species in the indicator
site_impact: a dataframe containing total species impact per year
Other Indicator function:
compute_site_indicator(),
compute_species_indicator()
acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) impact_value <- compute_regional_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean_cum", trans = 1, ci_type = "none" )acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) impact_value <- compute_regional_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean_cum", trans = 1, ci_type = "none" )
Combines occurrences cube and impact data using the given method (e.g., mean cumulative) to compute the impact indicator per site.
compute_site_indicator( cube, impact_data = NULL, method = NULL, trans = 1, col_category = NULL, col_species = NULL, col_mechanism = NULL, region = NULL )compute_site_indicator( cube, impact_data = NULL, method = NULL, trans = 1, col_category = NULL, col_species = NULL, col_mechanism = NULL, region = NULL )
cube |
A data cube object (class 'processed_cube' or 'sim_cube', processed
from |
impact_data |
A dataframe of species impact which contains columns of
|
method |
A method of computing the indicator. The method used in the aggregation of within and across species in a site proposed by Boulesnane-Genguant et al. (submitted). The method can be one of
|
trans |
Numeric:
|
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. |
region |
The shape file of the specific region to calculate the indicator on. If NULL (default), the indicator is calculated for all cells in the cube. |
A list of class site_impact, with the following components:
method: method used in computing the indicator
num_cells: number of cells (sites) in the indicator
num_species: number of species in the indicator
site_impact: a dataframe containing impact per sites
Other Indicator function:
compute_regional_indicator(),
compute_species_indicator()
# define cube for taxa acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) siteImpact <- compute_site_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean_cum", trans = 1 )# define cube for taxa acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) siteImpact <- compute_site_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean_cum", trans = 1 )
Combines occurrences cube and impact data using the given method (e.g., mean, max) to compute the impact indicator per species. Optionally computes bootstrap confidence intervals for the indicator grouped by year and species.
Interval calculation is currently not implemented!
compute_species_indicator( cube, impact_data = NULL, method = NULL, trans = 1, ci_type = "none", confidence_level = 0.95, boot_args = list(samples = 1000, seed = NA), ci_args = list(no_bias = TRUE), col_category = NULL, col_species = NULL, col_mechanism = NULL, region = NULL )compute_species_indicator( cube, impact_data = NULL, method = NULL, trans = 1, ci_type = "none", confidence_level = 0.95, boot_args = list(samples = 1000, seed = NA), ci_args = list(no_bias = TRUE), col_category = NULL, col_species = NULL, col_mechanism = NULL, region = NULL )
cube |
A data cube object (class |
impact_data |
A dataframe of species impact which contains columns of
|
method |
A method of computing the indicator. The method used in the aggregation of within-species impact. The method can be:
|
trans |
Numeric:
|
ci_type |
A character string specifying the type of confidence intervals to compute. Options include:
|
confidence_level |
The confidence level for the calculated
intervals. Default is |
boot_args |
(Optional) Named list of additional arguments passed to
|
ci_args |
(Optional) Named list of additional arguments passed to
|
col_category |
The name of the column containing the impact categories.
The first two letters of each category must be an EICAT short name
(e.g., |
col_species |
The name of the column containing species names. |
col_mechanism |
The name of the column containing mechanisms of impact. |
region |
The shape file of the specific region to calculate
the indicator on. If |
A list of class 'species_impact', with the following components:
method: Method used in computing the indicator.
num_species: Number of species in the indicator.
names_species: Names of species in the indicator.
species_impact: A dataframe containing impact per species and year.
Other Indicator function:
compute_regional_indicator(),
compute_site_indicator()
acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) # Without confidence intervals speciesImpact <- compute_species_indicator( 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 ) # Without confidence intervals speciesImpact <- compute_species_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean", trans = 1 )
This function combines the occurrence cube data and impact data, named impact_cube_data.
create_impact_cube_data( cube_data, impact_data, trans = 1, col_category = NULL, col_species = NULL, col_mechanism = NULL, region = NULL )create_impact_cube_data( cube_data, impact_data, trans = 1, col_category = NULL, col_species = NULL, col_mechanism = NULL, region = NULL )
cube_data |
A dataframe of a cube ( $data slot) of class |
impact_data |
The dataframe of species impact which contains columns of
|
trans |
Numeric:
|
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. |
region |
The shape file of the specific region to calculate the indicator on. If NULL (default), the indicator is calculated for all cells in the cube. |
A dataframe of containing impact data and occurrence cube. The class
is impact_cube
library(b3gbi) # for processing cube acacia_cube <- process_cube(cube_name = cube_acacia_SA, grid_type = "eqdgc", first_year = 2010, last_year = 2024) impact_cube <- create_impact_cube_data( cube_data = acacia_cube$data, impact_data = eicat_acacia, )library(b3gbi) # for processing cube acacia_cube <- process_cube(cube_name = cube_acacia_SA, grid_type = "eqdgc", first_year = 2010, last_year = 2024) impact_cube <- create_impact_cube_data( cube_data = acacia_cube$data, impact_data = eicat_acacia, )
GBIF Occurrence Cube of acacia in South Africa An example of occurrence cube of GBIF containing required column for impact indicator.
cube_acacia_SAcube_acacia_SA
A dataframe object containing 4,700 rows and 8 variables
The year the occurrence was recorded
The extended quarter degree cell code
The GBIF species identification number
The scientific name of species
The number of observation in the cell
The kingdom name of which the species belong
The family name of which the species belong
minimum radius of the uncertainty circle around the geographic point
GBIF.org (16 October 2025) GBIF Occurrence Download doi:10.15468/dl.zm3keb
Other Data:
eicat_acacia,
southAfrica_sf,
taxa_Acacia
head(cube_acacia_SA, 10)head(cube_acacia_SA, 10)
EICAT data of acacia taxa An example of EICAT data containing species name, impact category and mechanism.
eicat_acaciaeicat_acacia
A dataframe object containing 138 observations and 3 variables
species scientific name
EICAT impact category
mechanism of impact
Jansen, C., Kumschick, S. A global impact assessment of Acacia species introduced to South Africa. Biol Invasions 24, 175–187 (2022). doi:10.1007/s10530-021-02642-0
Other Data:
cube_acacia_SA,
southAfrica_sf,
taxa_Acacia
head(eicat_acacia, 10)head(eicat_acacia, 10)
Aggregate species impact categories from impact data. Species are often reported to have multiple impact categories specific to different study locations and mechanisms through which they exert the impact. To get an estimate of a likely impact category which could apply more broadly, this function aggregate the multiple impact scores per species into one impact score per species.
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:
|
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 )
Produces a ggplot2 object showing the temporal trend of the
overall impact indicator.
## S3 method for class 'impact_indicator' plot( x, trend = c("none", "line", "smooth"), point_args = list(), errorbar_args = list(), trend_args = list(), ribbon_args = list(), ... )## S3 method for class 'impact_indicator' plot( x, trend = c("none", "line", "smooth"), point_args = list(), errorbar_args = list(), trend_args = list(), ribbon_args = list(), ... )
x |
An object of class |
trend |
Character string indicating how the central trend should be displayed. One of:
|
point_args |
A named list of arguments passed to
|
errorbar_args |
A named list of arguments passed to
|
trend_args |
A named list of arguments passed to the trend layer
( |
ribbon_args |
A named list of arguments passed to
|
... |
Currently not used. |
A ggplot object representing the overall impact indicator
over time, with years on the x-axis and impact values on the y-axis.
Other Plot:
plot.site_impact(),
plot.species_impact()
## Not run: # create data_cube acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) # compute impact indicator impact_value <- compute_regional_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean_cum", trans = 1 ) # default plot plot(impact_value) # customised plot plot( impact_value, trend = "smooth", point_args = list(size = 3, colour = "darkred"), trend_args = list(colour = "black", linewidth = 1), ribbon_args = list(fill = "grey80", alpha = 0.3) ) ## End(Not run)## Not run: # create data_cube acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) # compute impact indicator impact_value <- compute_regional_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean_cum", trans = 1 ) # default plot plot(impact_value) # customised plot plot( impact_value, trend = "smooth", point_args = list(size = 3, colour = "darkred"), trend_args = list(colour = "black", linewidth = 1), ribbon_args = list(fill = "grey80", alpha = 0.3) ) ## End(Not run)
Produces the ggplot of site impact indicator
## S3 method for class 'site_impact' plot( x, region = NULL, first_year = NULL, last_year = NULL, title_lab = "Site Impact map", text_size = 14, ... )## S3 method for class 'site_impact' plot( x, region = NULL, first_year = NULL, last_year = NULL, title_lab = "Site 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 <- compute_site_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean_cum", 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 <- compute_site_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean_cum", 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 indicator.
## S3 method for class 'species_impact' plot( x, alien_species = "all", linewidth = 1.5, title_lab = "Species impact indicator", y_lab = "Impact score", x_lab = "Year", text_size = 14, ... )## S3 method for class 'species_impact' plot( x, alien_species = "all", linewidth = 1.5, title_lab = "Species impact indicator", y_lab = "Impact score", x_lab = "Year", 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" |
x_lab |
Label of the x-axis. Default is "Year" |
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 <- compute_species_indicator( 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 <- compute_species_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean", trans = 1 ) # visualise species impact plot(speciesImpact)
Create the parameter lists required to perform bootstrapping
(dubicube::bootstrap_cube()), calculate confidence intervals
(dubicube::calculate_bootstrap_ci()), and perform cross-validation
(dubicube::cross_validate_cube()).
This function is primarily intended for internal use by indicator
functions, but can also be used directly to construct parameter lists
for manual calls to the underlying dubicube functions.
Default bootstrap and confidence interval arguments are internally
defined and can be modified via boot_args and ci_args. User-supplied
values override defaults.
prepare_indicators_bootstrap( impact_cube_data, indicator = c("overall", "site", "species"), indicator_method, grouping_var = "year", ci_type = "perc", confidence_level = 0.95, boot_args = list(samples = 1000, seed = NA), ci_args = list(no_bias = TRUE), out_var = "taxonKey" )prepare_indicators_bootstrap( impact_cube_data, indicator = c("overall", "site", "species"), indicator_method, grouping_var = "year", ci_type = "perc", confidence_level = 0.95, boot_args = list(samples = 1000, seed = NA), ci_args = list(no_bias = TRUE), out_var = "taxonKey" )
impact_cube_data |
An impact cube object (class |
indicator |
Character string specifying the impact indicator to be
computed. Options are |
indicator_method |
Character string specifying the method used to
compute the impact indicator (see methods in |
grouping_var |
A character vector specifying the grouping variable(s)
for the bootstrap and confidence interval calculations. The function
supplied to |
ci_type |
Character string specifying the type of confidence interval to compute. Options include:
|
confidence_level |
Numeric value specifying the confidence level for
the intervals. Default is |
boot_args |
Named list of additional arguments passed to
User-supplied values override these defaults. Arguments that are
internally defined in this function (e.g., |
ci_args |
Named list of additional arguments passed to
User-supplied values override defaults. The arguments |
out_var |
Character string specifying the column used for
leave-one-out cross-validation. Default is |
A named list with three components:
List of parameters for dubicube::bootstrap_cube().
List of parameters for dubicube::calculate_bootstrap_ci().
List of parameters for dubicube::cross_validate_cube().
## Not run: library(b3gbi) acacia_cube <- process_cube( cube_name = cube_acacia_SA, grid_type = "eqdgc", first_year = 2010, last_year = 2024 ) impact_cube <- create_impact_cube_data( cube_data = acacia_cube, impact_data = eicat_acacia ) params <- prepare_indicators_bootstrap( impact_cube_data = impact_cube, indicator = "overall", indicator_method = "mean_cum", boot_args = list(samples = 2000), ci_args = list(no_bias = FALSE) ) # Bootstrap bootstrap_results <- do.call( dubicube::bootstrap_cube, params$bootstrap_params ) # Confidence intervals ci_result <- do.call( dubicube::calculate_bootstrap_ci, c(bootstrap_results = list(bootstrap_results), params$ci_params) ) # Cross-validation cv_results <- do.call( dubicube::cross_validate_cube, params$cv_params ) ## End(Not run)## Not run: library(b3gbi) acacia_cube <- process_cube( cube_name = cube_acacia_SA, grid_type = "eqdgc", first_year = 2010, last_year = 2024 ) impact_cube <- create_impact_cube_data( cube_data = acacia_cube, impact_data = eicat_acacia ) params <- prepare_indicators_bootstrap( impact_cube_data = impact_cube, indicator = "overall", indicator_method = "mean_cum", boot_args = list(samples = 2000), ci_args = list(no_bias = FALSE) ) # Bootstrap bootstrap_results <- do.call( dubicube::bootstrap_cube, params$bootstrap_params ) # Confidence intervals ci_result <- do.call( dubicube::calculate_bootstrap_ci, c(bootstrap_results = list(bootstrap_results), params$ci_params) ) # Cross-validation cv_results <- do.call( dubicube::cross_validate_cube, params$cv_params ) ## End(Not run)
Provides a summary representation of an impact_indicator object, designed for user-friendly display in the console.
## S3 method for class 'impact_indicator' print(x, n = 10, ...)## S3 method for class 'impact_indicator' print(x, n = 10, ...)
x |
An impact_indicator object. |
n |
(Optional) Integer specifying the number of rows of data to display. |
... |
Additional arguments. |
## Not run: # create data_cube acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) # compute impact indicator impact_value <- compute_regional_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean_cum", trans = 1 ) # print impact indicator print(impact_value) ## End(Not run)## Not run: # create data_cube acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) # compute impact indicator impact_value <- compute_regional_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean_cum", trans = 1 ) # print impact indicator print(impact_value) ## End(Not run)
Provides a summary representation of an site_impact object, designed for user-friendly display in the console.
## S3 method for class 'site_impact' print(x, n = 10, ...)## S3 method for class 'site_impact' print(x, n = 10, ...)
x |
An site_impact object. |
n |
(Optional) Integer specifying the number of rows of data to display. |
... |
Additional arguments. |
# create data_cube acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) siteImpact <- compute_site_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean_cum", trans = 1 ) # print species impact print(siteImpact)# create data_cube acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) siteImpact <- compute_site_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean_cum", trans = 1 ) # print species impact print(siteImpact)
Provides a summary representation of an species_impact object, designed for user-friendly display in the console.
## S3 method for class 'species_impact' print(x, n = 10, ...)## S3 method for class 'species_impact' print(x, n = 10, ...)
x |
An species_impact object. |
n |
(Optional) Integer specifying the number of rows of data to display. |
... |
Additional arguments. |
# create data_cube acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) # compute species impact speciesImpact <- compute_species_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean", trans = 1 ) # print species impact print(speciesImpact)# create data_cube acacia_cube <- taxa_cube( taxa = taxa_Acacia, region = southAfrica_sf, res = 0.25, first_year = 2010 ) # compute species impact speciesImpact <- compute_species_indicator( cube = acacia_cube, impact_data = eicat_acacia, method = "mean", trans = 1 ) # print species impact print(speciesImpact)
South African sf An example of region sf for impact indicator.
southAfrica_sfsouthAfrica_sf
A 'sf' object of South African map
geometry of polygon
Other Data:
cube_acacia_SA,
eicat_acacia,
taxa_Acacia
sf::plot_sf(southAfrica_sf)sf::plot_sf(southAfrica_sf)
GBIF occurrences data of acacia in South Africa An example of occurrence data from GBIF containing required column for impact indicator.
taxa_Acaciataxa_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
Other Data:
cube_acacia_SA,
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 columns "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 the country for which the GBIF 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 )