This data visualization is part of my Snapstream Searcher project, which searches through closed-captioning television scripts. Countries are considered related if they frequently co-occur, that is, they are mentioned within 300 characters of each other. Some normalization is done to account for the fact that certain countries more frequently than others, so those countries would appear related to other countries by chance.
To cluster the countries, I used a spring embedding algorithm, which places a spring between each pair of countries. If two countries are strongly related, the spring will be shorter. If the two countries are not related at all, the spring will be very long. The layout is calculated by running a steepest gradient descent algorithm to minimize the potential energy of these springs. It's possible that the algorithm gets stuck in a local min, so you may want to reset or randomize the layout a rerun the spring embedding algorithm by