How to make a plot based on a given requirement using plotly

Hello, i need help on a project I am currently working on. I working a graph that is like a Sankey graph but it is time based.

The logic of the graph is : once a label has been choosen, we start seeing the labels “children” over the years. A label is considered a child if it is more than 0.75 correlated. so in the first example that i have drawn. i choose cs.AI In the next steps we see for the year 1990 who are the children(for us is Cs.CE, cs.CG and CS.CR) we continue with finding the children for the year 1991 and see if there is any parent child relationship over with the children of the previous years and so on.

Below is a link to my approach and a mock-up data in a dataframe.


my question are.

  1. what is a better way to approach this task?
  2. Is there a graph in ploty library that implements this?