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 clicking on the buttons.
You can see how these relationships change over time by selecting a time period. Each time corresponds to one month of data. Countries that newly appear in the top 25 will be colored in red. The size of each node corresponds to the absolute number of occurrences of that country.
A more in-depth discussion can be found on my blog, Country Relationships and Spring Embedding.