Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Sandbox/Was a bee/tree/doc
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Module rating |pre-alpha|nocat=true}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> ==Usage== {{User:Was a bee/TreeBox|item=Q1073}} Paste following code at anatomy articles. It automatically shows tree (as far as structural data is stored in Wikidata with the source, TA98) <code><nowiki>{{</nowiki>[[User:Was a bee/TreeBox]]}}</code> {{-}} ==Plans== As far as I think in long-term perspective, technical part (rendering graphical tree based on data in Wikidata) would be implemented someday by Mediawiki extension or something in more stylish manner by experienced coder. Just like [[Template:Category tree]] ([[Wikipedia:Catalogue_of_CSS_classes#Page.2Faction_specific]], [[:mw:Extension:CategoryTree]]). So I feel other part would be more important. # {{Done}}: Rendering parent-side tree (upstream toward human body) ## Need to process multiple-parents cases (bifurcated parent tree) # {{Done}}: Rendering brother tree. Parent (upper) and child (lower) concepts are important. But at the same time, brother concepts (same level concepts) are also important for understanding the topic. # {{Done}}: Formatting TA98 ref. I think at least it would be needed to provide external link to the entry (like this [http://www.unifr.ch/ifaa/Public/EntryPage/TA98%20Tree/Entity%20TA98%20EN/14.1.09.110%20Entity%20TA98%20EN.htm]) using TA98_ID ([[:d:Property_talk:P1323]]) # Is it possible to make tree references more compact? Because tree references would be needed ([[WP:V]]), but actually not so interesting. # Treat species general and human specific articles. Fro example, "[[Human brain]]" and "[[Brain]]", "[[Human head]]" and "[[Head]]". # (Re)arrange some input options, especially source and appearance related options. # Populating Wikidata pages with "part_of ([[:d:Property talk:P361]])" and "has_part ([[:d:Property talk:P527]])" relations (see [[Ontology_components#Relationships]]). Currently TA98 ID is registered in about 3.3k Wikidata pages ([[:d:Property_talk:P1323|Property_talk:P1323]]). ==Related pages== * [[Module:Sandbox/Was a bee/tree]] - Lua code which generates following trees * [[User:Was a bee/Tree]] - wrapper template * [[:mw:Extension:Scribunto/Lua reference manual]] - Lua help * [[:mw:Extension:Wikibase Client/Lua]] - Lua help for Wikidata * Tree technologies from discussion at [[Wikipedia:Village pump (technical)#Mirror_of_template:Tree_list.2Ffinal_branch]] ([https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=808983707#Mirror_of_template:Tree_list.2Ffinal_branch perm link]) ** [[User_talk:Was_a_bee#Tree_lists]] ** [[Wikipedia:Family trees]] ** [[:mw:Extension:Graph/Demo/CartesianTree]] ** [[:Category:Tournament bracket templates]] ** [[MediaWiki_talk:Common.css#Mirror_of_Wikipedia:template:Tree_list.2Ffinal_branch]] ==Technical background== === Visual appearance === [[Tree view|Tree-like visual appearance]] is created by the "treeview" style described in [[MediaWiki:Common.css]]. This module outputs code which contains HTML elements [[HTML_element#ul|"ul" (unordered list)]] and [[HTML_element#li|"li" (list)]]. And the style sheet converts them into tree view. {|class = "wikitable" width="100%" !width="50%"| Source example (output from the module) !width="50%"| Result (output to reader) |- |width="50%"|<pre><div class="treeview"> <ul> <li>[[Alpha]] <ul> <li>[[Bravo]] <ul>[[Charlie Brown|Charlie]] <li>[[Delta]]</li> <li class="lastline">[[Echo]]</li> </li> </ul> <ul><li>[[Foxtrot]] <ul><li class="lastline">[[Golf]]</li></ul> </li></ul> <ul><li class="lastline">[[Hotel]] [[File:Blue pencil.svg|frameless|text-top|10px|link=https://www.wikidata.org/wiki/Q27686]]</li></ul> </ul></li></ul></div></pre> |width="50%"|<div class="treeview"> <ul> <li>[[Alpha]] <ul> <li>[[Bravo]] <ul>[[Charlie Brown|Charlie]] <li>[[Delta]]</li> <li class="lastline">[[Echo]]</li> </ul> <ul><li>[[Foxtrot]] <ul><li class="lastline">[[Golf]]</li></ul> </li></ul> <ul><li class="lastline">[[Hotel]] [[File:Blue pencil.svg|frameless|text-top|10px|link=https://www.wikidata.org/wiki/Q27686]]</li></ul> </ul></li></ul></div> |} === Algorithm === * [[Topological sorting]] === Sourcing === ;Currently permitted source Statement which has following item in "stated in" section is shown in tree. Other data is not shown in tree in default. *[[Terminologia Anatomica]] (TA98) = [[:d:Q286567|Q286567]] ;Other possible candidates * [[Terminologia Embryologica]] (TE) * [[Terminologia Histologica]] (TH) * [[Foundational Model of Anatomy|FMA]] * [[UBERON]] * [[MeSH]] * [[NeuroNames]] * [[Gene Ontology]] *..... === Problems === ;Incompatibilities between different sources :Different sources categorize things different ways. But this module can show only one tree. So some kind of troubleshooting is needed. Actually tree structures are almost similar and the differences between them are subtle. But it exist certainly. == Usage == === Tree based only on data which is sourced by TA98=== * Starting from {{wde|Q47273}} * Tracking through {{wdp|P527}} for downward 10 depth * Tracking through {{wdp|P361}} for upward 5 depth * Only showing data which is sourced by {{wde|Q286567}} (excluding other data) <code><nowiki>{{User:Was a bee/Tree|items=Q47273|childProperty=P527|childDepth=10|parentProperty=P361|parentDepth=5|sources=TA98}}</nowiki></code> {{User:Was a bee/Tree|items=Q47273|childProperty=P527|childDepth=10|parentProperty=P361|parentDepth=5|sources=TA98}} <!-- === Example 2 === ;To downstream <code><nowiki>{{User:Was a bee/Tree|items=Q75855|childProperty=P527|childDepth=10|parentProperty=P361|parentDepth=5|sources=TA98}}</nowiki></code> {{User:Was a bee/Tree|items=Q75855|childProperty=P527|childDepth=10|parentProperty=P361|parentDepth=5|sources=TA98}} ;To upstream <code><nowiki>{{User:Was a bee/Tree|items=Q75855|childProperty=P361|childDepth=10|parentProperty=P527|parentDepth=5|sources=TA98}}</nowiki></code> {{User:Was a bee/Tree|items=Q75855|childProperty=P361|childDepth=10|parentProperty=P527|parentDepth=5|sources=TA98}} --> === Tree based on data including unreferenced data=== * Starting from {{wde|Q47273}} * Tracking through {{wdp|P527}} for downward 10 depth * Tracking through {{wdp|P361}} for upward 5 depth * Showing all data (including unreferenced data) <code><nowiki>{{User:Was a bee/Tree|items=Q47273|childProperty=P527|childDepth=10|parentProperty=P361|parentDepth=5||sources=}}</nowiki></code> {{User:Was a bee/Tree|items=Q47273|childProperty=P527|childDepth=10|parentProperty=P361|parentDepth=5|sources=}} <!-- === Example 4=== <code><nowiki>{{User:Was a bee/Tree|items=Q47273|childProperty=P527|childDepth=10|parentProperty=P361|parentDepth=5|sources=TA98|lang1=fi|lang2=ru}}</nowiki></code> {{User:Was a bee/Tree|items=Q47273|childProperty=P527|childDepth=10|parentProperty=P361|parentDepth=5|sources=TA98|lang1=fi|lang2=ru}} === Example 5=== <code><nowiki>{{User:Was a bee/Tree|items=Q47273|childProperty=P527|childDepth=10|parentProperty=P361|parentDepth=5|sources=TA98|lang1=ja}}</nowiki></code> {{User:Was a bee/Tree|items=Q47273|childProperty=P527|childDepth=10|parentProperty=P361|parentDepth=5|sources=TA98|lang1=ja}} -->
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
User:Was a bee/Tree
(
edit
)
User:Was a bee/TreeBox
(
edit
)
Template:-
(
edit
)
Template:Done
(
edit
)
Template:Module rating
(
edit
)
Template:Wde
(
edit
)
Template:Wdp
(
edit
)