Over the last few years, YouGov asked Americans to evaluate the relationship between the United States and a set of 56 other countries. Across 43,273 interviews, respondents were asked their view of the relationship between the United States and a sample of around 6-8 countries. Over these interviews, 324,222 different evaluations were made.
Below, I've mapped an index of these data. Allies are blue (positive numbers) and enemies are red (negative numbers). The index is the natural log of the ratio between the sum of 'ally' and sum of 'enemy', where 'strong ally' and 'strong enemy' are doubled. Iran tops out the enemies list with an index of -3.38 (Strong ally - 175, Ally - 527, Enemy - 4388, Strong enemy - 10,744). Canada, Great Britain, and Australia are our top allies (3.57, 3.49, 3.47 respectively). Bahrain and Saudi Arabia (-.07 and .12) end up as the most balanced. Here is a an example of one week's result, and a non-reduced version of the map is available (svg, png).
Although differences by gender are slight (svg, png), Republicans quite consistently view other nations as much more hostile than Democrats.
What drives these evaluations? While untangling their causes would take far more space than is available in this blog post, the public's evaluation of other nations closely follows standard explanations of international relations: Democracy, Trade, and Values. Whether through the institutional constraints of democracy, expanded costs to war due to trading relationships, or shared values; the aspects that correlate with diminished conflict are well reflected in individual-level perceptions.
First, the more democratic a country is, the more likely it is to be viewed as a friend of the U.S. by the American public. Democracy, as measured by Polity IV, is the strongest correlation, with the most democratic nations being viewed as our closest allies. Mongolia, of which I'm sure few know much about, is the lone exception. Madagascar is viewed as more of a friend than the two available measures would have predicted (the points in the below scatter plot are identifiable in each plot, and paired across plots, by hovering over the points). This is probably the result of their hidden ace in the hole.
Second, the greater the amount of trade between the United States and a given country, the more likely it is to be considered a friendly country. Trade, as measured by the Correlates of War project (I use the natural log of trade flows) does have a weaker relationship than democracy, but a clear relationship none-the-less. Although China, Venezuela or Iran may be far from allies, we are certainly willing to trade with them. Finland, on the other hand, is considered a firm ally, yet Americans just aren't buying enough of their products.
Last but not least, countries whose citizens' values are closer to those of Americans are more likely to be thought of as friends of the U.S. The final plot shows a country's friend-foe measure against its placement on the "Survival versus Self-Expression" scales from the World Values Survey. The Survival-Self Expression Scale attempts to place individual countries on a spectrum on the basis of the values that their citizens prioritize. Using extensive global public opinion data, researchers have shown that the citizens of some countries are more likely to hold "survival values" (meaning they are more concerned with material and physical security than they are with other political issues), while citizens of advanced industrial democracies are more likely to hold "self-expression values. These values correlate almost as well as democracy.
It should be noted that while all three measures correlate with one another, the relationships are robust even while controlling for each of the other measures. Even while controlling for the two other factors; Democracy (followed by Values and then Trade) has the strongest relationship.