High-res The picture above shows the New York Times coverage of nine African countries from 1981 to 2008. You can click for a larger image. If you want to download the entire set of (much better quality) images, you can get them here. The set contains 48 pictures (continental Africa plus Madagascar) and a text file with some extra information and caveats.
I would love feedback, but I am not a fan of blog comments. You can reach me on twitter at @ryanbriggs.
—UPDATE: May 28, 2009 —
Andrew Hughey pointed out that I was missing some articles on the DRC because I forgot to includes those titled Zaire. The image for the DRC is now updated to reflect the additional articles, as is the map.

The picture above shows the New York Times coverage of nine African countries from 1981 to 2008. You can click for a larger image. If you want to download the entire set of (much better quality) images, you can get them here. The set contains 48 pictures (continental Africa plus Madagascar) and a text file with some extra information and caveats.

I would love feedback, but I am not a fan of blog comments. You can reach me on twitter at @ryanbriggs.

—UPDATE: May 28, 2009 —

Andrew Hughey pointed out that I was missing some articles on the DRC because I forgot to includes those titled Zaire. The image for the DRC is now updated to reflect the additional articles, as is the map.

High-res The New York Times’ API is really fantastic.
— Update: May 28, 2009 —
A point of comparison (requested by @theresac) is that in the same time period Canada had 10905 articles, Mexico had 10042, Germany had 10161, Norway had 1393, and Bangladesh had 900. I will soon upload the graphs of each country in Africa over time, as they show where coverage spiked. The point of the original exercise was to allow for comparisons within the continent (and to learn how to use processing), but if I find some extra time over the summer I might expand the project to the rest of the world.
— Update #2: May 28, 2009 —
Andrew Hughey pointed out that I was missing some articles from the DRC because I forgot to includes those titled Zaire. The map is now updated to reflect the additional articles.

The New York Times’ API is really fantastic.

— Update: May 28, 2009 —

A point of comparison (requested by @theresac) is that in the same time period Canada had 10905 articles, Mexico had 10042, Germany had 10161, Norway had 1393, and Bangladesh had 900. I will soon upload the graphs of each country in Africa over time, as they show where coverage spiked. The point of the original exercise was to allow for comparisons within the continent (and to learn how to use processing), but if I find some extra time over the summer I might expand the project to the rest of the world.

— Update #2: May 28, 2009 —

Andrew Hughey pointed out that I was missing some articles from the DRC because I forgot to includes those titled Zaire. The map is now updated to reflect the additional articles.

High-res I have been playing around with the New York Times API and Processing over the last few days for a project I am working on. I am looking at how the Times’ coverage of Africa has shifted from 1981 (the earliest date accessible by the API) to 2008. The picture above shows the (predictable) spike in the number of New York Times articles about Rwanda in 1994.
Expect more visualizations of Times data over the next few weeks as I wrap up the project. I didn’t find anything earth shattering, but having data to back up hunches is always nice. If anyone wants to learn how to use processing I can’t recommend Processing and Visualizing Data enough. Both were written by the people who created the Processing language. The picture that I made above draws heavily on code written by Ben (one of the creators) in an example in his book.
When everything is finished I will post the code and the final visualizations to this page.
A final note: if you are interested in the link between media attention and violence, you should check out this recent post from Alex de Walle on the SSRC webpage.

I have been playing around with the New York Times API and Processing over the last few days for a project I am working on. I am looking at how the Times’ coverage of Africa has shifted from 1981 (the earliest date accessible by the API) to 2008. The picture above shows the (predictable) spike in the number of New York Times articles about Rwanda in 1994.

Expect more visualizations of Times data over the next few weeks as I wrap up the project. I didn’t find anything earth shattering, but having data to back up hunches is always nice. If anyone wants to learn how to use processing I can’t recommend Processing and Visualizing Data enough. Both were written by the people who created the Processing language. The picture that I made above draws heavily on code written by Ben (one of the creators) in an example in his book.

When everything is finished I will post the code and the final visualizations to this page.

A final note: if you are interested in the link between media attention and violence, you should check out this recent post from Alex de Walle on the SSRC webpage.

Circle Plot Code

Before you even start reading this, you deserve a warning. This post exists mostly so I can keep track of my code and ideas. I am putting it online because it seems conceivable that some one on the internet might find it useful.

At the bottom of this post, you can download the latest version of the processing code that I used to create my circle plots. It is also the first program I have written since high school, and it still needs a lot of work. That said, it does most of what I need it to do. It is only 72 lines long and I tried to keep it readable, so hopefully you can see what I am trying to do pretty quickly.

To use it, you first need to download processing and download my sketch. The program relies on two external files. First, you need to load a font into the sketch. The font that I use is called Silkscreen. It is free to download and use. Second, you need to create a .csv file with your data, name it “data.csv” and add it to your sketch. The variables in the file control (in order): country name, position on x axis, position on y axis, size of the circle, and colour (blue to red).

The program is incomplete. The biggest problems are:

  • All variables in the .csv file (except the country name) must be scaled 0-100 outside of the program (100 is the max value and 0 is the min). I have been doing this in SPSS. This means that all of the positioning is relative, not absolute.
    • The program needs a way to internally scale the raw numbers so that SPSS is not needed.
    • The program needs a way to decouple the x and y values from the size of the sketch, which could allow for plotting raw numbers without scaling them against each other.
  • The font doesn’t scale with the image size. A larger font should be used when the image gets to a certain size.
    • A simple if statement will fix this, but I wanted to fix the previous problems first because they might complicate this fix.
  • The output (in the window that appears when you run the program) doesn’t match the image that is produced and saved in the sketch’s folder. The image is there, but the output window doesn’t show it.
    • This only started happening after I downloaded the most recent beta, version 0154.
  • I would like a way to show changes over time, perhaps by showing a circle for each year, starting with high transparency, and then making the circles less transparent as they move through time.
    • This would involve changing the arrays and I haven’t thought it through yet. I would probably add a year variable to the end of each line in the .csv file.
  • It might be nice to be able to colour each circle after a region, so that all of Europe, for example, was the same colour. It would make comparisons easier.
    • If I did this then the current colour scaling code would need to be either replaced to added on to.
    • This might also necessitate adding another variable, because the current colour variable must be scaled 0-100 and links to an attribute that exists for each circle.

    The code was last updated on Nov 1, 2008.

    Download the code, as a processing file, here.