new functions to determine country codes and plot PCA