| country_input_type | R Documentation | 
Determines whether a string is a country name, an iso2Code, or invalid (not a World Bank API country/region)
country_input_type(country_input, countries_dataframe)
country_input | 
 A country/region the user wishes to validate (string) E.g. "Australia".  | 
countries_dataframe | 
 A dataframe containing available iso2Code and country_name (see show_countries()).  | 
A character vector
## Not run: 
# Assign so as to save on API calls - recommended
countries_dataframe <- show_countries()
  country <- "Australia"
  country_input_type(country, countries_dataframe)
# [1] "country_name"
  country <- "AU"
  country_input_type(country, countries_dataframe)
# [1] "iso2Code"
  country <- "something other than a valid country name or iso2Code"
  country_input_type(country, countries_dataframe)
# [1] "invalid"
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.