0

I'm having trouble with the googleway package in R. I am attempting to get driving distance for 159,000 records. I am using a paid google cloud account and have set all quotas as unlimited. I've attempted to use server keys and browser keys. After multiple attempts the service returns a time out message

 Error in open.connection(con, "rb") : Timeout was reached 

Successfully returned x results before timeout

1) x ~=5,000 2) x ~=7,000 3) x ~=3,000 4) x ~= 12,000

All tried on different days. As you can see none of these are any where near the 100,000/day quota.

We've checked firewall rules and made sure that the cause of the time out is not at our end. For some reason Google API service is cutting off the requests.

We have had no response from Google and we are currently on the bronze support package so we don't get any real support from them as a matter of course.

The creator of the googleway packages is certain that there are no impediments coming from the package.

We're hoping there is someone out there who may know why this may be happening and how we could avoid it from happening to enable us to run the distance matrix over our full list of addresses.

Using R version "Supposedly Educational". Using Googleway package.

CHARSET           cp1252
DISPLAY           :0
FP_NO_HOST_CHECK
                  NO
GFORTRAN_STDERR_UNIT
                  -1
GFORTRAN_STDOUT_UNIT
                  -1
NUMBER_OF_PROCESSORS
                  4
OS                Windows_NT
PROCESSOR_ARCHITECTURE
                  AMD64
PROCESSOR_IDENTIFIER
                  Intel64 Family 6 Model 60 Stepping
                  3, GenuineIntel
PROCESSOR_LEVEL   6
PROCESSOR_REVISION
                  3c03
R_ARCH            /x64
R_COMPILED_BY     gcc 4.9.3
RS_LOCAL_PEER     \\.\pipe\37894-rsession
RSTUDIO           1
RSTUDIO_SESSION_PORT
                  37894
SymbolixAU
  • 25,502
  • 4
  • 67
  • 139
Clancy Birrell
  • 111
  • 1
  • 9
  • I wouldn't say the creator is "certain there are no impediments" - I'm happy to be pointed to an issue in the code; I just can't see where it would come in :) – SymbolixAU Jul 11 '16 at 03:13
  • I assume you're using some sort of loop to call the function 100,000 times? Have you tried using a `tryCatch` to catch any timeout error, where if there is an error it moves onto the next one? – SymbolixAU Jul 11 '16 at 03:22
  • @SymbolixAU Thanks Symbolix, i'm now running with the tryCatch function and the run has not finalized yet. I also had some local after hours internet access revocation to deal with. I'll update if anything interesting happens. – Clancy Birrell Jul 11 '16 at 23:47
  • Yes, please keep me informed - I'd be interested to know the outcome. Hopefully the `tryCatch` will skip over the 'timeouts', and the subsequent requests will then work. – SymbolixAU Jul 12 '16 at 00:57

1 Answers1

-1

I have developed a different implementation between Google maps and R: install.packages("gmapsdistance")

You can try this one. However, take into account that in addition to the daily limits, there are limits to the number of queries even if you have the premium account (625 per request, 1,000 per second in the server side, etc.): https://developers.google.com/maps/documentation/distance-matrix/usage-limits I think this might be the issue

rodazuero
  • 324
  • 3
  • 10