Devlopment Environment

This part of the project (phase 1) was heavy on database checking and rendering. A classic object-oriented database and rendering package needed to be built. The obvious choice was python.

The majority of the work lies in the python class library. There are two groups of files, the files that support the khipu objects such as cords, knots, etc., and the files that create the html output to view all the rendering.

The data-cleansing and analyses are done using the Jupyter notebook “literate programming” environment. While not my favorite environment for such a task, it integrates easily with python, and it did the job. In Phase 3, where statistical analysis will be the motivating factor, I suspect I will be using the more pleasant environment of R.

Rendering for a variety of Internet browsers required a painfully difficult conversion of SVG vector files (in textual XML like format) into Jpeg images. To do this well, with decent font support, required Adobe Illustrator which saves the files in high-quality format as Jpegs or Tiffs as needed. Why TIFFS? Because three of the khipus were so large that their images exceed Jpeg size bounds. Photoshop and the open-source image-processing utility ImageMagick take over from there to split up large TIFF images and convert the results to Jpegs. To orchestrate this process required a combination of OS calls, AppleScript and occasional old-fashioned by-hand tweaking. Your mileage may vary. The whole process of building the jpgs and html files from the data takes about 3 hours of computing on my fairly fast Mac Pro. Memory leaks in various apps, coupled with the size of data frequently crashed the Mac with 32 GB of RAM, midway through the conversion process.

I’ve tried to use the common Python libraries (numpy, pandas, scipy, etc.) to do the job of analysis and building the khipus.

Whenever it made sense I used the Plotly package to create graphics. Python’s matplotlib, seaborn, etc. are so poor in quality and robustness that the only thing I used was seaborn histograms, and even that I used guardedly. I note for the record that one seaborn histogram which rendered incorrectly, based on my failure to fine-tune a particular setting (the number of bins), made me think I had a handle on how to decipher khipus based on cord twists. Only when I looked at the actual numeric data did I realize how misleading the graphic was. After that I made sure to pay attention to every setting in seaborn’s plots.