{#- The characterisation of the corpus, factlabel's section of statistics' dashboard (dashboard.py's corpus(), as `section`), drawn with the dashboard's macros: the models of the version each lineage shows. -#} {% from "statistics/_macros.html" import kpi, stats_card, breakdown_table, top_table, chart %}

{{ icon('cpu', size=24, class_='me-2 text-info') }} Corpus characterisation

Materialised from fact labels, {{ section.metrics_ok }} of {{ section.hubfiles_with_factlabel }} models ({{ section.coverage_pct }}%)
{# Coverage KPIs #}
{{ kpi("Models", section.total_hubfiles, "file-text", "primary") }} {{ kpi("With fact label", section.hubfiles_with_factlabel, "check-square", "info") }} {{ kpi("Metrics extracted", section.metrics_ok, "bar-chart-2", "success") }} {{ kpi("Errored", section.metrics_errored, "alert-triangle", "warning") }} {{ kpi("Coverage %", section.coverage_pct, "percent", "secondary") }} {{ kpi("Satisfiable %", section.satisfiable_pct, "check-circle", "success") }}
{# Satisfiability and the composition of the constraints and the groups #}

{{ icon('check-circle', size=24, class_='me-2 text-success') }} Satisfiability

{{ chart("satChart", { "type": "hbar", "labels": ["Satisfiable", "Unsatisfiable", "Unknown"], "series": [{ "label": "Models", "data": [section.satisfiable_count, section.unsatisfiable_count, section.unknown_satisfiability], "colors": ["success", "danger", "secondary"], }], }, height=180) }}
Satisfiable: {{ section.satisfiable_count }} · Unsatisfiable: {{ section.unsatisfiable_count }} · Unknown: {{ section.unknown_satisfiability }}
{% for id, title_, icon_name, color, pairs in [ ("constraintTypesChart", "Constraint types (corpus-wide)", "link", "info", section.constraint_types), ("groupTypesChart", "Group types (corpus-wide)", "git-branch", "warning", section.group_types), ] %}

{{ icon(icon_name, size=24, class_='me-2 text-' ~ color) }} {{ title_ }}

{{ chart(id, { "type": "hbar", "labels": pairs | map("first") | list, "series": [{"label": "Count", "data": pairs | map("last") | list}], }, height=180) }}
{% endfor %}
{# Statistical summaries — the "headline table" for the paper #}

{{ icon('list', size=24, class_='me-2 text-secondary') }} Statistical summary (per feature model)

{{ stats_card("Features", section.summary_features, "hash") }}
{{ stats_card("Cross-tree constraints", section.summary_constraints, "link-2") }}
{{ stats_card("Tree depth", section.summary_depth, "git-commit") }}
{{ stats_card("Branching factor", section.summary_branching_factor, "share-2") }}
{{ stats_card("Configurations (exact only)", section.summary_configurations, "grid") }}
{{ breakdown_table("Feature classification (sum across corpus)", section.feature_classification, "text-bg-secondary", "layers") }}
{# Distributions #} {% for pair in [ [("featuresHistChart", "Features per model (log buckets)", "bar-chart", "primary", section.features_histogram), ("constraintsHistChart", "Cross-tree constraints per model (log buckets)", "bar-chart", "danger", section.constraints_histogram)], [("depthHistChart", "Tree depth distribution", "bar-chart-2", "success", section.depth_histogram), ("configsHistChart", "Number of configurations (log buckets, exact only)", "bar-chart-2", "warning", section.configurations_histogram)], ] %}
{% for id, title_, icon_name, color, histogram in pair %}

{{ icon(icon_name, size=24, class_='me-2 text-' ~ color) }} {{ title_ }}

{{ chart(id, { "type": "bar", "labels": histogram.labels, "series": [{"label": "Models", "data": histogram.counts, "color": color}], }, height=120) }}
{% endfor %}
{% endfor %} {# Tops by corpus complexity #}
{{ top_table("Largest models (features)", section.top_by_features, "Features", "text-bg-primary", "hash", name_label="Model") }}
{{ top_table("Most constrained models", section.top_by_constraints, "CTCs", "text-bg-danger", "link-2", name_label="Model") }}
{{ top_table("Most configurations", section.top_by_configurations, "Configs", "text-bg-warning", "grid", name_label="Model") }}