joelgombin / banR

R client for the BAN API
http://joelgombin.github.io/banR/
GNU General Public License v3.0
28 stars 10 forks source link

Geocode cities instead of specific addresses #25

Closed briatte closed 4 years ago

briatte commented 4 years ago

Dear @joelgombin and @pachevalier

Is there any way to get 'city-level' geocodes with banR, as with tidygeocoder::geo_osm?

It seems this was possible at some point, as in Joël's example in #6.

I basically want pseudo-centroids for city-level queries like "Lille, France", "Bondue, France" etc.

Hope you're both good!

joelgombin commented 4 years ago

I think that this is related to #24 and will be solved if I can implement it.

joelgombin commented 4 years ago

Anyway it does work at the moment, doesn't it?

See:

banR::geocode("Lille")

You may want to then filter the results:


banR::geocode("Lille") %>% 
  dplyr::filter(type %in% "municipality")
briatte commented 4 years ago

You are correct, twice -- #24 is a more elaborate version of my question, and yes, banR does what I want, but only if, I just realised, I do not append "France" to the query:

Thanks!

joelgombin commented 4 years ago

I guesd that's because the BAN is only about French adresses.

Le dim. 29 mars 2020 à 11:35, François Briatte notifications@github.com a écrit :

You are correct, twice -- #24 https://github.com/joelgombin/banR/issues/24 is a more elaborate version of my question, and yes, banR does what I want, but only if, I just realised, I do not append "France" to the query:

  • "Valserhône" finds the municipality
  • "Valserhône France" finds only addresses

Thanks!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/joelgombin/banR/issues/25#issuecomment-605609593, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOUODY4IEGY6BMCQDHBGUTRJ4I6XANCNFSM4LVWJUEQ .