alistaire47/passport

Failed Parse for Regex Option

simonschoe opened this issue · 3 comments

The Regex option of parse_country is unable to parse the following countries:

  • North Ireland
  • St. Martin
  • Saint Martin
  • Channel Islands
  • Eswatini

Thanks! Regex are from countrycode, so changes would have to be made there. I haven't rebuild in a while, though, so it's possible [some of] these may already be fixed. I've been meaning to rebuild the data and publish a patch version soon; I'll add an issue for it.

Rebuild and release is issue #9. If this doesn't solve this issue, one should be opened on countrycode.

Northern Ireland and Saint Martin are not sovereign "countries", so they are unlikely to be included in countrycode. Channel Islands and Eswatini are included in the current CRAN version (v1.1.3).

library(countrycode)

packageVersion('countrycode')
#> [1] '1.1.3'

countrycode('Channel Islands', 'country.name', 'wb')
#> [1] "CHI"

countrycode('Eswatini', 'country.name', 'wb')
#> [1] "SWZ"