score:1

If I understand you correctly, you want to convert your data and sum all COUNT for the same day. You can do it with d3.nest.

var dataAsCsv = `DATE OF ARREST,ARREST RESOLUTION,COUNT
01/01/1988,BONDED OUT,1
01/01/1988,BONDED OUT,1
01/01/1988,BONDED OUT,1
02/01/1988,BONDED OUT,1
02/01/1988,BONDED OUT,1`;

var data = d3.csvParse(dataAsCsv);

var parseDate = d3.timeParse("%m/%d/%Y");

var convertedData = d3.nest()
  .key(function(d) { return d["DATE OF ARREST"]; })
  .rollup(function(v) {
      return {
        date: parseDate(v[0]["DATE OF ARREST"]),
        count: d3.sum(v, function(d) { return +d["COUNT"]; })
      }
  })
  .entries(data).map(function(d) { return d.value});

console.log(convertedData);
<script src="https://d3js.org/d3.v4.min.js"></script>


Related Query