Exploring geospatial visualization in R:
from basics to the latest tools

Jakub Nowosad, https://jakubnowosad.com/

R User Group, Oak Ridge National Laboratory

2025-02-26

Hi, I am Jakub

Computational geographer: intersection between geocomputation and environmental sciences


Associate Professor at the Adam Mickiewicz University, Poznan; Visiting Scientist, University of Münster


Main scientific interest: spatial pattern analysis, focusing on quantifying and understanding patterns in environmental data

Co-author of a few books on geocomputation and spatial analysis with R and Python, including “Geocomputation with R”


Creator and contributor of various R packages for spatial data processing and visualization


Educator, teaching courses on geocomputation, spatial analysis, programming, and data visualization

Website: jakubnowosad.com

R-spatial

R has a long history of supporting spatial data processing, analysis, and visualization

Spatial visualization packages include:

  • {rasterVis}, {mapsf}, {ggplot2} and {ggspatial}, {tidyterra}, {rayshader} – static visualizations
  • {leaflet}, {mapview}, {mapdeck}, {leafgl}, {mapgl} – interactive visualizations
  • {tmap} – both

Code examples

https://jakubnowosad.com/ornl2025/code.R

Advanced {tmap}

Website: https://r-tmap.github.io/tmap/


Other features:

  • Many other visual variables, e.g., tm_lines() and tm_raster()
  • More complex scales for various data types
  • Including charts (e.g., histograms) in the legend
  • Using basemaps in both static and interactive modes
  • Extending {tmap} to other layer types (e.g., tm_cartogram()) or modes, e.g., "deck"

Other tools

{leafgl}: https://r-spatial.github.io/leafgl/

Allows rendering large datasets (millions of objects) on Leaflet maps by utilizing WebGL technology

{mapgl}: https://walker-data.com/mapgl/

An interface to Mapbox GL JS (API key required) and Maplibre GL JS (no API key required).

Provides support to various map layers (including rasters and heatmaps); allows to create story maps.

A lot of R-spatial tools and resources are available1: books, websites, and courses…

…but do not forget that making maps is also an art!

Contact

Website: https://jakubnowosad.com

Materials

Slides: https://jakubnowosad.com/ornl2025