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
.
if (!require(devtools)) install.packages("devtools")
devtools::install_github("walshc/grayscaleMap")
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())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.