Chapter 14


Chapter preview

This chapter describes how to draw geographical maps in R. Drawing maps requires specialized extension packages because there are unique file formats for map data and drawing maps involves special transformations that are not provided by the core graphics systems.

From a purely graphical perspective, drawing a map appears to be simply a matter of rendering one or more polygons that represent the borders of one or more countries, states, or regions. For example, it is not immediately obvious whether Figure 14.1 is just a rectangle, or a map of the State of Colorado.

Figure 14.1

Figure showing a map of the State of Colorado. This could be mistaken for a simple rectangle because a simple map is just a set of polygonal shapes.

A map of the State of Colorado. ...

Get R Graphics, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.