A way to access google streetview from R? -


there nice interface google earth images available via ggmap. example:

ggmap::get_map(location = c(lon = -95.3632715, lat = 29.7632836),                 maptype ="satellite",zoom=20) 

will return satellite map image google maps/earth. on google maps website if zoom bit more, switches streetview. there similar way r streetview images?

there seem api, can't find analogous ggmap interface in r.

my googleway package has google map widget (and works with shiny).

you'll need valid google api key use it

library(googleway)  ## valid api key here #key <- read.dcf("~/documents/.googleapi", fields = "google_map_key")  df <- data.frame(lat = -37.817714,                  lon = 144.967260,                  info = "flinders street station")  google_map(key = key, height = 600, search_box = t) %>%     add_markers(data = df, info_window = "info")  ## other available methods # add_markers # add_heatmap # add_circles # add_traffic # add_bicycling # add_transit 

satellite

enter image description here

satellite / street

enter image description here

street view

(notice marker still there)

enter image description here


update - static street view map

there's google_streetview() function download static streetview image (using google street view static image api)

google_streetview(location = c(-37.8177, 144.967),                   size = c(400,400),                   panorama_id = null,                   output = "plot",                   heading = 90,                   fov = 90,                   pitch = 0,                   response_check = false,                   key = key) 

enter image description here


Comments

Post a Comment

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -