iucnn_biome_features: Obtain Biome Features from Occurrence Records

View source: R/iucnn_biome_features.R

iucnn_biome_featuresR Documentation

Obtain Biome Features from Occurrence Records

Description

Will code all species in the input file into biomes based on an intersection of the coordinates with a shape file. The biome scheme can be user provided or by default will download the WWF biomes.

Usage

iucnn_biome_features(
  x,
  species = "species",
  lon = "decimallongitude",
  lat = "decimallatitude",
  biome_input = NULL,
  biome_id = "BIOME",
  download_folder = tempdir(),
  remove_zeros = FALSE
)

Arguments

x

a data.frame of species occurrence records including three columns with species name, longitudinal coordinates and latitudinal coordinates (both decimal).

species

a character string. The name of the column with the species names.

lon

a character string. The name of the column with the longitude.

lat

a character string. The name of the column with the latitude.

biome_input

a simple features collection of geometry type polygon, contain polygons of different biomes. If NULL, the WWF biome scheme is downloaded from https://www.worldwildlife.org/publications/terrestrial-ecoregions-of-the-world

biome_id

a character string. The name of the column with the biome names in biome_input. Default is "BIOME"

download_folder

character string. The folder were to save the data used for feature extraction. Relative to the working directory. Set to NULL for the working directory

remove_zeros

logical. If TRUE biomes without occurrence of any species are removed from the features. Default = FALSE

Details

If biome_input is NULL this will download the WWF biome scheme from https://www.worldwildlife.org/publications/terrestrial-ecoregions-of-the-world and save them in the working directory

Value

a data.frame of climatic features

See Also

Other Feature preparation: iucnn_bias_features(), iucnn_climate_features(), iucnn_cnn_features(), iucnn_footprint_features(), iucnn_geography_features(), iucnn_phylogenetic_features(), iucnn_prepare_features(), iucnn_prepare_phy()

Examples

## Not run: 
dat <- data.frame(species = c("A", "b"),
                  decimallongitude = runif(200, 10, 15),
                  decimallatitude = runif(200, -5, 5))

iucnn_biome_features(dat)

## End(Not run)


azizka/IUCNN documentation built on March 29, 2024, 9:38 a.m.