The following steps are required to run the B1 seabird abundance indicator analysis, as part of an update to OSPAR Common Indicators.

Look up tables

Update the following lookup tables by running the scripts in the lookup_raw script in data-raw folder.

  • species table: lists the bird species along with the number of eggs laid, functional group, the required count units of pairs or individuals and method of conversion between these two units.

  • country table: lists the participating countries along with their 2 letter ISO code.

  • regional weightings table: lists the breeding and non-breeding bird species’ regional weightings value for each country’s OSPAR region and birds subdivision, with the source year for the regional weighting and required count units of pairs or individuals for the species. An additional script to collate the regional weightings was run separately, collate_regional_weighting_data, in the vignettes folder. When running the script

    • replaces species information with species information in the species look up table.

    • removes regional weightings values for Greylag Goose as not in species look up table

    • converts source year ranges to a single mid source year.

    • excludes missing and zero source year weighting values.

    • checks species that do not breed within OSPAR region do not have breeding regional weighting values.

    • checks species counts requirements matched the actual counts of individuals or pairs.

    • standardize regional weighting values (based on conversion criteria in species look up table).

    -   Black Guillemot pair counts to individual counts.
    -   Razorbill and Common Guillemot pair counts to individual counts.
    -   Brunnichs Guillemot standardization not required as Norway supplied all counts as individuals Species weighting value removed.
    -   Tern individual counts to pair counts.
    -   Gull and Fulmar individual counts to pair counts.
    -   Puffin individual counts to pair counts.
    -   Breeding individual counts excluded for specific species.

    Once the look up tables have been updated run Build - Install and Restart in RStudio to update the package on your local machine.

  • count_status table lists whether the species counts are for analysis or excluded for the particular region / sub-regions.

ICES data

The breeding and wintering seabird abundance data across the participating OSPAR countries was collated and supplied by International Council for the Exploration of the Sea (ICES). The data was supplied in two files, one for colony information and one for abundance data.

Update and format the ICES colony and abundance data by running the ice_raw_data script in the data-raw folder. An additional Correct colony data script, b1_indicator_colony_correction in the vignettes folder, was ran separately to correct the colony data. The formatted data is stored on your local machine using the pins package.

  • colony_ices table: This table contains the seabird colony details including their name, country, OSPAR region and birds subdivision and spatial co-ordinates. When running the script

    • manually update path in script to ICES colony data file.
    • added additional Danish International Waterbird census non-breeding records colonies
    • check and correct colonies OSPAR regions and bird subdivisions. The script outputs shape files in the temporary directory containing colonies for each OSPAR region and birds subdivision so that they can be then be imported into QGIS for visual inspection.
  • b1 abundance data: The script outputs b1_abundance_data_ices file. The formatted data is stored on your local machine using the pins package. When running the script

    • manually update path in script to ICES abundance data file.

    • added additional Danish International Waterbird census non-breeding records.

    • restricts counts to a defined year range, 1984 - 2020 (1984 the earliest regional weighting source year)

    • excludes data with missing counts (= -1).

    • replaces colony information with colony information in colony_ices table.

    • replaces species information with species information in the species look up table.

    • checks that wintering birds have whole colony and not plot counts.

    • updated missing Ireland sample_breeding information as colony counts.

    • checks for unlikely abundance counts based on maximum numbers given in last analysis.

    • checks all non-breeding counts are individual counts.

    • checks species that do not breed within OSPAR region do not have breeding counts.

    • checks species counts requirements matched the actual counts of individuals or pairs

    • standardizes breeding bird counts (based on conversion criteria in species look up table).

      • Black Guillemot pair counts to individual counts.
      • Razorbill and Common Guillemot pair counts to individual counts.
      • Tern individual counts to pair counts.
      • Gull and Fulmar individual counts to pair counts.
      • Puffin individual counts to pair counts.
      • Breeding individual counts excluded for specific species.
    • excludes colonies with infrequent counts, recorded in less than two years (less than five years for Fulmars).

    • checks all breeding data have a breeding season count (time period = 3) and wintering data all have either a January peak count (time period = 1) or full Year mean count (July-June) (time period = 2).

    • splits abundance data into species in regions / sub-regions for analysis and with insufficient data for analysis. Species in regions and bird subsidivision with insufficient species counts are excluded at this stage.

    • exports data in b1_abundance_data_ices analysis and insufficient files onto local machine using the pins package.

  • b1_indicator_export_data. This script creates the required data folder structure in the vignettes folder for breeding and non-breeding wintering analyses.

    • export the number of eggs csv file from the species look up table. This contains the number of eggs laid and functional groups for each species.

    • export the BreedingSites ABUNDANCE csv file. This contains the colony’s name, OSPAR region and Birds subdivisions from the colony_ICES table, as well as appending the OSPAR regions and Birds subdivisions to this file.

    • export RegionalWeightings csv file containing regional weighting data from the regional weightings table. This script may need to be updated following an initial run through to remove regional weighting values where the source year weighting turns out to be zero for a particular country’s species.

    • the breeding abundance data are exported into two files in the breeding folder, ForImputationBreeding txt file containing abundance data to use in the imputation step and SkipImputationBreeding csv file containing data that has already been modelled and does not require to be run through the imputation step.

    -   Modelled breeding data are Netherlands (OPSAR IId) and Spain (OPSAR IV).
    • the breeding abundance whole colony counts are summed where there is more than one count for each species per colony per year prior to running through the imputation step (multiple plot counts are not summed as they are handled in the imputation step).

    • the wintering abundance data are exported into two files in the wintering folder, ForImputationWintering txt file containing abundance data to use in the imputation step and SkipImputationWintering csv file containing data that has already been modelled and does not require to be run through the imputation step.

    -   Modelled non-breeding data are Netherlands (OPSAR IId) and Great Britain (OPSAR IIa, IId, IIe, IIf, III).
    • the wintering abundance counts are summed where there is more than one count for each species per year prior to running through the imputation step, to take into account subspecies counts.

Imputation

Initial analysis using the Thomas Index imputation method created a number of outlier counts which was corrected by changing to a Generalized Additive Model (GAM) imputation method written by MF for the final analysis.

  • b1_indicator_imputation_gam_step. Run the imputation step

    • update path to either breeding or non-breeding wintering ForImputation text file in the data import section of the script.
    • update the subregion of interest selection. Run for each required subregion
    • update the path to either breeding or non-breeding folder for output the list of failed colonies and imputated counts files
    • Move the ForImputationBreeding/Wintering file and list of failed colonies to the data archive file in the vignettes folder.

    Breeding and wintering regions to impute

    region breeding wintering
    Im NO
    In NO NO
    Io NO NO
    IIa GB
    IIb NO NO
    IIc NO; SE; DK NO; SE; DK
    IId BE; DE; DK; FR; GB BE; DK (Jan peak counts) | DE (Full year mean counts)
    IIe FR; GB
    IIf GB
    III FR; GB; IE
    IV FR
    V PT

Regional weighting and aggregation

Regional weightings are necessary for regions where entire populations are not monitored. This has been needed to be done for Norway, Sweden, Belgium, Great Britain and Ireland.

The species abundance counts are weighted by calculating a weighting proportion based on the weighting values, for each species within each OSPAR region ± birds subdivision, for each country per year. These species weighted abundance values are then aggregated by summing the abundance counts within each OSPAR region ± birds subdivision.

Breeding

  • b1_indicator_regional_weighting_breeding This script both applies the regional weighting and aggregation for the breeding abundance counts. Running the script

    • imports and collates all csv files in the data/breeding folder, which includes the breeding abundance data that has skipped the imputation step and the breeding abundance data that has gone through the imputation step.

    • adds colony information from the BreedingSites ABUNDANCE csv file.

    • adds species information from the number of eggs csv file.

    • calculates breeding regional weighting proportions, as the sum of the species breeding abundance counts, within each OSPAR region, birds subdivision and country, for each year, divided by corresponding breeding regional weighting value. The weighting proportion is set to 1 where the regional weighting value is zero or less than the yearly count.

    • exports proportions as a check in RegionalWeightingsForBreedingCounts csv file, in results/EMECO checks folder.

    • applies the regional weighting to the species breeding abundance counts by dividing abundance count by weighting proportion.

    • aggregates the OSPAR region ± birds subdivision species breeding abundance counts by summing the counts.

    • exports aggregated weighted breeding species counts as individual csv files, for each species and OSPAR region ± birds subdivision, into data/breeding folder.

    • removes original SkipImputationBreeding and ForImputationBreeding files from data/breeding folder.

Wintering

  • b1_indicator_regional_weighting_wintering This script both applies the regional weighting and aggregation for the wintering abundance counts. Running the script

    • imports and collates all csv files in the data/wintering folder, which includes the wintering abundance data that has skipped the imputation step and the wintering abundance data that has gone through the imputation step.

    • adds colony information from the BreedingSites ABUNDANCE csv file.

    • adds species information from the number of eggs csv file.

    • calculates wintering regional weighting proportions, as the sum of the species wintering abundance counts, within each OSPAR region, birds subdivision and country, for each year, divided by corresponding wintering regional weighting value. The weighting proportion is set to 1 where the regional weighting value is zero or less than the yearly count.

    • exports proportions as a check in RegionalWeightingsForWinteringCounts csv file, in results/EMECO checks folder.

    • applies the regional weighting to the species wintering abundance counts by dividing abundance count by weighting proportion.

    • aggregates the OSPAR region ± birds subdivision species wintering abundance counts by summing the counts.

    • removes OSPAR IId 2017 - 2020 counts for species where these missing Wadden sea year counts have an effect on the analysis.

    • exports aggregated weighted breeding species counts, for each species and OSPAR region ± birds subdivision, as a single WinteringWaterbirdAbundance csv file into data/wintering folder.

    • removes original SkipImputationWintering and ForImputationWintering files from data/wintering folder.

Analysis

These scripts below were derived from the ones written by BTO to run the analyses for both breeding and wintering seabird abundance counts, incorporating the changes required in the 2021 analysis and extended to include additional OSPAR regions and birds subdivisions.

Run the breeding_seabird_trend_2021 script for the breeding species and wintering_seabird_trend_2021 script for the wintering non-breeding species

  • calculates and plots the relative abundance and six yearly mean relative abundances trends for each breeding species, across each OSPAR region and subregion. For each region and sub region is also plots the species latest six year mean relative abundance value compared to its threshold value and with this latest threshold status compared to a previous 2014 threshold status, to produce a traffic light table for the species within the OSPAR regions and birds subdivisions.

    • set the start years and end year for each OSPAR region and birds subdivision. The selected year is the latest year used for the assessment period in the traffic light plots.

    • set the previous assessment year used to compared threshold statuses in the traffic light plots

    • set the region and sub regions as region labels eg “I”, “II”, “IIa”, “IIb” used to create the species trend and traffic light plots

    • imports species information from the number of eggs csv file.

    • imports colony information from the BreedingSites ABUNDANCE csv file.

    • imports species colony count csv files for each OSPAR region from the vignettes/data/breeding or vignettes/data/wintering folder.

    • update code in the remove_species chunk to exclude species within OSPAR region and birds subdivision with incomplete time series or incorrect relative counts.

    • for each species (calling the calculate_breeding_relative_abundance function)

      • the target threshold (0.7 or 0.8) is determined based on the number of eggs the species lays.
      • abundance counts are combined for each OSPAR region and exported in EMECO checks/species data folder.
      • determine the predicted baseline abundance count using linear regression, if significant, or mean over the first 10 years.
      • calculates the relative abundance for each year relative to this baseline count.
      • sets the start year baseline relative abundance to 1.
      • calculates the rolling six year geometric mean of relative abundance.
      • plots both the yearly relative abundance and six year geometric mean relative abundances for each region and sub region, saving these to the results/breeding_out or non_breeding_out folders.
    • for each OSPAR region and subregion exports the yearly and six year mean relative abundance values, either separately for the breeding species or in a single files for the wintering non-breeding species

      • exports the yearly relative abundance values for each species in the EMECO/breeding_out or non_breeding_out folder eg OSPARI_unsm_all.csv, WinteringWaterbird_RegionalIndices.csv

      • export the six yearly relative abundance geometric mean for each species in the EMECO/breeding_out folder eg OSPARI_unsm_all_mean.csv, WinteringWaterbird_RegionalIndices_mean.csv

These two script also produces the breeding and wintering non-breeding traffic light plots displaying the latest six year relative abundance means and trends for each species against the upper threshold and species thresholds, for each OSPAR region and sub region. The scripts are derived from

  • gets the latest six year relative abundance mean for each species, exporting these values in the EMECO checks/breeding_out or non_breeding out folder as Breeding Seabirds Indicator Latest Six Year Mean.csv and Wintering Seabirds Indicator Latest Six Year Mean.csv files

  • gets the previous 2014 six year relative abundance mean for each species, exporting these values in the EMECO checks/breeding_out or non_breeding out folder as Breeding Seabirds Indicatorc2014 Six Year Mean.csv and Wintering Seabirds Indicator 2014 Six Year Mean.csv files

  • calls the family of latest_assessment_plot functions to create and export the traffic light plots for all OSPAR regions, OPSAR region I and II subdivisions, into results breeding_out or non_breeding_out folders. In these plots the colour indicates the status of the latest six year mean against the upper threshold and the species threshold and direction and thickness of arrow the change in threshold status between the previous 2014 and latest assessment year.

Run the seabird_species_exceeding_threshold_trend script to plot the yearly proportion of species with six year relative abundance means and create a table of proportion of species with latest six year relative abundance means above thresholds, for each functional group in each OSPAR region and birds subdivision.

  • set the start and end breeding and non-breeding years for each OSPAR region and birds subdivision. The end year is the latest year used for the proportion of species with latest six year relative abundance mean above the species threshold.

  • set the region and birds subdivision labels eg “I”, “II”, “IIa” used to create proportion of species functional groups above threshold table

  • imports species information from the number of eggs csv file.

  • imports the six year relative abundance mean values for each breeding and wintering non-breeding species per OSPAR region

  • export these species six year relative abundance mean values for each region in results/EMECO checks/breeding_out or non_breeding_out folders eg OSPARI Seabird Six Year Mean Abundance Values.csv, OSPARI Wintering Waterbirds SixYear Mean Abundance Values.csv

  • comment out region plots not needed

  • creates and exports the following plots of trend of the proportion of species with six year relative abundance mean exceeding threshold in the results/EMECO checks/ summary out folder

    • Proportion All Species Achieving GES.csv

    • Proportion Breeding Species Achieving GES.csv

    • Proportion Wintering Species Achieving GES.csv

    • Proportion OSPARI - OSPARV Species Achieving GES.csv (5 plots)

  • in the plots adjust y axis percentage range if required (currently set 30-100%)

  • calls function family latest_proportion_species_above threshold to create and export values of proportion of species in each functional group, within each region and birds subdivision, whose six year relative abundance mean exceeds the species threshold (for both breeding and wintering non-breeding species). These values are saved in a file, Functional Group Assessment Table.csv, in the results/EMECO checks/summary out folder.