dataDeathsPerDayAndTown = {
const totals = d3.rollups(
dataDeaths
.sort((a, b) => d3.ascending(a['DateRaw'], b['DateRaw']))
.filter(f => f["Location"]["township"]),
v => v.length,
d => d['DateRaw'],
d => d['Location']['township']
);
const totalsProcessed = totals.map(d =>
d[1].map(e => {
return { date: d[0], township: e[0], deaths: e[1] };
})
);
return d3
.merge(totalsProcessed)
.sort((a, b) => d3.descending(a['deaths'], b['deaths']));
}