Hierarchical data to hierarchy graph

I have a load of component hierarchy and description data (still developing a new project)
Stacked quite a few hierarchical layers deep.

I’d love to be able to display it in a radial graph, so that you can see how the element you are working on relates to the overall project.

I’ve tried a few approaches
see the attached .gh file
Components-Requirements-Charted3.gh (79.2 KB)
The excel data is internalised at the start.

My best attempt so far Has been laborious.

I split the hierarchy text to find out how many times “.” appeared, to give a hierarchy level indication
Then made increasingly bigger polygons with the number of elements at that level
I had no idea how to reference the parent levels so I did some circle packing

Well,
everything is there and labelled but it’s a fudge and doesn’t display how elements are related to their parent.

My next attempt has been trying to get the hierarchy data as path data


Then I’m probably going to have to do some recursive wizardry with nested Anemone components
ouch

Any suggestions for helpful lessons or videos or .gh files which show how to develop tree structures based on data structures which arent just fractally recursive?

Or can I maybe match my data into a fractal tree and delete branches which no longer exist ?

Maybe I should make a mesh from the objects, or settle a voronoi recursively ?
All suggestions welcome
Thanks
Rod

I put some example there. Not sure it is relevant, but there are differents scripts with an example of ho to go to a "horizontal tree’ to a circular one. This is the easy part. A radius is a level in the tree (X here), an angle is an height (Y or Z).

The most difficult is doing the “horizontal” as there are many ways to do it.

1 Like

Your datatree have errors… ?
1.1 , 2.1 and 2.2 have repetitions.
I think they were supposed to be 1.10 , 2.10 , 2.20 …
Somewhere the indexes were converted to numbers, losing trailing zeroes?
Can’t know if there are other errors because of that.

Ohh
You’re correct
will get cleaner data and come back to this
Thanks

        {0}
  1. {1}
  2. {1;1}
  3. {1;2}
  4. {1;2;1}
  5. {1;2;2}
  6. {1;2;3}
  7. {1;2;4}
  8. {1;2;5}
  9. {1;3}
  10. {1;3;1}
  11. {1;3;2}
  12. {1;3;3}
  13. {1;8}
  14. {1;9}
  15. {1;9;1}
  16. {1;9;2}
  17. {1;9;3}
  18. {1;1}

Gee Whizz wow that’s right into the depths of recursive levels
The C# script goes waaay over my head.
Will try and investigate further thanks

Here is a way to use your data. The idea is to have a data in tree (not Grasshopper).
A node has a parent and childs.
First node here contains “trunks” but you can put whatever you want

You can have a circular graph you can go on cluster to adjust the size.

Data in Tree.gh (49.8 KB)

I think it could be nice to use Kangaroo in order to adjust the looking. Now you have the connexions (except the first)

3 Likes

OMG Laurent
I’m just about crying
You’re AMAZING
Like top level wizardry
What a HERO!!!
Thank you So So So Much

1 Like

Here’s my updated solved version
Component Data in Tree (1).gh (63.8 KB)

With what you’ve done I can guide kangaroo to spread out the elements and shake it into a shape like this

Thank you so much again Laurent
Once I’ve checked through my data sets and cleaned it all …
I’ll have a great project overview chart
Soooo cool

2 Likes


Adding a grab component to the kangaroo solution helps to untangle knots.
(that’s kinda what I do with kite lines in real life)
Adjusting the pull to outer circle (curve) based on initial height helps with the initial fall spread.
A graph mapper helps to get neater relation between the node level sizes.
Components and Tasks2.gh (71.0 KB)

3 Likes