{# 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.
| Type | Serial | Variable | Flags by | {{ cols.th("Samples", "", true) }} {{ cols.th("Good", "%", true) }} {% for f in qc.flags if f.flag != 1 %}{{ cols.th(f.label | capitalize, "%", true) }}{% endfor %}Distribution | |||
|---|---|---|---|---|---|---|---|
| {{ row.type_label }} | {{ row.serial }} |
{{ row.var }} |
{{ row.by }} | {{ "{:,}".format(row.total) }} | {{ row.good.text }} | {% for f in qc.flags if f.flag != 1 %}{% if row.pct.get(f.flag) %}{{ row.pct[f.flag] }}{% else %}–{% endif %} | {% endfor %}
All other variables ({{ qc.n_good }}): 100 % good.
{% endif %} {% endif %}