Cord Group Count


1. Number of Cord Groups

The number of cord groups is a rough estimate of overall khipu size. What else is there to say!

2. Summary Results:

Measure Result
Number of Khipus That Match 650(100%)
Number of Significant Khipus 67 (10%)
Five most Significant Khipu AS069, UR055, UR050, UR054, UR1032
Image Quilt Click here

3.Summary Charts:

Code
# Initialize plotly
plotly.offline.init_notebook_mode(connected = False);

# Read in the Fieldmark and its associated dataframe and match dictionary
from fieldmark_khipu_summary import Fieldmark_Num_Cord_Groups
aFieldmark = Fieldmark_Num_Cord_Groups()
fieldmark_dataframe = aFieldmark.dataframes[0].dataframe
raw_match_dict = aFieldmark.raw_match_dict()
Code
# Plot Matching khipu
matching_khipus = aFieldmark.matching_khipus() 
matching_values = [raw_match_dict[aKhipuName] for aKhipuName in matching_khipus]
matching_df =  pd.DataFrame(list(zip(matching_khipus, matching_values)), columns =['KhipuName', 'Value'])
fig = px.bar(matching_df, x='KhipuName', y='Value', labels={"KhipuName": "Khipu Name", "Value": "Number of  Cord Groups", }, 
            title=f"Matching Khipu ({len(matching_khipus)}) for Number of  Cord Groups",  width=944, height=500).update_layout(showlegend=True).show()
Code
# Plot Significant khipu
significant_khipus = aFieldmark.significant_khipus()
significant_values = [raw_match_dict[aKhipuName] for aKhipuName in significant_khipus]
significant_df =  pd.DataFrame(list(zip(significant_khipus, significant_values)), columns =['KhipuName', 'Value'])
fig = px.bar(significant_df, x='KhipuName', y='Value', labels={"KhipuName": "Khipu Name", "Value": "Number of  Cord Groups", },
             title=f"Significant Khipu ({len(significant_khipus)}) for Number of  Cord Groups", width=944, height=500).update_layout(showlegend=True).show()
Code
## 4. Exploratory Data Analysis

How do the number of cords per group distribute?

Code
# Load khipus
(khipu_dict, all_khipus) = kamayuq.fetch_khipus()
Code
pendant_cords_per_group = []
for aKhipu in all_khipus:
    for aGroup in aKhipu[:]:
        pendant_cords_per_group.append(aGroup.num_pendant_cords())

num_total_groups = len(pendant_cords_per_group)
from collections import Counter as counter
counter_pendant_cords_per_group = counter(pendant_cords_per_group)
print(f"Most common group counts are: {counter_pendant_cords_per_group.most_common()}\n")

# of Six pendant cords per group
num_six_pendant_cords_per_group = counter_pendant_cords_per_group.most_common()[5][1]
percent_string = f"{ku.as_percent_string(num_six_pendant_cords_per_group, num_total_groups)}"
percent_count = f"{num_six_pendant_cords_per_group}/{num_total_groups} ({percent_string})"
print(f"# six_pendant_cords_per_group = {percent_count}")
Most common cluster counts are: [(1, 2599), (3, 789), (4, 728), (5, 671), (6, 670), (2, 669), (7, 440), (8, 306), (9, 256), (10, 215), (11, 175), (12, 137), (14, 74), (18, 65), (15, 51), (13, 50), (16, 45), (22, 30), (21, 29), (20, 24), (17, 23), (19, 20), (0, 11), (24, 11), (36, 9), (26, 7), (27, 7), (23, 6), (30, 6), (40, 5), (31, 5), (32, 4), (34, 4), (46, 4), (42, 3), (28, 3), (25, 3), (35, 3), (38, 3), (72, 2), (60, 2), (61, 2), (66, 2), (39, 2), (160, 2), (29, 2), (53, 2), (101, 1), (75, 1), (45, 1), (58, 1), (54, 1), (48, 1), (52, 1), (37, 1), (88, 1), (41, 1), (33, 1), (44, 1), (135, 1), (77, 1), (49, 1), (67, 1)]

# six_pendant_cords_per_cluster = 669/8192 (8%)