title: d3.csv map column values as keys in object
body: <p><a href="http://bl.ocks.org/thudfactor/6611441" rel="nofollow" title="D3 Drag Drop Example">D3 Drag Drop Example</a></p>
  
  <p>I am working through the Drag Drop Example an would like to read in data from a csv.</p>
  
  <p>I would like to reformat the returned data from my csv file into a needed format. 
  In a drag and drop scenario, the dragged element has a value from Array[3] and is dropped on an element with r1val(n). When those values match an event occurs.
  I would like to find a way to set the values of the first column as key as  shown in the Object below.</p>
  
  <p>file.csv:</p>
  
  <pre><code>  col1,col2,col3,col4
    r1val1,r1val2,r1val3,r1val4
    r2val1,r2val2,r2val3,r2val4
    ....
  </code></pre>
  
  <p>needed format:</p>
  
  <pre><code>  var colSet = {
    r1val1 : ["r1val2","r1val3","r1val4"],
    r2val1 : ["r2val2","r2val2","r2val2"],
    ...
    } 
  </code></pre>
  
  <p>console.log of needed format:</p>
  
  <pre><code>Object
    r1val1: Array[3]
    r2val1: Array[3]
    ...
  __proto__: Object
  </code></pre>
  
  <p>My target is this function:</p>
  
  <pre><code>var DragDropManager = {
      dragged: null,
      droppable: null,
      draggedMatchesTarget: function() {
          if (!this.droppable) return false;
          return (colSet[this.droppable].indexOf(this.dragged) &gt;= 0);
      }
  }
  </code></pre>