treemap
Pretty treemap with memory efficient input streaming and output streaming for the SVG image
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.6%) to scientific vocabulary
Repository
Pretty treemap with memory efficient input streaming and output streaming for the SVG image
Basic Info
- Host: GitHub
- Owner: MazenAlkhatib
- License: mit
- Language: Go
- Default Branch: main
- Size: 1.27 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 3
Metadata Files
README.md
Memory efficient Treemaps
Uses "Squarified Treemaps" (Mark Bruls, Kees Huizing, and Jarke J. van Wijk., 2000) algorithm.
The original code was copied from Nikolay Dubina's treemap repo (Check resources)
bash
$ go install github.com/MazenAlKhatib/treemap/cmd/treemap@latest
$ treemap -input your_csv_file -output-path your/output/path -w 1024 -h 1024
Different colorscheme
bash
$ treemap -color RdYlGn
Tree-Hue coloring
$ treemap -color balanced
Without color
bash
$ treemap -color none
Format
</ delimitered path>,<size>
Algorithms
Squarifiedalgorithm for treemap layout problem. This is very common algorithm used in Plotly and most of visualization packages. "Squarified Treemaps", Mark Bruls, Kees Huizing, and Jarke J. van Wijk, 2000Tree-Hue Coloralgorithm for generating colors for nodes in treemap. The idea is to represent hierarchical structure by recursively painting similar hue to subtrees. Nikolay Dubina, 2021
Contributions
Are much appreciated!
References
- Nikolay Dubina: https://github.com/nikolaydubina/treemap (Original Repo and code)
- Plotly treemaps: https://plotly.com/python/treemaps/
- go-colorful: https://github.com/lucasb-eyer/go-colorful
- D3 treemap is using Squerified: https://github.com/d3/d3-hierarchy
- Interactive treemap: https://github.com/vasturiano/treemap-chart
- Squerified in Rust: https://github.com/bacongobbler/treemap-rs
- Squerified in JavaScript: https://github.com/clementbat/treemap
- Squerified in Python: https://github.com/laserson/squarify
- Treemap Go tool: https://github.com/willpoint/treemap
- Plotly color scales: https://plotly.com/python/builtin-colorscales
- Plotly color scales source: https://github.com/plotly/plotly.py/blob/master/packages/python/plotly/plotlyutils/colors/colorbrewer.py
- Colorbrewer project, that is used in Plotly: http://colorbrewer2.org
Appendix A: Long Roots
When roots have one child multiple times it takes extra vertical space, which is very useful for narrow final dimensions.
Can collapse them into one node
Long roots without collapsing somewhere deep inside
Long roots with collapsing somewhere deep inside
Appendix B: Known Issues
The entire treemap is a black box when viewed from Jenkins
It's convenient to create treemap svg reports in a Jenkins jobs, because you can browse the job's "artifacts" from your browser. However, out of the box, Jenkin's Content Security Policy prevents inline styles from being applied. Instead of your treemap, you'll see a giant black rectangle.
If you look at the javascript console in the developer tools, you will see:
Refused to apply inline style because it violates the following
Content Security Policy directive: "style-src 'self'".
You can relax Jenkin's CSP rules by following the examples at:
* Jenkins error - Blocked script execution in
Owner
- Name: Mazen Al Khatib
- Login: MazenAlkhatib
- Kind: user
- Repositories: 1
- Profile: https://github.com/MazenAlkhatib
Citation (CITATION.cff)
cff-version: 1.2.0 message: If you reference this library in publication, please cite it as below. title: Memory efficient Treemap Visualization in Go abstract: Implementation of treemap visualization in Go authors: - family-names: Al Khatib given-names: Mazen version: 1.0 date-released: 2025-03-26 license: MIT repository-code: https://github.com/MazenAlkhatib/treemap url: https://github.com/MazenAlkhatib/treemap
GitHub Events
Total
- Release event: 3
- Delete event: 1
- Push event: 15
- Pull request event: 1
- Create event: 5
Last Year
- Release event: 3
- Delete event: 1
- Push event: 15
- Pull request event: 1
- Create event: 5
Packages
- Total packages: 3
- Total downloads: unknown
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 9
proxy.golang.org: github.com/MazenAlkhatib/treemap
- Homepage: https://github.com/MazenAlkhatib/treemap
- Documentation: https://pkg.go.dev/github.com/MazenAlkhatib/treemap#section-documentation
- License: MIT
-
Latest release: v1.1.0
published 11 months ago
Rankings
proxy.golang.org: github.com/mazenalkhatib/treemap
- Documentation: https://pkg.go.dev/github.com/mazenalkhatib/treemap#section-documentation
- License: mit
-
Latest release: v1.1.0
published 11 months ago
Rankings
proxy.golang.org: github.com/MazenAlKhatib/treemap
- Homepage: https://github.com/MazenAlkhatib/treemap
- Documentation: https://pkg.go.dev/github.com/MazenAlKhatib/treemap#section-documentation
- License: MIT
-
Latest release: v1.1.0
published 11 months ago