Dynamic Graph Creation from Dictionary in Python

I am a novice in Python, an trying to explore graph mining via python. I have a dataset in form of dictionary and trying to create graph/tree out of the below data wherein common vertex to be find by the code dynamically and creates a graph accordingly.

Sampled data -

{‘htt://www.abc.com/amp/proposal’: [‘Proposal for new Issue’], ‘htt://www.abc.com/amp/guideline’: [‘Guideline’], ‘htt://www.abc.com/amp/preparation direction’: [‘Preparation’], ‘htt://www.abc.com/amp/Reviews’: [‘Reviews’], ‘htt://www.abc.com/amp/ethics’: [‘Ethics’], ‘htt://www.abc2.com/amp/access’: [‘Access’]}

Using the above information I am trying to create trees as below - [Sampled Dynamic Tree]

The vertices are dynamic as well as the edges too.

I have checked and tried and checked networkX library, RenderTree library but everywhere the nodes, parents are static. Not sure how to make them dynamic.

Need some quick guidance to sort this issue.

Thanks in advance!

You can start by reading this essay.


Does that help you?