Skip to content

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

@alistaire47

Description

@alistaire47

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions