Skip to main content

hishiryo

Consciousness beyond thought ^_^

Hishiryo is a tool to generate a circular dataviz of any csv dataset.

This little experiment aims at trying to quickly represent the content of a dataset and make it funny to discover it's patterns!

Each datapoint (like a cell in an excel sheet) is converted into a pixel , and this pixel is diplayed on a circular graph.

This version supports the following column data formats : float, integers and text as nominal categories.

How to install

With PyPI (Make sure your pip is up to date as it can interfere with CV2 package install)

pip install hishiryo

Dependencies

  • Pandas
  • CV2 (OpenCV)
  • Pillow
  • svgwrite

How to use radial rendering

1 - find an appropriate csv. (more than 100 rows will start to overload the result a little)

2 - From your code or from a Jupyter notebook :

from hishiryo import Hishiryo

HishiryoConverter = Hishiryo.Hishiryo()

input_path = "/home/user/iris.csv"
separator = ','
output_path = "/home/user/iris.png"
radius = 500

HishiryoConverter.convertCSVToRadialBitmap(input_path,separator,output_path,radius,None,"Dot")

Arguments :

  • input path is the path to your csv file (e.g. /home/user/iris.csv)

  • output path is the path to your target image file (e.g. /home/user/iris.png) The fileformat you want is autodetected thanks to CV2 functionalities.

  • separator is the character separator in your csv (e.g. ",")

  • radius (in pixel) is the size of the radius of the disk where the pixels will be drawn. The higher it is the bigger and sharper your output image will be. (e.g: 1500)'

  • sort_by is the name of the column or the list of column you want to sort you data. (e.g. "Sepal.Length", or ["Sepal.Length","Sepal.Width"])

  • glyph_type is the type of representation you want for the pixels. it can be one among the following : "Dot","Square" or "Polygon"

      input_path = "path/to/your/csv/file.csv"
      output_path = "path/to/your/rendered/image.png"
      separator = ","
      radius = 3000
      sort_by = None
      glyph_type = "Polygon"
    

Colors are assigned based on the variable type.

  • Blue circles represent integer values
  • Red circles, float values
  • Random colors are assigned to categorical variables.
  • Black is the default value for value 0 or when there is no data

Radial bitmap rendering examples

See below an example of a visualisation generated from the train titanic dataset output example

The 12 columns of the dataset are represented as 12 circular rows. The first column is rendered as the inner circle, and the last as the outer one.

Here is an overview of the MNIST train dataset, sort by label output example

How to use simple bitmap rendering

Another way is to render your csv as a simple bitmap, without radial representation.

from hishiryo import Hishiryo

HishiryoConverter = Hishiryo.Hishiryo()

input_path = "/home/user/iris.csv"
separator = ','
output_path = "/home/user/iris.png"

HishiryoConverter.convertCSVToBitmap(input_path,
                                     output_path,
                                     separator,
                                     )

simple bitmap rendering example

Here is an extract of the MNIST test dataset () output example

Licence

GNU General Public License v3.0

Metadata

Release files for hishiryo 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hishiryo 0.0.4
File Size Uploaded
hishiryo-0.0.4.tar.gz 21.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hishiryo 0.0.4
File Interpreter ABI Platform
hishiryo-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 41.1 kB

Release files / hishiryo-0.0.4.tar.gz

Download URL hishiryo-0.0.4.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ba0e3725da6f6a9098ddfcef1ba6b9f7b16f0ccef5ae447289989653a09253af
BLAKE2b-256 checksum
How to use checksums
b3378e1e897c8a3321123b08fad9855be8298e3736f1b09e2120f115fafcfbb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / hishiryo-0.0.4-py3-none-any.whl

Download URL hishiryo-0.0.4-py3-none-any.whl
Size 20.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3607547694a3ffb16f94318303c772b8974dcb39613bac9c4d35bd2c3d3cd071
BLAKE2b-256 checksum
How to use checksums
2cd89cdee68728401687d35816e0c73dbe618ad7a8708c9666aaaa7f3faa0470
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page