4 Making Maps

In ArcGIS, the fundamental approach to working with data is through a visual interface. The first thing that happens when you import a dataset into an ArcGIS project is that you get an interactive map visualizing that data. In R on the other hand, when you import a dataset into your project you have only created a connection to that dataset, and may it will be read into your computer’s memory. To visualize your data (which you should do frequently), you need an extra step. This difference between R and ArcGIS is probably what makes ArcGIS so approachable and R so intimidating for beginners. But making a quick visualisation of your geodata is very easy in R, it sometimes just takes a simple line of code. In R, we have to differentiate two different types of outputs: Static maps which can be printed on paper and dynamic maps which you can interact with. Static maps are usually stored in JPG, Tiff of PDF Format which dynamic maps are rendered using html, and javascript. In the beginning, you don’t have to worry about these formats because RStudio automatically displays the maps in the correct pane (“Plot” for static maps and “Viewer” for dynamic maps).

A dynamic map is what you get “for free” in ArcGIS within your “Map Window,” a Static map is what you would get when you export a “Layout” to jpg or pdf to use in a report.

Prerequisite: Before you start making maps, you will have to familiarize yourself with importing raster or vector data into R. Read chapter 3 to get up to speed.