-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
178 lines (140 loc) · 7.5 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
dpi = 300,
out.width = "100%"
)
```
# impIndicator <img src="man/figures/logo.png" align="right" height="139" alt="" />
<!-- badges: start -->
[![R-CMD-check](https://github.com/b-cubed-eu/impIndicator/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/b-cubed-eu/impIndicator/actions/workflows/R-CMD-check.yaml)
[![repo status](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![CRAN status](https://www.r-pkg.org/badges/version/impIndicator)](https://CRAN.R-project.org/package=impIndicator)
<!-- badges: end -->
The goal of **impIndicator** is to allow users to seamlessly calculate and visualise the impact of alien taxa and individual species in a given area. It calculates and visualises impact per site as a map. It takes in GBIF occurrence data and EICAT assessment data. It enables users to choose from various methods
of calculating impact indicators based on different studies.\
The impIndicator produces three main products and can be useful as stated below:\
- **impact indicator** <`impact_indicator()`>\
The impact indicator offers a nuanced representation of the trends of biological invasions of an area (local, regional, or global scales). By tracking the increase and decrease of ecological threats over time, this product provides insights into the dynamics of invasive alien species impacts, helping assess whether current management practices are effective or need adjustment. The temporal analysis of impact indicator enables targeted resource allocation, fostering proactive interventions to mitigate biodiversity loss and ecosystem degradation.\
- **site impact** <`site_indicator()`\
The site impact as a map serves as a visual and analytical tool to represent the intensity of biological invasions across different parts of an area. By enabling spatial comparisons—such as between provinces, states, or conservation areas—it highlights hotspots and areas at risk of invasion impact. This spatial data is useful for prioritising management actions, coordinating restoration projects, and fostering cross-regional collaboration to address invasive species impacts effectively.\
- **species impact** <`species_impact()`\
The species impact produces the trends of individual invasive alien species, enabling a species-specific impact caused by invasions. This data supports comparisons of individual species’ impacts, revealing their roles and interactions within invaded area. The species impact is invaluable for prioritising species-specific management efforts, informing eradication strategies, and advancing research on alien species' ecological roles and adaptation patterns.
## Installation
You can install the development version of impIndicator from [GitHub](https://github.com/b-cubed-eu/impIndicator) with:
``` r
# install.packages("remotes")
remotes::install_github("b-cubed-eu/impIndicator")
```
## Demonstration
This Markdown demonstrates the computation and visualisation of impact indicator of biological invasions using the `impact_indicator()` to compute impact indicator of alien taxa, the `species_impact()` to compute impact indicator per species, and the `site_impact()` to compute impact indicator per site. The functions feeds in species GBIF occurrence cube from the `b3gbi::process_cube()` using `taxa_cube()` and
Environmental Impact Classification of Alien Taxa (EICAT) impact score of species.
Read about the background of the products at https://b-cubed-eu.github.io/impIndicator/articles/Background.html
```{r load packages, message=FALSE}
# Load packages
library(impIndicator)
library(b3gbi) # Biodiversity indicators for data cubes
library(tidyverse) # Data wrangling and visualisation
library(sf) # Spatial features
```
## Process occurrence cube
The Global Biodiversity Information Facility (GBIF) occurrence data is a standardised species information that documents the presence or absence of species at particular locations and times.
```{r}
# Process cube from GBIF occurrence data in the R studio environment
acacia_cube <- taxa_cube(
taxa = taxa_Acacia,
region = southAfrica_sf,
res = 0.25,
first_year = 2010
)
acacia_cube
```
## EICAT assessment data
The Environmental Impact Classification for Alien Taxa (EICAT) assessment data is the reported impact of alien taxa based on EICAT method which is the IUCN standard. An assessed alien taxa with adequate data is classified into massive (MV),
major (MR), moderate (MO), minor (MN), or minimal concern (MC) depending on the severity of the impact caused on recipient ecosystem. Additional information such as the mechanisms and location of impact are also recorded.
An example of an EICAT data is:
```{r}
# view EICAT data
head(eicat_acacia,10)
```
## Compute impact map
The impact risk map shows the impact score for each site, where multiple species can be present. To compute the impact risk per site, aggregated scores across species at each site are needed. The
`site_impact()` uses *max*, *sum* and *mean* metrics to aggregate impact scores across species as proposed by Boulesnane-Guengant et al., (in preparation). The combinations of within species aggregation metrics for each species and across species for each site leads to five type of
indicators, namely, **precautionary**, **precautionary cumulative**, **mean**, **mean cumulative** and **cumulative**.\
```{r}
siteImpact <- site_impact(
cube = acacia_cube,
impact_data = eicat_acacia,
trans = 1,
type = "mean cumulative"
)
# impact map
# visualize last four years for readability
plot(x = siteImpact, region = southAfrica_sf, first_year = 2021)
```
## Compute impact indicators
To compute the impact indicator of alien taxa, we sum all the yearly impact scores of each site of the study region. To correct for sampling effort we divide the yearly impact scores by number of sites in the study region with at least a single occurrence throughout the whole year.
```{r}
# impact indicator
impactIndicator <- impact_indicator(
cube = acacia_cube,
impact_data = eicat_acacia,
trans = 1,
type = "mean cumulative"
)
# visualise impact indicator
plot(impactIndicator)
```
## Impact indicator per species
We compute the impact indicator per species by summing the impact risk map per species and correct for sampling effort by dividing by $N$.
```{r}
# impact indicator per species
species_value <- species_impact(
cube = acacia_cube,
impact_data = eicat_acacia,
trans = 1,
type = "mean"
)
# visualise species impact
plot(species_value)
```
# Comparing type of indicators
To compare type of impact indicators for a case study, we provide a plot which can
be adapted by a user to compare a set of method.
```{r}
# plot all type of impact indicators
types <- c(
"precautionary",
"precautionary cumulative",
"mean",
"mean cumulative",
"cumulative"
)
all_impact <- data.frame("year" = unique(acacia_cube$data$year))
for (type in types) {
impact_value <- impact_indicator(
cube = acacia_cube,
impact_data = eicat_acacia,
trans = 1,
type = type
)
all_impact[type] <- impact_value$value
}
#plot the trend
all_impact %>%
gather(-year, key = "indicator_type", value = "impact_score") %>%
ggplot(aes(x = year, y = impact_score)) +
geom_line(aes(color = indicator_type), linewidth = 1.5) +
theme_minimal() +
labs(
title = "Type of indicators",
y = "impact score"
) +
theme(text = element_text(size = 14))
```