It would be great if you could make a feature where it was possible to export the graph to a Network Graph format.
Either Graphviz (dot), GraphML or even better to a RDS format like JSON-LD.
And let the export be somehow customizable, so that the user can map their Tag’s, Keywords, Headers, Body of text and other information to the corresponding fields/objects in the export format.
(Aside: I removed the “ Wishlist No. 1 - ” from the title, hope that’s okay. We’re trying to avoid this kind of competing for attention in feature requests!)
Would be great to export the graph statistics to a .CSV format as well. Many softwares can import .csv files and than make other types of operations with it. Like Gephi, a specialized software to produce graph visualizations with outstanding plugin capabilities.
OR, I wonder if would be possible to transform the graph links into a new note with a table, where the #hashtags are the category columns, and the notes are the lines, and in some way, a extra line in the end with the total number of notes linked to that hashtag.
I’ve seen some discussions about this on the discord, and I’m curious if this has been implemented already in a plugin or script. Re-surfacing this thread in case someone has an update.
I’ve built a new Python package obsidiantools that integrates closely with NetworkX. With Python becoming the main language for the science community, for things like graph analysis, I think it’ll be worthwhile for there to be more integration with NetworkX.
Cristian’s link on the file IO options for NetworkX is handy reference… NetworkX is a very powerful part of the Python data stack.
This is the code you need to get a NetworkX graph G:
import obsidiantools.api as otools
vault = otools.Vault(<VAULT_DIRECTORY>).connect()
G = vault.graph # networkx graph
This is how a basic vault looks like visualised in my package demo through Matplotlib:
With NetworkX you can also make subgraphs to filter the notes. I have some markdown file readers in the backend but they’re not exposed in the main API yet until I think more about the design I’d want (maybe have plaintext notes stored in JSON).