| Title: | 'Sampling Effort Proxies' for 'Species Distribution Models' |
|---|---|
| Description: | Addresses geographic sampling bias in 'Species Distribution Models' (SDMs) for data-poor regions. It generates sampling effort proxies using open-source infrastructure data, allowing researchers to sample bias-aware background points. This prevents models from learning sampling artifacts instead of true ecological niches. The spatial data processing relies on methods described in 'Hijmans' (2025) <doi:10.32614/CRAN.package.terra> and 'Pebesma' (2018) <doi:10.32614/CRAN.package.sf>. |
| Authors: | Aamna Naveed [aut, cre] (ORCID: <https://orcid.org/0009-0001-3371-1066>) |
| Maintainer: | Aamna Naveed <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-11-19 13:15:19 UTC |
| Source: | https://github.com/aamnanaveed/biasproxyr |
Plots occurrence points over a sampling effort proxy surface and calculates a "Bias Correlation Score" to quantify how much the data is skewed toward human infrastructure.
diagnose_sampling_bias(occurrences, effort_surface)diagnose_sampling_bias(occurrences, effort_surface)
occurrences |
An sf object containing occurrence points. |
effort_surface |
A SpatRaster of sampling effort. |
A list containing the bias score (percentage) and a diagnostic message.
try({ effort <- generate_effort_surface("Luxembourg", resolution = 10000) bg_points <- sample_bias_aware_background(effort, n_points = 10) diagnose_sampling_bias(bg_points, effort) })try({ effort <- generate_effort_surface("Luxembourg", resolution = 10000) bg_points <- sample_bias_aware_background(effort, n_points = 10) diagnose_sampling_bias(bg_points, effort) })
Downloads road data for a given country and calculates distance to roads to create a proxy for human sampling effort.
generate_effort_surface(country = "Pakistan", resolution = 10000)generate_effort_surface(country = "Pakistan", resolution = 10000)
country |
Character. Name of the country (e.g., "Pakistan"). |
resolution |
Numeric. Output raster resolution in meters. |
A SpatRaster object where higher values indicate higher probability of human sampling effort (closer to roads).
try({ effort <- generate_effort_surface("Luxembourg", resolution = 10000) })try({ effort <- generate_effort_surface("Luxembourg", resolution = 10000) })
Draws background points from a sampling effort proxy surface, ensuring that background points are sampled in proportion to the estimated sampling effort.
sample_bias_aware_background(effort_surface, n_points = 100)sample_bias_aware_background(effort_surface, n_points = 100)
effort_surface |
A SpatRaster of sampling effort. |
n_points |
Integer. Number of background points to sample. |
An sf object containing the sampled background points.
try({ effort <- generate_effort_surface("Luxembourg", resolution = 10000) bg_points <- sample_bias_aware_background(effort, n_points = 10) })try({ effort <- generate_effort_surface("Luxembourg", resolution = 10000) bg_points <- sample_bias_aware_background(effort, n_points = 10) })