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

split country attributes into separate data.frame and function #3

Open
6 tasks
alistaire47 opened this issue Jul 12, 2017 · 0 comments
Open
6 tasks

Comments

@alistaire47
Copy link
Owner

Country attributes that are not strictly country names or codes (tld, currency, capital, independence and territorial status (#2), etc.) should be split out of countries and accessed with a more apt function, maybe as_country_attr.

Reverse conversion (where sensible, e.g. tld or currency code) should be enabled through separate helpers to as_country_code and as_country_name akin to convert_country in order to avoid losing functionality. Conversion can probably use iso2c as a key to bridge the datasets. There are some observations without one, though once a list of attributes is collected, it will have to be seen whether they have any worth using a separate key column.

TODO:

  • Assemble list of attributes to separate
  • Check if all with data have iso2c to use as key column
  • Rebuild aggregate.Rmd as necessary to generate separate data.frames
  • Build separate parser—reuse convert_country?
  • Add separate helper functions to as_country_code and as_country_name to allow back-conversion
    • Add warning for non-unique types or limit reverse conversion
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

1 participant