Getting OVER QUERY LIMIT after one request with geocode

后端 未结 5 1552
情歌与酒
情歌与酒 2020-11-29 04:20

I\'m using the ggmap\'s geocode to find the latitude and longitude of different cities. It worked completely fine yesterday but I get an OVER QUERY LIMIT after only one requ

5条回答
  •  半阙折子戏
    2020-11-29 05:16

    I had a similar problem using ggmap::geocode() for a batch of locations where roughly 20% of locations gave the OVER QUERY LIMIT error even though geocodeQueryCheck() would show more than enough geocoding queries remaining, and the errors were sporadically spread throughout the locations, not just the last 20%. If I reran the subset of locations that failed the first time, again most would work, so I had to iterate through smaller subsets until they all had geocodes.

    ggmap v2.7 allows the user to specify a Google Maps API key through the register_google() function. v2.7 is not on CRAN yet, so you have to use devtools::install_github("dkahle/ggmap") to install it. After updating to that version and setting my API Key register_google(key = "my_api_key"), the same batch worked in one run as expected.

    The Google Maps API Key is easy to get: https://developers.google.com/maps/documentation/geocoding/get-api-key

提交回复
热议问题