The Mike Bostock code draws the months' paths from Jan to Dec in each row, not from August through to July, as you want.

The "weirdness" you see at April is two August months overlapping.

In the monthPath function, the start of the path is in part determined by the day number within the year (d0 = t0.getDay()). You will need to offset this to account for shifting the months from Jan-Dec to August-July

Related Query

More Query from same tag