问题描述
我目前正在使用大型的基于人口的数据库,在该数据库中,我需要为每个人计算两个地址之间的距离.我的第一个思路是获取代表每个地址的纬度和经度,然后计算距离.我使用Google API通过R中的各种程序包(例如dismo)获取这些地址的纬度和经度.但是,Google在24小时内限制了2500个请求.我大约有30万个地址,每天运行2500个,将无法按时完成任务.
I am currently working on a large population-based database where it is required that I compute the distance between two addresses for each individual. My first train of thought was to obtain the latitude and longitude representing each address and then compute the distance. I used Google API's to obtain the latitude and longitude for these addresses via various packages in R (e.g. dismo). However Google has a restriction of 2500 requests in a 24hr period. I have about 300,000 addresses and by running 2,500/day, I will not be able to meet the deadline.
有人会建议我使用R来获取经纬度的其他API吗?
Would anyone have suggestions regarding other API's I could use to obtain the latitude and longitude using R?
谢谢.
推荐答案
我建议您尝试使用RDSTK
软件包,该软件包与数据科学工具包.它在github
上可用.
I would recommend that you try the RDSTK
package which interfaces with the Data Science Toolkit. It is available on github
.
编辑.要计算道路距离,我建议使用 Mapquest Directions API ,该API似乎没有预设的限制,因为根据此链接.让我知道怎么回事.
EDIT. To compute the Road Distance, I would recommend the Mapquest Directions API, which appears to have no preset limits as per this link. Let me know how it goes.
这篇关于在不使用Google API的情况下从地址获取经度和纬度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!