Q:

D3.js line chart with CSV multi-level data

Might be a beginner question, but after looking at tons of exampkes I cannot get my head around how to d3.nest() or d3.map() or whatever is necessary to get pull out the numbers I want from my CSV-file with D3.js.
I have a CSV-file with the following data:
name,year,number1,number2,number3
Superman,2003,227141296,214978953,212418250
Superman,2004,232769230,220606887,211301729
Superman,2005,192769230,220606887,211301729
Batman,2003,252873171,239836381,225174161
Batman,2004,286137492,262439880,243001175
Batman,2004,232769230,220606887,211301729
Spiderman,2006,309584667,279490239,248758932
Spiderman,2007,324081833,278022620,246734614
Spiderman,2008,294081833,278022620,246734614

What I want to do is to create: 

One line chart per name
One path/line in the line chart for each number.
Year as X-axis

Is d3.nest() able to solve this?
In that case, do I have to repeat nest for every path I want to draw?
I am SORRY if the answer is obvious and you have to read this, but if you only can lead me in the right direction I will be greatful!
d3.csv("budsjettgrafikk.csv", function(error, data){

   data.forEach(function(d) {
       ***???***;
   })
   d3.nest()
       ***???*** ;
});

A:

Yes, d3.nest() is what you want.
d3.nest()
  .key(function(d) { return d.name; })
  .entries(data)

That will get the data into the form you need it to be; i.e. a 2D array (more accurately an array of objects with a lower-level array within each object), where the top level has 2 members ("Superman" and "Batman") each of which would contain a row's record.
To render the lines, since this is a nested data structure, you'll need to understand how to work with nested selections.

