Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breadcrumb hierarchy in local juggle view #116

Open
adeldaoud opened this issue Feb 12, 2022 · 16 comments
Open

Breadcrumb hierarchy in local juggle view #116

adeldaoud opened this issue Feb 12, 2022 · 16 comments

Comments

@adeldaoud
Copy link

Hi, I am trying to rely on Breadcrumb's hierarchy definitions local juggle view. While there is some hierarchical structure, juggle local graph does not seem to differentiate between notes that are "up", "next" and "down" . As the following images shows, all these will lay on the same spatial level. How can I make them align so that "next" is beside and "up" is up etc?

image

@HEmile
Copy link
Owner

HEmile commented Feb 14, 2022

This is a good question! It will never work for sure within the Juggl view itself, but we might further the Breadcrumbs integration to fully differentiate the placement of the notes based on those. However, note that this is a very hard problem to do in a general way... I've looked at the code for creating these layouts (I use an external algorithm for these), and it's extraordinarily complex (I barely have an idea what's going on there). So it's somewhat unlikely I'll be able to code an algorithm soon that can perfectly lay them out...

@adeldaoud
Copy link
Author

@HEmile That is too bad that it is such a hard problem. As far as I see it, producing these visualizations at scale is critical to see wider (hierarchically structured) connections and discover new knowledge insights for Folgezettel. The current views in the native Obsidian and Juggle just get too messy very quickly, unfortunately.

A) Sounds as a good idea to further the Breadcrumbs integration.

B) For the Juggle view, do you think it is viable to extend the number of available layouts instead of changing the code? For example, I found the following "Layers in the hierarchical layout style" that takes into account both layers (in our case, up, down) but also sequences (either "next" "previous" or time of note creation). That particular layout algorithm is written in yfiles, but assuming that such algorithms may exist in neo4j.

image

See https://docs.yworks.com/yfiles-html/dguide/layout/hierarchical_layout.html#:~:text=The%20hierarchical%20layout%20style%20aims,%2C%20top%2Dto%2Dbottom.

C)
As a last option, I wonder how I can export my Juggle and BC connections to process their connections in R (or other software)

@HEmile
Copy link
Owner

HEmile commented Feb 15, 2022

B) Yeah, yfiles has some of the best layout algorithms around. Unfortunately the ones I'm using in js.cytoscape aren't as powerful as those... And I don't think yfiles is open source either. Reproducing something like that in the plugin is unfortunately unfeasible.
I might be able to work something out using the Cola layout, but it's probably not going to be easy and the results will be nowhere as good as what you have right there. Unfortunately graph layouts is a very challenging problem!

C) Check out https://juggl.io/Features/Export+to+other+programs for how to export to Cytoscape desktop, you might be able to get something out of that.

@adeldaoud
Copy link
Author

Thanks for the input @HEmile . I will check out C) and feel free to add B) as a feature request.

@HEmile
Copy link
Owner

HEmile commented Feb 15, 2022

Yes, I'll definitely leave it open. Honestly, the algorithm I've been using has been bothering me a lot, it has tonnes of bugs that I have no idea how to resolve, despite the fact that I think it shouldn't be that hard to code it up for the BC use case. Especially in larger graphs...
So there is a good chance I get so annoyed at some point I'll actually create a new algorithm :P It sounds doable to me, but it'll take time...

@adeldaoud
Copy link
Author

@HEmile I totally agree that the algorithms that Juggle is relying on is sub-optimal for what Juggle is actually achieving. Juggl is an improvement over Obsidian's native algorithm but Juggle is not reaching its full potential with the current layouts. The algorithm we want is helping us with knowledge discovery--the current ones are not there yet. My programming skills are limited to R programming and a bit of Python, otherwise, I would have loved to assist you in developing a set of new algorithms. But let me know if I can help in any other way (e.g., I am more than happy to help test various layouts algorithms).

@HEmile
Copy link
Owner

HEmile commented Feb 15, 2022

In this case it would really be about Breadcrumbs more so than Juggl. Ie, it would be an algorithm that works specifically for the BC integration, not for other purposes.

And... I really cannot make too much promises.. The problem of creating suitable layouts is really hard, and although i think I can make it better than it is it will probably still have many issues.
Also imo Breadcrumbs isn't so much focused on knowledge discovery, rather on rediscovery and organization. For that you'd have to look more into clustering (eg the graph analysis plugin).

@adeldaoud
Copy link
Author

I understand. A BC integration is better than nothing. I will also explore ways of doing it in R, relying on exports from Juggl. I will let you know if I found anything useful. There are e.g., the following integration that looks interesting: https://neo4j.com/developer/r/ and https://neo4j-rstats.github.io/user-guide/.

@HEmile
Copy link
Owner

HEmile commented Feb 15, 2022

Thanks for the links. Do note that juggl is not based on neo4j though. It's based on js.cytoscape

@mattjastremski
Copy link

By no means a silver bullet, (and this might be a better candidate for breadcrumbs development) but I think there's an opportunity to bridge the gap between some existing plugins.
Specifically, if either plugin were able to generate the appropriately formatted output text, it could be pasted/piped into plantuml as a "work breakdown structure" diagram.
https://plantuml.com/wbs-diagram

The current output of the breadcrumbs "local index" / "global index" command is so close to being something you could paste into a plantuml codeblock and render a static tree image from. Depending on your plantuml setup, I'm pretty sure you could even kick out a clickable/editable SVG.

@HEmile
Copy link
Owner

HEmile commented Feb 16, 2022

That won't work, those diagrams only support trees and not general acyclic directed graphs which we need for Breadcrumbs.

@adeldaoud
Copy link
Author

adeldaoud commented Aug 3, 2022

@HEmile hope you are well. I am just checking if there are any updates on this issue?

I was browsing around to see if there is any update also in the Obsidian community but not much seems to be happening on creating layouts that are useful in the way I described in the initial post of this issue. I found only the following summary, https://forum.obsidian.md/t/graphviz-and-hierarchical-graph-layout-a-review-and-plugin-proposal/31596.

While not at all optimal, I was also looking for exporting my graph for further analysis in R or Python. I found the following pluign from yfiles that looks promising, https://www.yworks.com/products/yfiles-graphs-for-jupyter#license . I will explore what it has to offer in the coming period, but do let me know if you see any potential as well.

@HEmile
Copy link
Owner

HEmile commented Aug 4, 2022

Hi @adeldaoud . I've not been working on Juggl much lately, mostly because I've not been using it myself. It's unlikely I'll implement this soon as it's a rather difficult programming problem.

In general good graph visualization is a pretty hard problem, so I'm not surprised there's not much very useful stuff yet. Although you might be interested in the new ExcaliBrain plugin.

@adeldaoud
Copy link
Author

@HEmile thanks for the reply. I am curious what other tool than Juggle (or Obsidian) or pipeline you are using for your research?

I have checked out the ExcaliBrain plugin but it seems that one can only visualize directly adjacent nodes and not the entire workspace. But I will take a deeper look.

@HEmile
Copy link
Owner

HEmile commented Aug 5, 2022

@adeldaoud I'm not currently using anything other, really. For graph visualization that is. I use Obsidian religiously, but other plugins have been more useful to me than my own!

Indeed, you're correct about Excalibrain. Depends on your goal (I haven't tried it yet).

@adeldaoud
Copy link
Author

@HEmile ok, I see. I am also finding myself using Juggle less and less, unfortunately, because of the lack of satisfactory graphical representation. But I have yet to find any alternative Obsidian pipeline.

Nonetheless, if you would like to reveal more information about your Obsidian pipeline then I am all ears! Perhaps, that will inspire me to recast mine. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants