View source: R/bdc_country_standardized.R
bdc_country_standardized | R Documentation |
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 |
data.frame. Containing country names |
country |
character string. The column name with the country assignment of each record. Default = "country". |
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.
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).
Other prefilter:
bdc_basisOfRecords_notStandard()
,
bdc_coordinates_country_inconsistent()
,
bdc_coordinates_empty()
,
bdc_coordinates_from_locality()
,
bdc_coordinates_outOfRange()
,
bdc_coordinates_transposed()
,
bdc_scientificName_empty()
## Not run:
country <- c("BOLIVIA", "bolivia", "Brasil", "Brazil", "BREZIL")
x <- data.frame(country)
bdc_country_standardized(
data = x,
country = "country"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.