Skip to content

Instantly share code, notes, and snippets.

View nitaku's full-sized avatar

Matteo Abrate nitaku

  • IIT CNR
  • Pisa, Italy
View GitHub Profile
@nitaku
nitaku / README.md
Last active December 5, 2025 01:52
Isometric treemap (flare)

A first attempt at making a real isometric treemap. Unlike previous attempts, this experiment uses the treemap layout to actually represent a tree (in this example, the flare package hierarchy).

Treemaps are very good to show hierarchies in a compact way, and excel in the case of attributed hierarchies with a quantitative attribute (a classical example would be a file system hierarchy, in which size is given by the number of bytes of each file). However, they are not very good in representing internal nodes, parent-child relations and depth.

Nested treemaps introduce some padding between a parent and its children to better represent this aspect, losing accuracy in area encoding. Despite this improvement, hierarchy depth is still not represented.

An isometric treemap loses some clarity and compactness to introduce an intuitive representation of de

@nitaku
nitaku / README.md
Last active December 5, 2025 01:51
Isometric word cloud
@nitaku
nitaku / README.md
Last active December 5, 2025 01:50
Isometric projection

A fancy (and not that useful) visualization of random data in two dimensions as an isometric bar chart. Notice how the phenomenon of occlusion makes part of the dataset invisible.

@nitaku
nitaku / README.md
Last active August 4, 2025 01:28
Minimal JSON HTTP server in python

A minimal HTTP server in python. It sends a JSON Hello World for GET requests, and echoes back JSON for POST requests.

python server.py 8009
Starting httpd on port 8009...
curl http://localhost:8009
{"received": "ok", "hello": "world"}
@nitaku
nitaku / README.md
Last active August 2, 2025 06:26
Sky

A map of the sky that uses an azimuthal equidistant projection with star data. Longitudes and latitudes for the geo projection are obtained from declination and right ascension respectively (longitude is also inverted, because, unlike the earth globe, the celestial sphere is seen from the inside).

The boreal (northern) sky is shown at left, while the austral (southern) at right. Because right ascension is given in hours, both maps are divided in 24 slices. A circle is shown every 10 degrees of declination.

Star size indicates magnitude. Bigger circles depict brighter stars.

@nitaku
nitaku / README.md
Last active April 29, 2025 10:51
Sky II (HYG)
@nitaku
nitaku / README.md
Last active February 4, 2025 12:47
Peano Hex curve (L-system)
@nitaku
nitaku / README.md
Last active December 30, 2024 06:24
Canonical representation of unordered rooted trees

This example shows a canonical (non-ambiguous) representation of a randomly generated unordered rooted tree. Reload to generate a new one. This is an improvement of a previous example.

Unordered rooted trees are trees (with a root) in which sibling order is not defined. Visualizing such trees often involves showing siblings in arbitrary order.

Serializations of unordered trees are often ordered, therefore, they are not necessarily equal to each other even if they represent the same unordered tree. A particular case is that of randomly generated trees.

If such serializations are fed into a tree layout algorithm, it can yield different representations of the same unordered tree, which is undesirable.

We perform a total ordering of the tree, based solely on topological features, which constrains an order-preserving tree layout algorithm to yield a single representation (barring other layout parameters). The total ordering is used to sort the tree before passing it to th

@nitaku
nitaku / README.md
Last active November 27, 2024 11:23
World cloud intersection II
@nitaku
nitaku / README.md
Last active October 22, 2024 01:56
GosperMaps: boundaries

This example shows two experiments in representing boundaries in GosperMaps. All paths are simplified then smoothed with a cardinal interpolator, while internal boundaries are given varying thickness and colors to help in identifying hierarchy levels. The colored part slighlty covers boundaries that are inside a region, to convey a sense of nesting.

This example island represents all typed instances in a DBpedia dump. Click here for a more complete map.