Skip to main content

A tool for visualizing categorical data over time.

Project description

DOI

PyCatFlow

This package is a visualization tool which allows the representation of temporal developments, based on categorical data. I wrote a short article on Medium in which I outline the basic idea of PyCatFlow and provide a Tutorial for non-programmers based on a Jupyter Notebook with interactive widgets that can be run online.

Install

PyCatFlow is available on PyPi:

$ pip3 install pycatflow

Alternatively you can download the repository and install the package by running the setup.py install routine. Make sure to install the requirements as well:

pip3 install -r requirements.txt
python3 setup.py install

Additional Requirements: The visualization and export is based on the drawSvg package that in turn requires cairo to be installed as an external requirement. Platform-specific instructions for installing cairo are available on the cairo homepage.

On macOS cairo can be installed easily using homebrew:

$ brew install cairo

Basic usage

The visualization library provides many functionalities for adjusting the visual output. A simple use case is however as follows:

import pycatflow as pcf

# Loading and parsing data:
data = pcf.read_file("sample_data_ChatterBot_Requirements.csv", columns="column", nodes="items", categories="category", column_order="column order")

# Generating the visualization
viz = pcf.visualize(data, spacing=20, width=800, maxValue=20, minValue=2)
viz.savePng('sample_viz.png')
viz.saveSvg('sample_viz.svg')
viz

The code and sample data are provided in the example folder. The data contains annual snapshots of requirements of the ChatterBots framework developed and maintained by Gunther Cox.

Running the above code creates this visualization:

Sample Visualization

Credits & License

PyCatFlow was conceptualized by Marcus Burkhardt and implemented in collaboration with Herbert Natta (@herbertmn). It is inspired by the Rankflow visualization tool develped by Bernhard Rieder.

Cite as: Marcus Burkhardt, and Herbert Natta. 2021. “PyCatFlow: A Python Package for Visualizing Categorical Data over Time”. Zenodo. https://doi.org/10.5281/zenodo.5531785.

The package is released under MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycatflow-0.1.2.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

pycatflow-0.1.2-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file pycatflow-0.1.2.tar.gz.

File metadata

  • Download URL: pycatflow-0.1.2.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for pycatflow-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3ef8d3abbd7857fad298c22a2b9f11a2fa4ac7a9250f993eeab2da349cfb60e7
MD5 f3d99b62677125c40b19e7ce0acb723c
BLAKE2b-256 8bebb8a16b28dc35763fb6e5d20e295c3414d57c150f50d96d44c2f58e952820

See more details on using hashes here.

File details

Details for the file pycatflow-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pycatflow-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for pycatflow-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 25f58b9ba3fe086411a8c1720a68e74b7ada3ed5debdbe605b8953a96fbc34d7
MD5 ba281afa245f358eddb1309e00c2f7bf
BLAKE2b-256 82dd28b11cdc408471f12bcec2bc4ba71dae245c2bf1bb8799951bab2454e57a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page