title: D3.js sorting the rows of a heatmap by column values - approaches?
body: <p>I'm trying to animate a heatmap grid that describes the ranks of an arbitrary parameter in different countries (rows) across years (columns). The initial map is here:</p>
  
  <p><a href="http://bl.ocks.org/phattwizat/5471768" rel="nofollow">http://bl.ocks.org/phattwizat/5471768</a> </p>
  
  <p>I'd like to reorganize the rows by the ascending values of the 6th column in a transition, however I'm struggling to identify how to specify the selection and the subsequent sort that is necessary.</p>
  
  <p>I'm having trouble figuring out how to best implement the sort. Can someone advise? Debating whether I should reformat the data, perhaps into an array of objects - 1 for each row with column data as object attributes if it simplifies.</p>