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.
Would anyone have suggestions regarding other API's I could use to obtain the latitude and longitude using R?
Thank you.
I would recommend that you try the
RDSTK
package which interfaces with the Data Science Toolkit. It is available ongithub
.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.
More options:
geonames
package to retrieve information from the geonames service.osmar
package to use the API of openstreetmap.Besides, the
gdistance
package is useful for distance calculations on geographical grids.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.