{#- The numeric sections of a Tabalyst Insights column page. Every figure is in a table that reads without JavaScript. -#} {% from 'insights_timeline.html' import by_date with context %} {#- The numbers of a column by category: ``dimensions`` are the columns crossed with the one of the page, ``mode`` says which side the page is on. -#} {% macro by_category(dimensions, name, number, mode, library, ident='by-category', title='By category') -%}

{{ number }} / {{ title }}

{%- set first = dimensions[0].display if dimensions else '' -%}

{% if mode == 'numeric' %}Compare {{ name }} across categories{% else %}Compare numbers across {{ name }}{% endif %}

{% if dimensions %}
Mean & median of {% if mode == 'numeric' %}{{ name }} by {{ first }}{% else %}{{ first }} by {{ name }}{% endif %}
Distribution of {% if mode == 'numeric' %}{{ name }} inside each value of {{ first }}{% else %}{{ first }} inside each value of {{ name }}{% endif %} (% of the value)

These charts need JavaScript and a network connection to load {{ library.name }}. The tables below hold the same figures.

{% for d in dimensions %}
{{ d.display }}({{ d.groups | length }} categories){{ d.counted | count }} of {{ d.rows | count }} rows have a category and a number. The categories explain {{ d.eta }} of the variance of {% if mode == 'numeric' %}the numbers{% else %}{{ d.display }}{% endif %} ({{ d.epsilon }} once corrected for the number of categories).{% for label, value in d.left_out %} {{ label }}: {{ value }}.{% endfor %}
{% for g in d.groups %}{% endfor %}
Category
Rows
Numbers
Share
Total
Mean
Median (est.)
Minimum
Maximum
{{ g.label }}{{ g.rows }}{{ g.count }}{{ g.share }}{{ g.total }}{{ g.mean }}{{ g.median }}{{ g.low }}{{ g.high }}
{% endfor %} {% else %}

{% if mode == 'numeric' %}No category column was crossed with this column: the second pass found none worth counting.{% else %}No numeric column was crossed with this column: the second pass found none worth counting.{% endif %}

{% endif %}
{%- endmacro %} {% macro numeric_sections(num, library) -%}

02 / Key figures

The numbers at a glance

Exact figures of the whole file, read from the Scan and the second pass.

{% for k in num.kpis %}
{{ k.label }}
{{ k.value }}{{ k.sub }}
{% endfor %}
{% if num.facts %}

{% for label, value in num.facts %}{{ label }} {{ value }}{% endfor %}

{% endif %}

03 / Distribution

Histograms

The same values in three views: equal widths, equal ratios and equal counts. Counts per class are exact.

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.

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

{{ num.histograms[0].note }}

{{ by_category(num.dimensions, num.data.name, '04', 'numeric', library) }} {{ by_date(num.timelines, num.data.name, '05', 'numeric', library) }}

06 / Detailed tables

Every class of every histogram

The counts the charts draw, class by class.

{% for h in num.histograms %}
{{ h.title }}({{ h.rows | length }} classes, {{ h.count | count }} values) {% if h.quantiles %}

{% for label, value in h.quantiles %}{{ label }} {{ value }}{% endfor %} estimated from the classes

{% endif %}
{% for r in h.rows %}{% endfor %}
#
From
To (excluded)
Width
Values
Share
Cumulative
{{ r.index }}{{ r.low }}{{ r.high }}{{ r.width }}{{ r.count }}{{ r.share }}{{ r.cumulative }}
{% endfor %}
{%- endmacro %}