Converting and Standardizing Country Names/Codes in R

regular_expressionsWe have run into this issue before: you have n \geq 2 datasets with 1 < k \leq n different coding schemes for the cross-sectional unit. You need to get them all standardized so you can merge the data and increase the measurement error  control for a reviewer’s favorite variable run some models.

Last week I was about to spend some time merging alphanumeric ISO codes with their COW counterparts, when I ran across the new countrycode package in R.* The package uses regular expressions to convert between the following supported formats:

  • Correlates of War character
  • CoW-numeric
  • ISO3-character,
  • ISO3-numeric
  • ISO2-character
  • IMF numeric
  • FIPS 10-4
  • FAO numeric
  • United Nations numeric
  • World Bank character
  • official English short country names (ISO)
  • continent
  • region

The author is Vincent Arel-Bundock, a doctoral student in comparative politics at Michigan. Thanks Vincent!

________________________________________

* New here meaning I didn’t know about it before and its documentation is dated Jan. 20, 2013.

About these ads

About You Study Politics, Right?

Graduate student in political science at Duke University.
This entry was posted in Uncategorized and tagged , , , , , , , , , , , . Bookmark the permalink.

2 Responses to Converting and Standardizing Country Names/Codes in R

  1. Glad it’s useful!

    Cheers!

    Vince

  2. cars says:

    Have you had the experience of looking for a car only to end up feeling frustrated and overwhelmed by the process?

    It may be just be the case that you need some solid advice beforehand.
    The information included here can simplify the entire
    process of purchasing a car.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s