marindicators
A comprehensive evaluation and selection of robust ecological indicators is one of the key steps in the process of implementing an Ecosystem Approach to fisheries management and to track progress towards meeting ecosystem goals. The “Guidance framework for the selection and evaluation of ecological indicators” (Bundy, Gomez, and Cook, 2017) was developed to select and evaluate potential indicators for ecosystem monitoring and assessment at different spatial scales using established selection criteria (Fig. 1).
Figure 1. Indicator Selection Guidance Framework
The framework was successfully tested for the Scotian Shelf Bioregion, Canada. In Step 1, four ecosystem attributes and one pressure were defined: Biodiversity, Ecosystem Structure and Functioning, Ecosystem Stability and Resistance to Perturbations, Resource Potential, and Fishing Pressure. In Step 2, 186 indicators were selected to represent these attributes and pressure. The qualitative screening in Step 3 reduced this set to 68 indicators, which were calculated in Step 4 (Table 1). The quantitative screening in Step 5 resulted in a final suite of 30 non-redundant ecological and fishing pressure indicators derived from fishery independent and dependent data (Table 1; Step 6). For more information, including attribute and sub-attribute definitions and the methods used to select the final suite of indicators, please refer to the Guidance Framework document (Bundy, Gomez, and Cook, 2017).
The marindicators
package provides functions to calculate the suite of marine ecosystem indicators calculated in Step 4 of the Guidance Framework (Table 1; Bundy, Gomez, and Cook, 2017). Some functions may be used to calculate additional indicators, for example by specifying different species groups or using alternative values for arguments with default values.
Table 1: marindicators
function to calculate each of the 68 indicators calculated for the Scotian Shelf Bioregion in Step 4 of the Guidance Framework. Ecosystem attributes/pressure are shown in BOLD CAPS. Indicators included in the final suite for the Scotian Shelf Bioregion are highlighted in bold.
SUB-ATTRIBUTE | INDICATOR | FUNCTION |
---|---|---|
BIODIVERSITY | allBiodiversity() |
|
Species Richness | Margalef’s Species Richness | margalef() |
Species Richness | Margalef’s Species Richness (groundfish) | margalef() |
Species Richness | Species Richness | speciesRichness() |
Species Diversity | Shannon’s Diversity Index | shannon() |
Species Diversity | Hill’s Diversity Index | hillN1() |
Species Diversity | Kempton’s Q | kemptonQ() |
Species Evenness | Pielou’s Species Evenness | pielouEvenness() |
Species Evenness | Hill’s Dominance | hillN2() |
Species Evenness | Heip’s Evenness Index | heips() |
STRUCTURE & FUNCTIONING | allStructure() |
|
Structure: Top of Food Web | Large Fish Indicator | largeFishIndicator() |
Structure: Top of Food Web | Large Species Indicator | largeSpeciesIndicator() |
Structure: Top of Food Web | Proportion of Predatory Fish | biomassRatio() |
Structure: Trophic Guilds | Biomass of Large Benthivores | resourcePotential() |
Structure: Trophic Guilds | Biomass of Medium Benthivores | resourcePotential() |
Structure: Trophic Guilds | Biomass of Planktivores | resourcePotential() |
Structure: Trophic Guilds | Biomass of Piscivores | resourcePotential() |
Structure: Trophic Guilds | Biomass of Zoopiscivores | resourcePotential() |
Size Structure: Fish Community | Mean Length (weighted by abundance) | meanLengthCommunity() |
Size Structure: Fish Community | Mean Length (weighted by biomass) | meanLengthCommunity() |
Trophic Structure | Mean Trophic Level of Community | meanTLCommunity() |
Structural Change | Pelagic to Demersal biomass ratio | biomassRatio() |
Structural Change | Invertebrate to Demersal biomass ratio | biomassRatio() |
Ecosystem Functioning | Community Condition | communityCondition() |
Ecosystem Functioning | Large Benthivore Condition | communityCondition() |
Ecosystem Functioning | Medium Benthivore Condition | communityCondition() |
Ecosystem Functioning | Planktivore Condition | communityCondition() |
Ecosystem Functioning | Piscivore Condition | communityCondition() |
Ecosystem Functioning | Zoopiscivore Condition | communityCondition() |
STABILITY & RESISTANCE | allStability() |
|
Ecosystem Resistance | Mean Lifespan | meanMaxAge() |
Ecosystem Resistance | Mean Max Length (weighted by abundance) | meanMaxLength() |
Ecosystem Resistance | Mean Max Length (weighted by biomass) | meanMaxLength() |
Ecosystem Resistance | Intrinsic Vulnerability Index of Landings | IVILandings() |
Stability of Trophic Community | Biomass per Trophic Level 2 | biomassPerTL() |
Stability of Trophic Community | Biomass per Trophic Level 3 | biomassPerTL() |
Stability of Trophic Community | Biomass per Trophic Level 4 | biomassPerTL() |
Stability of Community Biomass | Coefficient of Variation of Biomass1 | CVBiomass() |
RESOURCE POTENTIAL | allPotential() |
|
Potential of Community | Biomass | resourcePotential() |
Potential of Community | Biomass of Finfish | resourcePotential() |
Potential of Community | Biomass of Invertebrates | resourcePotential() |
Potential of Fished Groups | Biomass of Clupeids | resourcePotential() |
Potential of Fished Groups | Biomass of Forage Fish | resourcePotential() |
Potential of Fished Groups | Biomass of Gadoids | resourcePotential() |
Potential of Fished Groups | Biomass of Groundfish | resourcePotential() |
Potential of Fished Groups | Biomass of Flatfish | resourcePotential() |
Potential of Indicator Species | Biomass of Skates | resourcePotential() |
Fishing Strategies & System Productivity | Fishing in Balance | fishingInBalance() |
FISHING PRESSURE | allPressure() |
|
Fishing Pressure on Community | Fishing Pressure on Community | fishingPressure() |
Fishing Pressure on Community | Fishing Pressure on Finfish | fishingPressure() |
Fishing Pressure on Community | Fishing Pressure on Invertebrates | fishingPressure() |
Fishing Pressure on Fished Groups | Fishing Pressure on Clupeids | fishingPressure() |
Fishing Pressure on Fished Groups | Fishing Pressure on Forage Fish | fishingPressure() |
Fishing Pressure on Fished Groups | Fishing Pressure on Groundfish | fishingPressure() |
Fishing Pressure on Fished Groups | Fishing Pressure on Gadoids | fishingPressure() |
Fishing Pressure on Fished Groups | Fishing Pressure on Skates | fishingPressure() |
Fishing Pressure on Fished Groups | Fishing Pressure on Flatfish | fishingPressure() |
Distribution of Fishing Pressure | Marine Trophic Index | meanTLLandings() |
Distribution of Fishing Pressure | Mean Trophic Level of Landings | meanTLLandings() |
Distribution of Fishing Pressure | Diversity of Target Species | speciesRichness() |
Total Landings | Landings | landings() |
Total Landings | Landings of Clupeids | landings() |
Total Landings | Landings of Forage Fish | landings() |
Total Landings | Landings of Groundfish | landings() |
Total Landings | Landings of Gadoids | landings() |
Total Landings | Landings of Finfish | landings() |
Total Landings | Landings of Invertebrates | landings() |
Total Landings | Landings of Skates | landings() |
Total Landings | Landings of Flatfish | landings() |
Total Landings | Landings of Large Pelagics | landings() |
There are three main steps for applying marindicators
: Step 1: Decide which indicators to calculate; Step 2: Compile data; Step 3: Calculate indicators. Steps 1 and 2 may be interchangeable and the availability of data may inform the choice of indicators. These steps are described in detail below.
The decision of which indicators to calculate will ideally be informed by an indicator selection process like the Guidance Framework (Bundy, Gomez, and Cook, 2017), and may also be informed by specific research questions, and/or the availability of data. The selected indicators will dictate the data required and the choice of function(s) (Steps 2 and 3).
Table 1 provides a guide for the indicators calculated by the package. Note that species groups are user-defined, and so the package is not restricted to calculating indicators for the groups in Table 1 (see Species Groups below).
The data required will depend on which indicators were selected in Step 1. In general, indicators related to ecosystem attributes require annual fishery independent survey data, while indicators related to fishing pressure require annual commercial landings data. Additional species information is required to calculate some indicators (Table 2). See the help
page for a specific function for its data requirements.
This section describes the six dataframes required to calculate all of the indicators listed in Table 1.
X is a dataframe of fishery independent data derived from research vessel survey data or model output, with columns YEAR
, ID
, SPECIES
, and ABUNDANCE
and/or BIOMASS
(depending on which indicator is being calculated). YEAR
indicates the year the observation was recorded, ID
is an area code indicating where the observation was recorded, SPECIES
is a numeric code indicating the species sampled, and ABUNDANCE
/BIOMASS
is the corresponding abundance/biomass (stratified and corrected for catchability as required).
#> YEAR ID SPECIES ABUNDANCE BIOMASS
#> 1 2014 AREA1 10 2.91e+08 6.34e+07
#> 2 2014 AREA1 11 2.56e+08 7.09e+07
#> 3 2014 AREA1 12 2.58e+07 9.68e+06
#> 4 2014 AREA1 13 2.15e+07 1.43e+06
#> 154 2014 AREA2 10 6.73e+07 4.20e+06
#> 155 2014 AREA2 11 2.30e+08 5.66e+07
#> 156 2014 AREA2 12 3.24e+07 1.94e+07
#> 157 2014 AREA2 13 3.28e+07 2.32e+06
#> 315 2015 AREA1 10 2.43e+08 6.06e+07
#> 316 2015 AREA1 11 4.45e+08 5.23e+07
#> 317 2015 AREA1 12 2.07e+07 8.01e+06
#> 318 2015 AREA1 13 3.40e+07 3.56e+06
#> 505 2015 AREA2 10 6.23e+07 4.75e+06
#> 506 2015 AREA2 11 2.40e+08 6.95e+07
#> 507 2015 AREA2 12 1.30e+07 1.22e+07
#> 508 2015 AREA2 13 1.83e+07 2.38e+06
Indicators calculated using X
(among other arguments): Heip’s Evenness Index, Hill’s N1, Hill’s N2, Kempton’s Q, Margalef’s Species Richness, Pielou’s Species Evenness, Shannon’s Diversity Index, Biomass ratio(s), Abundance/Biomass of Species Groups, Large Species Indicator, Mean Trophic Level of the Community, CV of Biomass, Mean Maximum Lifespan, Mean Maximum Length, and Fishing Pressure.
X_length is a dataframe of fishery independent data derived from research vessel survey data or model output, with columns YEAR
, ID
, SPECIES
, LENGTH
, and ABUNDANCE
and/or BIOMASS
(depending on which indicator is being calculated). As with X
, YEAR
indicates the year the observation was recorded, ID
is an area code indicating where the observation was recorded, and SPECIES
is a numeric code indicating the species sampled. LENGTH
is the length class (cm) and ABUNDANCE
/BIOMASS
is the corresponding abundance/biomass at length (stratified and corrected for catchability as required). Species for which there are no length data should be assigned LENGTH = -99
. These observations are removed by the function(s).
#> YEAR ID SPECIES LENGTH ABUNDANCE BIOMASS
#> 200 2014 AREA1 23 4 2.91e+06 2.02e+03
#> 201 2014 AREA1 123 4 2.16e+05 2.10e+02
#> 202 2014 AREA1 150 4 9.31e+06 8.79e+03
#> 203 2014 AREA1 502 4 3.14e+06 1.44e+04
#> 205 2014 AREA2 11 4 2.01e+05 9.51e+01
#> 206 2014 AREA2 23 4 4.69e+05 3.26e+02
#> 207 2014 AREA2 123 4 2.66e+06 2.58e+03
#> 208 2014 AREA2 150 4 3.60e+06 3.40e+03
#> 2628 2015 AREA1 502 2 3.45e+06 2.43e+03
#> 2629 2015 AREA1 40 3 6.46e+06 9.37e+02
#> 2630 2015 AREA1 502 3 7.21e+06 1.57e+04
#> 2632 2015 AREA1 10 4 1.10e+07 6.25e+03
#> 2631 2015 AREA2 340 3 4.32e+05 1.10e+02
#> 2638 2015 AREA2 23 4 7.57e+05 6.56e+02
#> 2639 2015 AREA2 150 4 4.09e+06 4.00e+03
#> 2640 2015 AREA2 300 4 7.07e+05 3.68e+02
Indicators calculated using X_length
(among other arguments): Community Condition, Large Fish Indicator, Mean Length.
land is a dataframe of commercial landings data with columns YEAR
, ID
, SPECIES
and CATCH
. YEAR
indicates the year the landing was recorded, ID
is an area code indicating where the landing was recorded, SPECIES
is a numeric code indicating the species landed, and CATCH
is the corresponding landed weight (in the same units as BIOMASS
in X
and X_length
).
The species codes in land
may not be consistent with those in X
and X_length
(this may be the case when dealing with different data sources). In this case, ensure that the species codes are consistent with the Species Information and Species Groups tables described below. Additionally, the Fishing-in-Balance, Intrinsic Vulnerability Index of Landings, Mean Trophic Level of the Landings, and Marine Trophic Index should be calculated using their respective single functions (see Examples below).
#> YEAR ID SPECIES CATCH
#> 1 2014 AREA1 10 4.78e+03
#> 2 2014 AREA1 11 4.06e+03
#> 3 2014 AREA1 12 9.22e+03
#> 4 2014 AREA1 13 1.55e+01
#> 307 2014 AREA2 10 4.06e+03
#> 308 2014 AREA2 11 6.26e+03
#> 309 2014 AREA2 12 4.84e+03
#> 310 2014 AREA2 13 2.83e+03
#> 52 2015 AREA1 10 8.32e+02
#> 53 2015 AREA1 11 4.37e+03
#> 54 2015 AREA1 12 2.92e+03
#> 55 2015 AREA1 13 9.47e+03
#> 358 2015 AREA2 10 4.82e+03
#> 359 2015 AREA2 11 7.42e+03
#> 360 2015 AREA2 12 3.76e+03
#> 361 2015 AREA2 13 5.01e+03
Indicators calculated using land
(among other arguments): Intrinsic Vulnerability Index, Fishing-in-Balance, Diversity of the Target Species, Fishing Pressure, Landings, Marine Trophic Index, and Mean Trophic Index of Landings.
Additional information on key species (i.e., all species for which the information is available) is required to calculate several indicators (Table 2).
Table 2: Additional species information required to calculate given indicators. TABLE HEADER is the required name of the column containing the information in the table passed to the function.
SPECIES INFO | TABLE HEADER | DESCRIPTION | INDICATOR(S) |
---|---|---|---|
Trophic Level | TL |
Trophic level of species caught in fishery independent surveys | Kempton’s Q2, Mean Trophic Level of Community, Biomass per Trophic Level |
Maximum Length | MAXLENGTH |
Maximum recorded length of species caught in fishery independent surveys | Large Species Indicator, Mean Maximum Length |
Maximum Age | MAXAGE |
Maximum recorded age of of species caught in fishery independent surveys | Maximum Lifespan |
Intrinsic Vulnerability Index | IVI |
Vulnerability of commercial species, determined by considering several traits (e.g. max length, age at first maturity, longevity, von Bertalanffy growth parameter, natural mortality, fecundity, spatial behaviour, and geographic range) | IVI of landings |
Trophic Level of Landed Species | TL_LAND |
Trophic level of commercial species | Fishing-in-Balance, Marine Trophic Index, Mean Trophic Level of Landings |
The species information is passed to the function through a table with at least two columns: SPECIES
(the species codes) and the corresponding column of information, which should be named after one of the table headers in Table 2. For example:
#> SPECIES TL
#> 1 10 4.170
#> 2 11 3.405
#> 3 12 4.465
#> 4 13 3.665
#> 5 14 4.227
#> 6 15 4.465
#> 7 16 4.080
#> 8 17 3.580
If the species codes used in X
and land
are the same, it may be convenient to store all of the additional information in a single table. If the species codes in X
and land
are not the same, then the extra information should be stored in at least two tables (e.g., TL
, MAXLENGTH
, and MAXAGE
in one table, and IVI
and TL_LAND
in the other). If information is not available for a given species, assign a value of NA
. This whole table may be passed to a function; superfluous columns will be ignored.
#> SPECIES TL MAXLENGTH MAXAGE IVI TL_LAND
#> 1 10 4.170 96 25 52 4.337
#> 2 11 3.405 64 20 47 3.430
#> 3 12 4.465 83 20 41 4.600
#> 4 13 3.665 47 14 41 3.550
#> 5 14 4.227 39 12 48 4.224
#> 6 15 4.465 92 20 54 4.600
#> 7 16 4.080 91 14 58 4.250
#> 8 17 3.580 27 NA 24 3.580
#> 9 19 4.465 71 NA 59 NA
#> 10 23 3.890 41 48 58 3.900
The Community Condition indicator (based on Fulton’s condition index) requires annual length-weight data for all species of interest. This table should have 5 columns: YEAR
, ID
, and SPECIES
correspond with those columns in X_length
, while LENGTH
is fish length at the corresponding WEIGHT
(fish weight).
#> YEAR ID SPECIES LENGTH WEIGHT
#> 1 2014 AREA1 23 37 698
#> 2 2014 AREA1 201 28 178
#> 3 2014 AREA1 23 38 649
#> 4 2014 AREA1 2526 80 160
#> 10321 2014 AREA2 11 19 58
#> 10322 2014 AREA2 11 8 4
#> 10323 2014 AREA2 11 53 1540
#> 10324 2014 AREA2 13 34 281
#> 17885 2015 AREA1 40 26 130
#> 17886 2015 AREA1 410 26 48
#> 17887 2015 AREA1 23 36 750
#> 17888 2015 AREA1 201 37 454
#> 28794 2015 AREA2 23 19 122
#> 28795 2015 AREA2 23 19 96
#> 28796 2015 AREA2 14 26 124
#> 28797 2015 AREA2 11 37 518
Several functions give the user the option to choose the species group(s) for which to calculate the indicator. The groups are defined by the user in a table, called here species.table
. The column names of species.table
are the groups of interest, and the entries in each column are the codes for species that belong in that group. Both fishery independent groups (e.g., trophic guilds) and commercial groups can be included in this table, but take care to be consistent with the species codes (e.g., if there are different species codes in X
and land
, the fishery independent groups should include species codes from X
, and the commercial groups should include species codes from land
).
#> CLUPEIDS FINFISH FLATFISH FORAGE GADOIDS GROUNDFISH INVERTEBRATES
#> 1 60 1 30 60 10 10 2000
#> 2 61 2 31 61 11 11 2001
#> 3 62 3 40 62 12 12 2002
#> 4 63 4 41 63 13 13 2003
#> 5 NA 5 42 64 14 14 2004
#> 6 NA 6 43 160 15 15 2005
#> 7 NA 7 44 610 16 16 2006
#> 8 NA 8 45 NA 17 17 2007
The user does not need to include a column with all species (i.e., all species are automatically included in the calculation if argument group = "ALL"
).
The functions used to calculate the indicators will depend on which indicators were selected in Step 1. There are three different levels of functions:
Individual functions: generally calculate a single indicator for one or more user-defined species groups. These functions return a dataframe with columns: ID
, YEAR
, and a column with the indicator values for each species group.
“allAttribute” functions: call the individual functions to calculate and return all (or a subset) of the indicators for an attribute or pressure. The user can choose whether the function returns the raw indicator values, the standardized (z-score) values, or both. Additionally, the user can choose whether the function returns the indicator dataframe to the global environment, exports the dataframe to a csv file, or both. These functions return a dataframe with columns ID
, YEAR
, and indicators corresponding to the arguments supplied to the function.
extractAll()
function, which calls the “allAttribute” functions to calculate and return all of the indicators. The user can choose whether the function returns the raw indicator values, the standardized (z-score) values, or both. Additionally, the user can choose whether the function returns the indicator dataframe to the global environment, exports the dataframe to a csv file, or both.
Here we show examples of how to use the different levels of functions to calculate indicators for two areas (AREA1
and AREA2
) from 2014 - 2019.
If there are only a handful of indicators to be calculated, it may be most efficient and convenient to use the individual functions (Table 1). For example, say in Step 1 we decide we are interested in: the Biomass and Margalef’s Species Richness for the community and groundfish, the Biomass per Trophic Levels 2, 3, and 4, and the Intrinsic Vulnerability Index, Trophic Level, and Marine Trophic Index of the landings. In this case, we would choose to apply the corresponding individual functions: resourcePotential()
, margalef()
, biomassPerTL()
, IVILandings()
, and meanTLLandings()
.
# Compiled Data
data(X)
data(land)
data(species.table)
data(species.info)
# Calculate indicators:
# Biomass of community and groundfish species
biomass <- resourcePotential(X = X, groups = c("ALL", "GROUNDFISH"),
species.table = species.table, years = c(2014:2019))
biomass
#> ID YEAR BIOMASS_ALL BIOMASS_GROUNDFISH
#> 1 AREA1 2014 3162255851 462102408
#> 2 AREA1 2015 2497674482 533289357
#> 3 AREA1 2016 2515742813 415384140
#> 4 AREA1 2017 2649301301 484332680
#> 5 AREA1 2018 2148033716 525420919
#> 6 AREA1 2019 3351348267 353127256
#> 7 AREA2 2014 2759984514 609696420
#> 8 AREA2 2015 1256212621 381644027
#> 9 AREA2 2016 1524331978 321671679
#> 10 AREA2 2017 1321989582 658386317
#> 11 AREA2 2018 1836321002 929478862
#> 12 AREA2 2019 1325037414 368579722
# Margalef's Species Richness of community and groundfish species
marg <- margalef(X= X, groups = c("ALL", "GROUNDFISH"), metric = "ABUNDANCE",
species.table = species.table, years = c(2014:2019))
marg
#> ID YEAR MargalefRichness_ALL MargalefRichness_GROUNDFISH
#> 1 AREA1 2014 6.197670 1.756198
#> 2 AREA1 2015 7.702378 1.747188
#> 3 AREA1 2016 7.717426 1.670704
#> 4 AREA1 2017 8.265226 1.760840
#> 5 AREA1 2018 7.754668 1.781742
#> 6 AREA1 2019 7.842566 1.928704
#> 7 AREA2 2014 6.726931 1.573160
#> 8 AREA2 2015 6.420818 1.796468
#> 9 AREA2 2016 6.376422 1.616272
#> 10 AREA2 2017 6.143174 1.752277
#> 11 AREA2 2018 5.850146 1.725159
#> 12 AREA2 2019 6.054704 1.582634
# Biomass per Trophic Level
biomass_TL <- biomassPerTL(X = X, TL.table = species.info, metric = "BIOMASS",
TL.grouping = 1, years = c(2014:2019))
biomass_TL
#> ID YEAR BIOMASS_TL2 BIOMASS_TL3 BIOMASS_TL4
#> 1 AREA1 2014 35405630 2871871298 219507005
#> 2 AREA1 2015 50462790 2084045535 321033089
#> 3 AREA1 2016 59015649 2208636535 234481212
#> 4 AREA1 2017 38536841 2363296738 207524841
#> 5 AREA1 2018 25266700 1772958593 314547289
#> 6 AREA1 2019 23113296 3121643636 198938915
#> 7 AREA2 2014 4943480 2314505007 439759145
#> 8 AREA2 2015 5610891 980086793 266814216
#> 9 AREA2 2016 7916106 1302569804 213227183
#> 10 AREA2 2017 2057205 825760389 490682646
#> 11 AREA2 2018 2701400 1056387429 774679946
#> 12 AREA2 2019 2382295 1166865751 152026191
# Intrinsic Vulnerability Index
IVI <- IVILandings(land = land, IVI.table = species.info, years = c(2014:2019))
IVI
#> ID YEAR IVILandings
#> 7 AREA1 2014 51.64111
#> 8 AREA1 2015 48.40060
#> 9 AREA1 2016 49.87676
#> 10 AREA1 2017 51.88015
#> 11 AREA1 2018 49.67221
#> 12 AREA1 2019 46.28995
#> 1 AREA2 2014 48.40830
#> 2 AREA2 2015 50.53258
#> 3 AREA2 2016 49.89094
#> 4 AREA2 2017 49.34488
#> 5 AREA2 2018 51.80322
#> 6 AREA2 2019 48.64983
# Trophic Level of Landings
TL_land <- meanTLLandings(land = land, TL.table = species.info, minTL = 0, years = c(2014:2019))
TL_land
#> ID YEAR MeanTL.Landings
#> 1 AREA1 2014 4.005387
#> 2 AREA1 2015 3.691699
#> 3 AREA1 2016 3.976440
#> 4 AREA1 2017 3.929728
#> 5 AREA1 2018 3.931436
#> 6 AREA1 2019 3.864715
#> 7 AREA2 2014 3.799556
#> 8 AREA2 2015 3.938645
#> 9 AREA2 2016 3.812923
#> 10 AREA2 2017 4.053953
#> 11 AREA2 2018 3.747004
#> 12 AREA2 2019 3.853020
# Marine Trophic Index
MTI_land <- meanTLLandings(land = land, TL.table = species.info, minTL = 3.25, years = c(2014:2019))
MTI_land
#> ID YEAR MTI.Landings_3.25
#> 1 AREA1 2014 4.150285
#> 2 AREA1 2015 3.788783
#> 3 AREA1 2016 4.139587
#> 4 AREA1 2017 4.152784
#> 5 AREA1 2018 4.159833
#> 6 AREA1 2019 4.209118
#> 7 AREA2 2014 3.904428
#> 8 AREA2 2015 4.160202
#> 9 AREA2 2016 3.986029
#> 10 AREA2 2017 4.176730
#> 11 AREA2 2018 3.908365
#> 12 AREA2 2019 4.064047
If all of the indicators to be calculated are related to one attribute or pressure, it may be the most efficient and convenient to use the corresponding “allAttribute” function (Table 1). For example, if in Step 1 we decide that we are only interested in the Biodiversity indicators, then the allBiodiversity()
function should be applied. The user can choose whether the function returns the indicator dataframe to the global environment, exports the dataframe to a csv file, or both. The user can also choose whether the function returns the raw indicator values, the standardized (z-score) values, or both. For example, the following function call returns 8 raw Biodiversity indicators to to the global environment.
# Compiled Data
data(X)
# Calculate raw indicators
allBiodiversity(X = X, metric = "ABUNDANCE", group = "ALL", years = c(2014:2019),
percentiles = c(.25, 0.75), minTL = 0, TL.table = species.info,
raw = TRUE, std = FALSE,
export.path = NULL, glob.env = TRUE)
#> ID YEAR SpeciesRichness_ALL ShannonDiversity_ALL
#> 1 AREA1 2014 153 1.832029
#> 2 AREA1 2015 190 2.043576
#> 3 AREA1 2016 191 1.723573
#> 4 AREA1 2017 200 2.123325
#> 5 AREA1 2018 187 2.206637
#> 6 AREA1 2019 196 1.426820
#> 7 AREA2 2014 161 2.018822
#> 8 AREA2 2015 150 2.130908
#> 9 AREA2 2016 151 1.920664
#> 10 AREA2 2017 143 2.002370
#> 11 AREA2 2018 140 1.579645
#> 12 AREA2 2019 141 1.797358
#> MargalefRichness_ALL PielouEvenness_ALL HillDiversity_ALL
#> 1 6.197670 0.3641888 6.246549
#> 2 7.702378 0.3894733 7.718159
#> 3 7.717426 0.3281575 5.604518
#> 4 8.265226 0.4007546 8.358885
#> 5 7.754668 0.4218297 9.085114
#> 6 7.842566 0.2703277 4.165434
#> 7 6.726931 0.3972961 7.529450
#> 8 6.420818 0.4252770 8.422510
#> 9 6.376422 0.3828098 6.825488
#> 10 6.143174 0.4034722 7.406587
#> 11 5.850146 0.3196600 4.853233
#> 12 6.054704 0.3631935 6.033683
#> HillDominance_ALL Heips_ALL KemptonQ_0_ALL
#> 1 3.951117 0.03451677 13.12902
#> 2 3.903130 0.03554582 15.15009
#> 3 3.174042 0.02423430 15.66883
#> 4 4.679784 0.03697932 15.71705
#> 5 5.597405 0.04346835 13.13195
#> 6 2.447229 0.01623299 16.62034
#> 7 4.886472 0.04080906 14.80901
#> 8 3.987204 0.04981550 13.31722
#> 9 4.597779 0.03883658 12.48471
#> 10 4.387534 0.04511681 10.57121
#> 11 3.031386 0.02772110 11.35864
#> 12 3.118748 0.03595488 13.33981
By changing the arguments to raw = FALSE
and std = TRUE
, the function call returns the standardized versions of the same Biodiversity indicators (denoted with _s in the indicator name):
# Calculate standardized indicators
allBiodiversity(X = X, metric = "ABUNDANCE", group = "ALL", years = c(2014:2019),
percentiles = c(.25, 0.75), minTL = 0, TL.table = species.info,
raw = FALSE, std = TRUE,
export.path = NULL, glob.env = TRUE)
#> ID YEAR SpeciesRichness_ALL_s ShannonDiversity_ALL_s
#> 1 AREA1 2014 -1.96336120 -0.20824764
#> 2 AREA1 2015 0.22692114 0.51834679
#> 3 AREA1 2016 0.28611796 -0.58075955
#> 4 AREA1 2017 0.81888935 0.79225918
#> 5 AREA1 2018 0.04933068 1.07840945
#> 6 AREA1 2019 0.58210207 -1.60000823
#> 7 AREA2 2014 1.66840550 0.56536998
#> 8 AREA2 2015 0.29197096 1.13871095
#> 9 AREA2 2016 0.41710137 0.06327215
#> 10 AREA2 2017 -0.58394192 0.48121355
#> 11 AREA2 2018 -0.95933316 -1.68110391
#> 12 AREA2 2019 -0.83420275 -0.56746272
#> MargalefRichness_ALL_s PielouEvenness_ALL_s HillDiversity_ALL_s
#> 1 -1.9495666 0.03124724 -0.33293655
#> 2 0.1726122 0.48700578 0.46171826
#> 3 0.1938362 -0.61822413 -0.67962724
#> 4 0.9664297 0.69035296 0.80770367
#> 5 0.2463608 1.07023672 1.19985988
#> 6 0.3703278 -1.66061858 -1.45671801
#> 7 1.4985953 0.41582955 0.54445706
#> 8 0.5118423 1.17409343 1.25502126
#> 9 0.3687338 0.02326120 -0.01565095
#> 10 -0.3831397 0.58319791 0.44670105
#> 11 -1.3277109 -1.68805644 -1.58487726
#> 12 -0.6683208 -0.50832565 -0.64565116
#> HillDominance_ALL_s Heips_ALL_s KemptonQ_0_ALL_s
#> 1 -0.00693690 0.2731363 -1.2215760
#> 2 -0.05035106 0.3777329 0.1702418
#> 3 -0.70996705 -0.7720179 0.5274729
#> 4 0.65229741 0.5234404 0.5606803
#> 5 1.48248123 1.1830134 -1.2195552
#> 6 -1.36752364 -1.5853051 1.1827361
#> 7 1.14088571 0.1441583 1.4196688
#> 8 -0.01845729 1.3244037 0.4402009
#> 9 0.76870128 -0.1143239 -0.1064005
#> 10 0.49765150 0.7086653 -1.3627534
#> 11 -1.25070507 -1.5709476 -0.8457487
#> 12 -1.13807613 -0.4919558 0.4550329
If we decide in Step 1 that all indicators should be calculated, and data are available to do so, the extractAll()
function may be the most efficient and convenient. The user can choose whether the function returns the indicator dataframe to the global environment, exports the dataframe to a csv file, or both. The user can also choose whether the function returns the raw indicator values, the standardized (z-score) values, or both. For example, the following function call calculates 47 standardized indicators and returns them to the global environment in variable all_inds
.
# Compiled data
data(X)
data(X_length)
data(land)
data(Length_Weight)
data(species.info)
data(species.table)
# Species groups of interest
resource.groups <- c("ALL", "GROUNDFISH")
ratio.groups <- data.frame(rbind(c("PELAGIC", "GROUNDFISH"), c("PREDATORS", "ALL")))
trophicguild.groups <- c("LBENTHIVORE", "MBENTHIVORE", "PISCIVORE", "PLANKTIVORE")
condition.groups <- c("FINFISH", "LBENTHIVORE", "MBENTHIVORE", "PISCIVORE", "PLANKTIVORE", "ZOOPISCIVORE")
landings.groups <- c("ALL", "CLUPEIDS.L", "FLATFISH.L", "GROUNDFISH.L")
FP.groups <- data.frame(rbind(c("ALL", "ALL"),
c("CLUPEIDS", "CLUPEIDS.L"),
c("FLATFISH", "FLATFISH.L"),
c("GROUNDFISH", "GROUNDFISH.L")))
names(FP.groups) <- c("group.X", "group.land")
# Calculate indicators
all_inds <- extractAll(X = X, X_length = X_length, land = land, years = c(2014:2019),
speciesinfo.table = species.info, species.table = species.table,
metric.bio = "ABUNDANCE", group.bio = "ALL", minTL.bio = 3,
LSI.group = "ALL", max.length = 85,
LFI.group = "ALL", large.fish = 35,
LenWt.table = Length_Weight,
guild.groups = trophicguild.groups,
condition.groups = condition.groups,
ratio.groups = ratio.groups,
maxlength.group = "FINFISH", TL.grouping = 1, wind = 5, negative = TRUE,
resource.groups = resource.groups,
minTL.FiB = 0, base.start = 2014, base.end = 2015,
landings.groups = landings.groups, FP.groups = FP.groups,
minTL.FP = c(0, 3.25),
export.path = NULL, glob.env = TRUE,
raw = FALSE, std = TRUE)
names(all_inds)
#> [1] "ID" "YEAR"
#> [3] "SpeciesRichness_ALL_s" "ShannonDiversity_ALL_s"
#> [5] "MargalefRichness_ALL_s" "PielouEvenness_ALL_s"
#> [7] "HillDiversity_ALL_s" "HillDominance_ALL_s"
#> [9] "Heips_ALL_s" "KemptonQ_3_ALL_s"
#> [11] "BIOMASS_LBENTHIVORE_s" "BIOMASS_MBENTHIVORE_s"
#> [13] "BIOMASS_PISCIVORE_s" "BIOMASS_PLANKTIVORE_s"
#> [15] "LargeSpeciesIndicator_s" "MeanTLCommunity_s"
#> [17] "LargeFishIndicator_s" "MeanLengthBIOMASS_s"
#> [19] "MeanLengthABUNDANCE_s" "CCondition_FINFISH_s"
#> [21] "CCondition_LBENTHIVORE_s" "CCondition_MBENTHIVORE_s"
#> [23] "CCondition_PISCIVORE_s" "CCondition_PLANKTIVORE_s"
#> [25] "CCondition_ZOOPISCIVORE_s" "CVBiomass_s"
#> [27] "MeanLifespan_s" "BIOMASS_TL2_s"
#> [29] "BIOMASS_TL3_s" "BIOMASS_TL4_s"
#> [31] "MMLength_BIOMASS_s" "MMLength_ABUNDANCE_s"
#> [33] "IVILandings_s" "ABUNDANCE_ALL_s"
#> [35] "BIOMASS_ALL_s" "BIOMASS_GROUNDFISH_s"
#> [37] "FishinginBalance_s" "DiversityTargetSpp_ALL_s"
#> [39] "MeanTL.Landings_s" "MTI.Landings_3.25_s"
#> [41] "landings_ALL_s" "landings_CLUPEIDS.L_s"
#> [43] "landings_FLATFISH.L_s" "landings_GROUNDFISH.L_s"
#> [45] "FP_ALL_s" "FP_CLUPEIDS_s"
#> [47] "FP_FLATFISH_s" "FP_GROUNDFISH_s"
Recall that if there are different species codes in X
and land
, then the Fishing-in-Balance, Intrinsic Vulnerability Index of Landings, Mean Trophic Level of the Landings, and Marine Trophic Index should be calculated using their respective single functions (see Table 1).
If there are no observations for a given year in X
, X_length
or land
, the indicator value is either assigned NA
or 0
. In the case of fishery independent data, a species may still be present in the community even if it is not detected during the survey, and so all indicators calculated from X
and X_land
are assigned NA
for years that are missing data.
In contrast, for commercial landings data, we assume that no recorded landings of a species means that the species was not landed. All landings indicators are therefore assigned 0
for years without data. For fishing pressure, if the biomass of the fished group is NA
and landings of the group are 0
, the fishing pressure is set to 0
. Otherwise, if biomass of the fished group is NA
, fishing pressure is set to NA
.
Other indicators that are calculated from land
are assigned NA
for years without observations (e.g., Intrinsic Vulnerability Index, Fishing-in-Balance, Diversity of Target Species, Marine Trophic Index, Mean Trophic Level of Landings).
Bundy A, Gomez C, Cook AM. 2017. Guidance framework for the selection and evaluation of ecological indicators. Can. Tech. Rep. Fish. Aquat. Sci. 3232: xii + 212 p.