This function is called by the cov_bioclim module and downloads bioclimatic data on from Bioclim via geodata. It returns a list of SpatRasters for the selected variables
cov_bioclim(shape, country_code, variables, async = FALSE)sf. sf object containing the area of interest
vector. ISO3 code of the country or countries.
vector. List of the bioclimatic variables to be returned.
Options are: Mean temperature, Mean diurnal range, Isothermality,
Temperature seasonality, Maximum temperature warmest month,
Minimum temperature coldest month, Temperature range,
Mean temperature wettest quarter, Mean temperature driest quarter,
Mean temperature warmest quarter, Mean temperature coldest quarter,
Total precipitation, Precipitation wettest month,
Precipitation driest month, Precipitation seasonality,
Precipitation wettest quarter, Precipitation driest quarter,
Precipitation warmest quarter, Precipitation coldest quarter
logical. Whether or not the function is being used asynchronously
a list of containing an item for each variable, either SpatRaster
objects when async is FALSE or PackedSpatRaster objects when async is
TRUE
x_min <- 9.47
x_max <- 9.63
y_min <- 47.05
y_max <- 47.27
poly_matrix <- matrix(c(x_min, x_min, x_max, x_max, x_min,
                        y_min, y_max, y_max, y_min, y_min), ncol = 2)
poly <- sf::st_polygon(list(poly_matrix))
shape <- sf::st_sf(1, geometry = list(poly))
sf::st_crs(shape) = 4326
raster <- cov_bioclim(shape = shape,
                      country_code = "LIE",
                      variables = c("Mean temperature", "Mean diurnal range"))