Mean Number of Cords Per Group, including pendant cords, subsidiary cords, top cords, etc.
2.Summary Charts:
Code
# Initialize plotlyimport plotlyplotly.offline.init_notebook_mode(connected =False);# Read in the Fieldmark and its associated dataframe and match dictionaryfrom fieldmark_khipu_summary import FieldmarkMeanCordsPerGroupaFieldmark = FieldmarkMeanCordsPerGroup()fieldmark_dataframe = aFieldmark.dataframes[0].dataframeraw_match_dict = aFieldmark.raw_match_dict()
Code
import plotly.express as px# Plot Matching khipumatching_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": "Mean Number of Cords Per Group", }, title=f"Matching Khipu for Mean Number of Cords Per Group", width=944, height=450).update_layout(showlegend=True).show()
Code
import pandas as pdimport utils_khipu as ukhipu# Plot Significant khipusignificant_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": "Mean Number of Cords Per Group", }, title=f"Significant Khipu {ukhipu.pct_kfg_khipus(len(significant_khipus))} for Mean Number of Cords Per Group", width=944, height=450).update_layout(showlegend=True).show()
3. Exploratory Data Analysis
The smoothness of the graph is perplexing. Despite the mean doing some artificial smoothing, one would expect a stair step function, not a smooth looking curve. Especially with low numbers of cords per group. Another way to measure might be the mode rather than the mean. Let’s do that.
fig = px.bar(mode_cords_per_group_df, x='KhipuName', y='mode_cords_per_group', labels={"KhipuName": "Khipu Name", "Value": "Mode Number of Cords Per Group", }, title="Khipu for Mode Number of Cords Per Group", width=944, height=450).update_layout(showlegend=True).show()