{#- Identifier sections for Tabalyst Insights column pages. Every figure is in a table that reads without JavaScript. -#} {% from 'insights_text.html' import crosstabs_block, duplicates_block, forms_block, lengths_block, patterns_block, residuals_block with context %} {% macro identifier_sections(idd, library, n_uniq='02', n_dups='03', n_struct='04') -%}
{% set chart_note = namespace(shown=false) %} {% if idd.has_uniqueness %} {% set uq_sec = idd.uniqueness %} {% set uq = uq_sec.view %}

{{ n_uniq }} / Uniqueness

Identifier uniqueness

{{ uq.title }}

{% if idd.has_charts and not chart_note.shown %}{% set chart_note.shown = true %}

The charts load {{ library.name }} {{ library.version }} from a CDN; no data of the report leaves this page. The tables hold every figure and read without it.

{% endif %}

{{ uq.status_word }} {{ uq.text }}

{% for label, value, sub, attn in uq_sec.kpis %}
{{ label }}
{{ value }}{% if sub %}{{ sub }}{% endif %}
{% endfor %}
{% if uq_sec.has_chart %}

This chart needs JavaScript and a network connection to load {{ library.name }}. The table below holds the same figures.

{% endif %} {% if uq.near %}

{{ uq.near.title }}

{{ uq.near.text }}

{% if uq_sec.near_kpis %}
{% for label, value, sub, attn in uq_sec.near_kpis %}
{{ label }}
{{ value }}{% if sub %}{{ sub }}{% endif %}
{% endfor %}
{% endif %} {% if uq_sec.has_near_chart %}

This chart needs JavaScript and a network connection to load {{ library.name }}. The figures above and below match this view.

{% endif %} {% if uq.near.caveat %}

{{ uq.near.caveat }}

{% endif %} {% endif %} {% if uq.caveat %}

{{ uq.caveat }}

{% endif %}
Uniqueness breakdown({{ uq.rows | length }} figures)
{% for r in uq.rows %}{% endfor %}
Measure
Count
{{ r.label }}{% if r.figure is none %}not established{% else %}{{ r.figure | count }}{% endif %}
{% for ev in uq.evidence %}

{{ ev }}

{% endfor %} {% for rej in uq.rejected %}

{{ rej }}

{% endfor %}
{% endif %} {% if idd.has_duplicates %}

{{ n_dups }} / Duplicates

{% if idd.duplicates %}Repeated values and whole-row copies{% else %}Whole-row copies{% endif %}

{% if idd.duplicates %}Repeated occurrences in {{ idd.data.name }} and dataset row duplication.{% else %}Dataset whole-row duplication (column values withheld by exposure).{% endif %}

{% if idd.has_charts and not chart_note.shown %}{% set chart_note.shown = true %}

The charts load {{ library.name }} {{ library.version }} from a CDN; no data of the report leaves this page. The tables hold every figure and read without it.

{% endif %} {% if idd.duplicate_rows %} {% set dr = idd.duplicate_rows %}

Whole-row copies

Rows read
{{ dr.records }}{{ dr.accuracy }}
Distinct rows
{{ dr.distinct_rows }}
Extra row copies
{{ dr.extra_copies }}{{ dr.copy_share }} ยท {{ dr.duplicate_groups }} groups
{% endif %} {{ duplicates_block(idd.duplicates, idd.data.name, library, 'id-duplicates') }}
{% endif %} {% if idd.has_structure %}

{{ n_struct }} / Structure & forms

Structure, patterns, forms and relations

Structural breakdown of {{ idd.data.name }}.

{% if idd.has_charts and not chart_note.shown %}{% set chart_note.shown = true %}

The charts load {{ library.name }} {{ library.version }} from a CDN; no data of the report leaves this page. The tables hold every figure and read without it.

{% endif %} {{ forms_block(idd.forms, idd.data.name, library, 'id-forms', 'id-forms-classes') }} {{ lengths_block(idd.lengths, idd.data.name, library, 'id-lengths') }} {{ patterns_block(idd.patterns, idd.data.name, library, 'id-patterns') }} {{ residuals_block(idd.residuals, idd.data.name, library, 'id-residuals') }} {{ crosstabs_block(idd.crosstabs, idd.data.name, library, 'id-crosstab') }}
{% endif %}
{%- endmacro %}