Spatial Data Science introduces fundamental aspects of spatial data that every data scientist should know before they start working with spatial data. These aspects include how geometries are represented, coordinate reference systems (projections, datums), the fact that the Earth is round and its consequences for analysis, and how attributes of geometries can relate to geometries. In the second part of the book, these concepts are illustrated with data science examples using the R language. In the third part, statistical modelling approaches are demonstrated using real world data examples. After reading this book, the reader will be well equipped to avoid a number of major spatial data analysis errors.
The book gives a detailed explanation of the core spatial software packages for R: sf for simple feature access, and stars for raster and vector data cubes – array data with spatial and temporal dimensions. It also shows how geometrical operations change when going from a flat space to the surface of a sphere, which is what sf and stars use when coordinates are not projected (degrees longitude/latitude). Separate chapters detail a variety of plotting approaches for spatial maps using R, and different ways of handling very large vector or raster (imagery) datasets, locally, in databases, or in the cloud. The data used and all code examples are freely available online from https://r-spatial.org/book/. The solutions to the exercises can be found here: https://edzer.github.io/sdsr_exercises/.