title: Error with D3 data.map function
body: <p>I'm trying to load a csv file with x and y coordinates and create circles with that coordinates. I've understood how to load a csv file and i can log coordinates in the console but I don't understand why the log function return Not_a_number when i try to create circles. Is there a problem with mine data.map function? Thanks</p>
  
  <p>Here the code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;script type="text/javascript" src="d3/d3.v3.js"&gt;&lt;/script&gt;
  &lt;style type="text/css"&gt;
      /* No style rules here yet */       
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;script type="text/javascript"&gt;
  
      //Width and height
      var w = 900;
      var h = 500;
      var padding = 20;
      var dataset = [];
  
      d3.csv("dataset.csv", function(data) {
        dataset = data.map(function(d,i) { 
          //THIS WORKS
          console.log(d);
          console.log(i);
          return [ +d["x-coordinate"], +d["y-coordinate"] 
          ]; });
  
  
      //Create SVG element
      var svg = d3.select("body")
                  .append("svg")
                  .attr("width", w)
                  .attr("height", h);
  
      svg.selectAll("circle")
         .data(dataset)
         .enter()
         .append("circle")
         .attr("cx", function(d) {
              //THIS DOESNT WORK
              console.log(d);
              return d[0];
         })
         .attr("cy", function(d) {
              return d[1];
         })
         .attr("r", function(d) {
              return d[1];
         })
  
      });
  
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>