List - R Geospatial Packages

Overview

Curated collection of R packages for geospatial analysis, visualization, and data access. Based on the CRAN Spatial Task View and practical experience.

Installation

Install all core packages: ctv::install.views("Spatial", coreOnly = TRUE)

Core Spatial Packages

The foundational packages for working with spatial data in R.

PackageDescriptionLinks
sfSimple Features for R - modern vector data standard (OGC compliant)CRAN - Docs
terraRaster and vector spatial data analysis (successor to raster)CRAN - Docs
starsSpatiotemporal arrays and raster/vector data cubesCRAN - Docs
spLegacy spatial classes (superseded by sf)CRAN

Geometry Operations

PackageDescriptionLinks
lwgeomLightweight geometry engine functions for sfCRAN
geosHigh-performance GEOS bindingsCRAN
s2Spherical geometry operations (used by sf)CRAN
wkWell-known geometry parsing and writingCRAN
sfheadersFast construction of sf objectsCRAN
geosphereSpherical trigonometry for geographic calculationsCRAN

Data Access - Census & Demographics

PackageDescriptionLinks
tidycensusUS Census Bureau data in tidy format with geometryCRAN - Docs
tigrisUS Census TIGER/Line shapefiles (boundaries, roads, water)CRAN
censusapiAccess all Census Bureau APIsCRAN

Data Access - Federal & Government

PackageDescriptionLinks
FedDataDownload SSURGO, NED, NHD, NLCD and other federal dataCRAN - Docs
elevatrElevation data from multiple sources (AWS, OpenTopography)CRAN
soilDBNRCS soil databases (SSURGO, STATSGO)CRAN
geodataClimate, elevation, soil, crop, species occurrence dataCRAN
terrainrUSGS National Map servicesCRAN

Data Access - OpenStreetMap

PackageDescriptionLinks
osmdataOpenStreetMap data via Overpass APICRAN - Docs
osmextractDownload and convert large OSM extractsCRAN
OpenStreetMapOSM raster imagesCRAN

Data Access - Natural & Global

PackageDescriptionLinks
rnaturalearthNatural Earth map data (countries, coastlines, etc.)CRAN
rnaturalearthdataNatural Earth datasetsCRAN
giscoREurostat GISCO spatial dataCRAN
cshapesHistorical country boundaries (1886-today)CRAN

Data Access - Remote Sensing

PackageDescriptionLinks
rstacSpatioTemporal Asset Catalog (STAC) clientCRAN
rsiAwesome Spectral Indices and STAC dataCRAN
rgeeGoogle Earth Engine clientCRAN
MODISToolsMODIS Land Products SubsetsCRAN
sitsSatellite image time series analysisCRAN

Visualization - Interactive Web Maps

PackageDescriptionLinks
leafletInteractive maps via Leaflet.jsCRAN - Docs
leaflet.extrasAdditional Leaflet pluginsCRAN
leaflet.extras2More Leaflet plugins (time slider, etc.)CRAN
leafemLeaflet extensions for mapviewCRAN
leaflegendCustom legends for LeafletCRAN
mapviewQuick interactive viewing of spatial dataCRAN
mapdeckDeck.gl and Mapbox GL mapsCRAN
mapglMapLibre/Mapbox GL interfaceGitHub

Leaflet

# leaflet
library(leaflet)
library(leaflet.extras)
library(leaflet.extras2)
library(leafem)
library(leaflet.providers)
library(leafgl)
library(leaflet.opacity)
library(leaflet.esri)
library(leaf.magic)
library(leaflegend)
library(leafsync)
library(leafdown)
library(leafsync)
library(leafpop)

Visualization - Static Maps

PackageDescriptionLinks
tmapThematic maps with grammar of graphicsCRAN - Docs
mapsfThematic cartography (successor to cartography)CRAN
ggplot2Grammar of graphics with geom_sfCRAN
ggspatialggplot2 extensions (north arrows, scale bars)CRAN
ggmapggplot2 with Google Maps and OSMCRAN
rayshader3D visualization and hillshadingCRAN

Database Connectivity

PackageDescriptionLinks
rpostgisPostGIS interfaceCRAN
RPostgresPostgreSQL driver (works with PostGIS)CRAN
poolDatabase connection poolingCRAN

ArcGIS & Esri Integration

PackageDescriptionLinks
arcgislayersRead ArcGIS Feature ServicesCRAN
arcgisutilsArcGIS REST API utilitiesCRAN
esri2sfConvert Esri services to sfGitHub
arcpullrPull ArcGIS REST API dataCRAN

Spatial Analysis & Geostatistics

PackageDescriptionLinks
gstatGeostatistical modeling and krigingCRAN
spdepSpatial dependence and autocorrelationCRAN
spatialregSpatial regression models (SAR, CAR)CRAN
spatstatPoint pattern analysisCRAN
exactextractrFast zonal statisticsCRAN

Network Analysis

PackageDescriptionLinks
sfnetworksTidy spatial network analysisCRAN
stplanrSustainable transport planningCRAN

Geocoding

PackageDescriptionLinks
tidygeocoderTidy geocoding with multiple servicesCRAN

File I/O & Utilities

PackageDescriptionLinks
gdalrasterGDAL API bindings for raster/vectorCRAN
vapourLow-level GDAL accessCRAN
rmapshaperMapshaper for topology-aware simplificationCRAN
geojsonioGeoJSON I/OCRAN

LiDAR & Point Clouds

PackageDescriptionLinks
lidRLiDAR data processingCRAN
whiteboxWhiteboxTools interfaceCRAN

Classification & Color

PackageDescriptionLinks
classIntClass interval algorithms for thematic mapsCRAN
viridisColor-blind friendly palettesCRAN
RColorBrewerColorBrewer palettesCRAN

Notes


Appendix

Created: 2024-12-22 | Modified: 2024-12-22

See Also


(c) No Clocks, LLC | 2024