{% macro cat_class(cat) -%} {%- if cat == "missing-from-X" -%}cat-mis {%- elif cat == "unique-to-X" -%}cat-uni {%- elif cat == "underused-by-X" -%}cat-und {%- elif cat == "shared-strong" -%}cat-str {%- elif cat == "saturated-low" -%}cat-sat {%- else -%}cat-unc {%- endif -%} {%- endmacro %} {% macro cat_abbrev(cat) -%} {%- if cat == "missing-from-X" -%}MIS {%- elif cat == "unique-to-X" -%}UNI {%- elif cat == "underused-by-X" -%}UND {%- elif cat == "shared-strong" -%}STR {%- elif cat == "saturated-low" -%}SAT {%- else -%}UNC {%- endif -%} {%- endmacro %} {% for ch in channels %} {% endfor %} {% for archetype in archetypes %} {% for ch in channels %} {% set cell = grouped_cells.get(archetype, {}).get(ch) %} {% endfor %} {% endfor %}
Archetype{{ ch }}
{{ archetype }} {% if cell %} {{ cat_abbrev(cell.category) }} {% else %} {% endif %} {%- if sparkline_points is defined and (ch, archetype) in sparkline_points %} {% with points=sparkline_points[(ch, archetype)], point_values=sparkline_values[(ch, archetype)], point_weeks=sparkline_weeks[(ch, archetype)] %} {% include "_partials/sparkline.html" %} {% endwith %} {%- endif %}
Per-channel details for {{ archetype }}
{% for ch in channels %} {% set cell = grouped_cells.get(archetype, {}).get(ch) %} {% if cell %}
{{ ch }}
count={{ cell.count }} / total={{ cell.total }} · p_hat={{ "%.2f"|format(cell.p_hat) }} · Wilson 95% CI [{{ "%.2f"|format(cell.ci_lo) }}, {{ "%.2f"|format(cell.ci_hi) }}] · category={{ cell.category }}
{% endif %} {% endfor %}