title: Select data from a CSV before loading it with javascript (d3 library)
body: <p>I want to select some data out of a CSV file before i load it with javascript (with the d3 library).</p>
  
  <p>This is how i load the CSV:</p>
  
  <pre><code>d3.csv("data.csv", function(csv) {
      vis.datum(csv).call(chart);
          });
  </code></pre>
  
  <p>And this is a sample of the CSV file:</p>
  
  <pre><code>Class,Age,Sex,Survived
  First Class,Adult,Male,Survived
  First Class,Adult,Male,Survived
  First Class,Adult,Male,Survived
  First Class,Adult,Male,Survived
  First Class,Adult,Male,Survived
  First Class,Adult,Female,Survived
  First Class,Adult,Female,Survived
  First Class,Adult,Female,Survived
  Second Class,Adult,Male,Perished
  Second Class,Adult,Male,Perished
  Second Class,Adult,Male,Perished
  Third Class,Adult,Male,Survived
  Third Class,Adult,Male,Survived
  Third Class,Adult,Male,Survived
  Third Class,Adult,Male,Survived
  Third Class,Adult,Male,Perished
  Third Class,Adult,Male,Perished
  Crew,Adult,Male,Perished
  Crew,Adult,Male,Perished
  Crew,Adult,Female,Survived
  Crew,Adult,Female,Survived
  </code></pre>
  
  <p>For example i want only to select the <code>Second Class</code> and <code>First Class</code> rows before i load it with <code>d3.csv</code>. </p>
  
  <p>i know i can just delete the other rows in the CSV, but i want to make a function so that the user can select what categories he want to use. I hope that makes some sense.</p>