Created
November 21, 2017 10:16
-
-
Save iUmarov/c02ae14c5ecc4a3d1f1df9e6a285235d to your computer and use it in GitHub Desktop.
Revisions
-
iUmarov created this gist
Nov 21, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #install.packages("googleway") library(googleway) key <- 'AIzaSyCOEzgiO1P6trrSmu9vy9ZVuQDkog6Lwiw' df_places <- google_places(search_string = "Starbucks", location = c(40.417287, -82.907123), key = key) df_places$results$formatted_address cen <- c(mean(df_places$results$geometry$location$lng), mean(df_places$results$geometry$location$lat)) gc <- data.frame(lon=df_places$results$geometry$location$lng, lat = df_places$results$geometry$location$lat) map <- get_googlemap(center = cen, scale = 1, maptype = "roadmap", zoom = 10, marker = gc) ggmap(map, extent = "device")