ggmap: Spatial Visualization with ggplot2

In spatial statistics the ability to visualize data and models superimposed with their basic social landmarks and geographic context is invaluable. ggmap is a new tool which enables such visualization by combining the spatial information of static maps from Google Maps, OpenStreetMap, Stamen Maps or CloudMade Maps with the layered grammar of graphics implementation of ggplot2. In addition, several new utility functions are introduced which allow the user to access the Google Geocoding, Distance Matrix, and Directions APIs. The result is an easy, consistent and modular framework for spatial graphics with several convenient tools for spatial data analysis.

David Kahle , Hadley Wickham

CRAN packages used

sp, RgoogleMaps, ggplot2, ggmap, maps, maptools, DeducerSpatial, plyr, rjson, osmar

CRAN Task Views implied by cited packages

Spatial, WebTechnologies, Graphics, Phylogenetics, SpatioTemporal


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Kahle & Wickham, "The R Journal: ggmap: Spatial Visualization with ggplot2", The R Journal, 2013

BibTeX citation

  author = {Kahle, David and Wickham, Hadley},
  title = {The R Journal: ggmap: Spatial Visualization with ggplot2},
  journal = {The R Journal},
  year = {2013},
  note = {},
  doi = {10.32614/RJ-2013-014},
  volume = {5},
  issue = {1},
  issn = {2073-4859},
  pages = {144-161}