Task view: Analysis of Spatial Data

Last updated on 2018-11-30 by Roger Bivand

Base R includes many functions that can be used for reading, visualising, and analysing spatial data. The focus in this view is on "geographical" spatial data, where observations can be identified with geographical locations, and where additional information about these locations may be retrieved if the location is recorded with care. Base R functions are complemented by contributed packages, some of which are on CRAN, and others are still in development. One location is R-Forge, which lists "Spatial Data and Statistics" projects in its project tree. Information on R-spatial packages was until 2016 posted on the R-Forge rspatial project website, including a visualisation gallery.

Another set of locations for the development and maintenance of packages is on Github. Some key packages including sf and stars are grouped under r-spatial, others including raster under rspatial. Maintenance of the sp is continuing here: edzer/sp.

The contributed packages address two broad areas: moving spatial data into and out of R, and analysing spatial data in R.

The R-SIG-Geo mailing-list is a good place to begin for obtaining help and discussing questions about both accessing data, and analysing it. The mailing list is a good place to search for information about relevant courses. Further information about courses may be found under the "Events" tab of this blog.

There are a number of contributed tutorials and introductions; a recent one is Introduction to visualising spatial data in R by Robin Lovelace and James Cheshire.

The packages in this view can be roughly structured into the following topics. If you think that some package is missing from the list, please fork the task view repository and provide a pull request in ctv format for the ctv/Spatial.ctv file.

Classes for spatial data and metadata

Because many of the packages importing and using spatial data have had to include objects of storing data and functions for visualising it, an initiative is in progress to construct shared classes and plotting functions for spatial data.

Complementary initatives are ongoing to support a better handling of geographic metadata in R

Spatial data - general

  • The sp package provides classes and methods for dealing with spatial data and is discussed in a note in R News.
  • sf is a newer package now on CRAN, and is being actively developed here: rspatial/sf, providing Simple Features for R, in compliance with the OGC Simple Feature standard. The development of the package is being supported by the R Consortium. It provides simple features access for vector data, and as such is a modern implementation and standardization of parts of sp. It is documented in an R Journal article.
  • stars is being actively developed here: rspatial/stars, and supported by the R Consortium; it provides for spatiotemporal data in the form of dense arrays .
  • stplanr provides a "SpatialLinesNetwork" class based on objects defined in sp and igraph that can be used for routing analysis within R. Another network package is shp2graph.
  • The spacetime package extends the shared classes defined in sp for spatio-temporal data (see Spatio-Temporal Data in R).
  • maptools provides conversion functions between PBSmapping and spatstat and sp classes, in addition to maps databases and sp classes.

Raster data

  • raster package is a major extension of spspatial data classes to virtualise access to large rasters, permitting large objects to be analysed, and extending the analytical tools available for both raster and vector data. Used with rasterVis, it can also provide enhanced visualisation and interaction.
  • stars provides for spatiotemporal data in the form of dense arrays, with space and time being array dimensions. Examples include socio-economic or demographic data, environmental variables monitored at fixed stations, time series of satellite images with multiple spectral bands, spatial simulations, and climate model results.
  • spatial.tools package contains spatial functions meant to enhance the core functionality of the raster package, including a parallel processing engine for use with rasters.

Geographic metadata

  • geometa provides classes and methods to write geographic metadata following the ISO and OGC metadata standards (ISO 19115, 19110, 19119) and export it as XML (ISO 19139) for later publication into metadata catalogues. Reverserly, geometa provides a way to read ISO 19139 metadata into R. The package extends sf to provide GML (ISO 19136) representation of geometries. geometa is under active development on eblondel/geometa
  • ncdf4 provides read and write functions for handling metadata (CF conventions) in the self-described NetXDF format.

Reading and writing spatial data

Reading and writing spatial data - rgdal

Maps may be vector-based or raster-based. The rgdal package provides bindings to GDAL (Geospatial Data Abstraction Library)-supported raster formats and OGR-supported vector formats. It contains functions to write raster files in supported formats. Formats supported by GDAL/OGR include both OGC standard data formats (e.g. GeoJSON) and proprietary formats (e.g. ESRI Shapefile). The package also provides PROJ.4 projection support for vector objects (this site provides searchable online PROJ.4 representations of projections). Affine and similarity transformations on sp objects may be made using functions in the vec2dtransf package. The Windows and Mac OSX CRAN binaries of rgdal include subsets of possible data source drivers; if others are needed, use other conversion utilities, or install from source against a version of GDAL with the required drivers.

Reading and writing spatial data - data formats

Other packages provide facilities to read and write spatial data, dealing with open standard formats or proprietary formats.

OGC Standard Data formats

  • Well-Known Text (WKT) / Well-Known Binary (WKB): These standards are part of the OGC Simple Feature specification. Both WKT/WKB formats are supported by sf package that implements the whole OGC Simple Feature specification in R. Apart from the sf package, the rgeos package provides functions for reading and writing well-known text (WKT) geometry. Package wkb package provides functions for reading and writing well-known binary (WKB) geometry.
  • GeoJSON: An rOpenSci blog entry described a GeoJSON-centred approach to reading GeoJSON and WKT data. GeoJSON can be written and read using rgdal, and WKT by rgeos. The entry lists geojson, geojsonio, geoaxe and lawn among others.
  • Geographic Markup Language (GML):GML format can be read and writen with rgdal. Additional GML native reader and writer is provided by geometa model with bindings to the sf classes, for extension of geographic metadata with GML data and metadata elements (GML 3.2.1 and 3.3) and interfacing OGC web-services in ows4R package
  • NetCDF files: ncdf4 or RNetCDF may be used.

Proprietary Data Formats

  • ESRI formats: maps (with mapdata and mapproj) provides access to the same kinds of geographical databases as S - RArcInfo allows ArcInfo v.7 binary files and *.e00 files to be read, and maptools and shapefiles read and write ESRI ArcGIS/ArcView shapefiles.
  • Others: maptools package provides helper functions for writing map polygon files to be read by WinBUGS, Mondrian, and the tmap command in Stata. The gmt package gives a simple interface between GMT map-making software and R.

Reading and writing spatial data - GIS Software connectors

  • PostGIS: The rpostgis package provides additional functions to the RPostgreSQL package to interface R with a 'PostGIS'-enabled database, as well as convenient wrappers to common 'PostgreSQL' queries. It is documented in an R Journal article. postGIStools package provides functions to convert geometry and 'hstore' data types from 'PostgreSQL' into standard R objects, as well as to simplify the import of R data frames (including spatial data frames) into 'PostgreSQL'. sf also provides an R interface to Postgis, for both reading and writing, throuh GDAL.
  • GRASS:Integration with version 7.* of the leading open source GIS, GRASS, is provided in CRAN package rgrass7, using rgdal for exchanging data. For GRASS 6.*, use spgrass6.
  • SAGA:RSAGA is a similar shell-based wrapper for SAGA commands.
  • Quantum GIS (QGIS):RQGIS package establishes an interface between R and QGIS, i.e. it allows the user to access QGIS functionalities from the R console. It achieves this by using the QGIS Python API via the command line. Note also this thread on an alternative R/QGIS integration.
  • ArcGIS:RPyGeo is a wrapper for Python access to the ArcGIS GeoProcessor

Interfaces to Spatial Web-Services

Some R packages focused on providing interfaces to web-services and web tools in support of spatial data management. Here follows a first tentative (non-exhaustive) list:

  • ows4R is a new package that intends to provide an R interface to OGC standard Web-Services. It is in active development at eblondel/ows4R and currently support interfaces to the Web Feature Service (WFS) for vector data access, with binding to the sf package, and the Catalogue Service (CSW) for geographic metadata discovery and management (including transactions), with binding to the geometa package.
  • geosapi is an R client for the GeoServer REST API, an open source implementation used widely for serving spatial data.
  • geonapi provides an interface to the GeoNetwork legacy API, an opensource catalogue for managing geographic metadata.

Specific geospatial data sources of interest

  • Modern country boundaries are provided at 2 resolutions by rworldmap along with functions to join and map tabular data referenced by country names or codes. Chloropleth and bubble maps are supported and general functions to work on user supplied maps (see A New R package for Mapping Global Data. Higher resolution country borders are available from the linked package rworldxtra. Historical country boundaries (1946-2012) can be obtained from the cshapes.
  • marmap package is designed for downloading, plotting and manipulating bathymetric and topographic data in R. It allows to query the ETOPO1 bathymetry and topography database hosted by the NOAA, use simple latitude-longitude-depth data in ascii format, and take advantage of the advanced plotting tools available in R to build publication-quality bathymetric maps (see the PLOS paper).
  • maptools provides an interface to GSHHS shoreline databases.
  • The UScensus2000 suite of packages (UScensus2000cdp, UScensus2000tract) makes the use of data from the 2000 US Census more convenient. An important data set, Guerry's "Moral Statistics of France", has been made available in the Guerry package, which provides data and maps and examples designed to contribute to the integration of multivariate and spatial analysis.
  • rgbif package is used to access Global Biodiversity Information Facility (GBIF) occurence data
  • geonames is an interface to the www.geonames.org service.
  • OpenStreetMap gives access to open street map raster images, and osmar provides infrastructure to access OpenStreetMap data from different sources, to work with the data in common R manner, and to convert data into available infrastructure provided by existing R packages.

Handling spatial data

A number of packages dedicated to spatial data handling have be written using sp classes.

Data processing - general

  • rgdal and maptools. The rgeos package provides an interface to topology functions for sp objects using GEOS.
  • raster package introduces many GIS methods that now permit much to be done with spatial data without having to use GIS in addition to R.
  • The gdalUtils package provides wrappers for the Geospatial Data Abstraction Library (GDAL) Utilities.
  • gdistance, provides functions to calculate distances and routes on geographic grids. geosphere permits computations of distance and area to be carried out on spatial data in geographical coordinates. cshapes package provides functions for calculating distance matrices (see Mapping and Measuring Country Shapes).
  • spsurvey provides a range of sampling functions.
  • The trip package extends sp classes to permit the accessing and manipulating of spatial data for animal tracking.
  • spcosa provides spatial coverage sampling and random sampling from compact geographical strata.
  • magclass offers a data class for increased interoperability working with spatial-temporal data together with corresponding functions and methods (conversions, basic calculations and basic data manipulation). The class distinguishes between spatial, temporal and other dimensions to facilitate the development and interoperability of tools build for it. Additional features are name-based addressing of data and internal consistency checks (e.g. checking for the right data order in calculations).
  • taRifx is a collection of utility and convenience functions, and some interesting spatial functions.
  • geoaxeallows users to split 'geospatial' objects into pieces.
  • The lawn package is a client for 'Turfjs' for 'geospatial'analysis.

Data processing - raster and imagery data

  • The landsat package with accompanying JSS paper provides tools for exploring and developing correction tools for remote sensing data.

Data cleaning

  • cleangeo may be used to inspect spatial objects, facilitate handling and reporting of topology errors and geometry validity issues. It may be used to reduce the likelihood of having issues when doing spatial data processing.
  • lwgeom may also be used to facilitate handling and reporting of topology errors and geometry validity issues.

Visualizing spatial data

Base visualization packages

  • Packages such as sp, sf, raster and rasterVis provide basic visualization methods through the generic plot function
  • RColorBrewer provides very useful colour palettes that may be modified or extended using the colorRampPalette function provided with R.
  • classInt package provides functions for choosing class intervals for thematic cartography.

Thematic cartography packages

  • tmap package provides a modern basis for thematic mapping optionally using a Grammar of Graphics syntax. Because it has a custom grid graphics platform, it obviates the need to fortify geometries to use with ggplot2.
  • quickmapr provides a simple method to visualize 'sp' and 'raster' objects, allows for basic zooming, panning, identifying, and labeling of spatial objects, and does not require that the data be in geographic coordinates.
  • cartography package allows various cartographic representations such as proportional symbols, choropleth, typology, flows or discontinuities.
  • The mapmisc package is a minimal, light-weight set of tools for producing nice looking maps in R, with support for map projections.
  • Additional processing and mapping functions are available in PBSmapping package; PBSmodelling provides modelling support. In addition, GEOmap provides mapping facilities directed to meet the needs of geologists, and uses the geomapdata package.

Packages based on web-mapping frameworks

  • mapview, leaflet and leafletR packages provide methods to view spatial objects interactively, usually on a web mapping base.
  • RgoogleMaps package for accessing Google Maps(TM) may be useful if the user wishes to place a map backdrop behind other displays.
  • plotGoogleMaps package provides methods for the visualisation of spatial and spatio-temporal objects in Google Maps in a web browser.
  • plotKML is a package providing methods for the visualisation of spatial and spatio-temporal objects in Google Earth.
  • ggmap may be used for spatial visualisation with Google Maps and OpenStreetMap;ggsn provides North arrows and scales for such maps.

Building Cartograms

  • The micromap package provides linked micromaps using ggplot2.
  • recmap package provides rectangular cartograms with rectangle sizes reflecting for example population.
  • statebins provides a simpler binning approach to US states.

Analyzing spatial data

Point pattern analysis

The spatial package is a recommended package shipped with base R, and contains several core functions, including an implementation of Khat by its author, Prof. Ripley. In addition, spatstat allows freedom in defining the region(s) of interest, and makes extensions to marked processes and spatial covariates. Its strengths are model-fitting and simulation, and it has a useful homepage. It is the only package that will enable the user to fit inhomogeneous point process models with interpoint interactions. The spatgraphs package provides graphs, graph visualisation and graph based summaries to be used with spatial point pattern analysis. The splancs package also allows point data to be analysed within a polygonal region of interest, and covers many methods, including 2D kernel densities. The smacpod package provides various statistical methods for analyzing case-control point data. The methods available closely follow those in chapter 6 of Applied Spatial Statistics for Public Health Data by Waller and Gotway (2004).

ecespa provides wrappers, functions and data for spatial point pattern analysis, used in the book on Spatial Ecology of the ECESPA/AEET. The functions for binning points on grids in ash may also be of interest. The ads package perform first- and second-order multi-scale analyses derived from Ripley's K-function. The aspace package is a collection of functions for estimating centrographic statistics and computational geometries from spatial point patterns. DSpat contains functions for spatial modelling for distance sampling data and spatialsegregation provides segregation measures for multitype spatial point patterns. GriegSmith uses the Grieg-Smith method on 2 dimensional spatial data. The dbmss package allows simple computation of a full set of spatial statistic functions of distance, including classical ones (Ripley's K and others) and more recent ones used by spatial economists (Duranton and Overman's Kd, Marcon and Puech's M). It relies on spatstat for core calculation. latticeDensity contains functions that compute the lattice-based density estimator of Barry and McIntyre, which accounts for point processes in two-dimensional regions with irregular boundaries and holes.

Geostatistics

The gstat package provides a wide range of functions for univariate and multivariate geostatistics, also for larger datasets, while geoR and geoRglm contain functions for model-based geostatistics. Variogram diagnostics may be carried out with vardiag. Automated interpolation using gstat is available in automap. This family of packages is supplemented by intamap with procedures for automated interpolation. A similar wide range of functions is to be found in the fields package. The spatial package is shipped with base R, and contains several core functions. The spBayes package fits Gaussian univariate and multivariate models with MCMC. ramps is a different Bayesian geostatistical modelling package. The geospt package contains some geostatistical and radial basis functions, including prediction and cross validation. Besides, it includes functions for the design of optimal spatial sampling networks based on geostatistical modelling. spsann is another package to offer functions to optimize sample configurations, using spatial simulated annealing. The geostatsp package offers geostatistical modelling facilities using Raster and SpatialPoints objects are provided. Non-Gaussian models are fit using INLA, and Gaussian geostatistical models use Maximum Likelihood Estimation. The FRK package is a tool for spatial/spatio-temporal modelling and prediction with large datasets. The approach, discussed in Cressie and Johannesson (2008), decomposes the field, and hence the covariance function, using a fixed set of n basis functions, where n is typically much smaller than the number of data points (or polygons) m.

The RandomFields package provides functions for the simulation and analysis of random fields, and variogram model descriptions can be passed between geoR, gstat and this package. SpatialExtremes proposes several approaches for spatial extremes modelling using RandomFields. In addition, CompRandFld, constrainedKriging and geospt provide alternative approaches to geostatistical modelling. The spTimer package is able to fit, spatially predict and temporally forecast large amounts of space-time data using [1] Bayesian Gaussian Process (GP) Models, [2] Bayesian Auto-Regressive (AR) Models, and [3] Bayesian Gaussian Predictive Processes (GPP) based AR Models. The rtop package provides functions for the geostatistical interpolation of data with irregular spatial support such as runoff related data or data from administrative units. The georob package provides functions for fitting linear models with spatially correlated errors by robust and Gaussian Restricted Maximum Likelihood and for computing robust and customary point and block kriging predictions, along with utility functions for cross-validation and for unbiased back-transformation of kriging predictions of log-transformed data. The SpatialTools package has an emphasis on kriging, and provides functions for prediction and simulation. It is extended by ExceedanceTools, which provides tools for constructing confidence regions for exceedance regions and contour lines. The gear package implements common geostatistical methods in a clean, straightforward, efficient manner, and is said to be a quasi reboot of SpatialTools. The sperrorest package implements spatial error estimation and permutation-based spatial variable importance using different spatial cross-validation and spatial block bootstrap methods. The spm package provides functions for hybrid geostatistical and machine learning methods for spatial predictive modelling. It currently contains two commonly used geostatistical methods, two machine learning methods, four hybrid methods and two averaging methods.

The sgeostat package is also available. Within the same general topical area are the deldir and tripack packages for triangulation and the akima package for spline interpolation; the MBA package provides scattered data interpolation with multilevel B-splines. In addition, there are the spatialCovariance package, which supports the computation of spatial covariance matrices for data on rectangles, the regress package building in part on spatialCovariance, and the tgp package. The Stem package provides for the estimation of the parameters of a spatio-temporal model using the EM algorithm, and the estimation of the parameter standard errors using a spatio-temporal parametric bootstrap. FieldSim is another random fields simulations package. The SSN is for geostatistical modeling for data on stream networks, including models based on in-stream distance. Models are created using moving average constructions. Spatial linear models, including covariates, can be fit with ML or REML. Mapping and other graphical functions are included. The ipdw provides functions o interpolate georeferenced point data via Inverse Path Distance Weighting. Useful for coastal marine applications where barriers in the landscape preclude interpolation with Euclidean distances. RSurvey may be used as a processing program for spatially distributed data, and is capable of error corrections and data visualisation.

Disease mapping and areal data analysis

DCluster is a package for the detection of spatial clusters of diseases. It extends and depends on the spdep package, which provides basic functions for building neighbour lists and spatial weights, tests for spatial autocorrelation for areal data like Moran's I, and functions for fitting spatial regression models, such as SAR and CAR models. These models assume that the spatial dependence can be described by known weights. In spdep, the ME and SpatialFiltering functions provide Moran Eigenvector model fitting, as do more modern functions in the spmoran package. The SpatialEpi package provides implementations of cluster detection and disease mapping functions, including Bayesian cluster detection, and supports strata. The smerc package provides statistical methods for the analysis of data areal data, with a focus on cluster detection. The diseasemapping package offers the formatting of population and case data, calculation of Standardized Incidence Ratios, and fitting the BYM model using INLA. Regionalisation of polygon objects is provided by AMOEBA: a function to calculate spatial clusters using the Getis-Ord local statistic. It searches irregular clusters (ecotopes) on a map, and by skater in spdep. The seg and OasisR packages provide functions for measuring spatial segregation; OasisR includes Monte Carlo simulations to test the indices. The spgwr package contains an implementation of geographically weighted regression methods for exploring possible non-stationarity. The gwrr package fits geographically weighted regression (GWR) models and has tools to diagnose and remediate collinearity in the GWR models. Also fits geographically weighted ridge regression (GWRR) and geographically weighted lasso (GWL) models. The GWmodel package contains functions for computing geographically weighted (GW) models. Specifically, basic, robust, local ridge, heteroskedastic, mixed, multiscale, generalised and space-time GWR; GW summary statistics, GW PCA and GW discriminant analysis; associated tests and diagnostics; and options for a range of distance metrics. The lctools package provides researchers and educators with easy-to-learn user friendly tools for calculating key spatial statistics and to apply simple as well as advanced methods of spatial analysis in real data. These include: Local Pearson and Geographically Weighted Pearson Correlation Coefficients, Spatial Inequality Measures (Gini, Spatial Gini, LQ, Focal LQ), Spatial Autocorrelation (Global and Local Moran's I), several Geographically Weighted Regression techniques and other Spatial Analysis tools (other geographically weighted statistics). This package also contains functions for measuring the significance of each statistic calculated, mainly based on Monte Carlo simulations. The sparr package provides another approach to relative risks. The CARBayes package implements Bayesian hierarchical spatial areal unit models. In such models the spatial correlation is modelled by a set of random effects, which are assigned a conditional autoregressive (CAR) prior distribution. Examples of the models included are the BYM model as well as a recently developed localised spatial smoothing model. The glmmBUGS package is a helpful way of passing out spatial models to WinBUGS. The spaMM package fits spatial GLMMs, using the Matern correlation function as the basic model for spatial random effects. The PReMiuM package is for profile regression, which is a Dirichlet process Bayesian clustering model; it provides a spatial CAR term that can be included in the fixed effects (which are global, ie. non cluster specific, parameters) to account for any spatial correlation in the residuals. The spacom package provides tools to construct and exploit spatially weighted context data, and further allows combining the resulting spatially weighted context data with individual-level predictor and outcome variables, for the purposes of multilevel modelling. The geospacom package generates distance matrices from shape files and represents spatially weighted multilevel analysis results. Spatial survival analysis is provided by the spatsurv - Bayesian inference for parametric proportional hazards spatial survival models - and spBayesSurv - Bayesian Modeling and Analysis of Spatially Correlated Survival Data - packages. The spselect package provides modelling functions based on forward stepwise regression, incremental forward stagewise regression, least angle regression (LARS), and lasso models for selecting the spatial scale of covariates in regression models.

Spatial regression

The choice of function for spatial regression will depend on the support available. If the data are characterised by point support and the spatial process is continuous, geostatistical methods may be used, or functions in the nlme package. If the support is areal, and the spatial process is not being treated as continuous, functions provided in the spdep package may be used. This package can also be seen as providing spatial econometrics functions, and, as noted above, provides basic functions for building neighbour lists and spatial weights, tests for spatial autocorrelation for areal data like Moran's I, and functions for fitting spatial regression models. It provides the full range of local indicators of spatial association, such as local Moran's I and diagnostic tools for fitted linear models, including Lagrange Multiplier tests. Spatial regression models that can be fitted using maximum likelihood include spatial lag models, spatial error models, and spatial Durbin models. For larger data sets, sparse matrix techniques can be used for maximum likelihood fits, while spatial two stage least squares and generalised method of moments estimators are an alternative. When using GMM, sphet can be used to accommodate both autocorrelation and heteroskedasticity. The McSpatial provides functions for locally weighted regression, semiparametric and conditionally parametric regression, fourier and cubic spline functions, GMM and linearized spatial logit and probit, k-density functions and counterfactuals, nonparametric quantile regression and conditional density functions, Machado-Mata decomposition for quantile regressions, spatial AR model, repeat sales models, and conditionally parametric logit and probit. The splm package provides methods for fitting spatial panel data by maximum likelihood and GM. The two small packages S2sls and spanel provide alternative implementations without most of the facilities of splm. The HSAR package provides Hierarchical Spatial Autoregressive Models (HSAR), based on a Bayesian Markov Chain Monte Carlo (MCMC) algorithm. spatialprobit make possible Bayesian estimation of the spatial autoregressive probit model (SAR probit model). The ProbitSpatial package provides methods for fitting Binomial spatial probit models to larger data sets; spatial autoregressive (SAR) and spatial error (SEM) probit models are included. The starma package provides functions to identify, estimate and diagnose a Space-Time AutoRegressive Moving Average (STARMA) model.

Ecological analysis

There are many packages for analysing ecological and environmental data. They include:

  • ade4 for exploratory and Euclidean methods in the environmental sciences, the adehabitat family of packages for the analysis of habitat selection by animals (adehabitatHR, adehabitatHS, adehabitatLT, and adehabitatMA)
  • pastecs for the regulation, decomposition and analysis of space-time series
  • vegan for ordination methods and other useful functions for community and vegetation ecologists, and many other functions in other contributed packages. One such is tripEstimation, basing on the classes provided by trip. ncf has entered CRAN recently, and provides a range of spatial nonparametric covariance functions.
  • The spind package provides functions for spatial methods based on generalized estimating equations (GEE) and wavelet-revised methods (WRM), functions for scaling by wavelet multiresolution regression (WMRR), conducting multi-model inference, and stepwise model selection.
  • rangeMapper is a package to manipulate species range (extent-of-occurrence) maps, mainly tools for easy generation of biodiversity (species richness) or life-history traits maps.
  • The siplab package is a platform for experimenting with spatially explicit individual-based vegetation models.
  • ModelMap builds on other packages to create models using underlying GIS data.
  • The SpatialPosition computes spatial position models: Stewart potentials, Reilly catchment areas, Huff catchment areas.
  • The Watersheds package provides methods for watersheds aggregation and spatial drainage network analysis.
  • Rcitrus (off-CRAN package) is for the spatial analysis of plant disease incidence.
  • The ngspatial package provides tools for analyzing spatial data, especially non-Gaussian areal data. It supports the sparse spatial generalized linear mixed model of Hughes and Haran (2013) and the centered autologistic model of Caragea and Kaiser (2009).

The Environmetrics Task View contains a much more complete survey of relevant functions and packages.

Packages

ade4 — 1.7-13

Analysis of Ecological Data: Exploratory and Euclidean Methods in Environmental Sciences

adehabitatHR — 0.4.15

Home Range Estimation

adehabitatHS — 0.3.13

Analysis of Habitat Selection by Animals

adehabitatLT — 0.3.23

Analysis of Animal Movements

adehabitatMA — 0.3.12

Tools to Deal with Raster Maps

ads — 1.5-3

Spatial Point Patterns Analysis

akima — 0.6-2

Interpolation of Irregularly and Regularly Spaced Data

AMOEBA — 1.1

A Multidirectional Optimum Ecotope-Based Algorithm

aspace — 3.2

A collection of functions for estimating centrographic statistics and computational geometries for spatial point patterns

ash — 1.0-15

David Scott's ASH Routines

automap — 1.0-14

Automatic interpolation package

CARBayes — 5.1.1

Spatial Generalised Linear Mixed Models for Areal Unit Data

cartography — 2.1.2

Thematic Cartography

classInt — 0.2-3

Choose Univariate Class Intervals

cleangeo — 0.2-2

Cleaning Geometries from Spatial Objects

CompRandFld — 1.0.3-5

Composite-Likelihood Based Analysis of Random Fields

constrainedKriging — 0.2.4

Constrained, Covariance-Matching Constrained and Universal Point or Block Kriging

cshapes — 0.6

The CShapes Dataset and Utilities

dbmss — 2.6-3

Distance-Based Measures of Spatial Structures

DCluster — 0.2-7

Functions for the Detection of Spatial Clusters of Diseases

deldir — 0.1-15

Delaunay Triangulation and Dirichlet (Voronoi) Tessellation

diseasemapping — 1.4.6

Modelling Spatial Variation in Disease Risk for Areal Data

DSpat — 0.1.6

Spatial Modelling for Distance Sampling Data

ecespa — 1.1-10

Functions for Spatial Point Pattern Analysis

ExceedanceTools — 1.2.2

Confidence regions for exceedance sets and contour lines

fields — 9.6

Tools for Spatial Data

FieldSim — 3.2.1

Random Fields (and Bridges) Simulations

FRK — 0.2.2

Fixed Rank Kriging

gdalUtils — 2.0.1.14

Wrappers for the Geospatial Data Abstraction Library (GDAL) Utilities

gdistance — 1.2-2

Distances and Routes on Geographical Grids

gear — 0.1.1

Geostatistical Analysis in R

geoaxe — 0.1.0

Split 'Geospatial' Objects into Pieces

geojson — 0.2.0

Classes for 'GeoJSON'

geojsonio — 0.6.0

Convert Data from and to 'GeoJSON' or 'TopoJSON'

GEOmap — 2.4-4

Topographic and Geologic Mapping

geomapdata — 1.0-4

Data for topographic and Geologic Mapping

geometa — 0.3-0

Tools for Reading and Writing ISO/OGC Geographic Metadata

geonames — 0.998

Interface to www.geonames.org web service

georob — 0.3-7

Robust Geostatistical Analysis of Spatial Data

geoR — 1.7-5.2.1

Analysis of Geostatistical Data

geoRglm — 0.9-11

A Package for Generalised Linear Spatial Models

geonapi — 0.2-0

'GeoNetwork' API R Interface

geosapi — 0.3-0

GeoServer REST API R Interface

geospacom — 0.5-8

Facilitate Generating of Distance Matrices Used in Package 'spacom' and Plotting Data on Maps

geosphere — 1.5-7

Spherical Trigonometry

geospt — 1.0-2

Geostatistical Analysis and Design of Optimal Spatial Sampling Networks

geostatsp — 1.7.2

Geostatistical Modelling with Likelihood and Bayes

ggmap — 2.6.1

Spatial Visualization with ggplot2

ggsn — 0.4.0

North Symbols and Scale Bars for Maps Created with 'ggplot2' or 'ggmap'

glmmBUGS — 2.4.2

Generalised Linear Mixed Models with BUGS and JAGS

gmt — 2.0-1

Interface Between GMT Map-Making Software and R

GriegSmith — 1.0

Uses Grieg-Smith method on 2 dimentional spatial data

gstat — 1.1-6

Spatial and Spatio-Temporal Geostatistical Modelling, Prediction and Simulation

Guerry — 1.6-1

Maps, data and methods related to Guerry (1833) "Moral Statistics of France"

GWmodel — 2.0-6

Geographically-Weighted Models

gwrr — 0.2-1

Fits geographically weighted regression models with diagnostic tools

HSAR — 0.4.2

Hierarchical Spatial Autoregressive Model

igraph — 1.2.2

Network Analysis and Visualization

intamap — 1.4-9

Procedures for Automated Interpolation

ipdw — 0.2-7

Spatial Interpolation by Inverse Path Distance Weighting

landsat — 1.0.8

Radiometric and topographic correction of satellite imagery

latticeDensity — 1.1.0

Density Estimation and Nonparametric Regression on Irregular Regions

lawn — 0.4.2

Client for 'Turfjs' for 'Geospatial' Analysis

lctools — 0.2-6

Local Correlation, Spatial Inequalities, Geographically Weighted Regression and Other Tools

leaflet — 2.0.2

Create Interactive Web Maps with the JavaScript 'Leaflet' Library

leafletR — 0.4-0

Interactive Web-Maps Based on the Leaflet JavaScript Library

lwgeom — 0.1-5

Bindings to Selected 'liblwgeom' Functions for Simple Features

magclass — 4.51.1

Data Class and Tools for Handling Spatial-Temporal Data

mapdata — 2.3.0

Extra Map Databases

mapmisc — 1.7.2

Utilities for Producing Maps

mapproj — 1.2.6

Map Projections

maps — 3.3.0

Draw Geographical Maps

maptools — 0.9-4

Tools for Handling Spatial Objects

mapview — 2.6.0

Interactive Viewing of Spatial Data in R

marmap — 1.0.2

Import, Plot and Analyze Bathymetric and Topographic Data

MBA — 0.0-9

Multilevel B-Spline Approximation

McSpatial — 2.0

Nonparametric spatial data analysis

micromap — 1.9.3

Linked Micromap Plots

ModelMap — 3.4.0.1

Modeling and Map Production using Random Forest and Related Stochastic Models

pastecs — 1.3.21

Package for Analysis of Space-Time Ecological Series

ncdf4 — 1.16

Interface to Unidata netCDF (Version 4 or Earlier) Format Data Files

ncf — 1.2-6

Spatial Covariance Functions

ngspatial — 1.2-1

Fitting the Centered Autologistic and Sparse Spatial Generalized Linear Mixed Models for Areal Data

nlme — 3.1-137

Linear and Nonlinear Mixed Effects Models

OasisR — 3.0.0

Outright Tool for the Analysis of Spatial Inequalities and Segregation

OpenStreetMap — 0.3.3

Access to Open Street Map Raster Images

osmar — 1.1-7

OpenStreetMap and R

ows4R — 0.1-0

Interface to OGC Web-Services (OWS)

PBSmapping — 2.70.5

Mapping Fisheries Data and Spatial Analysis Tools

PBSmodelling — 2.68.6

GUI Tools Made Easy: Interact with Models and Explore Data

plotGoogleMaps — 2.2

Plot Spatial or Spatio-Temporal Data Over Google Maps

plotKML — 0.5-8

Visualization of Spatial and Spatio-Temporal Objects in Google Earth

postGIStools — 0.2.2

Tools for Interacting with 'PostgreSQL' / 'PostGIS' Databases

PReMiuM — 3.2.1

Dirichlet Process Bayesian Clustering, Profile Regression

ProbitSpatial — 1.0

Probit with Spatial Dependence, SAR and SEM Models

quickmapr — 0.3.0

Quickly Map and Explore Spatial Data

ramps — 0.6-15

Bayesian Geostatistical Modeling with RAMPS

RandomFields — 3.1.50

Simulation and Analysis of Random Fields

rangeMapper — 0.3-4

A Platform for the Study of Macro-Ecology of Life History Traits

RArcInfo — 0.4-12

Functions to import data from Arc/Info V7.x binary coverages

raster — 2.8-4

Geographic Data Analysis and Modeling

rasterVis — 0.45

Visualization Methods for Raster Data

RColorBrewer — 1.1-2

ColorBrewer Palettes

recmap — 1.0.0

Compute the Rectangular Statistical Cartogram

regress — 1.3-15

Gaussian Linear Models with Linear Covariance Structure

rgbif — 1.1.0

Interface to the Global 'Biodiversity' Information Facility API

rgdal — 1.3-6

Bindings for the 'Geospatial' Data Abstraction Library

rgeos — 0.4-2

Interface to Geometry Engine - Open Source ('GEOS')

RgoogleMaps — 1.4.3

Overlays on Static Maps

rgrass7 — 0.1-12

Interface Between GRASS 7 Geographical Information System and R

RNetCDF — 1.9-1

Interface to NetCDF Datasets

RPostgreSQL — 0.6-2

R Interface to the 'PostgreSQL' Database System

rpostgis — 1.4.2

R Interface to a 'PostGIS' Database

RPyGeo — 1.0.0

ArcGIS Geoprocessing via Python

RQGIS — 1.0.4

Integrating R with QGIS

RSAGA — 1.3.0

SAGA Geoprocessing and Terrain Analysis

RSurvey — 0.9.3

Geographic Information System Application

rtop — 0.5-14

Interpolation of Data with Variable Spatial Support

rworldmap — 1.3-6

Mapping Global Data

rworldxtra — 1.01

Country boundaries at high resolution.

S2sls — 0.1

Spatial Two Stage Least Squares Estimation

seg — 0.5-5

Measuring Spatial Segregation

sf — 0.7-1

Simple Features for R

sgeostat — 1.0-27

An Object-Oriented Framework for Geostatistical Modeling in S+

shapefiles — 0.7

Read and Write ESRI Shapefiles

shp2graph — 0-5

Convert a SpatialLinesDataFrame Object to an 'igraph'-Class Object

sp — 1.3-1

Classes and Methods for Spatial Data

spacetime — 1.2-2

Classes and Methods for Spatio-Temporal Data

siplab — 1.3

Spatial Individual-Plant Modelling

smacpod — 2.0.4

Statistical Methods for the Analysis of Case-Control Point Data

smerc — 0.4.5

Statistical Methods for Regional Counts

spacom — 1.0-5

Spatially Weighted Context Data for Multilevel Modelling

spaMM — 2.5.11

Mixed-Effect Models, Particularly Spatial Models

spanel — 0.1

Spatial Panel Data Models

sparr — 2.2-13

Spatial and Spatiotemporal Relative Risk

spatial — 7.3-11

Functions for Kriging and Point Pattern Analysis

spatialCovariance — 0.6-9

Computation of Spatial Covariance Matrices for Data on Rectangles

SpatialEpi — 1.2.3

Methods and Data for Spatial Epidemiology

SpatialExtremes — 2.0-7

Modelling Spatial Extremes

SpatialPosition — 1.2.0

Spatial Position Models

spatgraphs — 3.2-1

Graph Edge Computations for Spatial Point Patterns

spatialprobit — 0.9-11

Spatial Probit Models

spatialsegregation — 2.44

Segregation Measures for Multitype Spatial Point Patterns

spatial.tools — 1.6.0

R Functions for Working with Spatial Data

SpatialTools — 1.0.4

Tools for Spatial Data Analysis

spatstat — 1.57-1

Spatial Point Pattern Analysis, Model-Fitting, Simulation, Tests

spatsurv — 1.2

Bayesian Spatial Survival Analysis with Parametric Proportional Hazards Models

spBayes — 0.4-1

Univariate and Multivariate Spatial-Temporal Modeling

spBayesSurv — 1.1.3

Bayesian Modeling and Analysis of Spatially Correlated Survival Data

spcosa — 0.3-8

Spatial Coverage Sampling and Random Sampling from Compact Geographical Strata

spdep — 0.8-1

Spatial Dependence: Weighting Schemes, Statistics and Models

sperrorest — 2.1.5

Perform Spatial Error Estimation and Variable Importance in Parallel

spgrass6 — 0.8-9

Interface Between GRASS 6+ Geographical Information System and R

spgwr — 0.6-32

Geographically Weighted Regression

sphet — 1.7

Estimation of Spatial Autoregressive Models with and without Heteroscedasticity

spind — 2.2.0

Spatial Methods and Indices

splancs — 2.01-40

Spatial and Space-Time Point Pattern Analysis

splm — 1.4-11

Econometric Models for Spatial Panel Data

spm — 1.1.1

Spatial Predictive Modeling

spmoran — 0.1.6

Moran's Eigenvector-Based Spatial Regression Models

spsann — 2.1-0

Optimization of Sample Configurations using Spatial Simulated Annealing

spselect — 0.0.1

Selecting Spatial Scale of Covariates in Regression Models

spsurvey — 3.4

Spatial Survey Design and Analysis

spTimer — 3.3

Spatio-Temporal Bayesian Modelling

SSN — 1.1.13

Spatial Modeling on Stream Networks

starma — 1.3

Modelling Space Time AutoRegressive Moving Average (STARMA) Processes

stars — 0.2-0

Scalable, Spatiotemporal Tidy Arrays

statebins — 1.2.2

U.S. State Cartogram Heatmaps in R; an Alternative to Choropleth Maps for USA States

Stem — 1.0

Spatio-temporal models in R

stplanr — 0.2.6

Sustainable Transport Planning

taRifx — 1.0.6.1

Collection of Utility and Convenience Functions

tgp — 2.4-14

Bayesian Treed Gaussian Process Models

trip — 1.5.0

Tools for the Analysis of Animal Track Data

tripEstimation — 0.0-44

Metropolis Sampler and Supporting Functions for Estimating Animal Movement from Archival Tags and Satellite Fixes

tripack — 1.3-8

Triangulation of Irregularly Spaced Data

tmap — 2.1-1

Thematic Maps

UScensus2000cdp — 0.03

US Census 2000 Designated Places Shapefiles and Additional Demographic Data

UScensus2000tract — 0.03

US Census 2000 Tract Level Shapefiles and Additional Demographic Data

vardiag — 0.2-1

Variogram Diagnostics

vec2dtransf — 1.1

2D Cartesian Coordinate Transformation

vegan — 2.5-3

Community Ecology Package

Watersheds — 1.1

Spatial Watershed Aggregation and Spatial Drainage Network Analysis

wkb — 0.3-0

Convert Between Spatial Objects and Well-Known Binary Geometry


Task view list