library(rCharts)
library(plyr)
library(reshape2)
library(scales)
findata=read.csv("https://raw.github.com/patilv/rChartsTutorials/master/findata.csv")
# These are data regarding NCAA athletic department expenses at public universities. Please see the blog post where these charts were originally used
# regarding more details on the origins of these data.: http://analyticsandvisualization.blogspot.com/2013/10/subsidies-revenues-and-expenses-of-ncaa.html
findata=findata[,-c(1:2)] # removing first dummy column - the csv quirk - and second column on Rank.
findatamelt=ddply(melt(findata),.(variable),transform,rescale=rescale(value))
hmap <- rPlot(variable ~ School, color = 'rescale', data = findatamelt, type = 'tile')
hmap$addParams(height = 400, width=1000)
hmap$guides(reduceXTicks = FALSE)
hmap$guides("{color: {scale: {type: gradient, lower: white, upper: red}}}")
hmap$guides(y = list(numticks = length(unique(findatamelt$value))))
hmap$guides(x = list(numticks = 5))
hmap