Processing, week 2
Today marks the second week I have been learning Processing, a Java-based language for “program[ming] images, animation, and interactions.” In other words, I want to learn how to make useful, pretty graphics.
Over the past year I had seen Processing mentioned here-and-there in various articles, but what piqued my interest was a visualization of US zipcodes. Check it out; it’s awesome.
My guide, at least for now, is Visualizing Data by Ben Fry. I just completed reading the third chapter and thought I’d share an example program.
The above Processing program plots data on a US map. The data are random numbers, associated with each state, which are displayed as colored circles of varying sizes. Colors are based on sign; size based on magnitude. Moving the mouse cursor over a circle displays the state name and the random value.
Obviously, this is a very simple visualization but it’s not hard to see the potential for powerful visualizations. I’m already coming up with other data to visualize with this… such as displaying the difference between the current and average daily temperature for a state.
Oh, before you get to comfortable with that static graphic, click anywhere on the map. Neat, huh? A new random number is generated and the graphic is animated from the old value.
Over the course of this coming week I will read the fourth chapter, “Time Series,” about displaying data which changes over time. I can’t wait to see what program the book will have me work on.
Comments
Leave a Reply


Shane Hall on 03.01.2009
Awesome. Bryce has been playing with Processing lately and made some cool stuff. It’s on my list of things to learn about. http://jfet.net/~bryce/nb/archives/2009/02/18/T23_47_48/index.html has some of what he’s been doing.
Mike Christianson on 03.01.2009
Hi, Shane. I’m definitely looking forward to learning more about Processing because all I’m doing right now is copying from the book!
Discorax on 03.02.2009
Cool.
I’m interested to hear what you think about Visualizing Data. I’ve been thinking about getting that book. Is it all Process programing or is there some theory in there as well.
Usually O’Riley books have a good mix of theory driving the in-depth examples they provide. Just wondering if one follows that same pattern.
- Ryan
Mike Christianson on 03.02.2009
Hi Ryan,
It definitely covers both theory and practice. After the introductory chapter, the author jumps right into code and simultaneously discusses RGB vs. HSV.