I would like to make a graphical visualization of a nested dictionary as a simple tree structure. I have tried several different solutions, but they are too old (python 2.7) or I get weird error messages, even after reinstalling the packages needed.
Here is an example of the nested dictionary. I can change the end nodes value to be whatever value is most useful and the dictionary should be able to scale and be used on a way bigger file structure.
{
"Folder1": {},
"Folder2": {
"Folder21": {},
"Folder22": {}
},
"Document1": {},
"Document2": {},
"Folder3": {
"Document31": {},
"Folder32": {
"Document 321": {},
"Document 322": {}
},
"Folder33": {
"Document331": {}
},
"Folder34": {
"Document341": {}
}
}
}
I have tried solutions using Mapping, NetworkX, GraphViz, pandas, matplotlib 3.1.3, Json, d3py 0.2.3, pyplot, numpy 1.18.1 and Pydot (pydot2 1.0.33, pydotplus 2.0.2). Using pip3 18.1 to install the packages in Ubuntu 19
Then goal is creating something like this post has, but it is 7 years old, and I can't get it to work after translating from Python2 to Python3. Python library for creating tree graphs out of nested Python objects (dicts)