Section 1 Prerequisites

For best results, the user should have the latest version of R (https://www.r-project.org/) and RStudio (https://www.rstudio.com/products/rstudio/download/) installed.

The next step is to install a variet of packages that will be needed for spatial analysis and creating maps in R. We will start with those packages available from CRAN.

The package rgeos currently has a bug that prevents proper installation on some systems. So, we will use the rgeos::install_version() function to install the previous version.

Lastly, we will install the ptolemy package which provides access to the Global High-Resolution Geography for shoreline data. This will provide easy access to basemaps of global land masses. The package is not released to CRAN and so we will use devtools::install_github()

The ptolemy package needs to download and install the source data before you can access the data.

{ install-gshhg, eval = FALSE} ptolemy::install_gshhg()

At this point, you should be ready to proceed with the examples provided in this book. Each chapter is a separate example and each tries to introduce you to elements of the sf and ggplot2 / ggspatial packages that make importing, manipulating, and creating maps in R relatively easy.