From the course: Data Visualization in R with ggplot2

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Changing map types

Changing map types

From the course: Data Visualization in R with ggplot2

Start my 1-month free trial

Changing map types

- [Narrator] So far we've only been working with the default type of mapping, GG Map. But you can actually use the GG map library to call up many different types of maps. We've been using maps that look a lot like this one. This default map type that GG map uses is called a Terrain Map. It includes major place names and roads, but it also includes geographic terrain features. You can see blue water, green parks, and gray mountains at various locations on the map. Those are terrain features. In R, if we call GG map without telling it what type of map we want, we get a terrain map. Let me go ahead and run this code, that geocodes New York City and pulls up a map of New York City using GG map. And you can see, we have the map that we were just looking at just a moment ago. A terrain map, centered on New York City showing the New York metropolitan area. Now, the same map results if I specify that I would like to use a terrain map, using the map type argument to the get map function. I can…

Contents