I currently have a JSON file that I need to utilize in order to create three distinct hierarchy visualizations using d3.pack.
This JSON file contains data for eventA (1 or 0) and eventB (1 or 0). Each individual leaf also possesses a unique ID.
The hierarchies I want to display are as follows: - First hierarchy : Total population (displaying all 10000 elements). - Second hierarchy : eventA (grouping all the 1s and 0s together). - Third hierarchy : eventB, further divided based on eventA values.
Currently, I am utilizing three separate multidimensional JSON files which is not efficient, as I am simply replacing old data with new ones. However, having smooth transitions between views is crucial for my requirements, so this current method falls short.
If anyone has any suggestions on how I can achieve this more efficiently, I would greatly appreciate it!
I'm not seeking specific code examples, just looking for guidance on how best to approach solving this problem.
Below is an example of how the JSON data is structured:
{
"name":"Total",
"children":[
{
"name":"POPULATION (n=20)",
"children":[
{
"id":1,
"eventA":1,
"eventB":1,
"size":50
},
... (rest of JSON data goes here)
]
}
]
}