O'Reilly logo

R Projects For Dummies by Joseph Schmuller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required