locations.comp: Estimate the number of locations.

View source: R/locations.comp.R

locations.compR Documentation

Estimate the number of locations.

Description

[Stable] Estimate the number of locations (sensu IUCN) for multiple taxa, taking into account spatial threats if provided.

Usage

locations.comp(
  XY,
  method = "fixed_grid",
  nbe_rep = 0,
  threat_list = NULL,
  names_threat = NULL,
  threat_weight = NULL,
  cell_size_locations = 10,
  method_polygons = c("no_more_than_one"),
  id_shape = "id_orig",
  rel_cell_size = 0.05,
  parallel = FALSE,
  NbeCores = 2,
  show_progress = TRUE,
  proj_type = "cea"
)

Arguments

XY

data.frame, see details

method

string, indicating the method used for estimating the number of locations. See Details

  • "fixed_grid" (the default)

  • "sliding_scale"

nbe_rep

numeric, the number of raster with random starting position for estimating the number of locations By default, it is 0 but some minimal translation of the raster are still done

threat_list

list or sfc objects POLYGON or MULTIPOLYGON documenting threats. If provided, this will be taken into account for calculating number of location (see Details and method_polygons). By default, no shapefile is provided

names_threat

character vector, indicating names of threats, optional

threat_weight

numeric vector, indicating weight given to each threat

cell_size_locations

numeric, value indicating the grid size in kilometres used for estimating the number of location. By default, equal to 10

method_polygons

string. Used if threat_list is provided. See Details.

  • "no_more_than_one" (the default): each single POLYGON will be considered as a single location

  • "grid": a grid of cell_size_locations size will be used to estimate the number of location within polygons

id_shape

string

rel_cell_size

numeric, if method_locations="sliding_scale", cell_size_locations is ignored and the resolution is given by the maximum distance separating two occurrences multiplied by rel_cell_size. By default, it is 0.05

parallel

logical, whether running in parallel. By default, it is FALSE

NbeCores

integer, register the number of cores for parallel execution. By default, it is 2

show_progress

logical, whether a bar showing progress in computation should be shown. By default, it is TRUE

proj_type

string or numeric

Details

XY as a data.frame should have the following structure:

It is mandatory to respect field positions, but field names do not matter

  1. The first column is contains numeric value i.e. latitude in decimal degrees

  2. The second column is contains numeric value i.e. longitude in decimal degrees

  3. The third column is contains character value i.e. the names of the species

Locations are estimated by overlaying a grid of a given resolution (see cell_size_locations for specifying the resolution). The number of locations is the number of occupied locations. Note that the grid position is overlaid in order to minimize the number of locations (several translation of the grid are performed and the one providing the minimum number of occupied cells is provided).

If threat_list is provided, which means occurrences within polygon documenting threats (if provided) will not be taken into account for estimating the number of locations following the grid system,

If method is "fixed_grid" as it is by default, the resolution is fixed and determined by the argument cell_size_locations.

If method is "sliding_scale", the resolution is defined as 1/x*max.dist where max.dist is the maximum distance between any pairs of occurrences and x is a defined parameter. 1/x is defined by rel_cell_size argument and is 0.05 by default. See Rivers M.C. et al. (2010) for more information on the methods.

Value

A list

  1. a data.frame of two columns with the number of locations and potential issue for each species

  2. a sf object representing the squared polygons OR a list of sf if threat_list is TRUE

Author(s)

Gilles Dauby, gildauby@gmail.com

References

Gaston & Fuller (2009) The sizes of species' geographic ranges, Journal of Applied Ecology: 49 1-9

Rivers, Bachman, Meagher, Lughadha & Brummitt (2010) Subpopulations, locations and fragmentation: applying IUCN red list criteria to herbarium specimen data. Biodiversity and Conservation 19: 2071-2085.

Examples

data(dataset.ex)
## Not run: 
locations <- locations.comp(dataset.ex)

## End(Not run)

# This would estimate the number of locations for all taxa by overlaying 
# randomly a grid 100 times. For each taxa, the minimum value is kept
## Not run: 
locations <- locations.comp(dataset.ex, nbe_rep = 100)

## End(Not run)


gdauby/ConR documentation built on Jan. 30, 2024, 11:10 p.m.