felixhayashi / TW5-TiddlyMap

Map drawing and topic visualization for your wiki
http://tiddlymap.org
BSD 2-Clause "Simplified" License
863 stars 132 forks source link

Allow connecting edges to other edges, and make edges their own tiddler #188

Open ar-p opened 9 years ago

ar-p commented 9 years ago

Often the relationship implied by an edge is complex enough that warrants having its own concept network.

For example: this is typical when trying to describe complex biological interactions and processes. Imagine the relationship between two concept entities is modulated by a third entity. To be more specific: Substance A - "is converted to" - Substance B. The "converts to" relationship is say, an enzymatic reaction, enabled by Substance C. In this case, Substance C is an entity that characterizes the process itself most directly. Therefore, the concept map would be most meaningful if Substance C's first degree connection was to "is converted to", with its own relationship: for example "enhances" or "inhibits". The relationship then could read like this: Substance A - "is converted to" - Substance B; Substance C "enhances/inhibits" "is converted to".

Going a step further, it would be useful if relationships could themselves be tiddlers. Again, using the example above, opening "is converted to" would show its tiddler, where some details and descriptions of the process itself can be expanded on.

felixhayashi commented 9 years ago

Hi @arpakdel

welcome to GitHub and thanks for creating this issue :)

Often the relationship implied by an edge is complex enough that warrants having its own concept network.

I agree. Before I started developing TiddlyMap, I did much research on the semantic web and ontologies (not because of TiddlyMap though). The idea that a relationship is not just a literal, but represents a concept itself, which may be described and related to other concepts, is a core aspect of the semantic web, shared vocabularies and is also reflected in the w3c's RDF standards.

So I completely agree that this is important and I'll post some potential solutions here for discussion as soon as I find the time!

-Felix

tobibeer commented 9 years ago

This is highly interesting, although I have yet to see a graph where a relationship is related to another relationship in a graph.

The straightforward thing could be a "note" (/"comment") feature which allows to attach "notes" to either edges or nodes. I don't know if vis allows for comment bubbles to either.

Here's how that could work...

  1. select a node or edge
  2. clicking on the "note" button in the toolbar opens a popup where you can...
    1. create new / view / edit / delete a wikified note

A note (/ comment), for me, would simply have a note text which would be wikified into the bubble / popup that allows me to specify:

ar-p commented 9 years ago

I regret that I don't have the developmental expertise to contribute something more concrete on the implementation. However, you might find the work down by Haller interesting - which has a fairly robust implementation of this manner of constructing semantic relationships: iMapping Tool (free limited version available).

The software he made is not open source, but his thesis does cover a lot of functional detail: User Interfaces for Personal Knowledge Management with Semantic Technologies (Haller, H. 2012. PhD Thesis)

tobibeer commented 9 years ago

@jermolene, is this iMapping Tool perhaps what you eventually had in mind with cecily? At least, if cecily worked this way it would be a great way of navigating, visualizing and organizing tiddlers and tiddler relations.

felixhayashi commented 9 years ago

@tobibeer

This is highly interesting, although I have yet to see a graph where a relationship is related to another relationship in a graph.

Well, its not a graph like in TiddlyMap but you take of the UML class diagram for example… http://merc.tv/img/fig/uclassd.gif

@ar-p

I regret that I don't have the developmental expertise to contribute something more concrete on the implementation. However, you might find the work down by Haller interesting

Indeed, I watched the demo video very interesting. Also thanks for the link to his dissertation, I'll definitely have a look at it. iMapping is very similar to TiddlyWiki + TiddlyMap in many respects.


The relationship then could read like this: Substance A - "is converted to" - Substance B; Substance C "enhances/inhibits" "is converted to".

The fundamental problem here is, that I Visjs (the underlying visualization engine) doesn't allow this construct. It only allows relationships to be drawn from node to node, and it is not possible to model a connection between a node and a relationship :( TiddlyMap itself allow this construct.

Apart from this, there are three possible solutions to this problem:

  1. Explicitly model the relationship as node.

2015-11-09 20 32 29

  1. What @tobibeer suggested: Using a edge-type description that will be shown as tooltip. Then use wikitext to create a description that lists all substances by a tw-filter with links that may be clicked and lead to the tiddler describing the encymatic reactuib (I have not implemented it yet, that TiddlyMap parses the description as wikitext for performance reasons so far, but technically, that's no problem).

2015-11-09 20 41 48

  1. Connect the edge type to a tiddler beforhand that represents the concept of the edge type and when the edge is clicked, this tiddler is opened or its text shown as tooltip.

-Felix

felixhayashi commented 9 years ago

@ar-p By the way, while it is a bit outdated in terms of the TiddlyMap version it is using @andtheWings (Daniel Riggins) has created a great wiki with many maps showing biochemical reactions (http://danielriggins.com/mednotes/).

Here is a screenshot:

2015-11-09 20 54 32

andtheWings commented 9 years ago

It's updated now. ;)

felixhayashi commented 9 years ago

It's updated now. ;)

Nice! (and glad to see you are alive :)

-Felix

andtheWings commented 9 years ago

Yeah, sorry. I switched to taking mostly textual notes as school got more intense. I wish had more time to test things because I love this project.

tobibeer commented 9 years ago

@felixhayashi,

explicitly model the relationship as node

I was trying to wrap my mind around that and then probably got distracted before playing directly with TiddlyMap as to if and how that would / could be done. So, thanks for the example.

I think this is a workable solution for now, although it appears to introduce an entirely different paradigm, e.g. "edges as nodes"... which perhaps would benefit from further explorations.

tobibeer commented 9 years ago

@felixhayashi

using a edge-type description that will be shown as tooltip

mhhh, I'm not quite sure that an edge type and an instance of one are to be treated as one

I think there needs to be both, the ability to make the tooltip for an entire edge type more customizable, but also for an individual instance, maybe not per view but at least per pair of source-target-nodes

it appears that those info tooltips need a way to be made sticky so as to be able to make its content clickable; this "sticky" mode could be achieved simply by selecting an edge first as opposed to the non-sticky tooltip shown on-hover

ar-p commented 9 years ago

It has been a pleasure discussing these ideas with you guys. I feel that in the world of medicine, the sheer disorganization of information, especially the way it is presented to learners, needs a completely new approach. As mentioned, I have tried many different solutions in the past couple of years, and nothing comes close to the power and flexibility offered by TW5+TiddlyMap. TW5 alone is extremely powerful, but combined with TiddlyMap, its potential grows in a synergistic way.

One example of the latest map I have been working on

TiddlyMap

I am now thinking to create a TW5 customization targeted to medical students and medical practitioners - as inspired by TiddlyWiki for Scholars.

Regarding iMapTools: I purchased it, and used it for many weeks. Ultimately, I went back to the classic way of taking notes. The issue is that while it was very powerful in generating relationships, and even wiki syntax features, ultimately the organization of the notes became unmanageable. The nodes in iMapTools are very much like Tiddlers, but they have a spatial coordinate in the actual map that was not dynamic and the display could not be filtered - unlike TiddlyMap. And the wiki features of it are far more elementary compared to TW5.

Another application with much potential is

I used VUE less than iMapTools, so I won't give more opinions on it - ultimately I have little motivation to go back to trying it now that I have discovered TW-5 TiddlyMap

As a relevant note to the above discussion - VUE also supports node to edge connections.

@felixhayashi

I have reviewed your suggestions, and I see better now how to implement the relationships. As you mentioned your experience with semantic networks, perhaps you might also find this interesting:

UMLS

As a more specific example, here is a snapshot for top-level semantic relationships for the term "osteosarcoma" generated from one of the many tools offered as part of the UMLS Terminology Services

example

I wonder if there is a way that this already-existing formalized ontology could be imported into TiddlyMap - perhaps it could make the backbone of the custom TW5 for medical-related notes I mentioned above. In this way, it would force a formalized structure to the entire wiki, with the added benefit that the users would be forced to use standardized terminology in the notes - which is an important part of effective communications in the medical field. In addition, just looking at the formal ontology is a great learning tool. It helps clarify often confused definitions -as an example, it is common for learners to confuse what a "syndrome" is, from what is a "diagnosis". I feel that this distinction can be enforced if the backbone of the tiddlywiki was based on this formal structure, and always visible to see visually through TiddlyMap

@andtheWings

Great to see another medical student that has discovered this great tool.

andtheWings commented 9 years ago

@ar-p Do you host your wiki anywhere? I'd love to steal some of your tiddlers. ;)

ar-p commented 9 years ago

@andtheWings I hope to put it up soon and will be glad to let you know; honestly in the past week, I been playing around with the macros and trying to creating customized UIs - and the sandbox version I have is in someways broken - nearly 20 hours that I should have spent studying instead :)

felixhayashi commented 9 years ago

@andtheWings

Yeah, sorry. I switched to taking mostly textual notes as school got more intense. I wish had more time to test things because I love this project.

Thanks! and never hesitate to use other tools when your brain feels like it ;) During courses, when you quickly need to draw something TW/TM is just not flexible enough.

@tobibeer

I think there needs to be both, the ability to make the tooltip for an entire edge type more customizable, but also for an individual instance

While this makes sense, treating edges as individuals would result in way more complexity. I tried to avoid this so far. However, to not close the door on this idea, I early decided to give edges unique ids so it is in theory possible to treat edges as individuals. But I think I will not go this path (for now).

it appears that those info tooltips need a way to be made sticky

Yeah, Visjs also allows to intercept the hover event so it is not too hard to fix this.

@ar-p

It has been a pleasure discussing these ideas with you guys.

dito!

I am now thinking to create a TW5 customization targeted to medical students and medical practitioners - as inspired by TiddlyWiki for Scholars.

Very interesting, would be great if you could share your results at some point.

One example of the latest map I have been working on

That is a very impressive map! While my maps are not as large (not bigger than 30 nodes), I use many separate views to compensate that (my computer is a old and slow and does not survive more than a 100 nodes per view, yes, it's a shame). While I see you made extensive use of the existing styling possibilities, your edges look quite curvy – this is absolutely fine of course, but just in case you want to reduce the "curviness", you can change the visjs physics configuration (per view or globally) setting the spring length a bit lower while increasing the spring constant a bit (background info: Visjs models edges as springs).

Regarding iMapTools […]

Thanks for sharing your experiences with this tool!

Another application with much potential is The visual Understanding Environment (VUE),

@rcrath also introduced me to this tool. While I haven't had a thorough look at it, it seems very clean and powerful. However, it seems to have been abandoned by the developers.

imagine it like this: you make a complex network of Nodes/Tiddlers, and then you can make a PowerPoint-like presentation that steps through these nodes however you want it in a linear sequence.

The "pathways tool" is a nice feature. This is also possible with Visjs, theoretically! Have a look at the example section (http://visjs.org/network_examples.html) more specifically at: http://visjs.org/examples/network/other/animationShowcase.html and click "start a show". Just like in their example, you could define a sequence that moves the "camera" over a certain set of nodes in a linear fashion (also without zooming out like they do in their demo. However, I have not implemented this for TiddlyMap. The closest thing in TiddlyMap would be the focus button in the map header on the very right to zoom on nodes (resembles the VUE "Dynamic Zoom Tool")…

As a relevant note to the above discussion - VUE also supports node to edge connections.

I have to admit, I am a bit jealous of this and it would be great if Visjs would support this. Maybe I can convince the developers to implement this feature at some point or change the Visjs code myself to support this… But no guarantee at all.

I wonder if there is a way that this already-existing formalized ontology could be imported into TiddlyMap

TiddlyMap is not good at importing existing graphs/ontologies at the moment :( There is a ticket to import VUE maps (#61) and RDF files (#60) in general, but I have not found any time to work on this. It will certainly come but probably only in the middle/end of next year. I would work on RDF first which would basically open the doors to import all types of ontologies based on RDF e.g. in OWL format. But this is a long way. To be honest, I always hoped an experienced programmer would come along and implement an RDF-import mechanism for TW/TM so I would not have to do it.

with the added benefit that the users would be forced to use standardized terminology in the notes - which is an important part of effective communications in the medical field.

I highly agree. Many shared vocabularies (e.g. "foaf") are based on this idea that effective communication needs a clearly defined set of concepts. I already prepared TiddlyMap a bit to work with shared vocabs by adding namespaces in v0.7.5 (see http://tiddlymap.org/#Edge-type%20namespaces). The idea was that users can define a set of edge types (using namespaces) and the create a TiddlyWiki plugin that contains these edge types in a bundle. So everybody can reuse these edge-types in their wiki.

Great to see another medical student that has discovered this great tool.

Guess I have to learn Latin + study medicine at some point to keep up with the rapidly growing community of medicine professionals here ;)

-Felix

rcrath commented 9 years ago

@rcrath also introduced me to this tool. While I haven't had a thorough look at it, it seems very clean and powerful. However, it seems to have been abandoned by the developers.

VUE just put out a maintenance release (which broke it under linux unfortunately). The project is on GitHub and has been updated October this year. I use Vue when creating maps from scratch, and TWmap to pull out and examine hypertext relations in TW I have already written. One of these days will put up an example.

Sitiyok commented 8 years ago

@arpakdel

@felixhayashi http://tiddlymap.org/#%40felixhayashi

thanks for providing the link to this phD thesis of Mr. Haller. I now understand why in the past I failed using MindMap&MSProject and now succeded using tiddlywiki/tiddlymap. I hope Mr Haller got a summa cum laude.

Pit

Am 07.11.2015 um 21:00 schrieb arpakdel:

I regret that I don't have the developmental expertise to contribute something more concrete on the implementation. However, you might find the work down by Haller interesting - which has a fairly robust implementation of this manner of constructing semantic relationships: iMapping Tool http://www.imapping.info/blog/ (free limited version available).

The software he made is not open source, but his thesis does cover a lot of functional detail: User Interfaces for Personal Knowledge Management with Semantic Technologies http://files.heikohaller.de/Dissertation_Heiko_Haller.pdf (Haller, H. 2012. PhD Thesis)

— Reply to this email directly or view it on GitHub https://github.com/felixhayashi/TW5-TiddlyMap/issues/188#issuecomment-154743461.

felixhayashi commented 8 years ago

VUE just put out a maintenance release (which broke it under linux unfortunately). The project is on GitHub and has been updated October this year.

@rcrath Oh, somehow missed that message. Thanks for sharing this info.

now succeded using tiddlywiki/tiddlymap.

@Sitiyok thanks, still a long road of improvements ahead for tiddlymap ;)

ahilliard commented 5 years ago

@tobibeer your suggestion of a 'comment' field sounds like just what I'm looking for. I'm trying some knowledge mapping in TiddlyMap where there are few types of links (3), but because of that each link instance needs a little explanation. A few sentences/bullets of text on hover-over would be enough, and a full edge-instance tiddler a nice extra.

As an alternative, would it make sense as a kludge to transclude in link description notes to the end of the from / to tiddlers' descriptions? Maybe using using tmap:linkIDs?

rcrath commented 5 years ago

Late to the party! Three things:

  1. Would breaking this problem into one-to-one, one-to-many, many-to-one, (and their combo,many-to-many) help model this problem? It seems that the thinking here is that this is a one-to-one problem with an exception rather than a many-to-one relationship where the edge acts as a node.
  2. Ugly workaround. Create a new node in the middle of an edge as a junction. It is simply changing a one-to-one relation into many-to-one followed by one-to-one. It does mar the semantic unity of the original relationship, which may or may not be important and can be dealt with via edge labelling. An edge is an edge but can be a node and a node is a node but can be an edge! In this way of thinking, connections to an edge rather than a node are just the case of an edge having a node as a special case as in VUE's implementation. All --nodes and edges alike--are semantically key-value pairs I think.
  3. @tobibeer's solution is a partial solution to this problem but would be an awesome feature.
rcrath commented 5 years ago

ok, even later to the party...just read more carefully about vis.js constraints re: edge to edge mapping and edge types.

The fundamental problem here is, that I Visjs (the underlying visualization engine) doesn't allow this construct. It only allows relationships to be drawn from node to node, and it is not possible to model a connection between a node and a relationship

How about this: If the kludge number one:

Explicitly model the relationship as node

is adopted (it already being implemented is a help in this regard!) with a node type defined as "edge descriptor" since if I understand right, node types can be defined in a way that edge types can't as far as the number of ins and outs (edges are always 1-to-1).

The features of edge type "edge descriptor" would be

Last thing, for VUE maps and rdf, I have always made the assumption, perhaps incorrect but useful to me, that thinking is divided into nouny, statelike, verb-to-BE nodes and verby, verb-to-DO relations. It does not map neatly to nouns and verbs, but generally, relations involve doing something in the middle that relates the two nodes (transforms, subsumes, supervenes upon, becomes, generalizes to, specifies to, etc). That is how graphing seems to be approached in linguistic theory, although it is not hard and fast. There, edges are always unlabeled, with the edge as a generalized transformation (move-x in generative grammar last I checked) ) and all the defining takes place in the nodes. Thus, I kind of get the constraint in Viz. But for semantic, rather than pure syntactical, content, giving relations/edges some additional meaning is helpful in keeping the graph manageable. The downside is that if unconstrained it leads to a seemingly infinite regress of nodes!

Anyway, I would find a node-type "edge descriptor" with the above parameters to be really useful. Maybe it is already possible to define it? Sort of like tags are?