-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7148367
Showing
124 changed files
with
21,485 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: b145f4440f1bb4e4d826c9b110fdeba0 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|:sparkles:| Construct | ||
========================= | ||
|
||
Construct Binary Tree from list. | ||
|
||
.. list-table:: Binary Tree Construct Methods | ||
:widths: 30 40 30 | ||
:header-rows: 1 | ||
|
||
* - Construct Binary Tree from | ||
- Using heapq structure | ||
- Add node attributes | ||
* - List | ||
- `list_to_binarytree` | ||
- No | ||
|
||
.. automodule:: bigtree.binarytree.construct | ||
:members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|:sparkles:| Construct | ||
========================= | ||
|
||
Construct Directed Acyclic Graph (DAG) from list, dictionary, and pandas DataFrame. | ||
|
||
.. list-table:: DAG Construct Methods | ||
:widths: 30 40 30 | ||
:header-rows: 1 | ||
|
||
* - Construct DAG from | ||
- Using parent-child relation | ||
- Add node attributes | ||
* - List | ||
- `list_to_dag` | ||
- No | ||
* - Dictionary | ||
- `dict_to_dag` | ||
- Yes | ||
* - DataFrame | ||
- `dataframe_to_dag` | ||
- Yes | ||
|
||
These functions are not standalone functions. | ||
Under the hood, they have the following dependency, | ||
|
||
.. image:: https://github.com/kayjan/bigtree/raw/master/assets/dag_construct.png | ||
:target: https://github.com/kayjan/bigtree/raw/master/assets/dag_construct.png | ||
:alt: DAG Constructor Dependency Diagram | ||
|
||
.. automodule:: bigtree.dag.construct | ||
:members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|:hammer:| Export | ||
=================== | ||
|
||
Export Directed Acyclic Graph (DAG) to list, dictionary, and pandas DataFrame. | ||
|
||
.. list-table:: DAG Export Methods | ||
:widths: 40 25 30 | ||
:header-rows: 1 | ||
|
||
* - Export DAG to | ||
- Method | ||
- Extract node attributes | ||
* - List | ||
- `dag_to_list` | ||
- No | ||
* - Dictionary | ||
- `dag_to_dict` | ||
- Yes with `attr_dict` or `all_attrs` | ||
* - DataFrame | ||
- `dag_to_dataframe` | ||
- Yes with `attr_dict` or `all_attrs` | ||
* - Dot (for .dot, .png, .svg, .jpeg, etc.) | ||
- `dag_to_dot` | ||
- No | ||
|
||
.. automodule:: bigtree.dag.export | ||
:members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|:seedling:| BaseNode | ||
===================== | ||
|
||
.. automodule:: bigtree.node.basenode | ||
:members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|:herb:| BinaryNode | ||
===================== | ||
|
||
.. automodule:: bigtree.node.binarynode | ||
:members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|:blossom:| DAGNode | ||
===================== | ||
|
||
.. automodule:: bigtree.node.dagnode | ||
:members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|:hibiscus:| Node | ||
===================== | ||
|
||
.. automodule:: bigtree.node.node | ||
:members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
|:sparkles:| Construct | ||
========================= | ||
|
||
Construct Tree from list, dictionary, and pandas DataFrame. | ||
|
||
To decide which method to use, consider your data type and data values. | ||
|
||
.. list-table:: Tree Construct Methods | ||
:widths: 35 30 50 40 | ||
:header-rows: 1 | ||
|
||
* - Construct Tree from | ||
- Using full path | ||
- Using parent-child relation | ||
- Add node attributes | ||
* - String | ||
- `str_to_tree` | ||
- NA | ||
- No | ||
* - List | ||
- `list_to_tree` | ||
- `list_to_tree_by_relation` | ||
- No | ||
* - Dictionary | ||
- `dict_to_tree` | ||
- `nested_dict_to_tree` | ||
- Yes | ||
* - DataFrame | ||
- `dataframe_to_tree` | ||
- `dataframe_to_tree_by_relation` | ||
- Yes | ||
|
||
|
||
To add attributes to existing tree, | ||
|
||
.. list-table:: Tree Add Attributes Methods | ||
:widths: 30 40 30 | ||
:header-rows: 1 | ||
|
||
* - Add attributes from | ||
- Using full path | ||
- Using node name | ||
* - String | ||
- `add_path_to_tree` | ||
- NA | ||
* - Dictionary | ||
- `add_dict_to_tree_by_path` | ||
- `add_dict_to_tree_by_name` | ||
* - DataFrame | ||
- `add_dataframe_to_tree_by_path` | ||
- `add_dataframe_to_tree_by_name` | ||
|
||
.. note:: | ||
| If attributes are added to existing tree using **full path**, paths that previously did not exist will be added. | ||
| If attributes are added to existing tree using **node name**, names that previously did not exist will not be created. | ||
These functions are not standalone functions. | ||
Under the hood, they have the following dependency, | ||
|
||
.. image:: https://github.com/kayjan/bigtree/raw/master/assets/tree_construct.png | ||
:target: https://github.com/kayjan/bigtree/raw/master/assets/tree_construct.png | ||
:alt: Tree Constructor Dependency Diagram | ||
|
||
.. automodule:: bigtree.tree.construct | ||
:members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
|:hammer:| Export | ||
=================== | ||
|
||
Export Tree to list, dictionary, and pandas DataFrame. | ||
|
||
.. list-table:: Tree Export Methods | ||
:widths: 40 30 | ||
:header-rows: 1 | ||
|
||
* - Export Tree to | ||
- Method | ||
* - Command Line / Others | ||
- `print_tree`, `yield_tree` | ||
* - Dictionary | ||
- `tree_to_dict`, `tree_to_nested_dict` | ||
* - DataFrame | ||
- `tree_to_dataframe` | ||
* - Dot (for .dot, .png, .svg, .jpeg, etc.) | ||
- `tree_to_dot` | ||
* - Pillow (for .png, .jpg, .jpeg, etc.) | ||
- `tree_to_pillow` | ||
* - Mermaid Markdown (for .md) | ||
- `tree_to_mermaid` | ||
|
||
While exporting to another data type, methods can take in arguments to determine what information to extract. | ||
|
||
.. list-table:: Tree Export Customizations | ||
:widths: 40 30 30 30 30 30 | ||
:header-rows: 1 | ||
|
||
* - Method | ||
- Extract node attributes | ||
- Specify maximum depth | ||
- Skip depth | ||
- Extract leaves only | ||
- Others | ||
* - `print_tree` | ||
- Yes with `attr_list` or `all_attrs` | ||
- Yes with `max_depth` | ||
- No, but can specify subtree | ||
- No | ||
- Tree style | ||
* - `yield_tree` | ||
- No, returns node | ||
- Yes with `max_depth` | ||
- No, but can specify subtree | ||
- No | ||
- Tree style | ||
* - `tree_to_dict` | ||
- Yes with `attr_dict` or `all_attrs` | ||
- Yes with `max_depth` | ||
- Yes with `skip_depth` | ||
- Yes with `leaf_only` | ||
- Dict key for parent | ||
* - `tree_to_nested_dict` | ||
- Yes with `attr_dict` or `all_attrs` | ||
- Yes with `max_depth` | ||
- No | ||
- No | ||
- Dict key for node name and node children | ||
* - `tree_to_dataframe` | ||
- Yes with `attr_dict` or `all_attrs` | ||
- Yes with `max_depth` | ||
- Yes with `skip_depth` | ||
- Yes with `leaf_only` | ||
- Column name for path, node name, node parent | ||
* - `tree_to_dot` | ||
- No | ||
- No | ||
- No | ||
- No | ||
- Graph attributes, background, node, edge colour, etc. | ||
* - `tree_to_pillow` | ||
- No | ||
- Yes, using keyword arguments similar to `yield_tree` | ||
- No | ||
- No | ||
- Font (family, size, colour), background colour, etc. | ||
* - `tree_to_mermaid` | ||
- No | ||
- Yes, using keyword arguments similar to `yield_tree` | ||
- No | ||
- No | ||
- Node shape, node fill, edge arrow, edge label etc. | ||
|
||
.. automodule:: bigtree.tree.export | ||
:members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|:wrench:| Helper | ||
=================== | ||
|
||
Helper functions that can come in handy. | ||
|
||
.. automodule:: bigtree.tree.helper | ||
:members: | ||
:show-inheritance: |
Oops, something went wrong.