data(london_boroughs)
## Not run: 
# # install.packages("ggplot2")
# # install.packages("RColorBrewer")
# library(ggplot2)
# library(RColorBrewer)
# data(murders)
# LB          <- london_boroughs
# mtab        <- table(murders$borough)
# LB$nmurders <- rep(mtab, rle(as.character(LB$name))$lengths)
# p           <- ggplot()
# p +
#   geom_polygon(data=LB, aes(x=x, y=y, group = name, fill = nmurders),
#                colour="white" ) +
#   scale_fill_gradientn(colours = brewer.pal(7, "Blues"),
#                limits=range(LB$nmurders))
# ## End(Not run)
Run the code above in your browser using DataLab