Since the pendant-pendant-sum relationship is the most prevalent sum relationship in the Khipu Field Guide, that sum relationship is useful as a proxy to examine sums and their colors in a broad manner.
2. Pendant Sum Color EDA:
2.1 By Color Frequency
How do pendant color sum cords distribute by color?
Code
#=======================================================# INITIALIZE# Read in the Fieldmark and its associated dataframes#=======================================================import pandas as pdimport qollqa_chuspa as qcimport plotlyfrom fieldmark_ascher_pendant_pendant_sum import FieldmarkPendantPendantSumaFieldmark = FieldmarkPendantPendantSum()khipu_df = aFieldmark.dataframes[0].dataframesum_cord_df = aFieldmark.dataframes[1].dataframe(khipu_dict, all_khipus) = qc.fetch_khipus()# Initialize plotlyplotly.offline.init_notebook_mode(connected =False);
Code
from statistics import meanimport mathsum_cord_df = aFieldmark.dataframes[1].dataframedef pendant_mean_by_color(aColor): cords_with_color_df = sum_cord_df[sum_cord_df.cord_color==aColor] pendant_color_values =list(cords_with_color_df.cord_value.values) the_mean_value = mean(pendant_color_values) iflen(pendant_color_values) >0else0return math.log(the_mean_value,10) if the_mean_value >0else0def pendant_color_occurrences(aColor): cords_with_color_df = sum_cord_df[sum_cord_df.cord_color==aColor] num_occurrences =len(cords_with_color_df)return num_occurrencesall_colors =set(sum_cord_df.cord_color.values)color_frequency = [(aColor, pendant_color_occurrences(aColor), pendant_mean_by_color(aColor)) for aColor in all_colors]
import plotly.express as pxlegend_text ="<i style=\"font-size:10pt;\"> Size/Color = Mean(Cord Values)"+\" - Hover to View Khipu/Cord Info</i>"fig = px.scatter(color_frequency_df.head(75), x='ascher_color', y='num_occurrences', log_y=True, color=list(color_frequency_df.log_mean_value.values)[:75], labels={"color": "Mean Cord Value",'num_occurrences':"Pendant Sum Color Frequency (Log_10)", "log_mean_value": "Log_10 of Mean Cord Value", }, title=f"Pendant Sum Cords by Color: (Top 75){legend_text}", width=944, height=944).update_layout(showlegend=True).show()
Code
each_color_occurences =list(color_frequency_df.num_occurrences.values)all_occurrences =float(sum(each_color_occurences))color_frequency_df['proportions'] = [round(100.0*float(x)/float(all_occurrences)) for x in each_color_occurences]fig = px.bar(color_frequency_df[:75], x="ascher_color", y="proportions", labels={"x": "Ascher Color", "y": "% of Overall Pendant Sum Colors"}, title="Percent of Pendant Sum Color to Overall Pendant Sums", width=944, height=400).update_layout(showlegend=False).show()
These two charts tell us that while White is the predominant pendant sum color, it comprises less than 27% of the pendant sum colors. About the same as its overall occurrence as a cord in the Khipu Field Guide.
2.2 Sum Color Frequency vs All Pendant Color Frequency
How does the distribution of pendant sum cord colors compare to the overall distribution of colors of significant cords (ie. cords with a value > 1) in all the khipus? To do that, let’s gather the total distribution of colors across all sum pendants, and then look at the cosine distance of that distribution to the distribution of all pendants with a value > 1.
Code
from collections import OrderedDict, Counterimport utils_loom as uloomdef build_pendant_color_frequencies(): ascher_colors = []for aKhipu in all_khipus: khipu_cords = aKhipu.pendant_cords()for cord_index, aCord inenumerate(khipu_cords): cord_colors = [aColor.full_color for aColor in aCord.ascher_colors]iflen(cord_colors)>0: ascher_colors += cord_colorsreturn OrderedDict(Counter(ascher_colors).most_common()) pendant_color_frequency_dict = build_pendant_color_frequencies()pendant_sum_color_frequency_dict = OrderedDict(zip(color_frequency_df.ascher_color.values, color_frequency_df.num_occurrences.values))theta = uloom.degrees_between_dicts(pendant_color_frequency_dict, pendant_sum_color_frequency_dict)print(f"Angle between all_colors vector and pendant color vector is {theta:0.2f}° degrees")
Angle between all_colors vector and pendant color vector is 4.91° degrees
That’s astounding. Pendant sum color frequency matches almost exactly (within 5° degrees) to overall pendant color frequency amongst all the khipus. Dr. Jon Clindaniel has posited in his Harvard Ph.D. Thesis that White (or more generally, color) has a grammatical role in sums. If we are to look at the above scatterplot Top 75 Pendant Sum Cords by Color Frequency one can conclude that Dr. Clindaniel’s argument makes sense.
However, the closeness of the vector angle disproves the case. If color was a grammatical marker, we would expect to see a more significant difference. Consequently, the apparent conclusion is that color does not play a grammatical role in summation patterns.
The reverse argument can also be made. All pendants are sum cords. Is that true? Let’s look at just this fieldmark alone - pendant pendant sums, which has the most number of sum cords:
Code
num_khipu_pendants =sum([khipu_dict[khipu_name].num_pendant_cords() for khipu_name in sum_cord_df.kfg_name.values])num_sum_pendants =len(aFieldmark.dataframes[1].dataframe)print(f"num pendant sum_cords is {num_sum_pendants}, out of a set of {num_khipu_pendants} total sum khipus pendants")percentage = (100.0*num_sum_pendants/float(num_khipu_pendants))print(f"That's a ratio of {percentage:.2f}%")
num pendant sum_cords is 6443, out of a set of 1524290 total sum khipus pendants
That's a ratio of 0.42%
So 0.5% - less than 1/2 of 1% - of the cords in khipus having a pendant pendant sum cord relations ship have pendants that are sum cords. So that argument might have trouble bearing weight…
As a final confirmation - let’s look at the color distributions of the two sets of colors (pendant sum colors) vs (pendant colors). Click on each image to view it full-size.
fig = px.scatter(color_by_value_df.head(75), x='color', y='mean_value', size='log_num_occurrences', color='log_num_occurrences', labels={"color": "Ascher Color", "mean_value": "Mean Cord Value", "log_num_occurrences": "Log_10 of # Color occurrences",}, title="Top 75 Pendant Sum Cords by Mean Cord Value per Color ", width=944, height=944).update_layout(showlegend=True).show()
Click on image to view larger
Note that as Dr. Clindaniel also noted in his thesis - the majority of the large-valued ascher cord colors in sums are barberpole or mottled - few are solid:
Code
def is_solid_ascher_color(aColor): returnisinstance(aColor,str) andnot (('-'in aColor) or (':'in aColor) or ('%'in aColor))all_colors = OrderedDict(list(zip(list(color_by_value_df.color.values), list(color_by_value_df.mean_value.values))))complex_colors = OrderedDict([(color, count) for (color, count) in all_colors.items() ifnot is_solid_ascher_color(color)])solid_colors = OrderedDict([(color, count) for (color, count) in all_colors.items() if is_solid_ascher_color(color)])
Click on image to view larger
Click on image to view larger
4. By Banded vs Seriated
Code
def banded_color(kfg_name): aKhipu = khipu_dict[kfg_name] is_banded = aKhipu.num_banded_groups() > khipu_dict[kfg_name].num_seriated_groups()return0.0if is_banded else1.0def banded_ratio(kfg_name): aKhipu = khipu_dict[kfg_name] total_groups = aKhipu.num_cord_groups()return aKhipu.num_banded_groups()/total_groups if total_groups >0else0khipu_df['banded_color'] = [banded_color(x) for x in khipu_df.kfg_name.values]khipu_df['banded_ratio'] = [banded_ratio(x) for x in khipu_df.kfg_name.values]khipu_df['num_banded_groups'] = [khipu_dict[x].num_banded_groups() for x in khipu_df.kfg_name.values]khipu_df['num_seriated_groups'] = [khipu_dict[x].num_seriated_groups() for x in khipu_df.kfg_name.values]fig = px.scatter(khipu_df, x='num_seriated_groups', y='num_banded_groups', hover_name='kfg_name', hover_data=["num_banded_groups", "num_seriated_groups", "num_sum_cords"], size="num_sum_cords", color='banded_color', color_continuous_scale=['#3c3fff', '#ff3030',], labels={"num_sum_cords":"Number of Pendant Pendant Sum Cords"}, title=f"<b>Pendant Pendant Sums by Banded/Seriated</b> - Blue=Banded, Red=Seriated, Size=#SumCords", width=944, height=944).update_coloraxes(showscale=False).show()
5. Conclusions:
A majority of large-valued pendant sum cords have a seriated color scheme. This provides an additional confirmation of Dr. Clindaniel’s argument in his Ph.D. Thesis the majority of the large-valued ascher cord colors in sums are barberpole or mottled - few are solid.
White is the most common pendant sum cord color (<30%), followed by AB(Light Brown), MB(Moderate Brown), and B(Moderate Yellowish Brown) and (YB)Light Yellowish Brown.
White does not appear to play a role as a grammatical marker for pendant sum summation. More examination of this can be found on the White Cord EDA page.