R for Geospatial Predictive Mapping: Takeaways from the Talk

[This article was first published on Thinking in spatial patterns, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Title slide

Slides: https://jakubnowosad.com/rome2025

Video recording: https://youtu.be/uZe7thh80MI

Reproducible code: https://jakubnowosad.com/rome2025/index.R

Geospatial predictive mapping is a common task across many domains, aiming to produce continuous surfaces from point observations and spatial predictors. There are many algorithms available to perform this task, ranging from simple interpolation methods to complex machine learning models, and a variety of R packages implement these methods. Thus, producing a map from points is easy, but understanding how reliable that map is is much harder.

In my talk at the Rome R Users Group (Nov 27, 2025), I presented practical R workflows for generating and evaluating spatial predictions. Using plant species richness data across South America, I compared methods such as Inverse Distance Weighting, ordinary and universal Kriging, and Random Forests. These approaches often produce visually appealing maps, but they can be misleading. Common issues include unrealistic predictions outside the observed value ranges, predictions for environments not represented in the training data, and overly optimistic accuracy metrics when training and test points are spatially clustered.

To address these problems, I focused on two complementary tools:

  • kNN Distance Matching (kNNDM), a prediction-domain adaptive cross-validation method that reshapes validation folds so that held-out data resemble “unseen” areas. This reduces evaluation bias caused by data sampling and yields more realistic performance estimates.
  • Area of Applicability (AoA), which identifies locations whose environmental conditions differ from the training data. Masking or highlighting these regions helps communicate where predictions are more or less trustworthy.

Together, kNNDM and AoA shift the focus from model-centric accuracy to understanding the prediction domain: where the model can be trusted and how well its errors are quantified within that domain.

Citation

BibTeX citation:
@online{nowosad2025,
  author = {Nowosad, Jakub},
  title = {R for {Geospatial} {Predictive} {Mapping:} {Takeaways} from
    the {Talk}},
  date = {2025-12-01},
  url = {https://jakubnowosad.com/posts/2025-12-01-rome-talk/},
  langid = {en}
}
For attribution, please cite this work as:
Nowosad, Jakub. 2025. “R for Geospatial Predictive Mapping: Takeaways from the Talk.” December 1, 2025. https://jakubnowosad.com/posts/2025-12-01-rome-talk/.
To leave a comment for the author, please follow the link and comment on their blog: Thinking in spatial patterns.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)