title: Creating a D3.js Collapsible Tree from CSV data
body: <p>This might be a slightly silly question for those of you more familiar with d3 but I'm fairly new to it and I can't quite figure out how to get this thing to work:</p>
  
  <p>What I'm trying to achieve is this: <a href="http://bl.ocks.org/robschmuecker/7880033" rel="noreferrer">http://bl.ocks.org/robschmuecker/7880033</a></p>
  
  <p>But I'd like to feed it the data from a flat CSV rather than a JSON.</p>
  
  <p>The problem is that the CSV I have is formatted like so:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Parent Name | Child Name
  -------------------------
  Parent Name | Child Name
  -------------------------
  Parent Name | Child Name
  
  so on...</code></pre>
  </div>
  </div>
  </p>
  
  <p>Could someone please point me in the right direction? I know that the d3.csv function works somehow, but I have no idea how to 'plug it' into the example above. </p>
  
  <p>I do apologise, I know this very much sounds like "Do my homework for me", but I've honestly given it a good go and I think I'm stuck.</p>
  
  <p>Thank you. Appreciated.</p>