Jan 12, 2010

Charting time series as calendar heat maps

I haven’t updated this blog for a while. I am working on one Matlab project right now. It is kind of difficult for me to work with Matlab and Mathematica at the same time.

There is an interesting post Charting time series as calendar heat maps in R. The original idea from SAS Analysis of airline performance. I create a simple version in Mathematica. The tricky part is to generate the background grid.


The code I use is from an old tutorial of Making a Calendar. For each month, the boundary is defined by 8 points, marked out by darker line. The monthly grids are shifted to the right positions to form a yearly grid. Once you figure out this part, the rest is just straightforward.

I use the stock as the example, this  is actually not the best data set for this type of visualization.


Calendar heatmap:


Download the file calendarheatmap.nb for the detail.

By the way, you can do whatever you like with the materials posted on this blog, there is no copyright problem.


vJD said...

Thank you for this new post - very creative way of looking at data!

I am checking the blog regularly - keep up the good work!

Anonymous said...

Thanks for these blog posts. As a Mathematica newbie I find them very helpful in learning the software.

Heat maps seem to be popular right now. Flowing Data has a new post about a different kind of heat map. How would you approach creating this in Mathematica: