tidygeocoder
tidygeocoder copied to clipboard
Add support for additional geocoding services
Instructions on how to add a geocoding service to the package are now here.
If I could recommend a Geocoder service to add, may I suggest Mapbox API?
https://docs.mapbox.com/api/search/
Hey! Glad to give Mapbox API a try, what I have seen so far is that there are two different endpoints:
https://docs.mapbox.com/api/search/geocoding/#endpoints
-
mapbox.places
: With free tier https://www.mapbox.com/pricing/#search -
mapbox.places-permanent
, that allows to batch geocoding, no free tier
I can try mapbox.places
as a stand-alone method (i.e. method="mapbox"
) if it is something that @jessecambon would like to explore. I think mapbox.places-permanent
would be pretty much the same implementation, but maybe via another method (method="mapbox_permanent"
¿?), and including batch geocoding.
Hey @dieghernan that would be great. I'm assuming mapbox.places
and mapbox.places-permanent
have the same API parameters? If so, we could use method = 'mapbox'
for both and then use a different variable to toggle the API url. For instance, the geocodio_v
and iq_region
variables in the geo()
function are currently used for adjusting API urls for the Geocodio and Location IQ services.
Also, could you base your changes off the reverse-geocoding branch? I've restructured a few things in the package to accommodate reverse geocoding (added new reverse_geo
and reverse_geocode
functions) so using this branch as the base will make it easier to merge changes. I haven't pushed this branch into master just yet because there are a few minor things I want to clean up first. I just updated the instructions above to reflect the new code structure.
Quick list with potential geocoding services (this list would be updated in the future)
Geonames
Docs: http://www.geonames.org/export/geonames-search.html
See also {geonames} package: https://github.com/ropensci/geonames
Any chance of getting https://geocode.xyz added to the already impressive list? Thanks
@moreron The geocode.xyz service is now implemented on the geocode.xyz
branch if you'd like to test it out