ABSTRACT

This chapter discusses the ways to work with spatial data using R and the tidyverse. It focuses on the richness spatial data has, both as a tool for exploratory data analysis about diverse phenomena, and as a way of visualizing and communicating the findings in an attractive and effective way. The chapter also discusses the ways to make different types of maps (both static and animated) from geographical data and its attributes, using the ggplot2 format as a base. Beyond the exploratory and descriptive analysis that can be made with spatial data, these are also of great use for making inference over the relation of various phenomena. Inference based on spatial data starts by recognizing that spatial observations cannot be assumed as mutually independent, since observations that are close to one another tend to be similar. Thus, one needs to pay close attention to the different association patterns that exist in the phenomena that is being studied.