EVEN BETTER Animated Map of Coup Attempts Worldwide, 1946-2013

[Click here to go straight to the map]

A week ago, I posted an animated map of coup attempts worldwide since 1946 (here). Unfortunately, those maps were built from a country-year data set, so we couldn’t see multiple attempts within a single country over the course of a year. As it happens, though, the lists of coup attempts on which that animation was based does specify the dates of those events. So why toss out all that information?

To get a sharper picture of the distribution of coup attempts across space and time, I rebuilt my mashed-up list of coup attempts from the original sources (Powell & Thyne and Marshall), but now with the dates included. Where only a month was given, I pegged the event to the first day of that month. To avoid double-counting, I then deleted events that appeared to be duplicates (same outcome in the same country within a single week). Finally, to get the animation in CartoDB to give a proper sense of elapsed time, I embedded the results in a larger data frame of all dates over the 68-year period observed. You can find the daily data on my Google Drive (here).

WordPress won’t seem to let me embed the results of my mapping directly in this post, but you can see and interact with the results at CartoDB (here). I think this version shows more clearly how much the rate of coup attempts has slowed in the past couple of decades, and it still does a good job of showing change over time in the geographic distribution of these events.

The two things I can’t figure out how to do so far are 1) to use color to differentiate between successful and failed attempts and 2) to show the year or month and year in the visualization so we know where we are in time. For differentiating by outcome, there’s a variable in the data set that does this, but it looks like the current implementation of the Torque option in CartoDB won’t let me show multiple layers or differentiate between the events by type. On showing the date, I have no clue. If anyone knows how to do either of these things, please let me know.

Leave a comment

13 Comments

  1. Reblogged this on Brittius.com.

    Reply
  2. Regarding the date issue, take a look at Video 4 of 5 from the CartoDB Academy session the other night (particularly after 2:30 or so). Link: http://vimeo.com/81056720

    For the colors, can you filter points by the outcome variable? Not sure if filtering works with Torque.

    Reply
    • Checking that out now, thank you.

      Reply
      • If the filtering option doesn’t work to differentiate between outcomes, you might try layering. I’m messing around with this and ARCHIGOS right now. Should have something posted soon.

      • My understanding is that you can’t do layering in the Torque animation. If you discover otherwise, please let me know.

      • Okay, so what that video tells me is what I knew: you need a properly formatted date variable in your table to use as your time attribute, and then that time attribute will be used to index the animation—exactly what I want. Where I’m stuck is getting a column that CartoDB will read as a date. I am creating my table in R and tried including a column formatted in the usual manner (MM-DD-YYYY). When I import the resulting .csv into CartoDB, it reads that column as a string variable, and when I try to change the format to ‘date’, I get an error message. I tried a few different date formats and had the same problem with each one. That’s where I’m still stuck.

  3. Neat. Is there a way to shade countries rather than display coups as dots?

    About the date issue, did you try ISO formatted dates (YYYY-MM-DD)? According to this (http://developers.cartodb.com/documentation/advanced_concepts.html) they use PostgreSQL type dates (http://www.postgresql.org/docs/9.1/static/datatype-datetime.html)

    Reply
    • No, as far as I can tell, you can’t shade whole countries. CartoDB is optimized for geolocated data. I’ve been using rworldmap to build annual slices for animated country-level maps.

      On the date, right, that’s what I saw and tried. Still not sure why it’s balking.

      Reply
  1. Animated Map of Coup Attempts Worldwide, 1946-2013 | Dart-Throwing Chimp
  2. EVEN BETTER Animated Map of Coup Attempts World...
  3. EVEN BETTER Animated Map of Coup Attempts World...
  4. Animated Map of Coup Attempts Worldwide, 1946-2013 | Dart-Throwing Chimp | Andrew Spath
  5. Visualizing Leader Succession in Non-Democracies, 1946-2004 | Andrew Spath

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 5,754 other followers

%d bloggers like this: