What this book covers
Chapter 1, The R Environment, introduces the R environment, shows how to install R, and how to use it. Some of the basic concepts related to writing R code are introduced.
Chapter 2, Working with Vectors and Time Series, covers the basic data structure in R, which is vector. The main types of vectors (numeric, character, and logical) as well as basic operations on vectors (such as subsetting and summarizing vector properties) are reviewed. Working with dates and displaying a graphical output, two highly relevant abilities commonly applied later in the book, are also introduced in this chapter.
Chapter 3, Working with Tables, focuses on tables and automated calculations in R. This chapter teaches you how tabular data can be handled and how calculations of a repetitive nature based on tabular data can be carried out using loops and conditional statements. Reshaping and joining tables (vital skills for any data analysis) are also covered.
Chapter 4, Working with Rasters, brings the reader into the realm of spatial data analysis in R, starting with the raster data structure. Basic operations such as import and export, visualization and summary, and subsetting and extraction of raster values are covered here. Simple manipulations of raster values, including assignment, raster algebra, and reclassification are also presented.
Chapter 5, Working with Points, Lines, and Polygons, covers the second type of spatial data structures—vector layers. The basic methodology of working with point, line, and polygon layers is reviewed, followed by the coverage of more advanced operations, including reprojection, geometric calculations, spatial querying, and joining new data to existing layers.
Chapter 6, Modifying Rasters and Analyzing Raster Time Series, covers several advanced themes associated with raster data analysis in R. Geometric modifications of raster data, such as cropping, mosaicking, and aggregating are reviewed. Operations related to cell neighborhoods, including focal filtering, clumping, and topography-related calculations are covered next. Additional themes include resampling, reprojection, and handling of spatio-temporal raster data.
Chapter 7, Combining Vector and Raster Datasets, integrates the material presented in Chapter 5, Working with Points, Lines, and Polygons, and Chapter 6, Modifying Rasters and Analyzing Raster Time Series, by demonstrating how rasters and vector layers can be combined in a single analysis. Transformation between raster and vector data structures as well as data extraction from a raster based on vector layers are covered in this chapter.
Chapter 8, Spatial Interpolation of Point Data, presents the subject of spatial interpolation in R from a practical point of view. Using a real-world case study, several common interpolation methods are applied and evaluated. An automated interpolation procedure is then constructed in order to create a series of interpolated maps from point data.
Chapter 9, Advanced Visualization of Spatial Data, shows readers how to produce publication-quality maps mainly using the popular ggplot2 R package.
Appendix A, External Datasets Used in Examples, provides a summary of the datasets used in the examples.
Appendix B, Cited References, lists the cited resources.