Skip to content
New issue

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

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

Already on GitHub? # to your account

Support multiple country codes #44

Closed
dpprdan opened this issue Feb 14, 2018 · 6 comments
Closed

Support multiple country codes #44

dpprdan opened this issue Feb 14, 2018 · 6 comments
Assignees

Comments

@dpprdan
Copy link
Member

dpprdan commented Feb 14, 2018

opencagedata supports [multiple country codes(https://geocoder.opencagedata.com/api#forward-opt), but opencage 📦 does not (yet).

# French territories according to the opencage website
french_territories <- 
  c("fr", "bl", "gf", "gp", "mf", "mq", "nc", "pf", "pm", "re", "tf", "wf", "yt") %>% 
  toupper()

opencage_forward("Arc de Triomphe de l’Etoile, Paris", countrycode = french_territories)
#> Warning in if (!(countrycode %in% countrycodes$Code)) {: the condition has
#> length > 1 and only the first element will be used
#> Error in vapply(elements, encode, character(1)): values must be length 1,
#>  but FUN(X[[2]]) result is length 13
@maelle maelle self-assigned this Feb 15, 2018
maelle added a commit that referenced this issue Feb 15, 2018
@maelle
Copy link
Member

maelle commented Feb 15, 2018

I think it now works. For the record the example above doesn't return any result, unless one removes "de l'Etoile".

@maelle maelle closed this as completed Feb 15, 2018
@dpprdan
Copy link
Member Author

dpprdan commented Feb 15, 2018

👍 Could you please add a keyword or two to your commit messages, otherwise one always has to go to Github (from e.g. RStudio) to see what the issue was about?

@maelle
Copy link
Member

maelle commented Feb 15, 2018

will do!

@maelle
Copy link
Member

maelle commented Feb 15, 2018

(I mean in the future, for now I won't rename the old ones)

@dpprdan
Copy link
Member Author

dpprdan commented Feb 15, 2018

Thanks!
Re future: of course. Wait, that's possible? (Without rewriting history and getting everybody mad at you?) I mean, in principle, not that you ought to do it.

@maelle
Copy link
Member

maelle commented Feb 15, 2018

I have no idea, I just imagine it is? Or maybe not? 🤔 (I won't try to mess up with this repo but might look into it one day!)

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

No branches or pull requests

2 participants