Every good artist needs a canvas, and when it comes to displaying geographic data placing those data in context -- on a map -- makes all the difference. A new package for R from Markus Loecher, RgoogleMaps, allows you to download a street or satellite map from Google simply by specifying the bounding latitude/longitude coordinates. (You need to sign up for a free Google API key first, though.) You can then overlay data from objects in R, using tools provided to convert to the map-based coordinate system. Here's an example from the package vignette overlaying the locations of faults (provided as data in the geomapdata package) on a satellite map:
You can find the commands to create this map in R, along with other examples, in the package vignette linked below.
RgoogleMaps package: Vignette: Plotting on Google Static Maps in R (PDF) (via @DataJunkie)


Also, see here for a posting from 2008 to this effect.
Posted by: Avram | January 27, 2010 at 10:07
This is very nice, and I just tested it out on creating some detailed information on a bicycle route (such as local gradients, special symbols every 5 miles, and so on).
However, it is not clear to me if this constitutes legal use. The Google link you provide (with the space before "maps" removed) suggests to me that use on a website (only legal place for this?) needs to directly include a URL, that is a direct link to Google (not just a link to a png file, say).
Also, see (left-hand side of the Google link): Google Static Maps API,Developer's Guide: http://code.google.com/apis/maps/documentation/staticmaps/.
If so, this seems like R would not be a good fit.
Thoughts?
Posted by: Joe Voelkel | March 08, 2010 at 08:48