TechPolicy.ca Data mining politics and public policy. The politics of data mining.

21Feb/104

Beautiful Web-Based Graphs

I regularly show charts on this website, and for the past few days, have been trying to find a good way to do this. Many of the charts so far have been shown as PDF or JPG files. These are fine, but they are not very responsive. Furthermore, many of the packages available for graphing are proprietary or not open source, and this is a problem for me. I decided to look for something I could live with when it comes to displaying charts and graphs.

Quite a few people have recommended Google Charts, which definitely has a lot to offer. However, I also want to customize my charts and make my own chart types (for example, social network illustrations). Another good package is Open Flash Chart, but I don't have a Flash license and prefer things to be a bit more open. Finally, there's Processing. This is a great language, but Java applets on a website bug me.

I'm quite picky, but have finally found a useful tool: Raphaƫl -- a library meant for representing vector graphics using JavaScript. While they have a graphing library, I decided to write my own code to play around with the library and customize the graphics. Overall, I must say that I am very impressed with the package.

As an example, the chart below shows a bubble plot. While fairly basic, I'm really happy with how easy it is to make interactive charts. Scrolling over the bubbles changes their colour, and adding other features is fairly easy.

Another example is a line chart, shown below.

I'll do my best to improve these charts and make them more interactive and useful. Please e-mail me if you want the source code.