cosewic_ranges: Calculate COSEWIC IAO and EOO

View source: R/cosewic_tools.R

cosewic_rangesR Documentation

Calculate COSEWIC IAO and EOO

Description

The COSEWIC Index of Area of Occupancy (IAO; also called Area of Occupancy, AOO by the IUCN) and Extent of Occurrence (EOO; IUCN as well) are metrics used to support status assessments for potentially endangered species.

Usage

cosewic_ranges(
  df_db,
  record_id = "record_id",
  coord_lon = "longitude",
  coord_lat = "latitude",
  species_id = "species_id",
  iao_grid_size_km = 2,
  eoo_p = 0.95,
  filter_unique = FALSE,
  spatial = TRUE
)

Arguments

df_db

Either data frame or a connection to database with naturecounts table.

record_id

Character. Name of the column containing record identification.

coord_lon

Character. Name of the column containing longitude.

coord_lat

Character. Name of the column containing latitude.

species_id

Character. Name of the column containing species identification.

iao_grid_size_km

Numeric. Size of grid (km) to use when calculating IAO. Default is COSEWIC requirement (2). Use caution if changing.

eoo_p

Numeric. The percentile to calculate the convex hull over. Defaults to 0.95 for a 95% convex hull to ensure outlier points do not artificially inflate the EOO. Note that for a final COSEWIC report, this may not be appropriate. Set to 1 to include all points.

filter_unique

Logical. Whether to filter observations to unique locations. Use this only if there are too many data points to work with. This changes the nature of what an observation is, and also may bias EOO calculations if using less than 100% of points (see eoo_p).

spatial

Logical. Whether to return sf spatial objects showing calculations.

Details

Note that the while the IUCN calls this metric AOO, in COSEWIC, AOO is actually a different measure, the biological area of occupancy. See the Distribution section in 'Instructions for preparing COSEWIC status reports' for more details.

By default the EOO is calculated only using the inner 95% of points (based on distance to the centroid). This is to ensure that a first-pass of the EOO does not reject a species from consideration if there are any outlier observations. However, for a final COSEWIC assessment report, it is likely better to carefully explore the data to ensure there are no outliers and then use the full data set (i.e. set eoo_p = 1).

The IAO is calculated by first assessing large grids (10x large than the specified size). Only then are smaller grids created within large grid cells containing observations. This speeds up the process by avoiding the creation of grids in areas where there are no observations. This means that the plots and spatial objects may not have grids over large areas lacking observations. See examples.

Details on how IAO and EOO are calculated and used

Value

Summarized data frame (ranges) or list containing ranges, a summarized data frame, and spatial, a list of two spatial data frames.

ranges contains columns

  • n_records_total - Total number of records used to create ranges

  • min_record - Minimum number of records within IAO cells

  • max_record - Maximum number of records within IAO cells

  • median_record - Median number of records within IAO cells

  • grid_size_km - IAO cell size (area is this squared)

  • n_occupied - Number of IAO cells with at least one record

  • iao - IAO value (grid_size_km^2 * n_occupied)

  • eoo_pXX - EOO area calculated with a convex hull at percentile eoo_p (e.g., 95%)

spatial contains spatial data frames

  • iao_sf - Polygons of the IAO grids with the n_records per cell

  • eoo_sf - Polygon of the Convex Hull at percentile eoo_p

Examples


# Using the included, test data on black-capped chickadees

bcch # look at the data

r <- cosewic_ranges(bcch)
r <- cosewic_ranges(bcch, spatial = FALSE)

# Calculate for multiple species
mult <- rbind(bcch, hofi)
r <- cosewic_ranges(mult)
r <- cosewic_ranges(mult, spatial = FALSE)



BirdStudiesCanada/rNatureCounts documentation built on July 3, 2023, 2:06 a.m.