Movatterモバイル変換


[0]ホーム

URL:


Jump to content
Wikidata
Search

Help:Tree

From Wikidata
Various visualization of the tree-shaped data.

Methods to drawtree view fromtree-shaped data structure in Wikidata.

Lua

[edit]

Template:Tree

[edit]

Basic

[edit]

By putting the code{{Tree|property=184|items=Q7251|recursion=10}} using the template{{Tree}}, the following tree graph automatically appears. The code means "Tracking items throughdoctoral advisor(P184), starting fromAlan Turing(Q7251), until 10 items depth." The black dots "•" appears in the tree means the end of branch. The template{{Tree}} internally using Lua moduleModule:Tree which is the program written inLua language.

Customize

[edit]

By customizing Lua code, you can draw the tree with additional features. For example, by putting code{{ #invoke:Haplogroup | main | firstItemId = Q351265 | maxdepth = 7}} (using the customized Lua codeModule:Haplogroup), the following tree appears. The tree automatically shows links to Wikipedia, Commons, and external website, by retrieving data stored in each Wikidata item pages.

Lua error in Module:Haplogroup at line 122: bad argument #1 to 'pairs' (table expected, got nil).

Template:Wikidata/FamilyTree

[edit]

{{Wikidata/FamilyTree}} generates family trees of various styles by trackingfather(P22),mother(P25), andchild(P40). As an example, by putting the code{{Wikidata/FamilyTree|title={{Q|Q9682}}|entityId=Q9682}}, following tree appears.

⛭
William, Prince of Wales[d]
Charles III[d]
Prince Harry, Duke of Sussex[d]
George V[d]Peter Phillips[d]
George VI[d]Anne, Princess Royal[d]
Mary of Teck[d]Zara Tindall[d]
Elizabeth II[d]
Claude Bowes-Lyon, 14th Earl of Strathmore and Kinghorne[d]Princess Beatrice of York[d]
Queen Elizabeth, The Queen Mother[d]Prince Andrew, Duke of York[d]
Cecilia Bowes-Lyon, Countess of Strathmore and Kinghorne[d]Princess Eugenie of York[d]
Lady Louise Windsor[d]
Prince Edward, Duke of Edinburgh[d]
James, Earl of Wessex[d]

Extension

[edit]

Mediawiki extension "Graph" can draw tree-like structures. For demos, seemw:Extension:Graph/Demo#Trees. As of September, 2019,Graph extension is not stable compared with Lua functions. But the extension can draw beautiful interactive graphs. There are templates which uses Graph extension functionalities to draw graphs, like{{Force-directed graph}},{{Forward graph}}, or{{Reverse graph}}. For example, the code{{Forward graph|Q7251|P184|width=200|height=200|depth=2}} generate the following graph automatically.

Graphs are temporarily unavailable due to technical issues.

External websites

[edit]

SPARQL

[edit]
TreeTry Out

JSON format

[edit]
  1. Gohttps://query.wikidata.org ->
  2. Create query and run ->
  3. Click "</> code" button at middle-right ->
  4. Copy URL ->
  5. Paste URL somewhere (for example Notepad) ->
  6. Adding at the last of the URL&format=json
  7. Example

Wikidata generic tree

[edit]
List view[1]
Radial view[2]
Wikidata generic tree screenshot

Tool to generate trees from Wikidata structures, such as subclasses, administrative divisions, and taxons. Examples:1234

Wikidata Graph Builder

[edit]
Wikidata Graph Builder screenshot

Tool to visualize Wikidata items in a graph form usingD3.js. Examples:1234

See also

[edit]
 
Wikidata properties related totree(Q223655)
This template lists some major properties which can be used to digitizingtree-shaped data. For techniques about creating tree, seeHelp:Tree
↕Vertical relations↕
↔Horizontal relations↔
Other
Items
Wikimedia template
 
Template/Module
Category
Help/Documentation
Example Gallery
Retrieved from "https://www.wikidata.org/w/index.php?title=Help:Tree&oldid=1038583578"
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp