library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.3.3
library(HistData)
## Warning: package 'HistData' was built under R version 3.3.3
library(ggmap)
## Warning: package 'ggmap' was built under R version 3.3.3
qmplot(x,y,data = Snow.deaths,maptype = "toner-lite", color=I("blue"),mapcolor = "bw")
## Using zoom = 7...
## Map from URL : http://tile.stamen.com/toner-lite/7/66/57.png
## Map from URL : http://tile.stamen.com/toner-lite/7/67/57.png
## Map from URL : http://tile.stamen.com/toner-lite/7/68/57.png
## Map from URL : http://tile.stamen.com/toner-lite/7/69/57.png
## Map from URL : http://tile.stamen.com/toner-lite/7/70/57.png
## Map from URL : http://tile.stamen.com/toner-lite/7/66/58.png
## Map from URL : http://tile.stamen.com/toner-lite/7/67/58.png
## Map from URL : http://tile.stamen.com/toner-lite/7/68/58.png
## Map from URL : http://tile.stamen.com/toner-lite/7/69/58.png
## Map from URL : http://tile.stamen.com/toner-lite/7/70/58.png
## Map from URL : http://tile.stamen.com/toner-lite/7/66/59.png
## Map from URL : http://tile.stamen.com/toner-lite/7/67/59.png
## Map from URL : http://tile.stamen.com/toner-lite/7/68/59.png
## Map from URL : http://tile.stamen.com/toner-lite/7/69/59.png
## Map from URL : http://tile.stamen.com/toner-lite/7/70/59.png
## Map from URL : http://tile.stamen.com/toner-lite/7/66/60.png
## Map from URL : http://tile.stamen.com/toner-lite/7/67/60.png
## Map from URL : http://tile.stamen.com/toner-lite/7/68/60.png
## Map from URL : http://tile.stamen.com/toner-lite/7/69/60.png
## Map from URL : http://tile.stamen.com/toner-lite/7/70/60.png
## Map from URL : http://tile.stamen.com/toner-lite/7/66/61.png
## Map from URL : http://tile.stamen.com/toner-lite/7/67/61.png
## Map from URL : http://tile.stamen.com/toner-lite/7/68/61.png
## Map from URL : http://tile.stamen.com/toner-lite/7/69/61.png
## Map from URL : http://tile.stamen.com/toner-lite/7/70/61.png
## Map from URL : http://tile.stamen.com/toner-lite/7/66/62.png
## Map from URL : http://tile.stamen.com/toner-lite/7/67/62.png
## Map from URL : http://tile.stamen.com/toner-lite/7/68/62.png
## Map from URL : http://tile.stamen.com/toner-lite/7/69/62.png
## Map from URL : http://tile.stamen.com/toner-lite/7/70/62.png
## Warning: `panel.margin` is deprecated. Please use `panel.spacing` property
## instead

plot(Snow.deaths[,c("x","y")], col="red",xlim=c(3,20), ylim=c(3,20))
Street <- split(Snow.streets[,c("x","y")],as.factor(Snow.streets[,"street"]))
invisible(lapply(Street, lines, col="black"))

London <- ggmap(get_map(c(-.137,51.513), zoom=17,maptype = "toner"))
## maptype = "toner" is only available with source = "stamen".
## resetting to source = "stamen"...
## Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=51.513,-0.137&zoom=17&size=640x640&scale=2&maptype=terrain&sensor=false
## Map from URL : http://tile.stamen.com/toner/17/65484/43580.png
## Map from URL : http://tile.stamen.com/toner/17/65485/43580.png
## Map from URL : http://tile.stamen.com/toner/17/65486/43580.png
## Map from URL : http://tile.stamen.com/toner/17/65487/43580.png
## Map from URL : http://tile.stamen.com/toner/17/65484/43581.png
## Map from URL : http://tile.stamen.com/toner/17/65485/43581.png
## Map from URL : http://tile.stamen.com/toner/17/65486/43581.png
## Map from URL : http://tile.stamen.com/toner/17/65487/43581.png
## Map from URL : http://tile.stamen.com/toner/17/65484/43582.png
## Map from URL : http://tile.stamen.com/toner/17/65485/43582.png
## Map from URL : http://tile.stamen.com/toner/17/65486/43582.png
## Map from URL : http://tile.stamen.com/toner/17/65487/43582.png
Map1 <- London + geom_point(mapping = aes(x,y),data = Snow.deaths)
Map1
## Warning: Removed 578 rows containing missing values (geom_point).
