score:0

Outputting the data into a table:

<!DOCTYPE html>
<html>
<body>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<!-- JQuery import -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" ></script>
<div id="container"></div>
<script type="text/javascript">
var dataset = [];
d3.csv("data.csv", function(data) {
   dataset = data.map(function(d) { return [ +d["max_i"], +d["min_i"] ]; });

   // build a string using html table
   var tableString = "<table border=1>\
                        <thead>\
                            <tr> <td> max_i </td> <td> min_i </td> </tr>\
                        </thead>\
                        <tbody>";
   for (var i = 0; i < dataset.length; i++) {
        tableString += "<tr>";
        tableString += "<td>" + dataset[i][0] + "</td><td>" + dataset[i][1];
        tableString += "</tr>";
   };
   tableString += "</tbody></table>";

   $('#container').html(tableString);
});
</script>


</body>
</html>

Related Query

More Query from same tag