requesting (continued) help to re-structure mapped data

Ok, I got it - AND I remembered that I had issues on this before, and getting around it required a different sunburst chart, which Mike had graciously volunteered.

Thanks @Evan - you took me over the finish line! Based on your code, here’s the final bit:

households_per_settlement_rolled = {
  const rollup = d3.rollup(
  household_data,
  (v) => d3.sum(v, (e) => e.household_total),
  (d) => d.municipality,
  (d) => d.settlement_name);
  return d3.hierarchy(rollup).sum(([, value]) => value);
}
1 Like