Closed ludstuen90 closed 6 years ago
It turns out converting all of our addresses to lat-long coordinates with Google's geocoding (convert address > lat-long) feature would be extremely expensive. https://mapsplatformtransition.withgoogle.com/calculator?__utma=236542612.350585252.1542372437.1542465412.1542465412.1&__utmb=236542612.0.10.1542465412&__utmc=236542612&__utmx=-&__utmz=236542612.1542465412.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)&__utmv=-&__utmk=155444216&_ga=2.106684481.-350585252.1542372437
Starts charging at 100 calls.
I found 68,851 records in Warren County alone, and according to the calculator, converting all of these records to lat-long in one month with Google would cost $344. However — we would only pay $144 because Google offers a recurring $200 monthly credit.
Mapquest is a bit cheaper, we could do 75,000 transactions per month for $199.
OpenCage Data allows 2.500 free requests per day, but did not appear to be accurate on first attempt. https://opencagedata.com/
However, it looks like typing in the address to Google, it doesn't appear the placement of the cardinal direction matters. (19 w 25th street equates to the same place as 19 25th st w).
Proposing moving forward storing information in its directional format (ie. not lat/long) coordinates, so as to avoid API fees.
(See discussion above)
@walinchus
Yes that is good. We applied, as a nonprofit, to use Google's API key for free and they granted it to us. There is still a limit, I forget off the top of my head. but long story short if it's not easy to get things into Lat/Long I can convert the addresses to Lat/Long in R no problem.
I will look up the limit, as we might hit it.
@walinchus Right on! Another thing we could do, is build in a function to convert and store the addresses, but only do a certain amount per day. That way we could ensure each day we only request up to the free limit, and then over time we'd build up the DB
Outside the scope of this app. Closing issue. (See #33 )
Because addresses can be stored in a to of different formats, we'll store both addresses and lat/long coordinates.
Google offers a lat/long conversion API. https://support.google.com/maps/answer/18539?co=GENIE.Platform%3DDesktop&hl=en
We'll need to develop a tool to take our stored addresses, and store them in lat-long format.
Related to #33
Friendly reminder: Be sure to add unit tests!