R/iucnn_climate_features.R
iucnn_climate_features.Rd
Extract median and range (95% - 5% quantiles) climate features based on a table of species occurrence coordinates. If no climate data is supplied via the input.climate argument, 19 bioclim variables are downloaded from www.worldclim.org. Rescaling is only done for these default variables.
iucnn_climate_features(
x,
climate_input = NULL,
species = "species",
lon = "decimallongitude",
lat = "decimallatitude",
rescale = TRUE,
res = 10,
type = "selected",
download_folder = "feature_extraction"
)
a data.frame of species occurrence records including three columns with species name, longitudinal coordinates and latitudinal coordinates (both decimal).
a SpatRaster object with climate data. Optional. If not provided, the 19 bioclim variables from www.worldclim.org are used as default.
a character string. The name of the column with the species names.
a character string. The name of the column with the longitude.
a character string. The name of the column with the latitude.
logical. If TRUE, the features are rescaled. This is recommended to run IUCNN, and the default. If FALSE, raw (human readable) feature values are returned.
numeric. The resolution of the default climate rasters. One of 2.5, 5, or 10. Only relevant if climate_input is NULL
character string. A selection of which variables to return. If "all" all 19 bioclim variables if "selected" only Annual Mean Temperature, Temperature Seasonality, Mean temperature of the Coldest Quarter, Annual Precipitation, Precipitation seasonality and Precipitation of the Driest Quarter are returned
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
a data.frame of climatic features
All climate variables are summarized to the species median.
Other Feature preparation:
iucnn_bias_features()
,
iucnn_biome_features()
,
iucnn_cnn_features()
,
iucnn_footprint_features()
,
iucnn_geography_features()
,
iucnn_phylogenetic_features()
,
iucnn_prepare_features()
,
iucnn_prepare_phy()
if (FALSE) {
dat <- data.frame(species = c("A","B"),
decimallongitude = runif(200,10,15),
decimallatitude = runif(200,-5,5))
iucnn_climate_features(dat)
}