Questions tagged [googleway]

R Package for working with Google Maps API.

Provides a mechanism to plot a Google Map from R and overlay it with shapes and markers. Also provides access to Google Maps APIs, including places, directions, roads, distances, geocoding, elevation and timezone.

102 questions
2
votes
1 answer

R googleway: change marker colors

I have 2 data frames with the geocoded locations of several hospitals within the United States. I would like to plot these locations as markers with two different colors for each set of hospitals from each data frame. I am using the R googleway…
Kartik
  • 621
  • 2
  • 5
  • 11
2
votes
1 answer

Error in batch geocoding using R googleway

Not sure why I keep getting this error: Error in value[3L] : There was an error downloading results. Please manually check the following URL is valid by entering it into a browswer. If valid, please file a bug report citing this URL (note: your…
Ahmad Mobin
  • 153
  • 10
2
votes
1 answer

Google Places API and R -- calling 2nd column in a data frame returns six separate columns

I'm trying to store the results of a data frame I retrieved from a list via the Google Places API. My call to the API... library(googleway) HAVE_PLACES <- google_places(search_string = "grocery store", location =…
J.Q
  • 971
  • 1
  • 14
  • 29
2
votes
0 answers

next_page_token not working on second attempt (google_places function)

I am looking for all starbucks' stores in a given location through googleway's google_places function. library(googleway) res <- google_places(search_string = 'starbucks in Sao Paulo SP', key = my_key) # get second page of…
Felipe Alvarenga
  • 2,572
  • 1
  • 17
  • 36
2
votes
1 answer

Problems with reverse geocoding loops with latitude longitude co-ordinates using googleway: r gives the same results for different co-ordinates

Here is my sample dataset (called origAddress): lat lng 1.436316 103.8299 1.375093 103.8516 1.369347 103.8398 1.367353 103.8426 I have many more rows of latitude and longitude numbers (330) and I would like to find the address. I have used…
2
votes
1 answer

Gather markers by clusters using R googlemap package

How do you cluster markers in Google Maps in R using googleway package? I tried to use the option add_markers("cluster = TRUE ") but without success Here is a reproducible example and the map that I get: library(googleway) key <-…
JeanBertin
  • 633
  • 1
  • 7
  • 23
2
votes
1 answer

R, googleway, matching address by removing word

If I run the below codes directly, it gives me an error because the address is too specified, however if I remove -272, it works fine. So how can I keep removing words automatically until the function runs and give me the address,…
AAA
  • 83
  • 8
2
votes
1 answer

Plotting waypoint routes with googleway in Shiny App

I am working with google-way in a Shiny app. I started from this example: Drawing journey path using leaflet in R and modified it a little to include 2 extra waypoints between the Destination and Origin and have google_directions render the optimal…
2
votes
1 answer

Googleway R Alternative routes

I'm using the google_directions() function to generate driving routes between two coordinates which are generated on clicking at different points in a leaflet map.I would like to show a few possible routes, instead of just one. Setting alternatives…
Agalloch
  • 23
  • 2
2
votes
1 answer

Convert/export googleway output to data frame

I'm trying to make sense and convert googleway.distance output into a data frame. I have a sample of 10 locations as below: > origins V1 V2 1 38.82402 -78.28962 2 39.66405 -75.68834 3 38.68630 -77.30899 4 38.98991 -76.92997 5 …
GGT
  • 43
  • 6
2
votes
1 answer

Automatically open both Google Map and Streetview

I'm wondering if someone better than I am at R Shiny could tell me if the following is possible (it may not be, but I'd like to know if not). Question: Can I open both a google map and interactive streetview in Shiny? Why I want to do this: I have…
Neal Barsch
  • 2,810
  • 2
  • 13
  • 39
2
votes
3 answers

Extract address components from coordiantes

I'm trying to reverse geocode with R. I first used ggmap but couldn't get it to work with my API key. Now I'm trying it with googleway. newframe[,c("Front.lat","Front.long")] Front.lat Front.long 1 -37.82681 144.9592 2 -37.82681 …
2
votes
2 answers

How to always get a zipcode record from ggmap/googleway package in R?

Two questions related to this topic. First, with the sample address '方桥社区居委会', I first checked it directly from Google Map, and I get both its location and its English translation 'Fangqiao Community Residents' Committee'. However, when I try to run…
Yijiao Liu
  • 184
  • 12
2
votes
1 answer

HTTP error 400 on google_elevation() call

I am using the R-package googleway to decode polylines using decode_pland subsequently getting the elevation data at the corresponding lat/lon coordinates using google_elevation. I get the polylines from Strava, using the rStrava package. Sample…
Franz Hahn
  • 332
  • 1
  • 10
2
votes
1 answer

Error in using the googlway package in R

Hello I have a problem using the googlway package in R. More specifically, it concerns the google_distance function and the selection of the trafic model. When I execute my script: x <- as.POSIXct("2017-02-2 00:00:00", tz =…
jean
  • 31
  • 1