{# QC flag summary: the share of each variable's samples in each quality class, listing only variables with anything not flagged good. The `qc` panel payload (kind="html"); columns and legend come from the flag values present, so they always match. `.qc-bar`/`.qc-legend` styles are in mooring.html. #} {% import "_mooring_cols.html" as cols %} {# One line per flag that covers a variable's whole record (not checked, nominal, interpolated): "Not checked (2): temperature (2941), pressure (2941)". #} {% macro single_lines(qc) %} {%- for line in qc.lines %}

{{ line.label }} ({{ line.n }}): {{ line.names | join(", ") }}.

{%- endfor %} {% endmacro %} {% if not qc.any %}

No checked (stage 3) files found for this deployment.

{% elif not qc.rows and not qc.lines %}

All variables ({{ qc.n_good }}): 100 % good.

{% elif not qc.rows %} {{ single_lines(qc) }} {% if qc.n_good %}

All other variables ({{ qc.n_good }}): 100 % good.

{% endif %} {% else %}

Share of each variable's samples in each quality class, on the OceanSITES flag scale used throughout these pages: oceanarray's and the originator's, the originator's translated by their meaning. {%- if qc.rows | map(attribute="by") | unique | list | length > 1 %} Rows per flag source; figures mark the worse of the two.{% endif %} Only variables with anything not flagged good are listed. {{ good_sentence }} HAB: height above bottom.

{% for f in qc.flags %}{{ f.label }} ({{ f.flag }}) {% endfor %}
{{ cols.depth_heads() }} {{ cols.th("Samples", "", true) }} {{ cols.th("Good", "%", true) }} {% for f in qc.flags if f.flag != 1 %}{{ cols.th(f.label | capitalize, "%", true) }}{% endfor %} {% for row in qc.rows %} {{ cols.depth_cells(row) }} {% for f in qc.flags if f.flag != 1 %} {% endfor %} {% endfor %}
Type Serial Variable Flags byDistribution
{{ row.type_label }} {{ row.serial }} {{ row.var }} {{ row.by }} {{ "{:,}".format(row.total) }} {{ row.good.text }}{% if row.pct.get(f.flag) %}{{ row.pct[f.flag] }}{% else %}–{% endif %}
{% for f in row.bar %}
{% endfor %}
{{ single_lines(qc) }} {% if qc.n_good %}

All other variables ({{ qc.n_good }}): 100 % good.

{% endif %} {% endif %}