Khipus with DecaDecimal Cords
Appendix 5 - Analysis of Khipus with DecaDecimal Cords
Many khipus have cord values that are multiples of 10. Are these khipus “intentionally planned” to be this way? For example, could they be top-down khipus that reflect a taxation scheme? This idea, proposed by Manual Medrano, investigates the mean cord values of these khipus, and looks at their distribution.
Code
(khipu_dict, all_khipus) = kamayuq.fetch_khipus()
# Analysis is done for pendant cords only:
# Build a dictionary of all cord values for each khipu
khipu_names = [khipu.name() for khipu in all_khipus]
cord_values_dict = {khipu.name():[cord.knotted_value() for cord in khipu[:,:]] for khipu in all_khipus}
Code
from scipy.stats import entropy
import warnings
warnings.simplefilter("ignore")
def is_decadecimal(aValue): return (aValue != 0) and (aValue%10==0)
def num_decadecimals(cord_values): return sum([is_decadecimal(aValue) for aValue in cord_values])
decadecimal_table = [(khipu_name,
num_decadecimals(cord_values_dict[khipu_name]),
float(num_decadecimals(cord_values_dict[khipu_name]))/float(len(cord_values_dict[khipu_name])),
entropy(cord_values_dict[khipu_name]),
mean(cord_values_dict[khipu_name]),
len(cord_values_dict[khipu_name])) for khipu_name in khipu_names]
decadecimal_df = pd.DataFrame(decadecimal_table, columns=["Khipu_Name", "Num_Decadecimals", "Decadecimal_Proportion", "Entropy", "Mean_Cord_Value", "Num_Cords"])
decadecimal_df
Khipu_Name | Num_Decadecimals | Decadecimal_Proportion | Entropy | Mean_Cord_Value | Num_Cords | |
---|---|---|---|---|---|---|
0 | AS010 | 2 | 0.074074 | 2.650825 | 8 | 27 |
1 | AS011 | 2 | 0.133333 | 1.624489 | 92 | 15 |
2 | AS012 | 1 | 0.011765 | 2.765642 | 2 | 85 |
3 | AS013 | 5 | 0.055556 | 2.807698 | 4 | 90 |
4 | AS014 | 10 | 0.238095 | 3.478898 | 53 | 42 |
... | ... | ... | ... | ... | ... | ... |
646 | UR193 | 10 | 0.101010 | 4.274406 | 30 | 99 |
647 | UR221 | 6 | 0.600000 | 1.733907 | 70 | 10 |
648 | UR253 | 3 | 0.050847 | 3.219005 | 10 | 59 |
649 | UR280 | 7 | 0.189189 | 2.808857 | 60 | 37 |
650 | UR292A | 1 | 0.018868 | 3.031936 | 2 | 53 |
Now that we have a dataframe of relationships, let’s plot them:
Code
# Initialize plotly
import warnings
warnings.filterwarnings("ignore")
plotly.offline.init_notebook_mode(connected = False);
fig = (px.scatter(decadecimal_df, x="Num_Cords", y="Decadecimal_Proportion",
hover_data=['Khipu_Name'],
title=f"<b>Relationship between Decadecimal Proportion, and Num Cords</b>",
width=944, height=944)
.update_layout(showlegend=False).update(layout_coloraxis_showscale=False).show()
)
Code
# Initialize plotly
import warnings
warnings.filterwarnings("ignore")
plotly.offline.init_notebook_mode(connected = False);
fig = (px.scatter(decadecimal_df, x="Mean_Cord_Value", y="Decadecimal_Proportion",
hover_data=['Khipu_Name'],
title=f"<b>Relationship between Decadecimal Proportion, and Mean Cord Value</b>",
width=944, height=944)
.update_layout(showlegend=False).update(layout_coloraxis_showscale=False).show()
)
Code
# Initialize plotly
import warnings
warnings.filterwarnings("ignore")
plotly.offline.init_notebook_mode(connected = False);
fig = (px.scatter(decadecimal_df, x="Num_Cords", y="Entropy",
hover_data=['Khipu_Name'],
title=f"<b>Relationship between Entropy, and Num Cords</b>",
width=944, height=944)
.update_layout(showlegend=False).update(layout_coloraxis_showscale=False).show()
)
Code
# Initialize plotly
import warnings
warnings.filterwarnings("ignore")
plotly.offline.init_notebook_mode(connected = False);
fig = (px.scatter(decadecimal_df, x="Mean_Cord_Value", y="Entropy",
hover_data=['Khipu_Name'],
title=f"<b>Relationship between Entropy, and Mean Cord Value</b>",
width=944, height=944)
.update_layout(showlegend=False).update(layout_coloraxis_showscale=False).show()
)