Skip to contents

This function uses coverage-based methods to estimate Hill-Shannon Diversity over a gridded map.

Usage

hill1_map(data, cutoff_length = 5, coverage = 0.95, ...)

Arguments

data

A data cube object (class 'processed_cube').

cutoff_length

The minimum number of data points for each grid cell. Grid cells with fewer data points will be removed before calculations to avoid errors. Default is 5.

coverage

The sample coverage value for the estimator. Default is 0.95.

...

Arguments passed on to compute_indicator_workflow

ci_type

Type of bootstrap confidence intervals to calculate. (Default: "norm". Select "none" to avoid calculating bootstrap CIs.)

cell_size

Length of grid cell sides, in km. (Default: 10 for country, 100 for continent or world)

level

Spatial level: 'cube', 'continent', 'country', 'world', 'sovereignty', or 'geounit'. (Default: 'cube')

region

The region of interest (e.g., "Europe"). (Default: "Europe")

ne_type

The type of Natural Earth data to download: 'countries', 'map_units', 'sovereignty', or 'tiny_countries'. (Default: "countries")

ne_scale

The scale of Natural Earth data to download: 'small' - 110m, 'medium' - 50m, or 'large' - 10m. (Default: "medium")

output_crs

The CRS you want for your calculated indicator. (Leave blank to let the function choose a default based on grid reference system)

first_year

Exclude data before this year. (Uses all data in the cube by default.)

last_year

Exclude data after this year. (Uses all data in the cube by default.)

spherical_geometry

If set to FALSE, will temporarily disable spherical geometry while the function runs. Should only be used to solve specific issues. (Default is TRUE)

make_valid

Calls st_make_valid() from the sf package. Increases processing time but may help if you are getting polygon errors. (Default is FALSE).

num_bootstrap

Set the number of bootstraps to calculate for generating confidence intervals. (Default: 1000)

Value

An S3 object with the classes 'indicator_map' and 'hill1' containing the calculated indicator values and metadata.

See also

compute_indicator_workflow

Examples

if (FALSE) { # \dontrun{
h1_map <- hill1_map(example_cube_1, level = "country", region = "Denmark")
plot(h1_map)
} # }