{#- The numbers of a column by part of a date on a Tabalyst Insights column page. Every figure is in a table that reads without JavaScript. ``mode`` says which side the page is on: ``numeric`` (the dates vary) or ``date`` (the numeric columns vary). -#} {% macro by_date(timelines, name, number, mode, library) -%}

{{ number }} / {% if mode == 'numeric' %}By date{% else %}Numbers over time{% endif %}

{% if mode == 'numeric' %}{{ name }} by date{% else %}Numbers by {{ name }}{% endif %}

{% if mode == 'numeric' %}The numbers of the column for each month, year, day of the week and hour of a date column.{% else %}The numbers of each numeric column for each month, year, day of the week and hour of this column.{% endif %} Counts, minima and maxima are exact; totals and means are 64-bit floats. An association, not a cause.

{% if timelines %}

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

{% for t in timelines %}

{{ t.display }}

{{ t.counted | count }} of {{ t.rows | count }} rows have a date and a number. The periods explain {{ t.eta_period }} of the variance of the numbers{% if t.eta_weekday != '-' %}, the days of the week {{ t.eta_weekday }}{% endif %}.{% for label, value in t.left_out %} {{ label }}: {{ value }}.{% endfor %}

{% for table in t.tables %}
{{ table.title }}({{ table.rows | length }} rows)
{% for r in table.rows %}{% endfor %}
{% if table.key == 'weekday' %}Day{% elif table.key == 'hour' %}Hour{% else %}Period{% endif %}
Rows
Numbers
Share
Total
Mean
Minimum
Maximum
{{ r.label }}{{ r.rows }}{{ r.count }}{{ r.share }}{{ r.total }}{{ r.mean }}{{ r.low }}{{ r.high }}
{% endfor %} {% endfor %} {% else %}

{% if mode == 'numeric' %}No date column was crossed with this column in the second pass.{% else %}No numeric column was crossed with this column in the second pass.{% endif %}

{% endif %}
{%- endmacro %}