README.md

grayscaleMap

This is a modification of the code from the R package ggmap which removes the labels and colors from Google maps. This is useful because plots using the maps are easier to understand. Using it is exactly the same as with ggmap.

Installation

if (!require(devtools)) install.packages("devtools")
devtools::install_github("walshc/grayscaleMap")

Usage Example

map <- get_grayscale_map("Boston", zoom = 13)
df <- data.frame(lon   = rnorm(100, mean = -71.07, sd = 0.01),
                 lat   = rnorm(100, mean = 42.35,  sd = 0.01),
                 value = sample(LETTERS[1:5], 100, replace = TRUE))
ggmap(map) + geom_point(data = df, aes(lon, lat, color = value)) +
  theme(axis.text  = element_blank(),
        axis.ticks = element_blank(),
        axis.title = element_blank())


walshc/grayscaleMap documentation built on May 29, 2019, 9:57 a.m.