tidygeocoder icon indicating copy to clipboard operation
tidygeocoder copied to clipboard

Add support for additional geocoding services

Open jessecambon opened this issue 4 years ago • 6 comments

Instructions on how to add a geocoding service to the package are now here.

jessecambon avatar Jan 03 '21 20:01 jessecambon

If I could recommend a Geocoder service to add, may I suggest Mapbox API?

https://docs.mapbox.com/api/search/

maxachis avatar Feb 07 '21 18:02 maxachis

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.

dieghernan avatar Mar 02 '21 12:03 dieghernan

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.

jessecambon avatar Mar 02 '21 13:03 jessecambon

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

dieghernan avatar Mar 05 '21 17:03 dieghernan

Any chance of getting https://geocode.xyz added to the already impressive list? Thanks

moreron avatar Oct 23 '21 19:10 moreron

@moreron The geocode.xyz service is now implemented on the geocode.xyz branch if you'd like to test it out

jessecambon avatar Jan 29 '22 21:01 jessecambon