dataByBorough = {
const data = d3.rollup(dataset,
collisions => d3.sum(collisions, c => c.injured),
d => d.borough,
d => d3.timeMonth(d.date));
return Array.from(data, ([borough, months]) => ({
borough: borough,
counts: Array.from(months, ([date, injuries]) => ({date: date, injuries}))
}));
}