Circular Visualization of Dataset using hishiryo Python
Among various ways to represent data, circular representation of data is one of the ways to render data points and do a corresponding analysis of the same. This article talks about ways to achieve the said visualization of data for further analytical purposes.
hishiryo: This tool helps in the generation of circular visual representation of data. Converts each data point to pixel, and then displayed it to circular graphs and supports various data types such as integers, floats, and text as its categorical columns.
This module does not come built-in with Python. To install it type the below command in the terminal.
pip install hishiryo
After installation, the target dataset is required to proceed with the coding part.
HishiryoConverter.convertCSVToRadialBitmap: Convert an input CSV file into a radial bitmap and save it on disk
- input path : Path to csv.
- output path : Path to image file.
- separator : Character separator in your csv (e.g. “,”)
- radius (in pixel) : Size of radius of disk where pixel will be drawn. The higher it is, bigger and sharper image will be.
- sort_by : Column by which data is required to be sorted.
- glyph_type : Type of representation for the pixels. Options : [“Dot”,”Square” or “Polygon”].
Below is the implementation:
After running the code, process metadata is output at the console, and the corresponding image is output at the desired destination.
Colors are assigned on the basis of variable type.
- Blue circles – integer values
- Red circles – float values
- Random colors – categorical variables.
- Black – default or 0 or no data.
Using custom parameters, here we alter the dataset, glyph type, and radius.
Please Login to comment...