I realize Phil’s tutorial on g3.group, d3.rollup explains this a bit, but I haven’t quite managed to grasp how it works.
What I would like to visualize is this: the name of the location and the number of different categories of entries in that location:
What I can’t figure out is how to re-label the indexes so that I can use them. I can transform the grouped data into an array, but even at that I don’t know how to reference these ‘counts’ for each group.
I can manually construct the array that I am after using index numbers (as done in this shared notebook), but this doesn’t seem like a good solution:
Any tips for how to render in values directly from my grouped data (or the derived array)?