This script allows you to visualize any hierarchical data (in this case, SQLite database tables) in an intuitive way—using a circular treemap chart. Also, this script allows you to shift the leaves of a tree or entire subtrees with the mouse with saving the result.
The circle packing of the treemap chart is implemented in an original way—in real-time using rigid body physics (the Box2D engine is used). Natural packing instead of rigorous math makes hierarchy editing even more intuitive.
If desired, you can adapt this script to visualize and edit other hierarchical data structures by implementing a wrapper for them similar to the repository.Repository class.
The motive for creating this project is to do manual and automatic control of personal stuff using a database and an interactive chart as a client/editor.
- Python 3.7–3.8
pip install -r requirements.txt
- run main.pyw
- shuffle items by
dragging
with mouse right click
on items to select it for picking or deselectdouble right click
on item with picked up sub-items to reset the selectiondouble right click
on item without picked up sub-items to select or deselect for picking all items of same level- when any items are picked up,
left click
on another item to shake the picked up items into it - press
Escape
to quit