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

Interact with ISOcodes package? #187

Closed
briatte opened this issue Aug 5, 2018 · 3 comments
Closed

Interact with ISOcodes package? #187

briatte opened this issue Aug 5, 2018 · 3 comments

Comments

@briatte
Copy link

briatte commented Aug 5, 2018

https://cran.r-project.org/web/packages/ISOcodes/

@vincentarelbundock
Copy link
Owner

vincentarelbundock commented Aug 6, 2018

Nice! One way to approach this would be to package a bunch of custom_dict data.frames, and to write think wrappers around countrycode. Essentially,

isocode = function(...) {
    countrycode(sourcevar, origin, destination, 
                custom_dict = countrycode::codelist_iso)
}

@vincentarelbundock
Copy link
Owner

The latest version of countrycode supports ISO3166 (country codes) and ISO4127 (currencies).

I added a section to the README to explain how to use the custom_dict argument to use the remaining ISOcodes data, including the computer encodings character map and the language names. You can find these examples here:

https://github.com/vincentarelbundock/countrycode#custom_dict-the-isocodes-package

@vincentarelbundock
Copy link
Owner

This took a while. Sorry!

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

No branches or pull requests

3 participants