{% from 'report_parts.html' import logo, table_head, acc with context %} {% macro col_ref(hrefs, col_id, name) -%}{% set href = hrefs.get(col_id) %}{% if href %}{{ name }} {% else %}{{ name }}{% endif %}{%- endmacro %} {% macro card_body(t) -%}
{{ table_head(t.category_name, filter=false) }}{% for c in t.classes %}{% endfor %}{{ table_head('Rows', align=true, filter=false) }}{{ table_head('Coverage', align=true, filter=false) }}{{ table_head('Purity', align=true, filter=false) }}{% for r in t.rows %}{% for cell in r.cells %}{% endfor %}{% endfor %}{% for n in t.column_totals %}{% endfor %}
{% if t.feature == 'pattern' and c.kind != 'other' %}{{ c.label }}{% else %}{{ c.label }}{% endif %}
{{ r.label }}{% if cell.count %}{{ cell.count | count }}{{ '%.1f' | format(cell.share * 100) }}%{% else %}0{% endif %}{% if cell.dominant %} dominant class{% endif %}{{ r.classified | count }}{% if r.coverage is not none %}{{ '%.1f' | format(r.coverage * 100) }}%{% else %}–{% endif %}{% if r.purity is not none %}{{ '%.1f' | format(r.purity * 100) }}%{% else %}–{% endif %}
All{{ n | count }}{{ t.counted | count }}
{% if t.exceptions.listed %}

Exceptions({{ t.exceptions.count | count }} rows · {{ t.exceptions.listed | length | count }} listed)

{{ table_head(t.category_name, filter=false) }}{{ table_head('Class', filter=false) }}{{ table_head('Rows', align=true, filter=false) }}{{ table_head('First rows', filter=false) }}{% for e in t.exceptions.listed %}{% endfor %}
{{ e.category_label }}{% if t.feature == 'pattern' and e.class_label != 'other' %}{{ e.class_label }}{% else %}{{ e.class_label }}{% endif %}{{ e.count | count }}{% if e.examples %}{% for ex in e.examples %}{{ ex.value }}{% endfor %}Records {{ e.examples | map(attribute='record') | join(', ') }}{% else %}–{% endif %}
{% if t.exceptions.cells > t.exceptions.listed | length %}

Showing the {{ t.exceptions.listed | length | count }} listed of {{ t.exceptions.cells | count }} exception cells stored in the report JSON.

{% endif %}{% endif %} {% if t.rules %}

Candidate rules({{ t.rules | length }})

{% endif %} {% if t.provided_rules %}

Checked rules({{ t.provided_rules | length }})

{% endif %} {%- endmacro %} {% macro rel_card(t, hrefs, order_idx, secondary=false) -%}

{{ col_ref(hrefs, t.category_id, t.category_name) }} {{ col_ref(hrefs, t.column_id, t.column_name) }}

{{ t.relation_kind_label }}by {{ t.feature_label }}{{ t.tier_label }}{% for reason in t.tier_reason_labels %}{{ reason }}{% endfor %}{{ acc('exact') }}
{% if t.reference_note %}

{{ t.reference_note }}{% if t.reference_anchor %} · Jump to referenced card{% endif %}

{% endif %}
Classified
{{ t.counted | count }} / {{ t.rows_examined | count }}{% if t.left_out %} ({{ t.left_out }}){% endif %}
Purity & lift
{% if t.purity_forward is not none %}{{ '%.1f' | format(t.purity_forward * 100) }}%{% else %}–{% endif %}{% if t.baseline is not none %} (baseline {{ '%.1f' | format(t.baseline * 100) }}%{% if t.lift is not none %}, lift {{ '%+.1f' | format(t.lift * 100) }} pp{% endif %}{% if t.purity_reverse is not none %}, reverse {{ '%.1f' | format(t.purity_reverse * 100) }}%{% endif %}){% endif %}
Cramér's V, bias-corrected
{% if t.corrected_cramers_v is not none %}{{ '%.2f' | format(t.corrected_cramers_v) }} ({{ 'Unstable: low counts' if t.strength_code == 'unstable' else t.strength_label }}){% else %}– (Not defined){% endif %}
Exceptions
{% if t.exceptions.count %}{{ t.exceptions.count | count }} (in {{ t.exceptions.cells | count }} cells){% else %}0 (exact fit){% endif %}
{% if t.association_note %}

{{ t.association_note }}

{% endif %} {% if secondary %}
Contingency matrix, exceptions, and rules ({{ t.rows | length | count }} categories · {{ t.exceptions.count | count }} exceptions · {{ t.rules | length | count }} candidate rules) {{ card_body(t) }}
{% else %} {{ card_body(t) }} {% endif %}
{%- endmacro %}

Chart page · {{ report.source.name }}

{{ title }}

  • {{ sections | length }} {{ 'dataset' if sections | length == 1 else 'datasets' }}
  • Second pass, complete relationship tables

The charts load {{ library.name }} {{ library.version }} from a CDN; no data of the report leaves this page. Every relationship, matrix, exception, and correlation stays readable below without it.

{% for s in sections %}{% set rel = s.presentation %}{% set rs = rel.summary %}{% set px = s.prefix %}{% set hrefs = s.column_hrefs %}

{{ '%02d' | format(loop.index) }} / {{ s.dataset }}

Complete relationships

All categorical tables (primary and secondary), 1-1 value equivalences, and numeric correlations read directly from the report JSON.

1-1 equivalences
{{ rs.equivalence_class_count | count }}{{ 'Exact value bijections' if rs.equivalence_class_count else 'No exact 1-1 bijection' }}
Primary relationships
{{ rs.primary_count | count }}of {{ rs.categorical_count | count }} categorical tables
Secondary relationships
{{ rs.secondary_count | count }}Redundant, transitive, or low signal
Numeric correlations
{{ rs.correlation_count | count }}{{ rs.primary_correlation_count | count }} notable
{% if rs.withheld_count %}
Withheld
{{ rs.withheld_count | count }}Masked or hidden columns omitted
{% endif %}
{% if rel.primary_categorical or rel.secondary_categorical or rel.correlations %}

This chart needs JavaScript and a network connection to load {{ library.name }}. Complete relationship cards and tables follow below.

{% endif %} {% if rel.equivalences %}

1-1 value equivalences ({{ rel.equivalences | length | count }})

    {% for eq in rel.equivalences %}
  • {{ eq.id }} {% for m in eq.members %}{{ col_ref(hrefs, m.column_id, m.name) }}{% if not loop.last %} ↔ {% endif %}{% endfor %} (canonical: {{ eq.canonical_name }} · {{ eq.cardinality | count }} distinct values)
  • {% endfor %}
{% endif %} {% if rel.primary_categorical or rel.secondary_categorical %}
{{ rs.categorical_count }} of {{ rs.categorical_count }} relationships
{% endif %} {% if rel.primary_categorical %}

Primary relationships({{ rel.primary_categorical | length }})

{% for t in rel.primary_categorical %} {{ rel_card(t, hrefs, loop.index0, secondary=false) }} {% endfor %}
{% endif %} {% if rel.secondary_categorical %}

Secondary relationships({{ rel.secondary_categorical | length }})

Redundant, mirror, equivalent, transitive, or low-signal categorical tables. Matrices, exceptions, and rules stay collapsed per card until opened.

{% set offset = rel.primary_categorical | length %} {% for t in rel.secondary_categorical %} {{ rel_card(t, hrefs, offset + loop.index0, secondary=true) }} {% endfor %}
{% endif %} {% if rel.correlations %}

Correlations between numeric columns({{ rs.correlation_count }})

{{ table_head('Pair', filter=false) }}{{ table_head('Signal', filter=false) }}{{ table_head('Pearson r', align=true, filter=false) }}{{ table_head('R²', align=true, filter=false) }}{{ table_head('Slope', align=true, filter=false) }}{{ table_head('Intercept', align=true, filter=false) }}{{ table_head('Spearman ρ', align=true, filter=false) }}{{ table_head('Strength', filter=false) }}{{ table_head('Pairs / Rows', align=true, filter=false) }}{{ table_head('Note', filter=false) }}{{ table_head('Accuracy', filter=false) }} {% for c in rel.correlations %}{% endfor %}
{{ col_ref(hrefs, c.field_id, c.field_name) }} and {{ col_ref(hrefs, c.partner_id, c.partner_name) }}{{ c.tier_label }}{% if c.coefficient is not none %}{{ '%+.3f' | format(c.coefficient) }}{% else %}–{% endif %}{% if c.r_squared is not none %}{{ '%.3f' | format(c.r_squared) }}{% else %}–{% endif %}{% if c.slope is not none %}{{ c.slope | number }}{% else %}–{% endif %}{% if c.intercept is not none %}{{ c.intercept | number }}{% else %}–{% endif %}{% if c.rank_coefficient is not none %}{{ '%+.3f' | format(c.rank_coefficient) }}{% if c.rank_lower is not none and c.rank_upper is not none %}[{{ '%+.2f' | format(c.rank_lower) }}, {{ '%+.2f' | format(c.rank_upper) }}]{% endif %}{% else %}–{% endif %}{{ c.strength_label or '–' }}{{ c.pairs | count }}of {{ c.rows | count }}{{ c.note }}{{ acc('exact') }}
{% endif %} {% for note in rel.exploration_notes %}

{{ note }}

{% endfor %}

Counts are exact: every row of the file is placed in one category and one class, or left out. Purity is the share of classified rows in the dominant class of each category; lift is the gain over the global majority baseline. The score is Cramér's V corrected for rows and classes. Correlations measure linear association on paired numeric rows. Observed associations and candidate rules are descriptive only and do not imply causality or domain validity.

{% endfor %}