Accepted answer

You can use d3.nest() to group your data into week numbers

First, we need to define a time parser that would give you the week number of a date object

var week = d3.time.format("%U");

Then create a nest object

var nest = d3.nest()
    .key(function (d) {
         return week(new Date(;

The nest object will be an array that contains your data grouped into week numbers

A live demo with your data can be found at You can take a look at the nest object in the console

Related Query