
Recording effort from accessibility: roads, paths, settlements, water
Source:R/effort.R
accessibility_effort.RdWhere no record of a target group is available (herbarium data,
national databases, historical records), recording effort can be
estimated from how accessible each place is. Following Monsarrat et al.
(2018), who mapped the accessibility of a region as the mean of the
proximities to settlements and fresh water and found it predicted where
historical records came from, accessibility_effort() turns the
distance of each cell to the nearest road (or path, track, railway),
settlement and water body into a proximity, exp(-distance / scale_km)
(1 on the source, 0.37 at scale_km), and combines the proximities by
their mean (or maximum).
Arguments
- env
Predictor rasters: the grid the result is computed on.
- roads, settlements, water
Sources of access (see Details);
NULLto leave one out.- country
With
roadsorsettlementsmissing: country names or ISO3 codes whose OpenStreetMap roads and places are downloaded withgeodata::osm().- path
Folder for downloads.
- scale_km
Distance (km) at which the proximity falls to 1/e; one value, or one per source in the order roads, settlements, water.
- combine
"mean"(Monsarrat et al. 2018) or"max"of the proximities.- source_min
For raster sources: cells above this value are sources.
- n_sample
Number of cells sampled for the summary.
- seed
Seed for the sample.
Value
An object of class accessibility_effort: layer (a
terra::SpatRaster accessibility, 0-1), components (the proximity
to each source), summary (per source: source cells, median distance
in km over a sample of cells) and settings. It can be passed wherever
an effort raster is expected.
Details
Sources. Each of roads, settlements and water can be lines,
points or polygons (sf, terra::SpatVector or a path, e.g. a
shapefile) or a raster whose cells above source_min are sources (e.g.
the built-up layer of aggregate_ghs()). Roads and paths are best taken
from OpenStreetMap: national extracts (e.g. from Geofabrik,
https://download.geofabrik.de) include tracks and mountain paths,
which matter for remote terrain. With country and no roads or
settlements, the main roads ("highways") and places of OpenStreetMap
are downloaded per country with geodata::osm() (needs the geodata
package and internet), and the files are logged in
preENM_sources.csv. Recording a century ago followed the roads,
rivers and settlements of that time: for historical records use
historical sources if available.
Use. The result goes to sample_background() (method = "effort")
or effort_layers() as the effort raster, and to delimit_m()
(effort) for the gap test.
Status, assumptions and limits. Adapted from Monsarrat et al.
(2018); the exponential decay and scale_km = 5 are preENM defaults,
not from the literature. Fernandez & Nakamura (2015) instead estimated
effort from presence-only records and accessibility with a fitted
model, which preENM does not do. Distances are straight lines, not
travel time: terrain, rivers and borders that slow access are ignored,
and OpenStreetMap is incomplete in places. Accessibility is often
correlated with the environment (valleys, lowlands, coasts); check this
with effort_layers() before using it as a covariate. Distances need
the whole grid, so use rasters cropped to the study area, not global
layers.
What to vary. scale_km (e.g. 1, 5 and 20 km: how far recorders
walk from a road), combine, the sources, and compare backgrounds drawn
with it in bias_sensitivity().
References
Monsarrat, S., Boshoff, A.F., Kerley, G.I.H. (2019) Accessibility maps as a tool to predict sampling bias in historical biodiversity occurrence records. Ecography 42, 125-136. doi:10.1111/ecog.03944
Fernandez, D., Nakamura, M. (2015) Estimation of spatial sampling effort based on presence-only data and accessibility. Ecological Modelling 299, 147-155. doi:10.1016/j.ecolmodel.2014.12.017
Examples
sim <- simulate_enm_data(seed = 1)
road <- terra::vect("LINESTRING (15 50, 23 54)", crs = "EPSG:4326")
town <- terra::vect("POINT (18 52)", crs = "EPSG:4326")
acc <- accessibility_effort(sim$env, roads = road, settlements = town,
scale_km = 20)
acc
#> Recording effort from accessibility (mean of the proximities)
#>
#> IN SHORT
#> - Accessibility from roads, settlements: 1 on a source, falling to 0.37 at
#> 20 km (roads), 20 km (settlements).
#> - roads: median distance 135.3 km; 7% of the cells within 20 km.
#> - settlements: median distance 269.7 km; 0.2% of the cells within 20 km.
#>
#> Use `x$layer` (or `x` itself) as the effort raster in sample_background(),
#> effort_layers() and delimit_m(). Distances are straight lines, not travel time;
#> the decay and its scale are preENM defaults, not from the literature.
# \donttest{
# OpenStreetMap main roads and places of a country (internet)
# acc <- accessibility_effort(env, country = "POL", path = "data")
# }