Skip to content

antropolouco/quipucamayoc

 
 

Repository files navigation

Quipucamayoc

A high-level quipu visualization library for Python

The quipucamayoc data visualization library reimagines the modern data science toolkit as one that includes indigenous modes of data communication. This library is based on Incan numeric quipus and works with Python in a Jupyter Notebook environment. I hope quipucamayoc inspires data scientists to approach their discipline as the weaving together of historical modes of representation with historical problems

✨ For more information on this library and quipus, visit the quipucamayoc wiki page in this repo. ✨

Project Structure

|--assets/        <-- SVG elements that make the quipu chart
|--quipucamayoc/  <-- Python files that interface with Jupyter Notebook
|--src/           <-- TypeScript files that build the quipu chart
|--MANIFEST.in    <-- combines JavaScript with the Python build
|--pyproject.toml <-- tells Python library `build` to use setuptools
|--setup.py       <-- defines the Python build
|--tsconfig.json  <-- TypeScript settings

quipucamayoc Data Flow Purple and pink diagram of how data flows through the system

Installation

Make sure you have everything from https://github.com/potatodax/quipucamayoc/blob/main/requirements.txt installed.

Go to https://github.com/potatodax/quipucamayoc/releases/tag/v0.1.0 and download the quipucamayoc-0.1.0.tar.gz file.

Then run:

cd <directory where you downloaded the tar.gz file>
pip3 install quipucamayoc-0.1.0.tar.gz

If successful, you should see the following at the end of the terminal output:

[...]
Successfully installed quipucamayoc-0.1.0

♻️ Note: To uninstall later, simply use:

pip3 uninstall quipucamayoc

Usage

The wiki page and the demo notebook also show how quipucamayoc builds quipu charts.

Here is a small example of how this library works in a Jupyter Notebook:

import quipucamayoc as qp
import pandas as pd
data = {'item': ['item_a', 'item_b', 'item_c', 'item_d', 'item_e'],
        'amount': [1200, 150, 300, 450, 201],
        }
df = pd.DataFrame(data)

new_quipu = qp.Quipu(data=df, label='item', value='amount')
new_quipu.display()

Small quipu with five pendant cords

About

A high-level quipu visualization library for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 73.6%
  • Python 26.4%