From cbc12fa92bf33fc324eed038b9ec3f5b85823f73 Mon Sep 17 00:00:00 2001 From: Mara Karagianni Date: Fri, 16 Dec 2022 00:38:19 +0200 Subject: [PATCH] Update readme --- README.md | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e53520..d92d8c1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,47 @@ -Python module, derived from PyFPDF, for tree like design layout +# Tree Maker +## Tree sorting visualization and algorithmic publishing +## Mara Karagianni in collaboration with Ahnjili ZhuParris + +The initial ideas were about combining the concept of tree branches and the tree sort algorithm to map plants’ names, their year of publication, and including non-scientific content from online forums. The latter, we thought would bring some everyday narration to an otherwise very academic and abstract process of how trees are categorized and named, a methodology developed by Linnaeus in 18th century, amended and further developed in the International Code of Botanical Nomenclature, which entails the rules of plant naming. However it’s still considered biased as to the syntax and categorization followed. Ref: https://ab.pensoft.net/article/38075/ + +Sorting tree algorithm can produce different types of traversals: +## Depth First Traversals: +### (a) Inorder (Left, Root, Right) : 4 2 5 1 3 +### (b) Preorder (Root, Left, Right) : 1 2 4 5 3 +### (c) Postorder (Left, Right, Root) : 4 5 2 3 1 + +## Breadth First or Level Order Traversal : 1 2 3 4 5 + +[python programming and tree traversals](https://www.wikitechy.com/technology/python-programming-tree-traversals-inorder-preorder-postorder/) +[video tutorial on the different traversals](https://www.youtube.com/watch?v=gm8DUJJhmY4) + +Due to the very short window of implementation in terms of hands-on dataset definition and coding (2 days), we decided to visualize the tree layout with the level order traversal, since the depth first traversals, such as the pre-order traversal, requires a more complex calculations such as the logarithm of the surface, where the nodes of a tree shall be drawn on that surface. A pre-order traversal layout is to be considered when there is more time and resources to revisit the project and the code. + +The layout output implements the sorting tree with python code and includes 16 methods for layout and generate pdf documents, and for debugging the code. + +## Code repository +Tree maker is a Python module, derived from PyFPDF, for tree like design layout +It follows the logic of the [zine maker](https://git.systerserver.net/mara/zine_maker) by the same author _mara karagianni_ +Tree type class and all its methods defined in tree_maker.py +Tree methods can be called by the script tree_design.py +1. Tree method keys_sorting: Soring with the class Node and Left and Right input nodes +2. Tree method draw_year: Simple generating of year stamps in vertical position and +progressively moving horizontally to the left side +input data >> sorted years by the Tree keys_sorting method: trees/test_years_simple_layout.pdf +3. Tree method design_tree: +input data >> sorted years by the Tree keys_sorting method: trees/test_years_tree_layout.pdf +4. Tree method draw_year_name: Year-name pair stamps in vertical position in a +branching layout, work in progress +input data >> sorted years by the Tree keys_sorting method:: trees/test_year_name_pair_layout.pdf +5. Tree method draw_year_name_reddit, work in progress: +branching sorted year followed by trees named that year on the left side and reddit blog titles related to those trees on the right side +input data >> Dictionary of sorted years as keys, and a list of tree family names and tree scientific names as values. Intersecting with a dict of same tree family names as keys and tree family names as values. +All pdf output experiments are under the trees folder + + + + +Tree method keys_sorting: Soring with the class Node and Left and Right input nodes Tree method draw_year: Simple year stamps in vertical position and progressively horizontally to the left side