New: Joplin Plugin Graph (knowledge graph visualization)

Hello! I have published a plugin to visualize knowledge graph in Joplin.

Main features:

  • Scale to graphs with several thousand notes/connections and allows incremental graph updates.
  • Dynamic filtering of the notes for data exploration.
  • Dynamic graph layout to support different graph topologies.
  • Support for tags (tags can be visualize as special nodes in the graph).
  • Support for visualizing multiple links between notes.
  • Multiple selection of nodes and links, highlighting, variable node size...

I am aware another plugin for graph is already out there - I have contributed to it -
but for now our requirements are quite different and I ended up with significantly different design decisions.

I would love to get your feedback on how to make it better and more useful,
so please post here and/or submit issues.
There are plenty of functionalities I can already think of going forward but I
would like to focus first on how to make the visualization as user friendly as possible.
Interested contributors are more than welcome!

github repo

-Antoine

29 Likes

Have tried your plugin. Amazing~~~ Thanks~~~~

Beautiful visualization, love it, thank you!

super

Thanks again for making this plugin! It looks really awesome.

I already mentioned the idea of adding the option of notebooks as nodes but I do have a few more comments:

  1. I've noticed that enabling this plugin uses a lot of system resources (the fan on my laptop instantly turns on with this plugin) even if it is toggled to not be showing. Could some optimization be done there?
  2. I think a lot of the options currently displayed on the right sidebar could potentially be placed under the plugin settings or be toggled/hidden in some way to give more space for the graph itself. I know I personally wouldn't be constantly changing these options and it kind of adds clutter when the graph itself is already busy.
  3. The ability for it to switch between light and dark mode to match Joplin would look better.
1 Like

Thanks the detailed feedback!

I have given a bit more thoughts about the notebooks, and I may have an idea to generalized the approach which we can further discuss in the issue thread.

Regarding your comments :

  1. I am very interested in the resource consumption issue. I have not noticed on my side, but it will definitely do some profiling. The graph is redrawn every frame while the layout runs, but should not after that. For now, every note selection force a refresh of the graph in order to detect when a note is deleted, so this may add up. Hiding the panel does not suspend the plugin, but it could prevent refreshing the visualization in the background. Something else to look at.

  2. I do expect users to heavily rely on the options to dynamically explore the graph and change the filters/layout as they explore the graph (I do it a lot). As it may be hard to predict what layout works in every circumstances, I let the user decide so I expose a lot of the low level controls. Maybe there is a way to simplify them moving forward, but having those in the Settings will make them hard to reach. However I do agree that a way to hide the controls will be great, specially for smaller screens.

  3. Agreed. I know that Joplin exposes css variables, which I could readily use for most parts. Some other changes will require a bit more work. For now the plugin looks best with darker themes.

That would be very helpful if you could create different issues for those topics, so we can better track discussions/progress.

1 Like

You could try listening for events instead: https://joplinapp.org/api/references/rest_api/#events

1 Like

Thanks for the pointer yes I have seen this and this is probably the way I'll end up going.
Is this derived from the way synchronization is implemented? I have seen this Joplin Server delta sync | Joplin and that looks close.

But that implies that the plugin has to poll the state regularly and the question becomes how often
to make the visualization responsive enough?

Also the doc says it only tells you about notes changes, so I would not be able to detect tag changes this way and will need to check for tags separately, correct?

I created issues for each topic to facilitate discussion and tracking:

1 Like

Very cool! I have no idea yet how it could be useful for my workflow but it looks amazing! Thanks.

I'd love to get ideas for real-world uses for this.

I've tried it. Very useful and cool plugin indeed!

I would like to make another plugin to automatically link notes based on the folder structure, e.g. I manually created a "root" note on every folder with name "/<FolderName>", then copy the markdownlink of that note and put it on the bottom of every other note on the same folder. If there was a folder inside a folder, I linked the "root" folders to each other. This leads to a tree like structure with this plugin, where every note is conected to every other note:

5 Likes

Seems so. I haven't used this function yet. I Joplin should provide not only note updates but other types as well: folders, tags, etc. But this is a change to the core app so won't be quick.

I suppose this could be another feature request to the core app -- allow plugins to subscribe and receive events instead of polling. Seems it can be useful not just for your plugin.

Great. Thanks!

This looks great! How hard would it be to let it group by notebook?

For example, all the notes circled in red in the picture bellow belong to the same notebook, and they are not close to each other. This might make it harder to establish connections between notes, though.

1 Like

Indeed, that would be one way to work around the current implementation.

However, since we already have the file explorer, it may not be so useful beyond that use case, am I correct?
In this case since notes already have a parent_id and we can get all notebooks, I would not be
hard to create those synthetic nodes on the fly and links between them. So we would have notebook nodes linked with a "in" relationship. We could then attach specific behaviors to this tree structure (expand/collapse even move) and also add filters.

There is a issue were we can discuss this further if you are interested: Notebooks as nodes · Issue #2 · agerardin/joplin-plugin-knowledge-graph · GitHub

2 Likes

It seems this feature definitely interest several people. In my workflow, I rely on tags to cluster notes but I can see people love the hierarchical folder structure. Adding something similar for notebooks is completely doable, progress will be tracked here : Notebooks as nodes · Issue #2 · agerardin/joplin-plugin-knowledge-graph · GitHub

4 Likes

Very cool visualization by the way @DanteCoder

1 Like

Wow this is really great, thanks for developing it!!

Not sure if perhaps I have a key/mouse map conflict, however I don't seem to be able to click any graph node and be taken to the note, is this implemented?

Thanks! You need to use CTRL+click or Meta+click to open a note.

2 Likes

I think this plugin is awesome. Will you consider that merge with this plugin into one?

1 Like