Displays investment compound annual growth rates over all time frames. Rows represent start years from 1986, columns represent number of years the investment was held for.
Dynamic scale using ckmeans data clustering algorithm. This assigns the colours to groups with minimal differences in their values. A dynamic scale makes the visualisation usable on a wide variety of data, but makes it difficult to compare different sets of data (the scales would be different). In this implementation, it also results in a non-nice scale.
Inspired by the Portfolio Charts website's heat map - calculator, explanation.
FTSE All-Share Index yearly return data from http://www.swanlowpark.co.uk/ftseannual.jsp
References for CAGR calculation in code comments.