Maps Maps Maps, Part Deux

I posted a few days ago about openheatmap.com, a website that will convert your csv files into fancy thermal maps.  One problem with our initial attempts to map out the presence of American military forces abroad was that the data are highly skewed.  Some countries host upwards of 50,000–60,000 American military personnel in the year we’re looking at (2005).  In the past this figure was even higher—Germany at one point plays host to roughly 250,000 members of the American military during the Cold War.

As you can imagine, we don’t have that many soldiers in most countries.  The original map I posted was somewhat misleading, as countries such as China and Russia appeared to have more soldiers within their boarders than they actually have, and this was mostly the result of the combination of skewed data and the way that software color-coded countries.  Phil Arena suggested logging the troop values to see if this would help to take care of the issue:

I’ve changed the colors from blues to reds, as I think this helps a bit, but the figures used to generate the map above are the logged values of troops within the country.  The paler countries obviously have fewer soldiers than the darker countries.  Overall I think this map looks better, but there is still a fairly substantial amount of variation that is being masked by the limited range of tones.  For example, Iran is actually coded as having one American soldier present during 2005, which explains why it’s a pale tan/organge.  Nevertheless, I think the important information that the map is intended to convey (namely the extent to which the US military has at least some presence virtually everywhere) is still there.

On a final note, I also found that the map doesn’t distinguish between 0 values and positive values—rather, a 0 and a 1 will share the same color.  Any observations that have a 0 value need to be dropped out of the data before the map is created.  This is kind of a funny feature, but something that users should be aware of.

Michael Flynn

About Michael Flynn

Michael Flynn is currently an assistant professor in the Department of Political Science at Kansas State University. He received his Ph.D. in Political Science from Binghamton University in 2013. His research focuses on the political and economic determinants of foreign economic and security policy, security issues, and state repression.

3 Replies to “Maps Maps Maps, Part Deux”

  1. It does look better. South Korea, Japan, Germany, Iraq, and Afghanistan clearly stand out now. And it’s quite striking how many countries have a US military presence.
    With respect to the thing about 0s and 1s, you mean it does this even with raw data? Because you’re going to lose 0s when you log the data anyway (you can’t take the log of 0), but that wouldn’t be due to the software.
    I also think the red looks better than the blue. Good choice.

  2. I added 1 to each value (although I’ve heard this approach can have ill-effects in other settings) so that after logging the troops data the zero countries would still be zeroes. But yes, even with the raw data, the software apparently treats any value (including zeroes) as a minimum threshold for color coding–zeroes would be light tan rather than white.
    For example, Iran only has one soldier, and before I removed the zero cases, Libya was given the same color. So apparently the zeroes have to be manually removed from the data before you upload the material to the website to make the map. There may be a way around this by adjusting the scale, but I’m surprised that the default isn’t simply set to ignore the zero values.

  3. Yeah, adding 1 to each value can be problematic in some cases. Especially if your largest value isn’t very large. But if the mean, median, max, and so on are all big, then adding 1 doesn’t distort as much. At least, that’s my sense of the concern here.
    That is strange that the software does that. Too bad. Still, it does a nice job of distinguishing the very large values from the rest at least.

Leave a Reply