地理编码失败,状态为OVER_QUERY_LIMIT R Studio [英] Geocode failed with status OVER_QUERY_LIMIT R studio

查看:100
本文介绍了地理编码失败,状态为OVER_QUERY_LIMIT R Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很抱歉重复一个问题,但是我还无法用找到的答案解决问题.我正在此回购中使用transport-workshop.Rmd: https://github.com/nickbearman/运输车间.我使用qmap进行的前3个查询在qmap('Leeds')qmap('LS2 9JT')qmap('LS2 9JT', zoom = 17)上都没有问题.但是,然后我继续在研讨会上尝试qmap('LS2 9JT', zoom = 17, maptype = 'satellite'),这将向我返回此错误:

Apologies for repeating a question, but I've haven't been able to fix the problem with the answers I found. I'm working with transport-workshop.Rmd from this repo: https://github.com/nickbearman/transport-workshop. The first 3 queries I make with qmap work no problem qmap('Leeds'), qmap('LS2 9JT') and qmap('LS2 9JT', zoom = 17). But then I go on with the workshop and try qmap('LS2 9JT', zoom = 17, maptype = 'satellite'), which returns me this error:

geocode failed with status OVER_QUERY_LIMIT, location = "LS2 9JT"Error in data.frame(ll.lat = ll[1], ll.lon = ll[2], ur.lat = ur[1], ur.lon = ur[2]) : arguments imply differing number of rows: 0, 1

geocode failed with status OVER_QUERY_LIMIT, location = "LS2 9JT"Error in data.frame(ll.lat = ll[1], ll.lon = ll[2], ur.lat = ur[1], ur.lon = ur[2]) : arguments imply differing number of rows: 0, 1

检查时: > geocodeQueryCheck() 2495 geocoding queries remaining.

When checking: > geocodeQueryCheck() 2495 geocoding queries remaining.

发现指定Google Maps API密钥可能会解决该问题: devtools::install_github("dkahle/ggmap") register_google(key = "my_api_key")来自 https://developers.google.com/maps/documentation/geocoding/get-api-key ,但我一直收到相同的错误.不知道还要检查或尝试什么.

Found that specifying a Google Maps API key may sort it out: devtools::install_github("dkahle/ggmap") register_google(key = "my_api_key") from https://developers.google.com/maps/documentation/geocoding/get-api-key , but I keep getting the same error. Not sure what else to check or try.

使用R版本3.4.3(2017-11-30),Windows 10.

Working with R version 3.4.3 (2017-11-30), Windows 10.

推荐答案

可能有两个原因:

1)如果您使用的是Google API的免费版本,则可能已超过24-hour limit.您可以使用高级服务或使用

1) You may have exceeded a 24-hour limit if you are using free version of google API. You can either go for premium service or check the limit policy for service which you are using here

2)您在一秒钟内多次点击地理编码,就越过了requests per second的限制.因此,您可以更改代码并添加下一个请求之前的等待时间,以免发生此错误.

2) You are crossing limit of requests per second by hitting geocode multiple times in one second . So you can change your code and add the wait time before next request to avoid this error.

这篇关于地理编码失败,状态为OVER_QUERY_LIMIT R Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆