Nowadays such lack of geographic data is hard to imagine.Every smartphone has a global positioning (GPS) receiver and a multitude of sensors on devices ranging from satellites and semi-autonomous vehicles to citizen scientists incessantly measure every part of the world.The rate of data produced is overwhelming.An autonomous vehicle, for example, can generate 100 GB of data per day (The Economist ).Remote sensing data from satellites has become too large to analyze the corresponding data with a single computer, leading to initiatives such as OpenEO.

    R is a multi-platform, open source language and environment for statistical computing and graphics ().With a wide range of packages, R also supports advanced geospatial statistics, modeling and visualization.New integrated development environments (IDEs) such as RStudio have made R more user-friendly for many, easing map making with a panel dedicated to interactive visualization.

    Another example showing R’s flexibility and evolving geographic capabilities is interactive map making.As we’ll see in Chapter 8, the statement that R has “limited interactive [plotting] facilities” (Bivand, Pebesma, and Gómez-Rubio ) is no longer true.This is demonstrated by the following code chunk, which creates Figure 1.1 (the functions that generate the plot are covered in Section ).

    It would have been difficult to produce Figure 1.1 using R a few years ago, let alone as an interactive map.This illustrates R’s flexibility and how, thanks to developments such as knitr and leaflet, it can be used as an interface to other software, a theme that will recur throughout this book.The use of R code, therefore, enables teaching geocomputation with reference to reproducible examples such as that provided in Figure rather than abstract concepts.