无需使用Google API即可从地址获取经度和纬度

时间:2022-11-23 08:35:49

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.

我目前正在开发一个基于人口的大型数据库,我需要计算每个人的两个地址之间的距离。我的第一个思路是获得代表每个地址的纬度和经度,然后计算距离。我使用Google API通过R中的各种包(例如dismo)获取这些地址的纬度和经度。但是,谷歌在24小时内限制了2500个请求。我有大约300,000个地址,每天运行2,500个,我将无法满足截止日期。

Would anyone have suggestions regarding other API's I could use to obtain the latitude and longitude using R?

有没有人会有关于其他API的建议我可以使用R来获取经度和纬度?

Thank you.

谢谢。

3 个解决方案

#1


11  

I would recommend that you try the RDSTK package which interfaces with the Data Science Toolkit. It is available on github.

我建议您尝试与Data Science Toolkit连接的RDSTK包。它可以在github上找到。

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.

编辑。要计算道路距离,我建议使用Mapquest Directions API,根据此链接,该API似乎没有预设限制。让我知道事情的后续。

#2


5  

What you are doing is called "geocoding". Knowing that will greatly improve your ability to search for more info :) You may have already known that since you tagged the question properly, but I wanted to make sure.

你在做什么被称为“地理编码”。知道这将大大提高你搜索更多信息的能力:)你可能已经知道,因为你正确地标记了问题,但我想确保。

Here's a really good previous Stack Overflow question, albeit not R specific.

这是一个非常好的之前的Stack Overflow问题,尽管不是R特定的。

#3


1  

More options:

更多的选择:

  • The geonames package to retrieve information from the geonames service.
  • geonames包用于从地理名称服务中检索信息。
  • The osmar package to use the API of openstreetmap.
  • osmar包使用openstreetmap的API。

Besides, the gdistance package is useful for distance calculations on geographical grids.

此外,gdistance包对地理网格的距离计算很有用。

#1


11  

I would recommend that you try the RDSTK package which interfaces with the Data Science Toolkit. It is available on github.

我建议您尝试与Data Science Toolkit连接的RDSTK包。它可以在github上找到。

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.

编辑。要计算道路距离,我建议使用Mapquest Directions API,根据此链接,该API似乎没有预设限制。让我知道事情的后续。

#2


5  

What you are doing is called "geocoding". Knowing that will greatly improve your ability to search for more info :) You may have already known that since you tagged the question properly, but I wanted to make sure.

你在做什么被称为“地理编码”。知道这将大大提高你搜索更多信息的能力:)你可能已经知道,因为你正确地标记了问题,但我想确保。

Here's a really good previous Stack Overflow question, albeit not R specific.

这是一个非常好的之前的Stack Overflow问题,尽管不是R特定的。

#3


1  

More options:

更多的选择:

  • The geonames package to retrieve information from the geonames service.
  • geonames包用于从地理名称服务中检索信息。
  • The osmar package to use the API of openstreetmap.
  • osmar包使用openstreetmap的API。

Besides, the gdistance package is useful for distance calculations on geographical grids.

此外,gdistance包对地理网格的距离计算很有用。