mutate_geocode(ggmap)|错误“结果必须全部原子,或者所有的数据帧”
问题描述:
我试图用mutate_geocode
进行地理编码一套48K解决了上述问题。实际的地理编码功能似乎工作得很好,但一旦完成地理编码,我得到一个错误,指出:mutate_geocode(ggmap)|错误“结果必须全部原子,或者所有的数据帧”
错误list_to_dataframe(RES,ATTR(。数据,“split_labels”),.ID,id_as_factor) :结果必须全部原子,或者所有的数据帧
我不知道为什么我运行到这一点,因为我一直在使用相同的代码进行地理编码全48K文件的一个较小的子集尝试和无错误被返回。任何人都可以在解决这个问题时指出正确的方向吗?以下是我正在运行的代码,以及我的R设置的相关详细信息。
的代码中使用了
# load up the ggmap library
library(ggmap)
library(qdap)
library(plyr)
# get the input data
infile <- "DistinctAddressesAlleg_20170906_1"
data <- read.csv(paste0(infile, '.csv'))
data$address <- as.character(data$FullAddress)
register_google(key = "removed",
account_type = "premium",
day_limit = 150000)
data_geocoded <-
data %>% mutate_geocode(address,
output = "more",
override_limit = TRUE,
key = key)
红设置向上
- [R V3.4.1
- RStudio v1.0.153
- ggmap V2.7
答
我用于遇到与地理编码功能相同的问题,我解决了这个问题通过强迫到数据帧:
data_geocoded <- as.data.frame(geocode(data$address,
output = "more"))
我应该指出,一些48K地址未能地理编码(或ZERO_RESULTS返回,或响应地址解析请求ocassional 500内部服务器错误。 –
在公开场合公开看起来像高级帐户API密钥的想法是不是一个好主意? – Spacedman
废话,我以为我把它拿出来了。感谢您指出了这一点。现在删除它。 –