Foreword

  • Output options: ‘pygments’ syntax, the ‘readable’ theme.
  • Snippets and results.


Spatial statistics

Spatial statistics or spatial analysis includes any of the formal techniques which study entities using their topological, geometric or geographic properties.

Spatial analysis includes a variety of techniques, using different analytic approaches and applied in fields as diverse as astronomy, with its studies of the placement of galaxies in the cosmos, to chip fabrication engineering, with its use of “place and route” algorithms to build complex wiring structures and most notably in the analysis of geographic data.

Some ‘spatial’ keywords: dependency or autocorrelation, scaling, sampling, length, locational fallacy, ecological fallacy, geographic space, data analysis, stratified heterogeneity, interpolation, regression, interaction, simulation and modeling, multiple-point geostatistics (MPS), etc.

Hereby: We can see the spread of the bubonic plague through time during the Middles Ages. Beginning with dark orange in the Mediterranean and turning into light yellow in north-east Europe. Green areas were almost unaffected. The map depicts the ‘descriptive spatial statistics’. We could go further and build models linking the spread to trade routes, population densities, terrains, etc. Green areas appear to be isolated (mountains, dense forests) except West Flanders were far from being isolated. Why?*

Above: John Snow and his analysis of the cholera outbreak in Soho, London, in 1854.

Above: Charles Joseph Minard and his information graphic depicting Napoleon’s disastrous Russian campaign of 1812.

Notes from A Primer for Spatial Econometrics

A Primer for Spatial Econometrics with Applications in R, Palgrave Macmillan, 2014.

  • Chapter 1, The Classical Linear Regression Model
  • Chapter 2, Some Important Spatial Definitions
  • Chapter 3, Spatial Linear Regression Models
  • Chapter 4, Further Topics in Spatial Econometrics
  • Chapter 5, Alternative Model Specification for Big Datasets
  • Chapter 6, Conclusion: What’s Next?

Cases from the book

The cases are taken from the book examples and exercises.

  • Case 1, Italy macroeconomics
    • 1a, The Barro and Sala-i-Martin model of regional convergence model
    • 1b, Okun’s Law for the 20 Italian regions
    • 1c, Phillips curve for the 20 Italian regions
  • Case 2: UK macroeconomics
  • Case 3: US and spatial analyses (used car price and taxes in 48 states)
  • Case 4: House price determinants in Boston
  • Case 5: The determinants of educational achievement in Georgia
  • Case 6: EU, the impact of education & Hi-tec exports
  • Case 7: The determinants of crime in Columbus, Ohio
  • Case 8: Luxury houses in Baltimore, Maryland
  • Case 9: Health in Mexico

A grid of the topics by case

1-3

Topic Case 1, Italy macroeconomics Case 2, UK macroeconomics Case 3, US and spatial analyses
compute W matrix from a vector file x x
compute W matrix with a .GAL file x x
GWR
Logit/Probit
map from maps x
map from vector files, centroids x x
map from UTM, XY coordinates other than lat/lon
map with ggplot2
MESS
Moran scatterplot x
Moran’s I test x x x
OLS x x x
OLS tests x x x
OpenStreetMap
residuals and spatial residuals analysis x
SAR x x
SARAR, heteroscedastic, non-parametric
SARAR, heteroscedastic, parametric
SARAR, homescedastic
SEM x x
SLM x
spatial analysis
spatial autocorrelation test x
spatial error tests x
Spatial Probit GMM
Spatial Probit LGMM
Spatial Probit ML
spatial residuals dependence x
spatial residuals dependence test
what is a W matrix, what it does (the spatial lag) x x
what is spatial autocorrelation x

4-6

Topic Case 4, House price determinants in Boston Case 5, The determinants of educational achievement in Georgia Case 6, EU, the impact of education & Hi-tec exports
compute W matrix from a vector file x
compute W matrix with a .GAL file x
GWR x x
Logit/Probit x
map from maps x x
map from vector files, centroids x
map from UTM, XY coordinates other than lat/lon x x
map with ggplot2 x x
MESS x
Moran scatterplot
Moran’s I test
OLS x x
OLS tests x
OpenStreetMap x
residuals and spatial residuals analysis x
SAR
SARAR, heteroscedastic, non-parametric
SARAR, heteroscedastic, parametric x
SARAR, homescedastic x x
SEM x x
SLM x x
spatial analysis x x
spatial autocorrelation test x
spatial error tests
Spatial Probit GMM x
Spatial Probit LGMM x
Spatial Probit ML x
spatial residuals dependence
spatial residuals dependence test x
what is a W matrix, what it does (the spatial lag)
what is spatial autocorrelation

7-9

Topic Case 7, The determinants of crime in Columbus, Ohio Case 8, Luxury houses in Baltimore, Maryland Case 9, Health in Mexico
compute W matrix from a vector file x x x
compute W matrix with a .GAL file
GWR
Logit/Probit x
map from maps
map from vector files, centroids x x
map from UTM, XY coordinates other than lat/lon x x
map with ggplot2
MESS x
Moran scatterplot x
Moran’s I test x
OLS
OLS tests
OpenStreetMap
residuals and spatial residuals analysis
SAR
SARAR, heteroscedastic, non-parametric x
SARAR, heteroscedastic, parametric x
SARAR, homescedastic x
SEM
SLM x
spatial analysis
spatial autocorrelation test
spatial error tests
Spatial Probit GMM x
Spatial Probit LGMM x
Spatial Probit ML x
spatial residuals dependence
spatial residuals dependence test
what is a W matrix, what it does (the spatial lag)
what is spatial autocorrelation

Chapter 1, The Classical Linear Regression Model (notes)

Cases: 1a, 1b, 1c, 2 / Packages: sp & spdep

The basic linear regression model (OLS) with thenormality of the disturbances (residuals): homoscedasticity and no autocorrelation. The presence of non-normal residuals(the Jarque-Bera test), heteroscedasticity (the Breusch-Pagan test), and autocorrelation (the Durbin-Watson test) is a ‘sign’ that something is wrong, but not necessarily a violation of the OLS assumptions; it is symptomatic of spatial autocorrelation.

Chapter 2, Some Important Spatial Definitions (notes)

Cases: 1a, 1b, 1c, 3, 6 / Packages: sp & spdep

Tobler’s First Law of Geography:

“Everything is related to everything else, but near things are more related than distant things.”

Spatial autocorrelation is the formal property that measures the degree to which near and distant things are related. Spatial data needs to be geo-coded for location (coordinates, borders, distance).

We can relate things with a neighbour weights W matrix or spatial weight W matrix and capture spatial autocorrelation. The spatial weight matrix provides the structure of the spatial relationship among observations. The spatial matrix defines neighbours (observations that are spatially close) and their effects.

Spatial econometrics accounts for the presence of spatial effects in regression analysis. Spatial econometrics is used in regional science, urban and real estate economics and economic geography.

For example, real estate economics: house prices depend on the number of bedrooms, bathrooms, etc. House prices also depend on location; prices of houses in the same neighborhood are similar.

Spatial weight matrix can be based on contiguity or on distance. For farmland value, neighbors that are based on distance may be more appropriate, but for residential housing values, neighbors based on contiguity (or neighbourhood block) may be more appropriate.

Spatial autocorrelation

A chessboard is a perfect example of ‘no autocorrelation’. Black and white tiles alternate, both horizontally and vertically, in a regular fashion.

There is spatial autocorrelation when we can find ‘clusters’. On the chessboard: we would have groups of several black tiles or white tiles.

On a map of Italy, for example, we saw a clear difference between the North and the South. If there was no spatial correlation, the squares and triangles in the plot would be evenly distributed. across the regression line.

We can build matrices to capture contingencies. On a chessboard, all tiles are surrounded. Corner tiles have two neighbours, two contiguous sides. Central tiles have four neighbours. However, maps are not perfect 8x8 chessboards. We cannot easily pinpoint irregular polygons.

Here we have a special chessboard consisting of 8 distinct regions. Unlike a regular chessboard, the polygons are irregular; more like a map.

We first need to list all the regions or units on the ‘map’.

We then build a matrix: a spatial weight matrix or the W matrix.

The W matrix accounts for all regions and specifies how each region is related to the other regions. Contiguous (‘1’) or not (‘0’).

The corresponding W matrix can be calculated with various criteria: adjacency (touching), nearest neighbour, distance < 2, etc. The next W matrix accounts for adjacency in our special chessboard.

##   1 2 3 4 5 6 7 8
## 1 0 1 1 1 1 0 0 0
## 2 1 0 1 1 0 0 0 0
## 3 1 1 0 1 1 1 1 1
## 4 1 1 1 0 0 0 0 0
## 5 1 0 1 0 0 1 0 0
## 6 0 0 1 0 1 0 1 1
## 7 0 0 1 0 0 1 0 1
## 8 0 0 1 0 0 1 1 0

We can capture spatial correlation amongst OLS residuals with a W matrix.

The Moran’s I test

The most widely used test for spatial autocorrelation is the Moran’s I test where:

\(H_0\): ‘no spatial autocorrelation’ among regression residuals.

We had an overview of this test in the Barro sub-case.

The test is similar to the Durbin-Watson test for lagged values in time series. In fact, the Durbin-Watson is a special case of the Moran’s I test. Rather than having \(y_t\) correlated with \(y_{t-1}\) (or lagged value in a ‘1-dimensional’ time series), we have correlated spaces in a ‘2-dimensional’ plane.

Let us apply the Moran’s I test to our cases.

First, we specify the W matrix by contiguity.

As a neighbourhood criterion, we consider the maximum threshold distance in order to include the two islands that would otherwise be isolated with a simple contiguity criterion.

Methodology

  1. Run an OLS regression. Run tests. If the residuals appear to show signs of non-normality, heteroscedasticity or autocorrelation, we can consider spatial regressions as alternatives.
  2. Choose a neighborhood criterion. Which areas are linked?
  3. Assign weights to the areas that are linked. Create a spatial weights W matrix.
  4. Run statistical tests to examine spatial autocorrelation. We use the W matrix and confirm the presence of spatial autocorrelation (Moran’s I test, Moran scatterplot, semi-variogram plot, etc.)
  5. Run a spatial regression(s).

Chapter 3, Spatial Linear Regression Models (notes)

  • The Spatial Autoregressive with Autoregressive (SARAR) error model.
  • The ‘pure’ Spatial Autoregression (SAR).
  • The Spatial Lag Model (SLM).
  • The Spatial Error Model (SEM).

The complete spatial model

Cases: 4 / Packages: sp & spdep

The OLS (as a comparison)

\[y = x\beta + \varepsilon\]

  • \(y\) is a vector for the dependent variable.
  • \(x\) is a matrix of explanatory variables by observations.
  • \(\varepsilon\) is the vector of error terms, the disturbances or the residuals.
  • In an OLS model, the variables capture most of the ‘explained’ variability of the \(y\) ~ \(x\) relationship. The ‘unexplained’ variability is captured by the error term \(\varepsilon\).
  • Following the OLS results, we can run Lagrange Multiplier tests (LM tests) with command lm.LMtests using option test = "all" to compute the Lagrange multiplier diagnostics for spatial dependence. If we detect problems with the OLS model with tests that reject the normality and the homoscedasticity of the residuals, we might have symptoms of spatial autocorrelation. Before computing the W matrix, the Moran test or running any spatial model, we can run the LM tests on the OLS results. The LM tests have a null hypothesis of no spatial autocorrelation of the residuals and use the SLM and the SEM as alternatives. We obtain 4 results (for the SEM, the SLM, the robust SEM, and the robust SLM). We might fail to reject the null hypothesis on the SEM, but we can reject it on the SLM. We also confirm the 2 previous results with the robust versions (4 tests in total). These results then indicate what spatial model to opt for. Nonetheless, there are more than the SEM and the SLM.

The complete spatial model or the spatial general form of the Spatial Autoregressive with Autoregressive (SARAR) error model

\[y = \rho Wy + x\beta + u~~~~~~~~~~|\rho| < 1\]

\[u = \lambda Wu + \varepsilon~~~~~~~~|\lambda|<1\]

  • \(\rho\) is the moving average parameter, the spatial effect, the smoothing factor or the spatial coefficient.
  • \(\lambda\) is the spatial autoregression parameter, the spatial dependence parameter or the spatial error coefficient.
  • \(\varepsilon\) is the vector of error terms, the disturbances or the residuals, spatially weighted.
  • When estimating a model, not only do we estimate the coefficients for the explanatory variables, but also these parameters. They must be statistically significant. If so, we can interpret the coefficient as the effect of the variable/parameter on \(y\). We can measure the local effect and error as well as the ‘neighbouring’ effects and the spatial error.
  • In spatial models, \(\rho\) captures some of the ‘explained’ variability: the effect of \(x\) on \(y\) in one region combined with the neighbouring \(x\) effects. It is similar to time series where a moving average integrates lagging \(x\) values with the current \(x\) value to forecast \(y\).
  • Therefore, the error term \(\varepsilon\) includes the unexplained variability and the unexplained spatial variability. In other words, \(\lambda W\) smoothes the neighbouring values or ‘regional effect’ while \(\varepsilon\) becomes the location-specific error.
  • The results provide the \(\sigma^2\), the single variance parameter and the Wald test with the null hypothesis that both parameters are equal to 0.

The SARAR model can be estimated with the homoscedastic variance (this chapter). In Chapter 4, we cover other SARAR models with heteroscedastic-parametric variance and heteroscedastic-non-parametric variance.

Variations

  1. \(\beta = 0\), \(\rho \neq 0\), \(\lambda \neq 0\); the Spatial Autoregressive with Autoregressive (SARAR) error model.
  2. \(\beta = 0\) and either \(\lambda\) or \(\rho\) = 0; the ‘pure’ Spatial Autoregression (SAR).
  3. \(\rho = 0\), \(\lambda \neq 0\); the Spatial Lag Model (SLM).
  4. \(\rho \neq 0\), \(\lambda = 0\); the Spatial Error Model (SEM).

The Spatial Autoregressive with Autoregressive (SARAR) error model

Cases: 4, 6 / Packages: sp & spdep

  • The SARAR(1,1) encompasses all the aspects of the SAR, the SLM, and the SEM.
  • \(\rho\) is the moving average parameter, the spatial effect, the smoothing factor or the spatial coefficient.
  • \(\lambda\) is the spatial autoregression parameter, the spatial dependence parameter or the spatial error coefficient.
  • \(\varepsilon\) is the vector of error terms, the disturbances or the residuals, spatially weighted.

We set \(\beta = 0\):

\[y = \rho Wy + u~~~~~~~~~~|\rho| < 1\]

\[u = \lambda Wu + \varepsilon~~~~~~~~|\lambda|<1\]

After rearranging the equations, we estimate the model using Maximum Likelihood (ML), a spatial version of the 2-Stage Least Squares (GS2SLS) estimator or the Lee’s Instrumental Variable (LIV) estimators also known as the Best Feasible GS2SLS (BFGS2SLS).

The ‘pure’ Spatial Autoregression (SAR)

Cases: 1c, 3, 4 / Packages: sp & spdep
  • The ‘pure’ SAR simply captures the neighbouring effects without any explanatory variable(s). It’s a SLM or a SEM without \(x\).
  • \(\rho\) is the moving average parameter, the spatial effect, the smoothing factor or the spatial coefficient.
  • \(\lambda\) is the spatial autoregression parameter, the spatial dependence parameter or the spatial error coefficient.
  • \(\varepsilon\) is the vector of error terms, the disturbances or the residuals, spatially weighted.

When \(\beta = 0\) and either \(\lambda = 0\) or \(\rho = 0\).

When \(\lambda = 0\):

\[y = \rho Wy + \varepsilon~~~~~~~~~~|\rho| < 1\]

When \(\rho = 0\):

\[y = \lambda Wy + \varepsilon~~~~~~~~~~|\lambda| < 1\]

After rearranging the equations, we estimate the model using Maximum Likelihood (ML).

We can also generalize the model.

The Spatial Lag Model (SLM)

Cases: 4, 6 / Packages: sp & spdep
  • It incorporates spatial effects by including a spatially lagged dependent variable as an additional predictor: spatial interactions.
  • We ‘know’ the structure of the spatial relationships.
  • For example, the price of houses depends on several variables \(x\) and on the price of neighbouring houses (location-location-location!).
  • \(\rho\) is the moving average parameter, the spatial effect, the smoothing factor or the spatial coefficient.
  • \(\lambda\) is the spatial autoregression parameter, the spatial dependence parameter or the spatial error coefficient.
  • \(\varepsilon\) is the vector of error terms, the disturbances or the residuals, spatially weighted.

When \(\rho \neq 0\) and \(\lambda = 0\), the model becomes:

\[y = \rho Wy + x\beta + \varepsilon~~~~~~~~~~|\rho| < 1\]

If \(\rho = 0\), there is no spatial dependence and \(y\) does not depend on neighbouring y values.

After rearranging the equations, we estimate using Maximum Likelihood (ML). There is also a 2-Stage Least Squares (2SLS) estimator.

The Spatial Error Model (SEM)

Cases: 3, 4, 6 / Packages: sp & spdep
  • It corrects for spatial autocorrelation due to the use of spatial data. We do not know the structure of the spatial relationships. The error term accounts for unobservable features or omitted variables associated with a location in the real estate model, for instance.
  • Another example is the technological innovation affecting neighbours. Neighbours imitate their neighbours when adopting a new technology, but we can’t measure the effect (yet); the effect is captured by the spatial error component.
  • \(\rho\) is the moving average parameter, the spatial effect, the smoothing factor or the spatial coefficient.
  • \(\lambda\) is the spatial autoregression parameter, the spatial dependence parameter or the spatial error coefficient.
  • \(\varepsilon\) is the vector of error terms, the disturbances or the residuals, spatially weighted.

When \(\rho = 0\) and \(\lambda \neq 0\), the model becomes:

\[y = x\beta + u\] \[u = \lambda Wu +\varepsilon~~~~~~~~|\lambda|<1\]

If \(\lambda = 0\), there is no spatial autocorrelation among errors.

After rearranging the equations, we estimate the model using Maximum Likelihood (ML). We can also generalize the model with a Feasible Generalized Least Squares (FGLS) estimator.

Chapter 4, Further Topics in Spatial Econometrics (notes)

Spatial heteroscedasticity

Cases: 6, 7 / Packages: sphet

We can think of time series as unidimensional, and spatial data as bidimensional. Nonetheless, time series and spatial data share similarities. Spatial data are observed within 2D frameworks that are different from time series.

We can detect autocorrelation of the time series residuals with the Durbin-Watson test. The test is derived from the Moran’s I test for detecting spatial autocorrelation.

Apart from autocorrelation, we know variance can be uneven in time series. This is a violation of another basic assumption, but we can correct this violation with ARCH and GARCH models1.

We have the same concept with spatial data: larger variances in larger areas, thus heteoroscedasticity of the disturbances or residuals. In spatial econometrics, we address the issue with the heteroscedastic SARAR model. We can estimate the model with a modified GS2SLS estimator or the Heteroscedastic Autocorrelation Consistent (HAC) estimator.

Spatial models for binary response variables

Cases: 6, 8 / Packages: McSpatial

Logit and probit are models where the dependent variable \(y\) is either 1 or 0. We also have spatial logit, or spatial autologistic model, and spatial probit. We can estimate these models with the ML, the GMM or the Linearized GGM (LGMM).

Spatial panel data models

Panel data can have a large number of cross-sectional units observed over a few points in time (short panels, typical of microdata), a limited number of relatively long time series (long panels, or pooled time series, typical of financial or macroeconomics data), or even a balanced behaviour between the two dimensions. The typical panel leans towards short time series with large spatial dimensions as it usually consists in repeated observation over a sizable cross-section of spatially referenced data, such as countries of the world, regions within a country or geographical areas.

Panel data are used to control for unobserved heterogeneity related to individual-specific, time-invariant characteristics which are difficult or even impossible to observe but might lead to biased or inefficient estimates of the parameters of interest if omitted.

We can have models with fixed effects and with random effects.

Spatial panels are a special where data are observed on two dimensions: across spatial units and over time.

There are spatial panel models with random effects and with fixed effects. They can be panel SEM or SLM.

Spatial time series

All the models above describe the relationships between variables as a mechanism that is stationary over the various geographical units.

In many empirical situations, it is unreasonable to believe that a relationship between two variables is constant in the whole geographical area and it is more sensible to conjecture that varies in the space according to some regular pattern.

The relationship between \(x\) and \(y\) should be different in each geographical unit, in other words, it should be non-stationary. We can consider alternative modeling frameworks such as the Geographically-weighted Regressions (GWR).

Geographically-weighted Regressions (GWR)

Cases: 4, 5 / Packages: spgwr

Given a dataset, covering an area or a sample, Geographically-weighted Regressions (GWR) consider sub-samples that are close geographically and perform some statistical computations within these sub-samples.

We estimate GWR model using a Gauss kernel.

Chapter 5, Alternative Model Specification for Big Datasets (notes)

Big Data and the Matrix Exponential Spatial Specification (MESS)

Cases: 4, 9

Many datasets have more than 3000 observations and requiring the inverse of a W matrix of dimension 3000x3000. This is still nothing compared to many other geo-referenced economic data such as the observation related US establishments provided by the census bureaus which refer to millions individual geo-located firms.

Other examples include satellite images used in land cover assessment or high-resolution medical images where spatial econometric technique have to accommodate millions of spatially dependent observations composed of pixilated imagery. Furthermore, the data available in human genome mapping display spatial dependence and involve millions of observations.

The future demand for big spatial data will increase further and so will the demand for developing appropriate methods for analyzing these new data sources.

Advancements in IT speed up the calculation of many time-intensive procedures. On the other hand, new techniques have concentrated on the specification of alternative models which depart from the conventional spatial autoregressive class with the specific aim of reducing the computational obstacles. One of these alternative specifications is the Matrix Exponential Spatial Specification (MESS).

Anisotropies

The autoregressive models have a common characteristic. They are based on the general definition of the spatially lagged variables. The spatial lag is defined as the average of the dependent variable observed in all locations that are neighbours any given location. It implied that direction does not matter in that all the neighbours (whatever their position with respect to the given location) contribute in the same way to the lagged variable. This hypothesis is known as isotropy.

The concept of isotropy derives from physics and implies that the dependence structure does not present directional biases or preferred directions. When dealing with spatial data in meteorology, geology or in other physical phenomena (where the direction is of paramount importance), we face anisotropy or asymmetry of spatial relationships.

Anisotropy is the property of being directionally dependent, which implies different properties in different directions, as opposed to isotropy. It can be defined as a difference when measured along different axes.

An example of anisotropy is wood, which is easier to split along its grain than against it. In medical imaging applications, anisotropy is proven to be a good predictor of cancer risks.

Directional biases can be observed in many empirical circumstances, such as in the dynamic pattern of house prices, in the many economic variables observed in the US with reference to dependencies along the coasts (North-South) to the internal states (East-West), or in the EU in the different dependencies between the center and the periphery and vice-versa.

The problem with anisotropic model is the preprocessing time and computing power needed to estimate the coefficients. Instead of one W matrix for 20 regions, for example, we need 20 W matrices. Each matrix is built from the perspective of each region towards the rest of the regions.

We can make the hypothesis of isotropy and simplify the calculations with unilateral approximations. The results provide the same inferential information.

The unilateral spatial lag model relies on predecessors-neighbours variables; similar to what happens in times series analysis (the likelihood of the model can be easily factorized as the product of the conditional densities of each of the variables). We can, in fact, use a k-nearest neighbours’ list to derive the W matrix.

We can also use the same matrix to assess the MESS.

Other advanced topics

We can also consider an inferential approach based on a particular form of composite likelihood termed pairwise likelihood. Bivariate Marginal Likelihood (BML) approach to SEM are estimated with Monte Carlo.



A review of spatial statistics, geostatistics, and geoprocessing

Spatial statistics is a rapidly expanding topic with applications in so many diverse fields that it is impossible to enumerate all the discipline.

Indeed, in recent years we can find applications in fields such as regional economics, criminology, public finance, industrial organization, political science, psychology, biology & ecology (diseases, epidemics), agricultural sciences, health, demography, epidemiology, management, urban planning, education, land use, social sciences, economic development, innovation diffusion, environment, history, resources and energy, transportation, food, real estate, marketing, social medias and many others.

Users want to perform causal analyses (econometrics, biometrics, chemometrics, etc.), predictive modeling, cluster analyses, policy analyses and manage large datasets (from social medias, geolocation data, and other metadata) can do it with spatial analysis techniques.

The main applications are real estate economics, farmland valuation, agriculture economics and discriminatory pricing (marketing). In all these fields, the physical distance and interactions are important. We can find missing values. Spatial statistics can be used to interpolate values according to coefficients. We can assess over/undervaluations.

Promising applications are outside the geographic framework. A map can be anything. Principal Component Analysis reduces several dimensions (several variables) to bidimensional planes (the two principal components) or ‘maps’. Medical imagery ‘slices the brain’ in several layers or ‘maps’. These ‘maps’ have features and these features are regions, units, centroids, etc.

GIS

GIS software are either open-source (PostGIS, QGIS, GeoDa) or commercial (ArcGIS, MapInfo). They can be used on a standalone basis (by loading data from files or by linking to databases or online sources). We can also create and run scripts to automate things.

  • The ESRI Guide to GIS Analysis Volume 1: Geographic Patterns & Relationships, Esri Press, 1st edition, 1999.
  • The Esri Guide to GIS Analysis, Volume 2: Spatial Measurements and Statistics, Esri Press, 1st edition, 2005.
  • The Esri Guide to GIS Analysis, Volume 3: Modeling Suitability, Movement, and Interaction, Esri Press, 1st edition, 2012.

These are not software manuals, and they avoid any particular GIS. They should be useful to professionals who are concerned about interoperability across different brands, because of its focus on the basic principles of simple spatial analysis rather than on any one software product. (1) The first volume gives readers information on how to conduct accurate analysis using powerful GIS software tools. (2) The concepts and methods presented in this volume will allow users to unleash the full analytic power of their GIS. The most commonly used spatial statistical tools are described in detail along with their applications in a range of disciplines, from crime analysis to habitat conservation. GIS users will learn how features are distributed, how to analyze the pattern created by the features, and how to determine the relationships between them. Four general statistical concepts are discussed, including testing statistical significance, defining spatial neighborhoods and weights, and using statistics with spatial data. Advice on determining which statistical tool to use in a given situation is also provided. (3) This book shows readers how they can explore spatial interaction, site selection, routing, and scheduling, and explains how to best interpret the results of the analysis. With full-color maps and illustrations and sample applications, this book will help students studying GIS and professional GIS analysts better use models to evaluate locations and analyze movement.

There plenty of manuals focusing on one specific software.

Code in R and Python

We can achieve a great deal with R packages and Python libraries. We can interact with GIS software, online mapping tools, and Google Earth as well.

A Primer for Spatial Econometrics: With Applications in R, Palgrave Macmillan, 2014.

This book aims at meeting the growing demand in the field by introducing the basic spatial econometrics (statistics and geostatistics) methodologies. It provides a practical guide that illustrates the potential of spatial econometric modeling, discusses problems and solutions and interprets empirical results.






An Introduction to R for Spatial Analysis and Mapping, SAGE Publications, 2015.

In an age of big data, data journalism and with a wealth of quantitative information around us, this is an excellent and student-friendly text in the teaching and development of spatial analysis. It shows clearly why the open source software R is not just an alternative to commercial GIS, it may actually be the better choice for mapping, analysis and for replicable research. Providing practical tips as well as fully working code, this is a practical ‘how to’ guide ideal for undergraduates as well as those using R for the first time.




Spatial Statistics and Geostatistics: Theory and Applications for Geographic Information Science and Technology, SAGE Publications, 2013.

The text focus is on spatial statistics as a distinct form of statistical analysis and it includes computer components for ArcGIS, R, SAS, and WinBUGS. The teaching and learning objective of the text is to illustrate the use of basic spatial statistics and geostatistics, as well as the spatial filtering techniques used in all the relevant programs and software. Fully explanatory, the book uses boxed computer code, diagrams, illustrations; and includes further readings. Case study and exemplary materials and data sets are also included. The text is a systematic overview of the canonical spatial statistical and geostatistical methods. It explains and demonstrates methods and techniques in spatial sampling; spatial autocorrelation; spatial composition (heterogeneity, homogeneity) and configuration (contiguity), spatially adjusted regression and related spatial econometrics; local statistics: hot and cold spots; geostatistics and related techniques in measuring spatial variance and covariance; and methods for spatial interpolation in two-dimensions. A concluding section discusses advanced topics in spatial statistics: these include Bayesian methods, the Monte Carlo simulation, and error and uncertainty.


Applied Spatial Data Analysis with R, Springer, 2013.

Applied Spatial Data Analysis with R, second edition, is divided into two basic parts, the first presenting R packages, functions, classes, and methods for handling spatial data. This part is of interest to users who need to access and visualize spatial data. Data import and export for many file formats for spatial data are covered in detail, as is the interface between R and the open source GRASS GIS and the handling of spatio-temporal data. The second part showcases more specialized kinds of spatial data analysis, including spatial point pattern analysis, interpolation and geostatistics, areal data analysis and disease mapping. The coverage of methods of spatial data analysis ranges from standard techniques to new developments, and the examples used are largely taken from the spatial statistics literature. All the examples can be run using R contributed packages available from the CRAN website, with code and additional data sets from the book’s own website. Compared to the first edition, the second edition covers the more systematic approach towards handling spatial data in R, as well as a number of important and widely used CRAN packages that have appeared since the first edition.



Learning R for Geospatial Analysis, Packt Publishing, 2014.

Learn how to efficiently analyze geospatial data with R. For GIS analysts, researchers, educators, and students who work with spatial data and who are interested in expanding their capabilities through programming. The book assumes familiarity with the basic geographic information concepts (such as spatial coordinates), but no prior experience with R and/or programming is required. Make inferences from tables by joining, reshaping, and aggregating. Familiarize yourself with the R geospatial data analysis ecosystem. Prepare reproducible, publication-quality plots and maps. Efficiently process numeric data, characters, and dates. Reshape tabular data into the necessary form for the specific task at hand. Write R scripts to automate the handling of raster and vector spatial layers. Process elevation rasters and time series visualizations of satellite images. Perform GIS operations such as overlays and spatial queries between layers. Spatially interpolate meteorological data to produce climate maps.


Displaying Time Series, Spatial, and Space-Time Data with R, Chapman and Hall/CRC, 2014.

Focusing on the exploration of data with visual methods, the book presents methods and R code for producing high-quality graphics of time series, spatial, and space-time data. Practical examples using real-world datasets help you understand how to apply the methods and code. The book illustrates how to display a dataset starting with an easy and direct approach and progressively adding improvements that involve more complexity. Each of the book’s three parts is devoted to different types of data. In each part, the chapters are grouped according to the various visualization methods or data characteristics. Along with the main graphics from the text, the author’s website offers access to the datasets used in the examples as well as the full R code. This combination of freely available code and data enables you to practice with the methods and modify the code to suit your own needs.


Spatial Analysis: Statistics, Visualization, and Computational Methods, CRC Press, 2015.

An introductory text for the next generation of geospatial analysts and data scientists, Spatial Analysis: Statistics, Visualization, and Computational Methods focuses on the fundamentals of spatial analysis using traditional, contemporary, and computational methods. Outlining both non-spatial and spatial statistical concepts, the authors present practical applications of geospatial data tools, techniques, and strategies in geographic studies. They offer a problem-based learning (PBL) approach to spatial analysis―containing hands-on problem-


Geoprocessing with Python, Manning Publications, 2016.

This book is about the science of reading, analyzing, and presenting geospatial data programmatically, using Python. Thanks to dozens of open source Python libraries and tools, you can take on professional geoprocessing tasks without investing in expensive proprietary packages like ArcGIS and MapInfo. Access available datasets to make maps or perform your own analyses using free tools like the GDAL, NumPy, and matplotlib Python modules. Through lots of hands-on examples, you’ll master core practices like handling multiple vector file formats, editing geometries, applying spatial and attribute filters, working with projections, and performing basic analyses on vector data. The book also covers how to manipulate, resample, and analyze raster data, such as aerial photographs and digital elevation models.


There are more books about Python that integrate spatial statistics with data mining, predictive modeling, and machine learning techniques.



  1. ARCH means Autoregressive Conditional Heteroskedasticity and GARCH is the generalized form.