title: D3 - create network graph from 2 column list of nodes
body: <p>We have compiled a 2 column spreadsheet of SQL and Web servers that all talk to one other daily:</p>
  
  <pre><code>Source,Target  
  sql1,web1  
  sql1,web2  
  sql2,web2  
  sql2,sql1  
  sql2,web3  
  web2,web3  
  web3,web2
  web3,sql2
  </code></pre>
  
  <p>I want to create a 'pretty' and <a href="http://bl.ocks.org/jose187/4733747" rel="nofollow">simple D3 graph</a>, (not necessarily that one, even a static graph might do) from above data. Direction of flow is not that important. Each group (SQL or WEB) needs to be in a different color though.</p>
  
  <p>However, D3 requires the data to be in json format.</p>
  
  <p>How do I make the D3 code accept my 2 column data ?<br>
  or How do I convert my 2 column data into the JSON format that D3 code requires ? I'm comfortable writing T-SQL code btw if someone can guide.</p>