Project: NYTimes GraphMaker
Date: Fall, 2009
Language: Processing
Key Concepts: Data vizualization, graphing, NYTimes Article Search API
Overview:
The New York Times Article Search API gives us access to a mountain of data: more than 2.6 million indexed articles. There must be countless discoveries waiting to be made in this vast pile of information – we just need more people with shovels! With that in mind, I wanted to release a really simple example of using Processing to access word trend information from the Article Search API. Since I made this project in February, the clever folks at the NYT research lab have released an online tool to explore word trends, but I think it’s useful to have the Processing code released for those of us who want to poke around the data in a slightly deeper way. Indeed, I hope this sketch can act as a starting point for people to take some more involved forays into the dataset – it is ripe to be customized and changed and improved.
This is the simplest project I’m sharing in this now multi-week source release. It should be a nice starting point for those of you who have some programming experience but haven’t done too much in the way of data visualization. As always, if you have questions, feel free to send me an e-mail or post in the comments section below.
You can see a whole pile of radial and standard bar graphs that I made with this sketch earlier in the year in this Flickr set.
Getting Started:
You’ll need the toxiclibs core, which you can download here. Put the unzipped library into the ‘libraries’ folder in your sketchbook (if there isn’t one already, create one).
Put the folder ‘NYT_GraphMaker’ into your Processing sketch folder. Open Processing and open the sketch from the File > Sketchbook menu. You’ll find detailed instructions in the header of the main tab (theNYT_GraphMaker.pde file).
Thanks:
It’s starting to get a bit repetitive, but once again this file depends on Karsten Schmidt’s toxiclibs. These libraries are so good they should ship with Processing.
Download: GraphMaker.zip(88k)

This software is licensed under the CC-GNU GPL version 2.0 or later.





















7 Comments
This looks awesome!
Kind of a newbie question: I'm getting an error that the package "toxi" does not exist. I tried downloading toxi math and geom classes from google code and placing folders in my Processing > libraries folder — doesn't seem to help. Do I have the wrong toxi libraries? Am I putting it in the wrong place? (I'm using Processing 1.0.9).
Hi,
I am using the toxiclibs core, which you can download from here:
http://code.google.com/p/toxiclibs/
/>
Cheers,
-Jer
Thanks for these Jer! Is there a way to connect the NYTimes GraphMaker & NYTimes: 365/360 apps to a set of offline data like you did with your BC Budget Visualizations? i.e. Excel .csv?
Definitely possible. I've been meaning to implement some kind of a caching system for a while now.
I think the most straightforward way of doing it would be to save out the individual JSON requests as you get them into a folder – then before each request you could see if the file exists before you do a new search.
If I get some time over the weekend I will try this out.
-Jer
I downloaded from the same link you indicated here, but have the same problem with toxi math and geom classes =/
Nice. I am cleaning up a pretty cool dataset and I'd like to use your apps to visualize them. Feel free to drop me an email & let me know how its coming along.
Thank you so much for sharing…as a Processing newbie (going through Shiffamn's book: as we speak) it's a great piece of code to play with. Unfortunately, being a newbie seems to have its cons as i'm unable to change the background color
it's stays white no matter what color I input). I've tried the following:
color backColor = #111111;
tried to change background(backColor); to background(0); but same thing.
What am I missing?