This function standardizes country names and adds a new column to the database containing two-letter country codes (ISO 3166-1 alpha-2).
bdc_country_standardized(data, country = "country")
data.frame. Containing country names
character string. The column name with the country assignment of each record. Default = "country".
A data.frame containing two columns: country_suggested (standardized country names) and country_code (two-letter country codes; more details in World Countries, International Organization for Standardization).
Country names are standardized using an exact matching against a list of country names in several languages from International Organization for Standardization. If any unmatched names remain, a fuzzy matching algorithm is used to find potential candidates for each misspelled countries names.