🍬 Pretty Treemaps

Overview

🍬 Pretty Treemaps

Go Reference codecov Go Report Card

$ go install github.com/nikolaydubina/treemap/cmd/[email protected] 
$ echo '
Africa/Algeria,33333216,72
Africa/Angola,12420476,42
Africa/Benin,8078314,56
...
' | treemap > out.svg

example

Adjusting size

$ ... | treemap -w 1080 -h 360 > out.svg

example-narrow

$ ... | treemap -w 1080 -h 1080 > out.svg

example-square

Tree-Hue coloring when there is no heat

$ ... | treemap -color balanced > out.svg

example-balanced

Without color

$ ... | treemap -color none > out.svg

example-no-color

Format

Size and heat is optional.

</ delimitered path>,<size>,<heat>

Algorithms

  • Squarified algorithm 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, 2000
  • Tree-Hue Color algorithm 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

Welcomed!

References

Appendix A: Less Illustrative Examples

Large dimensions and large tree (e.g. github.com/golang/go)

$ ... | treemap -w 4096 -h 4096 > out.svg

example-large

You might also like...
Slice graph uses graphviz in order to pretty print slices for you.

slicegraph Slice graph uses graphviz in order to make you understand what happens underneath your slices.

🪵 A dead simple, pretty, and feature-rich logger for golang
🪵 A dead simple, pretty, and feature-rich logger for golang

🪵 lumber 🪵 A dead simple, pretty, and feature-rich logger for golang 🚀 Install 🌲 Logging Functions lumber.Success() lumber.Info() lumber.Debug() l

code is pretty self explanatory and decently commented
code is pretty self explanatory and decently commented

square_approximation code is pretty self explanatory and decently commented when limit set to 10^9 or more ram usage goes to 42 gigs of ram which is

Gofetch is a pretty command-line
Gofetch is a pretty command-line "Go and System information" tool written in Go

GoFetch Show off your Go information with this cool command-line tool! Report Bug || Request Feature Table of Contents About the Project Built With Ge

A command-line tool to pretty print your system's PATH environment variable.
A command-line tool to pretty print your system's PATH environment variable.

Description A command-line tool to pretty print your system's PATH environment variable. The output paths are colorized if they have special associati

Pretty wrapper for sending email using go net/smtp

Emailer A pretty wrapper around go net/smtp send multiple email using single client func main() { var client *emailer.Client var clientX sync.Mute

✨ Pretty TOTP manager in your terminal
✨ Pretty TOTP manager in your terminal

asunder Asunder, Sweet and Other Distress asunder is a small pretty command-line TOTP manager. Installation Binaries Download a binary from the releas

Implements a deep pretty printer for Go data structures to aid in debugging

spew Spew implements a deep pretty printer for Go data structures to aid in debugging. A comprehensive suite of tests with 100% test coverage is provi

Comments
  • Continuous integration to build binaries

    Continuous integration to build binaries

    Would you accept a PR to do a CI build of native binaries in order to distribute it to those who don't have or want the go toolchain?

    ( Super cool tool ! )

    enhancement 
    opened by michaelsanford 2
Releases(v1.2.0)
  • v1.2.0(Jan 25, 2022)

    🐲 CNY 2022 release

    • collapsing long paths deep inside
    • collapsing by default in CLI
    • if duplicates then taking sum for sizes and taking max for heat
    • fixed collapsing roots with fake nodes
    • more examples
    • this release unblocks go-binsize-treemap
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Dec 11, 2021)

  • v1.0.3(Dec 7, 2021)

  • v1.0.2(Dec 6, 2021)

    • Fixed bug with text not aligned correctly
    • Fixed bug with imputing of size is not working correctly
    • Added imputing of heat
    • Added light and dark versions of border
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Dec 4, 2021)

  • v1.0.0(Dec 4, 2021)

    • ✅ SVG
    • ✅ Squerified works
    • ✅ CLI works
    • ✅ Tree-Hue and go-colorful works
    • ✅ Data processing works
    • ✅ No upstream dependencies except go-colorful which is self contained
    • ✅ Complex logic and algorithms have tests

    Happy Holidays! 🥳 🎄🍬

    Source code(tar.gz)
    Source code(zip)
Owner
Nikolay Dubina
Nikolay Dubina
💻 PTerm | Pretty Terminal Printer A golang module to print pretty text

✨ PTerm is a modern go module to beautify console output. Featuring charts, progressbars, tables, trees, and many more ?? It's completely configurable and 100% cross-platform compatible.

null 3k Sep 23, 2022
Implements a deep pretty printer for Go data structures to aid in debugging

go-spew Go-spew implements a deep pretty printer for Go data structures to aid in debugging. A comprehensive suite of tests with 100% test coverage is

Dave Collins 5.3k Sep 22, 2022
Package httpretty prints the HTTP requests you make with Go pretty on your terminal.

httpretty Package httpretty prints the HTTP requests of your Go programs pretty on your terminal screen. It is mostly inspired in curl's --verbose mod

Henrique Vicente 277 Sep 26, 2022
Implements a deep pretty printer for Go data structures to aid in debugging

go-spew Go-spew implements a deep pretty printer for Go data structures to aid in debugging. A comprehensive suite of tests with 100% test coverage is

Dave Collins 5.3k Sep 21, 2022
Pretty Slug.

go-slugify Make Pretty Slug. Installation go get -u github.com/mozillazg/go-slugify Install CLI tool: go get -u github.com/mozillazg/go-slugify/slugi

Huang Huang 81 Aug 19, 2022
Gotabulate - Easily pretty-print your tabular data with Go

Gotabulate - Easily pretty-print tabular data Summary Go-Tabulate - Generic Go Library for easy pretty-printing of tabular data. Installation go get g

Vadim Kravcenko 288 Sep 25, 2022
Package httpretty prints the HTTP requests you make with Go pretty on your terminal.

httpretty Package httpretty prints the HTTP requests of your Go programs pretty on your terminal screen. It is mostly inspired in curl's --verbose mod

Henrique Vicente 276 Sep 14, 2022
Colored pretty printer for Go language

pp Colored pretty printer for Go language Usage Just call pp.Print(). import "github.com/k0kubun/pp" m := map[string]string{"foo": "bar", "hello": "w

Takashi Kokubun 1.4k Sep 21, 2022
Litter is a pretty printer library for Go data structures to aid in debugging and testing.

Litter Litter is a pretty printer library for Go data structures to aid in debugging and testing. Litter is provided by Sanity: The Headless CMS Const

Sanity 1.3k Sep 25, 2022
Fast Color JSON Marshaller + Pretty Printer for Golang

ColorJSON: The Fast Color JSON Marshaller for Go What is this? This package is based heavily on hokaccha/go-prettyjson but has some noticible differen

Tyler Brock 115 Sep 15, 2022