O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

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

How it works...

First, we load the RgoogleMaps package. Then we determine the latitude and longitude of the location for which we want a map. Next, we use the GetMap function to acquire and store the map in an R variable called shu.map. The zoom option controls the zoom level of the returned map. The zoom=1 option gives the whole world, and zoom=17 covers a square area approximately a quarter of a mile on each side. Finally, we plot the map using the PlotOnStaticMap function.

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