Nearby Tiddlers - following on from TiddlyMap

Hi,

I had to stop using TiddlyMap quite a long time ago as my TW grew in size, I am now heading towards 4000 tiddlers in my knowledge base.

Sometimes I find myself thinking about trying to write something similar, quite possibly not graphically based, by means of example, if I have a tiddler A which I wish to examine.

Scenario 1

rank1: List all tiddlers that are directly linked TO in the text of tiddler A
rank2: List all tiddlers that are directly linked TO in the text of tiddlers in rank1
rank3: List all tiddlers that are directly linked TO in the text of tiddlers in rank2

Scenario2

rank1: List all tiddlers that (in their main text field) link directly to tiddler A
rank2: List all tiddlers that (in their main text field) link directly to tiddlers in rank1
rank3: List all tiddlers that (in their main text field) link directly to tiddlers in rank2

So I am interested in a neighbourhood of interest defined only by links in tiddler text.

I would ideally like to be able to experiment with the direction of linking hence scenario1 and scenario2 above and maybe increase rank but only to a modest level so I am not thinking in terms of recursive code, I am guessing for only 3 levels it would be easiest just to hard code it out.

I guess the primary difference in my interest and TiddlyMap is I am not overly concerned with a graphical interface and I need to limit the number of tiddlers, I would tend to be interested in one “hub” tiddler at a time and then simply wish to see nearest neighbours to a modest level “outwards”. I am thinking initially of a simple title list based text result with duplicates removed and possibly reflecting the rank - really basic, for instance perhaps three lists of tiddler titles with the rank indicated at the head of each list.

Has anyone written anything along these lines? I know there have been discussions about more intelligent “nearby” systems but in my case there is no need for analysis of anything other than the links I have already set up in tiddler text by hand.

TiddlyMap already has this functionality.
image

What you are talking about is Neighourhood scope. Before you can use this, however you need to create a new view because by default TiddlyMap displays the “live view”, which includes all tiddlers. With 4000, no wonder it begins to stutter.

  1. Clone current view
    image
  2. Ensure cloning is enabled.

Then you can configure your view, by fine-tuning the filters. For example you may filter based on tag. You can also enable or disable edge types and create networks of tiddlers and relationships.

Tip: Use the widget code to embed different views in your tiddlers.
image

Paste into your tiddler and forget about it. When you add a new tiddler that matches your custom filter, you’ll see TiddlyMap widget updated, almost instantly.

Hope this helps.

Edit:

[field:title{$:/temp/tmap/currentTiddler}]

Keep this filter to limit the scope to the current active tiddler. This will become a centre for your map view and will include its “Neighbourhood” within 1, 2, 3, etc. distance.

If you filter by tag, or fixed tiddlers. The tiddler you see will be counted as 0. The same applies for a group of tiddlers matcing your filters. Their neighbourhood will show depending on your selected scope.
Note that in TiddlyMap Edges are unidirectional, e.g. Incoming and Outgoing. This is called “traversal” and can be selected below the scope options.

I always enable Inter-neighbour edges because it highlights indirect relationships between the neighbourhood nodes.

Have fun!

Hi, thanks so much for that detailed answer.

I think TiddlyMap is probably a bit of a heavy tool for what I require but I am trying it out rather than simply going on my initial reaction so I am staying open minded.

However following your instructions I have not been able to get the behaviour I expected. The problem seems to be centred on the use of [field:title{$:/temp/tmap/currentTiddler}].

I interpreted your instructions this way…

  1. Clear all existing entries in cloned view so that the only entry in the view configuration node filter is [field:title{$:/temp/tmap/currentTiddler}]

  2. Leave the edge type filter alone, accept the cloned values without any change.

The situation I arrive it is that dependent on how I open and close tiddlers on the story view (not using TiddlyMap) I can get TiddlyMap to recognise the “current tiddler” - so not seamless but it works, it is possible to get the target tiddler I have written with just a few links in the main text to other test tiddlers to appear in the centre of the graph.

The problem is that what ever target tiddler I try to manufacture for the purpose of testing I cannot get TiddlyMap to show links to nearest linked neighbours, I have played around with the neighbourhood scope and chosen values of 2 and 3 and even.

So to be specific I have a tiddler named “New Tiddler 15” and it has a single link in the text field to another tiddler named “fred”, I cannot achieve the desired result when “New Tiddler 15” is the current tiddler - I expect to see a graph with two nodes - “New Tiddler 15” and “fred”, instead I just get “New Tiddler 15” - if I play around with the StoryRiver to make “fred” the current tiddler then I just see “fred” I don’t see the linked tiddler “New Tiddler 15”.

In short it seems that [field:title{$:/temp/tmap/currentTiddler}] set in the view configuration does not allow more than one tiddler to be shown - simply the current tiddler. My expectation is that this should show all tiddlers directly or indirectly linked to the current tiddler as dictated by the value in neighbourhood scope.

I have experimented both on a copy of my real knowledge base tiddler and also on the TiddlyMap.org website and the results seem to be the same in both cases.

Additional: I stumbled across TW-Graph5 here How to export/import a TiddlyMap?

With this plugin I have had a little more success, when I created tiddlers named say Susan Fred and Alison I can add links in each tiddlers text to some of the other tiddlers and see the group properly, however I am only seeing tiddlers that are directly linked to say fred[] so if Alison contains a link to Susan and Susan contains a link to Fred then setting Fred as the sole initial tiddler does pull in Susan but not Alison, I have yet to see anything that goes beyond first tier neigbours when it comes to following links but maybe I haven’t found the right setting yet.

I can certainly see cases where the use of filters like tags has introduced more tiddlers into the consideration but in terms of pulling in more than directly linked neighbours when links are the only connection to be followed I am not seeing it yet.

I am still interested to hear from anyone who has pondered a simple engine to identify linked neighbours out to a certain depth or zone? Something that starting with Fred will find nearest linked neighbour Susan and from Susan will find linked neighbour Alison and conclude that if the user preference value of zone depth is set to 2 then both Susan and Alison are considered neighbours but if the value of zone depth is set to 1 then only Susan is considered a neighbour. An engine that is basic and elemental taking in a target tiddler or list of tiddlers and delivering a result list of tiddlers etc.

Hi, Apart from the current tiddler filter you must have the relevant relationship in the Edge-type filter. It is not intuitive, but you just need to scroll-down. Note, that the filters with hyphen are commented out, e.g. ignored when rendering the view.

I incorrectly presumed you’ll have that already. Edge-type filter is very powerful and I haven’t seen anything like this anywhere else. Once you get into creating custom edges you’ll see.

Other than that your logic and expectations are correct. Let me know how it goes.

All this is available in TiddlyMap. I played a bit with the Graph-thing and it’s still in infancy. If you’re still struggling, send me screenshots of your “Configure View” dialogue.

Also ‘tagged’ and ‘body-link’ are separate edge types. If you use them in the same view, it helps to style the edges differently. Then it’s easier to analyse. It also means that the tagged filter will have to be present in the Edge filter thingy.

Edit: Here are the edge-filters you want.

  • [[tw-body:link]]
  • [[tw-list:tags]]

If you use those, you should be able to see both edge types simultaneously.
One more note if you have [tag[component]] filter in the Node filter it will filter nodes based on that tag and will take precedence over the edge filter. It will click when you play with it for a bit.

Thanks - that was what was missing - I didn’t have the [[tw-body:link]] as I inherited from the cloned “Overview” view so now I am seeing Susan and the rest, I will try it with some tiddlers that are part of my real knowledge base next.

I will play with that for a while.

Just in case it is of interest to anyone I tried a more textual based approach - just exploring at the moment, this is hard coded for three levels of link nesting, very crude layout, just something to poke around with a stick, just place in the text field of a regular tiddler. It would be necessary to replace “My Target Tiddler” with whatever name is chosen for the test tiddler.

\whitespace trim


<$list filter="[[My Target Tiddler]links[]sort[title]]">
<br><br><$link <$view field="title"></$link>
<$list filter="[title{!!title}links[]sort[title]]">
<br>&nbsp;&nbsp;&nbsp;&nbsp;<$link <$view field="title"></$link>
<$list filter="[title{!!title}links[]sort[title]]">
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<$link <$view field="title"></$link>
</$list>
</$list>
</$list>


2 Likes