Combination of the melt function in Hadley Wickham's reshape package and Shan Carter's Mr. Data Converter...You put in CSV, it spits out a melted JSON blob to use with D3