Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geocode cities instead of specific addresses #25

Closed
briatte opened this issue Mar 28, 2020 · 4 comments
Closed

Geocode cities instead of specific addresses #25

briatte opened this issue Mar 28, 2020 · 4 comments

Comments

@briatte
Copy link

briatte commented Mar 28, 2020

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
Copy link
Owner

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

@joelgombin
Copy link
Owner

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
Copy link
Author

briatte commented Mar 29, 2020

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:

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

Thanks!

@joelgombin
Copy link
Owner

joelgombin commented Mar 29, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants