r-ggmap地理编码查询到googleapi



在谷歌api中查询lon/lat时,即使是单个位置,我也会收到一条警告**geocode failed with status OVER_QUERY_LIMIT**api返回NA。我的每日上限远低于2500,不太清楚我为什么会受到警告。这里有一个例子:

geocode("Paris")
Source : https://maps.googleapis.com/maps/api/geocode/json?address=Paris&key=xxx
lon lat
1  NA  NA
Warning message:
geocode failed with status OVER_QUERY_LIMIT, location = "Paris" 

使用ggmap的devetool版本,并在谷歌上注册api_key。

Versions: ggmap_2.7.904, R version 3.5.1

好的。问题在以下时间后得到解决:

  1. 除了注册API_KEY,还需要在谷歌云平台添加信用卡信息才能完成注册。[此链接很有帮助][1]
  2. 输入后,api查询就工作了
  3. 需要安装ggmap的devtool版本,并且需要重新启动R

最新更新