Chapter 14

All Over the Map

IN THIS CHAPTER

check Using geographic data

check Mapping a state

check Mapping the country

As you might have gathered from glancing at this book’s table of contents, one of R’s major calling cards is its emphasis on visualization. Beginning with plots of analytic results, R’s graphics capabilities have evolved into map development.

R graphics honchos have created several ways of drawing maps. In this chapter, I show you the one that I think is the most straightforward and will get you on the road to Rtography. (See what I did there?)

Project: The Airports of Wisconsin

The map I show you how to draw in this project appears in Figure 14-1. It shows the locations of the major airports in Wisconsin, and includes the cities they serve, the FAA abbreviations, and the number of enplanements (commercial passenger boardings) in 2013.

image

FIGURE 14-1: The major airports of Wisconsin.

Dispensing with the preliminaries

This project requires a package called maps that enables you to draw all kinds of geographic representations. Another necessary package is ggmap, which enables you to ...

Get R Projects For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.