TiddlyMaps for Data Entry and Display in a Semantic TiddlyWiki (Motivation & Feature Request)

264 views
Skip to first unread message

LorenzGL

unread,
Oct 16, 2018, 2:32:27 AM10/16/18
to TiddlyWiki

Semantic annotation of data is an extremely powerful tool for structuring knowledge and making it machine readable: domain knowledge is captured by defining a class hierarchy and describing the properties that relate individuals class members. For example, in order to model family relations I can define a class "Person" whose individual members are pairwise linked to eachother by the properties "has_parent" and "has_child". This then allows me to query an individual's ancestry, e.g. "has_sibling" or "has_grandparents" — without having to assert each of these derived relationships individually.


Specialized ontology modeling software (e.g. protégé) exist for building these semantic models. Yet, while extremely powerful these software packages are not good at creating attractive user facing knowledge bases. Interestingly, the ontology concept matches very well onto the "smallest semantic units possible"-paradigm of TiddlyWiki. In TiddlyWiki, a family knowledge base can be simply created by storing each persons information in a tiddler and adding fields for properties has_child and has_parent. Now, an individual's ancestry can be displayed using templates with appropriate filters (recursive search along has_parent property). And, since TiddlyWiki's elegant way of displaying information and media we can easily add additional information like images, personal details, etc. On top of this, TiddlyMap makes it trivial to display the family tree graphically (see "Using the Map Raster" example on TiddlyMap.org).


Unfortunately, linking tiddlers by entering tiddler names into properties fields is tedious and error prone (due to missing auto-completion). TiddlyMap greatly simplifies this data entry process by allowing to connect existing tiddlers by simply dragging edges (which are linked to tiddler fields) between them — thus ruling out broken links due to spelling errors. However, especially in complex models with many properties it is easy to forget to some properties since each edges have to be manually created. In order to improve this I would like to propose a different data entry mode in TiddlyMap: "dangling edges" could be created for each tiddler that is added to a map (based on a template/filter) so that all fields can be easily filled by connecting the respective edges to other tiddlers. In other words, instead of adding both tiddlers and edges manually, adding a tiddler should also add "edges" for connecting additional tiddlers. Ideally, a mechanism for defining rules for which edge type can connect to which node type (including directionality) could be defined.


This behavior would dramatically improve the data input speed, minimize errors, and enable an incredibly powerful semantic TiddlyWiki.

TonyM

unread,
Oct 16, 2018, 3:16:57 AM10/16/18
to TiddlyWiki
Lorenz,

Sounds like a helpful extension to TiddlyMap but I would disagree with "missing auto-completion" in some ways because I have defined fields that get their content from values defined in the same field in other tiddlers.

For example this macro pulls the values from existing fields

\define select-existing-values(fieldname)
<$select field="$fieldname$" default={{!!$fieldname$}}>
<$list filter="[each[$fieldname$]get[$fieldname$]]" variable="choice">
<option value=<<choice>>><<choice>></option>
</$list>
</$select>
\end

Just call it with a field name <<select-existing-values fieldname>>

Also with the if a Child is tagged with its parents, and other things, you could list all of the tiddlers in the tags field 
and test if each is also a person, even a male or female person and thus identify the childs parent(s).

I think my point is there are many ways for you to encode and list any type of relationship in TiddlyWiki..

Best Wishes
Tony

LorenzGL

unread,
Oct 17, 2018, 12:58:45 AM10/17/18
to TiddlyWiki
Hello Tony,

Thanks for the macro. This is fantastic! It solves a problem that I had on the back burner: inheritance of properties from superclasses. However, there will still be cases where a property needs to refer to another tiddler that isn't referenced anywhere else, yet. In these instances the TiddlyMap functionality I describe would be quite helpful.

You are right that there are many ways to solve a problem in TiddlyWiki. I'm constantly wondering whether what I'm doing is the best way or whether there might be a better way to implement. I guess it's part of the experience.

Thanks again,

Lorenz

TonyM

unread,
Oct 17, 2018, 1:40:21 AM10/17/18
to TiddlyWiki
Lorenz

Someone recently mentioned the ctrl-l in edit text allows you to insert a link to a tiddler. This uses the toolbar button $:/core/ui/EditorToolbar/link which has its main code in $:/core/ui/EditorToolbar/link-dropdown

The reason I mention this is if it were reworked it could be used to insert tiddler names into fields and do so after first filtering. Eg Adding a parent to a child let us select only from people tiddlers. and other refined methods like tiddlers with the same surname.

Just a possible lead,

Tony

LorenzGL

unread,
Oct 18, 2018, 1:10:49 AM10/18/18
to TiddlyWiki
One more thing... it would be totally awesome to be able to create embedded map views parametrically. Today, the widget code only allows embedding views that have already been created. This makes it prohibitive to create individual views for lots of individual tiddlers. However, it seems that templating embedded maps would only require for the widget to also specify edge and node filters.

LorenzGL

unread,
Oct 18, 2018, 1:30:09 AM10/18/18
to TiddlyWiki
Excellent! I didn't know, obviously. Possibly greatest shortcut independent of my specific application. I like the idea of using this as a mechanism for filling in fields via a button or form. Will investigate.
Reply all
Reply to author
Forward
0 new messages