Archive for October, 2010

The Right Tool

No Comments »

My professor runs a website on the USA elections. I help him some with the graphics.



Since the site features a lot of dynamic graphs, I build a numbers-to-graphs system by combining Bourne Shell and Ghostscript. This gave me a very powerful code and data pre-processor on a very powerful graphic language.

It took many hours to write the program. Luckily, the result was surprisingly dynamic; Because every thing parameterized, things often stayed visually pleasing even with input parameters we had not anticipated. For example midterm elections (right top image) have only house and senate races, but no electoral votes prediction like the presidential elections (left top image). Originally the program could handle only presidential elections, but with two numbers changed an one line removed, it generated the midterm graphics adequately. Take a look at some of the other graphs at Just click on the map.