无法加载HTTP资源,地理编码

问题描述

运行以下代码时,出现以下错误

无法加载HTTP资源 错误:1:无法加载HTTP资源

.geocode中的错误(xx $ place,oneRecord = oneRecord,范围=范围,进度=进度): 找不到对象“ doc”

search.string<-"#USAElections2020"
no.of.tweets<-2000
Jtweets<-searchTwitter(search.string,n=no.of.tweets,lang="en")

df<-do.call("rbind",lapply(Jtweets,as.data.frame))
View(df)

userInfo<-lookupUsers(df$screenName)

#Batch lookup of user info

userFrame<-twListToDF(userInfo)

#Convert to a nice dF

locatedUsers<-!is.na(userFrame$location)
#Keep only users with location info

head(userFrame)
head(locatedUsers)

install.packages("dismo")
install.packages("maps")
library(dismo)
library(maps)

locations=geocode(userFrame$location[locatedUsers])
#Use amazing API to guess

head(locations)
#approximate lat/lon from textual location data.
with(locations,plot(longitude,latitude))

write.csv(locations,"JeruLocation.csv")
table(locations$interpretedplace)
head(locations$interpretedplace```

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...