sdm.accessible_area
The area the species could have reached, where its background is drawn (landschaft's accessible_area, the M of the BAM diagram): the land within a distance of the records (geodesic circles, merged), their convex hull or the regions that hold them (widened by the distance if given), cut at the antimeridian, within a mask.
| Input | Type | What it is |
occurrencesrequired | any | points, or a table with coordinate columns |
regions | vector | polygons (ecoregions, biomes...), for regions |
within | vector | polygons the area is cut to |
| Output | Type | What it is |
area | vector | one (multi)polygon in lon/lat |
| Setting | Type | What it is |
x | text | the table's x column (default x, lon, longitude...) |
y | text | the table's y column (default y, lat, latitude...) |
method | text | buffer (default), convex_hull or regions |
distance | number | the radius in metres (required for buffer) |
resolution | integer | the vertices of each circle (default 64) |
sdm.area_of_habitat
The area of habitat of species (Brooks et al. 2019; Strassburg et al. 2020): over the cells of each species' range (within its elevation limits), the shares of the natural classes suitable to it times the cell's area, now and before conversion (the original vegetation); and the habitat it gains per unit of a cell restored. Rows in the order of the ranges' layers.
| Input | Type | What it is |
rangesrequired | stack | each species' range (cells above 0), by species |
land_coverrequired | stack | the share of each class, by name |
original | stack | the original share of each natural class |
restore | stack | the shares restored land returns to |
anthropic | map | the share of anthropic land (where restoring gains) |
elevation | map | the elevation, for the species' limits |
| Output | Type | What it is |
table | table | per species (in the ranges' order): its area of habitat now and potential (km²), its range's cells, and whether it counts (1: habitat now and potential, and suitable classes) |
gain | stack | the habitat each species gains per unit of a cell restored |
loss | stack | with loss: the habitat each species loses per unit of a cell's natural land converted |
| Setting | Type | What it is |
naturalrequired | any | the natural classes (names of the land cover's layers) |
suitability | any | each species' suitable classes: {species: [classes]} (the species not listed: every natural class) |
include_unlisted | bool | species not in suitability count (default true) |
elevation_limits | any | [[species, lowest, highest], ...] (null: none) |
cell_area | number | a cell's area in km² (default: the grid's) |
loss | bool | also the habitat lost per unit of natural land (conservation, conversion) |
sdm.autocorrelation_range
The range of spatial autocorrelation of the predictors (landschaft's autocorrelation_range, blockCV's cv_spatial_autocor): gstat's variograms (spherical, exponential, Gaussian and Matern) fitted to a sample of every layer, the best one's range; their median and the block size it gives for spatial blocks.
| Input | Type | What it is |
envrequired | any | the predictors: a stack or a map |
| Output | Type | What it is |
range | number | the median range (metres on lon/lat grids) |
block_size | number | the size of spatial blocks (degrees on lon/lat grids) |
layers | table | per layer: range, sill, nugget, kappa |
models | any | per layer, the variogram model |
| Setting | Type | What it is |
n | integer | the cells sampled per layer (default 5000) |
seed | integer | the seed of R's generator (default 1) |
deg_to_metre | number | metres per degree on lon/lat (111325) |
sdm.background
Background points for a species distribution model (landschaft's background, dismo's randomPoints): cells with values in every predictor drawn with R's sampling (weighted by the cells' widths on lon/lat grids, or by a bias), within an area, a band of distances from the records or outside their environmental envelope, the records' cells left out.
| Input | Type | What it is |
envrequired | any | the predictors: a stack or a map |
occurrences | any | the records (points or a table) |
area | vector | the area to draw within |
bias | map | a weight per cell |
| Output | Type | What it is |
points | vector | the points at the cells' centres, with their cell |
| Setting | Type | What it is |
x | text | the table's x column (default x, lon, longitude...) |
y | text | the table's y column (default y, lat, latitude...) |
n | integer | the points (default 10000) |
distance | any | the largest distance from the records, or [from, to] |
envelope | number | outside the records' quantiles [q, 1 - q] of every predictor |
exclude_occurrences | bool | leave the records' cells out (default true) |
tryf | number | the candidates drawn per point (default 3) |
lonlat_correction | bool | weight lon/lat cells by their width (default true) |
seed | integer | the seed of R's generator (default 1) |
sdm.bias_surface
The sampling effort as a surface (landschaft's bias_surface): a Gaussian kernel density of the records of a whole group (the same taxa, collectors and decades) on the grid of the predictors, MASS::kde2d's at the cells' centres, with R's bw.nrd in each direction by default. The bias of sdm.background, which draws the background with the records' bias (a target-group background, Phillips et al. 2009; Maxent's bias file). kde2d(h = H) is bandwidth = H / 4.
| Input | Type | What it is |
occurrencesrequired | any | the records of the target group: points, or a table with coordinate columns |
envrequired | any | the predictors: a stack or a map (its grid) |
| Output | Type | What it is |
bias | map | the density (the share of the records per unit of area of the coordinate system: it sums to 1 over the plane) or rescaled |
bandwidth | any | the bandwidths used, [x, y] |
| Setting | Type | What it is |
x | text | the table's x column (default x, lon, longitude...) |
y | text | the table's y column (default y, lat, latitude...) |
bandwidth | any | the kernel's standard deviation in the grid's units (metres, or degrees on lon/lat): a number, [x, y], or nrd (default: R's bw.nrd in each direction, kde2d's) |
isotropic | bool | the larger bandwidth in both directions (default false) |
limits | any | [min, max]: bandwidths raised or lowered to them (either null); a floor keeps a clustered group's surface from collapsing on its records |
weights | text | a column of the records: each one's weight (specimens, visits); default 1 |
rescale | any | [lo, hi]: the densities mapped linearly to them, e.g. [0.05, 0.95], so that every cell keeps a chance |
mask | bool | no value on the cells without a value in every predictor (default true) |
sdm.boyce
The continuous Boyce index (landschaft's boyce, ecospat's ecospat.boyce): the correlation between the classes of suitability and their ratio of predicted to expected presences, in a moving window (default) or in classes.
| Input | Type | What it is |
presencesrequired | any | the predictions at the presences |
availablerequired | any | the predictions everywhere (or at the background and the presences) |
| Output | Type | What it is |
cor | number | the index (rounded to 3 digits) |
table | table | the classes: f_ratio, hs, used |
| Setting | Type | What it is |
column | text | the tables' column of the predictions (default the first) |
nclass | any | 0 (default, a moving window), a number of classes or their breaks |
window | number | the window's width (default a tenth of the range) |
res | integer | the window's steps (default 100) |
method | text | spearman (default), pearson or kendall |
rm_duplicate | bool | drop repeated ratios (default true) |
sdm.buffer_folds
Buffered leave-one-out folds (blockCV's cv_buffer): for every presence (or record) the records farther than the size to train on and the record (with the background within the size) to test.
| Input | Type | What it is |
recordsrequired | any | the records: points, or a table of coordinates |
| Output | Type | What it is |
folds | any | per fold the records (0-based) to train and to test on |
| Setting | Type | What it is |
presence | text | their presence column, 1 or 0 (default presence) |
x | text | the table's x column |
y | text | the table's y column |
sizerequired | number | the buffer's radius (metres on lon/lat records) |
presence_background | bool | test on presences (default true) |
add_background | bool | and the background near them (default false) |
sdm.checkerboard_folds
A checkerboard of the predictors' cells aggregated by a factor (ENMeval's checkerboard1) or two (checkerboard2, four folds).
| Input | Type | What it is |
recordsrequired | any | the records: points, or a table of coordinates |
envrequired | any | the predictors: a map or a stack (their grid) |
| Output | Type | What it is |
records | any | the records with their fold |
| Setting | Type | What it is |
presence | text | their presence column, 1 or 0 (default presence) |
x | text | the table's x column |
y | text | the table's y column |
aggregation | any | the factor (default 2), or two |
sdm.clean_occurrences
Occurrence records with suspicious coordinates flagged or dropped (landschaft's clean_occurrences, CoordinateCleaner's tests): invalid coordinates, equal longitude and latitude, 0/0, capitals, country and province centroids, the sea, towns, outside the country they claim, geographic outliers of their species, GBIF's headquarters, biodiversity institutions, duplicates and artificial hotspots. Each test takes false (skip it), true (its defaults), a number (its main option) or an object of its options. CoordinateCleaner's tables travel with Terraflux; Natural Earth's land, urban areas and countries are downloaded on first use (or connect your own).
| Input | Type | What it is |
occurrencesrequired | any | points, or a table with coordinate columns |
capitals_ref | any | capitals in place of CoordinateCleaner's (points) |
centroids_ref | any | centroids in place of CoordinateCleaner's (points) |
institutions_ref | any | institutions in place of CoordinateCleaner's (points) |
seas_ref | vector | the land, in place of Natural Earth's (polygons) |
urban_ref | vector | urban areas in place of Natural Earth's |
countries_ref | vector | countries in place of Natural Earth's |
| Output | Type | What it is |
occurrences | any | the records that pass every test, or (flag) all with flag_ and flagged |
counts | table | the records each test flagged, and in total |
| Setting | Type | What it is |
x | text | the table's x column (default x, lon, longitude...) |
y | text | the table's y column (default y, lat, latitude...) |
species | text | the column of the species (default species, scientificName or label) |
action | text | drop (default) or flag the suspicious records |
equal | any | equal longitude and latitude (default true) |
zeros | any | at 0/0: buffer, degrees around 0/0 (default 0.5) |
capitals | any | at a country's capital: buffer (metres, default 10000), geod (true), verify (false) |
centroids | any | at a country's or province's centroid: buffer (metres, default 1000), detail (both, country or provinces), geod (true), verify (false) |
seas | any | in the sea: scale of Natural Earth's land (110, 50 or 10; default 50) |
urban | any | in Natural Earth's urban areas (default false) |
countries | any | outside the country it claims: column (the records' ISO codes; a text sets it), ref_col (default iso_a2_eh for two-letter codes, else iso_a3_eh); default false |
outliers | any | far from the records of its species: method (quantile, mad or distance), mltpl (5), tdi (km, 1000), size (7), min_occs (7), thinning (false), thinning_res (0.5) |
gbif | any | at GBIF's headquarters: buffer (metres, default 1000), geod (true), verify (false) |
institutions | any | at a biodiversity institution: buffer (metres, default 100), geod (false), verify (false), verify_mltpl (10) |
duplicates | any | duplicated: additions, more columns that must be equal too (default false) |
aohi | any | at an artificial hotspot: buffer (metres, default 10000), geod (true), taxa (Aves, Insecta, Mammalia, Plantae); default false |
sdm.dataset
The records of a species distribution model (landschaft's dataset): presences (or a table with a y, presence or pa column of 1 and 0) and background points with the predictors' values at their cells, those without a value in some predictor left out.
| Input | Type | What it is |
presencesrequired | any | the presences: points or a table of coordinates |
background | any | the background points (sdm.background) |
envrequired | any | the predictors: a stack (by name) or a map |
| Output | Type | What it is |
records | table | x, y, presence and the predictors |
| Setting | Type | What it is |
x | text | the table's x column (default x, lon, longitude...) |
y | text | the table's y column (default y, lat, latitude...) |
sdm.download_gbif
Occurrence records of a species from GBIF (landschaft's download_gbif, the occurrence search API, no account needed): the records with coordinates, up to 100 000 per query (narrow it by country, area or years), as points with their Darwin Core terms and GBIF's issues. For larger queries, and the DOI to cite, request a download on gbif.org.
| Input | Type | What it is |
area | vector | only the records in its bounding box |
| Output | Type | What it is |
occurrences | vector | the records, points in lon/lat |
query | any | the query, the taxon matched, the count and whether truncated |
| Setting | Type | What it is |
speciesrequired | any | a scientific name (GBIF's backbone) or a taxon key |
country | any | ISO 3166-1 alpha-2 codes (BR), one or a list |
year | any | a year, or a range [1990, 2020] or "1990,2020" |
basis_of_record | any | PRESERVED_SPECIMEN, HUMAN_OBSERVATION..., one or a list |
max_uncertainty | number | drop records less precise than this (metres) |
limit | integer | at most this many records (default all, 100 000) |
has_geospatial_issue | bool | keep the records GBIF flags with geospatial issues (default false) |
workers | integer | the pages asked at the same time (default 4) |
sdm.evaluate
How well predictions separate presences from the background (landschaft's evaluate, dismo's): AUC, the point-biserial correlation and its p-value, the prevalence, the largest TSS and the Boyce index; the confusion table at every threshold (kappa, sensitivity, specificity, TSS...) and the thresholds that optimize them (max_kappa, max_spec_sens, no_omission, equal_prevalence, equal_sens_spec, mtp, p10).
| Input | Type | What it is |
presencesrequired | any | the predictions at the presences |
backgroundrequired | any | at the background points (or absences) |
| Output | Type | What it is |
stats | table | auc, cor, pcor, np, na, prevalence, max_tss, boyce |
table | table | the confusion table per threshold |
thresholds | table | the optimal thresholds |
boyce | table | Boyce's classes: f_ratio, hs, used |
| Setting | Type | What it is |
column | text | the tables' column of the predictions (default the first) |
thresholds | any | the thresholds of the table (default dismo's) |
sdm.exdet
Mesgaran's extrapolation detection (landschaft's exdet): NT1, below 0 where a predictor falls outside the reference's range, and inside the ranges NT2, the Mahalanobis distance against the reference's largest (above 1 a novel combination); mic, the most influential covariate, by its 1-based place among the predictors (0: no novelty).
| Input | Type | What it is |
referencerequired | any | the conditions the model knows: a table of the predictors (e.g. its presences and background) or a stack |
envrequired | any | the new conditions: a stack of the predictors (by name), or a table |
| Output | Type | What it is |
result | any | a stack on the new conditions' grid, or a table |
sdm.fit
A species distribution model with cross-validation (landschaft's fit): MaxNet (the default), a GLM (scikit-learn's StandardScaler and LogisticRegression) or a random forest (scikit-learn's RandomForestClassifier, the same trees); one fit per fold of the records (AUC of the training and test records and their difference, the largest TSS, Boyce's index, the omission rates at the minimum and 10th percentile training presence), their means and standard deviations, the records' out-of-fold predictions (for models stacked on them), and the model on every record with its threshold of maximum sensitivity plus specificity.
| Input | Type | What it is |
recordsrequired | any | the records: predictors, presence (1 or 0) and fold columns |
| Output | Type | What it is |
model | sdm_model | the model on every record |
metrics | table | per fold: fold, auc_train, auc_test, auc_diff, tss, boyce, or_mtp, or_10p, n_test |
summary | table | the metrics' means and standard deviations |
threshold | number | the threshold of maximum sensitivity plus specificity |
predictions | any | with cross-validation, the records with a column prediction: the suitability from the model fitted without the record's fold (none in fold 0), to score the model on what it did not see or to feed a model stacked on it (an ensemble, a calibration, the distance to an expert range: Merow et al. 2017) |
| Setting | Type | What it is |
predictors | any | the predictor columns (default every other column) |
presence | text | the presence column (default presence) |
fold | text | the fold column (default fold) |
categorical | any | the predictors that are categories (classes) |
classes | text | the feature classes: default (maxnet's, by each fit's presences: l, lq, lqh or lqph; with cross-validation a fold's model may get fewer than the final one: give the letters to fix them), or letters of l, q, p, h, t |
regmult | number | the regularisation multiplier (default 1) |
add_samples_to_background | bool | add the presences to the background (true) |
type | text | the output: cloglog (default), logistic |
clamp | bool | clamp to the training ranges (default true) |
cv | bool | cross-validate over the folds (default true) |
model | text | maxnet (default), glm or random_forest |
C | number | glm: the inverse of the L2 penalty (default 1) |
standardize | bool | glm: standardize the predictors first (default true) |
n_estimators | integer | random_forest: the trees (default 100) |
min_samples_leaf | integer | random_forest: default 1 |
min_samples_split | integer | random_forest: default 2 |
max_depth | integer | random_forest: default none |
max_features | any | random_forest: the features tried per split: sqrt (default), log2, all, a number or a share |
bootstrap | bool | random_forest: default true |
random_state | integer | random_forest: scikit-learn's seed (default 1) |
weights | text | the records' weights for the GLM and the forest: balanced (default: presences 1, the background their number over its), equal; a weight column of the records is taken as it is |
sdm.importance
The permutation importance of a model's predictors (landschaft's importance): the mean drop of AUC over the records when each predictor is shuffled (numpy's generator), and its standard deviation; the most important first.
| Input | Type | What it is |
modelrequired | sdm_model | a fitted model |
recordsrequired | any | the records: predictors, presence (1 or 0) and fold columns |
| Output | Type | What it is |
importance | table | importance and sd per predictor, the most important first |
predictors | any | the predictors, most important first |
| Setting | Type | What it is |
predictors | any | the predictor columns (default every other column) |
presence | text | the presence column (default presence) |
fold | text | the fold column (default fold) |
n_repeats | integer | the shuffles per predictor (default 5) |
seed | integer | numpy's seed (default 1) |
sdm.jackknife_folds
Jackknife folds (ENMeval's): every presence its own fold; background 0.
| Input | Type | What it is |
recordsrequired | any | the records: points, or a table of coordinates |
| Output | Type | What it is |
records | any | the records with their fold |
| Setting | Type | What it is |
presence | text | their presence column, 1 or 0 (default presence) |
x | text | the table's x column |
y | text | the table's y column |
sdm.maxnet
A MaxNet species distribution model (landschaft's MaxNet, the maxnet package): Maxent as a lasso logistic regression of presences against background points over linear, quadratic, product, hinge, threshold and categorical features of the predictors (glmnet's path, maxnet's regularisation).
| Input | Type | What it is |
data | table | the predictors and a presence column (1 presence, 0 background) |
presences | table | or the predictors at the presences |
background | table | and at the background points |
| Output | Type | What it is |
model | sdm_model | the fitted model |
coefficients | any | every feature with a nonzero coefficient and its coefficient |
| Setting | Type | What it is |
presence | text | the presence column of data (default presence) |
categorical | any | the predictors that are categories (classes) |
classes | text | the feature classes: default, or letters of l, q, p, h, t |
regmult | number | the regularisation multiplier (default 1) |
add_samples_to_background | bool | add the presences to the background (default true) |
type | text | the predictions' output: cloglog (default), logistic, exponential or link |
clamp | bool | clamp the predictors to the training ranges (default true) |
sdm.maxnet_predict
A model's predictions (maxnet's predict, the others' predict_proba): the suitability of every cell of a stack of the predictors (by name), or of every row of a table; for a MaxNet cloglog, logistic, exponential or the link, for a GLM or a forest the probability of presence.
| Input | Type | What it is |
modelrequired | sdm_model | a fitted model (sdm.maxnet, sdm.fit) |
envrequired | any | a stack of the predictors (by name), or a table |
| Output | Type | What it is |
prediction | any | a map on the stack's grid, or a table |
| Setting | Type | What it is |
type | text | the output (default the model's) |
clamp | bool | clamp to the training ranges (default the model's) |
sdm.mess
Elith's multivariate environmental similarity surface (landschaft's mess, dismo's): per predictor the similarity of each value to the reference's (negative outside their range), and the least of them; negative where the model extrapolates.
| Input | Type | What it is |
referencerequired | any | the conditions the model knows: a table of the predictors (e.g. its presences and background) or a stack |
envrequired | any | the new conditions: a stack of the predictors (by name), or a table |
| Output | Type | What it is |
result | any | a stack on the new conditions' grid, or a table |
| Setting | Type | What it is |
full | bool | every predictor's MESS too (default false) |
sdm.migrate
A species' dispersal through the habitat suitability of successive periods (MigClim 1.6's cellular automaton, the same run for a seed): every step, a suitable empty cell is colonised from an occupied cell within the kernel's distance with the kernel's probability (times the source's propagule production while it matures, times the sink's suitability), unless barriers lie between; long-distance dispersal to random cells; cells that turn unsuitable stay until their period ends. The final map is MigClim's: 1 the initial cells, a step's number (period × 100 + step) where it colonised, 30000 suitable but not reached, below 0 lost, 0 absent.
| Input | Type | What it is |
initialrequired | map | the initial distribution: 1 present, 0 absent |
suitabilityrequired | raster | the habitat suitability of each period, 0 to 1000 (a stack, a loop's series, rasters) |
barriers | map | the barriers (1) |
| Output | Type | What it is |
map | map | the final state (MigClim's codes) |
occupied | map | 1 where the species is at the end, 0 elsewhere |
steps | stack | the state after every dispersal step |
table | table | per step: period, step, step_id, unlimited, no_dispersal, occupied, absent, colonized, decolonized, ldd |
| Setting | Type | What it is |
steps | integer | dispersal steps per period (default 1) |
kernelrequired | any | the probability of colonisation at 1, 2... cells: [1, 0.4, 0.1] |
ini_maturity | integer | the age a cell first disperses (default 1) |
full_maturity | integer | the age it fully disperses (default 1) |
propagules | any | the propagule production of the ages from ini_maturity to full_maturity (default 1 each) |
threshold | integer | suitability below it 0, else 1000 (default 0: none) |
ldd_frequency | number | long-distance dispersal's frequency (default 0) |
ldd_min | integer | its smallest distance in cells (default 10) |
ldd_max | integer | its largest distance in cells (default 15) |
barrier_type | text | strong (default: two of five lines) or weak (all five) |
seed | integer | the seed of the C runtime's rand() (default 1) |
sdm.mop
The mobility-oriented parity of new conditions (landschaft's mop, the mop package): the mean distance of each to its nearest reference conditions (Euclidean or Mahalanobis), and where the predictors fall outside the reference's ranges (basic; simple: how many; detailed: which, below and above, as sums of 2^k).
| Input | Type | What it is |
referencerequired | any | the conditions the model knows: a table of the predictors (e.g. its presences and background) or a stack |
envrequired | any | the new conditions: a stack of the predictors (by name), or a table |
| Output | Type | What it is |
result | any | a stack on the new conditions' grid, or a table |
| Setting | Type | What it is |
type | text | basic (default), simple or detailed |
distance | text | euclidean (default), mahalanobis or none |
where | text | the conditions whose distance to take: in_range (default), out_range or all |
percentage | number | the share of the reference nearest, (0, 100] (default 1) |
scale | bool | scale the predictors (Euclidean; default false) |
center | bool | center them (Euclidean; default false) |
rescale | bool | the distances rescaled to 0-1 (default false) |
sdm.omission_rate
The share of test presences predicted below the training presences' minimum (mtp) or 10th percentile (p10, default) (landschaft's omission_rate, ENMeval's).
| Input | Type | What it is |
trainrequired | any | the predictions at the training presences |
testrequired | any | at the test presences |
| Output | Type | What it is |
rate | number | the omission rate |
| Setting | Type | What it is |
column | text | the tables' column of the predictions (default the first) |
threshold | text | p10 (default) or mtp |
sdm.one_per_cell
A record per cell of a raster (landschaft's one_per_cell): the first in each cell, those outside the raster left out (and with drop_missing those on cells without a value in any layer).
| Input | Type | What it is |
occurrencesrequired | any | points, or a table with coordinate columns |
rasterrequired | any | a map or a stack: its grid |
| Output | Type | What it is |
occurrences | any | the records kept |
| Setting | Type | What it is |
x | text | the table's x column (default x, lon, longitude...) |
y | text | the table's y column (default y, lat, latitude...) |
drop_missing | bool | drop records on cells without values (default false) |
sdm.prepare
The preparation of a species distribution model in one node (landschaft's prepare): the records cleaned (CoordinateCleaner's tests), one per cell, thinned; the accessible area; the predictors without collinearity in it; background points in it; the predictors' values at the records; the folds. Each step takes false (skip it), true, a number (its main setting) or an object of the settings of its node; one seed for every random step. The report counts what each step removed.
| Input | Type | What it is |
occurrencesrequired | any | the records: points, or a table with coordinate columns |
envrequired | any | the predictors: a stack (by name) or a map |
area | vector | the accessible area, in place of the area step |
background | any | background points, in place of the background step |
regions | vector | regions for the area step (method regions) |
within | vector | polygons the area is cut to |
| Output | Type | What it is |
records | table | x, y, presence, the predictors and the fold |
env | any | the predictors kept |
area | vector | the accessible area (else the predictors' extent) |
presences | any | the records left |
background_points | any | the background points |
report | any | per step: the presences, those removed and why |
settings | any | every setting used |
| Setting | Type | What it is |
x | text | the table's x column (default x, lon, longitude...) |
y | text | the table's y column (default y, lat, latitude...) |
species | text | keep only this species (the species column) |
clean | any | sdm.clean_occurrences' settings (default true) |
one_per_cell | bool | a record per cell of the predictors (default true) |
thin | any | sdm.thin: the distance in metres or its settings (off) |
area | any | sdm.accessible_area: the buffer's distance in metres or its settings (off: the whole extent) |
predictors | any | sdm.select_predictors: the VIF threshold (10) or settings |
background | any | sdm.background: the points (10000) or settings |
folds | any | k spatial blocks (5), or {method: blocks, quadrants, checkerboard, random, jackknife or clusters, and its settings}; blocks take size "auto" (the predictors' range of autocorrelation) |
seed | integer | the seed of every random step (default 1) |
sdm.quadrant_folds
The four quadrants of the presences (ENMeval's block partition): near-equal counts split along the orientation's axes, the background by the same lines.
| Input | Type | What it is |
recordsrequired | any | the records: points, or a table of coordinates |
| Output | Type | What it is |
records | any | the records with their fold |
| Setting | Type | What it is |
presence | text | their presence column, 1 or 0 (default presence) |
x | text | the table's x column |
y | text | the table's y column |
orientation | text | lat_lon (default), lon_lat, lon_lon or lat_lat |
sdm.random_folds
Random folds of the presences (landschaft's random_folds, ENMeval's randomkfold): k groups of near-equal size drawn with R's generator; background 0.
| Input | Type | What it is |
recordsrequired | any | the records: points, or a table of coordinates |
| Output | Type | What it is |
records | any | the records with their fold |
| Setting | Type | What it is |
presence | text | their presence column, 1 or 0 (default presence) |
x | text | the table's x column |
y | text | the table's y column |
k | integer | the folds (default 5) |
seed | integer | the seed of R's generator (default 1) |
sdm.reference_data
The geographic reference data of the cleaning of records (landschaft's reference_data): CoordinateCleaner's centroids and capitals of countries and provinces (countryref, at the centroids), biodiversity institutions and artificial hotspots (aohi), and Natural Earth's land (land110, land50, land10), urban areas (urban50) and countries (countries50), downloaded on first use.
| Output | Type | What it is |
features | vector | the points or polygons, with their attributes |
| Setting | Type | What it is |
namerequired | text | the data set |
sdm.response_curves
A model's response curves (landschaft's response_curves): each predictor over its range in the records, the others at their mean or median; a column of values and one of suitability per predictor.
| Input | Type | What it is |
modelrequired | sdm_model | a fitted model |
recordsrequired | any | the records: predictors, presence (1 or 0) and fold columns |
| Output | Type | What it is |
curves | table | and _suitability columns |
| Setting | Type | What it is |
predictors | any | the predictor columns (default every other column) |
presence | text | the presence column (default presence) |
fold | text | the fold column (default fold) |
of | any | the predictors to draw (default all) |
n | integer | the steps (default 100) |
fixed | text | the others at their mean (default) or median |
sdm.select_predictors
Predictors without collinearity (landschaft's select_predictors, usdm's vifcor and vifstep): the most correlated pairs above a correlation dropped one by one (the one of larger VIF), then the predictors of the largest VIF above a threshold; those to keep stay.
| Input | Type | What it is |
envrequired | any | the predictors: a stack (by name) or a table |
area | vector | the area of the stack to look at |
| Output | Type | What it is |
env | any | the predictors kept: a stack or a table |
selection | any | kept, excluded (in order) and the kept ones' VIF |
| Setting | Type | What it is |
size | integer | the cells sampled on large grids (default 5000; null: all) |
seed | integer | the seed of R's generator (default 1) |
vif | number | the VIF threshold (default 10; null: none) |
cor | number | the correlation threshold (default none) |
keep | any | the predictors to keep |
method | text | of the correlation: pearson (default), spearman, kendall |
sdm.spatial_blocks
Spatial blocks (blockCV's cv_spatial): the records in hexagons or squares of a size (or rows and columns), the blocks assigned to k folds at random (the most balanced of the iterations), systematically or as a checkerboard.
| Input | Type | What it is |
recordsrequired | any | the records: points, or a table of coordinates |
| Output | Type | What it is |
records | any | the records with their fold |
| Setting | Type | What it is |
presence | text | their presence column, 1 or 0 (default presence) |
x | text | the table's x column |
y | text | the table's y column |
size | number | the blocks' size (metres on lon/lat records) |
rows_cols | any | else their rows and columns (default [10, 10]) |
k | integer | the folds (default 5) |
hexagon | bool | hexagons (default) or squares |
flat_top | bool | flat-topped hexagons (default false) |
selection | text | random (default), systematic or checkerboard |
iteration | integer | the random assignments tried (default 100) |
offset | any | the blocks' offset, [x, y] shares of a block |
extend | number | squares: the extent grown by this percentage |
deg_to_metre | number | metres per degree on lon/lat (111325) |
seed | integer | the seed of R's generator (default 1) |
sdm.spatial_clusters
Spatial or environmental clusters (blockCV's cv_cluster): R's kmeans of the records' coordinates, or of the predictors at the records (scaled as terra).
| Input | Type | What it is |
recordsrequired | any | the records: points, or a table of coordinates |
env | any | the predictors: environmental clusters |
| Output | Type | What it is |
records | any | the records with their fold |
| Setting | Type | What it is |
presence | text | their presence column, 1 or 0 (default presence) |
x | text | the table's x column |
y | text | the table's y column |
k | integer | the clusters (default 5) |
scale | bool | scale the predictors (default true) |
algorithm | text | Hartigan-Wong (default), Lloyd, Forgy or MacQueen |
seed | integer | the seed of R's generator (default 1) |
sdm.thin
Occurrence records thinned (landschaft's thin, spThin's thin.algorithm): records dropped at random until none is closer than the distance to another (great-circle, on lon/lat), the repetition that keeps the most.
| Input | Type | What it is |
occurrencesrequired | any | points, or a table with coordinate columns |
| Output | Type | What it is |
occurrences | any | the records kept |
kept | any | how many each repetition kept, most first |
| Setting | Type | What it is |
x | text | the table's x column (default x, lon, longitude...) |
y | text | the table's y column (default y, lat, latitude...) |
distancerequired | number | the least distance between records, in metres |
reps | integer | the repetitions (default 10) |
seed | integer | the seed of R's generator (default 1) |
sdm.threshold
A threshold of suitability from presences and background (landschaft's threshold, dismo's): max_spec_sens (default), max_kappa, no_omission, equal_prevalence, equal_sens_spec, mtp, p10, or the highest that keeps a sensitivity.
| Input | Type | What it is |
presencesrequired | any | the predictions at the presences |
backgroundrequired | any | at the background points |
| Output | Type | What it is |
threshold | number | the threshold |
| Setting | Type | What it is |
column | text | the tables' column of the predictions (default the first) |
method | text | the criterion (default max_spec_sens) |
sensitivity | number | of the method sensitivity (default 0.9) |
sdm.vif
The variance inflation factor of every predictor (landschaft's vif, usdm's vif): 1 / (1 - R^2) of its regression on the others (R's lm), over the cells of the stack (a sample of them on large grids) or the rows of a table.
| Input | Type | What it is |
envrequired | any | the predictors: a stack (by name) or a table |
area | vector | the area of the stack to look at |
| Output | Type | What it is |
vif | table | a column per predictor, its VIF |
| Setting | Type | What it is |
size | integer | the cells sampled on large grids (default 5000; null: all) |
seed | integer | the seed of R's generator (default 1) |