{% extends "stg_detail.html" %}

{% block details %}
<h1>Column {{ obj.pk }}: {{ obj.name }}</h1>

<p>Attributes</p>

<ul>
    <li>Description: {{ obj.description }}</li>
    <li>Table: {{ obj.stg }}</li>
    <li>Type: {{ obj.col_type }}</li>
    <li>Scale: {{ obj.col_scale }}</li>
    <li>Precision: {{ obj.col_precision }}</li>
    <li>INFORMAT: {{ obj.informat }}</li>
    <li>Integrity Status: {{ obj.integrity_status }}</li>
    <li>Integrity Detail: {{ obj.integrity_detail }}</li>
    <li>Count Not-Null: {{ obj.count_notnull }}</li>
    <li>Count Null: {{ obj.count_null }}</li>
    <li>Minimum: {{ obj.min }}</li>
    <li>Maximum: {{ obj.max }}</li>
    <li>Standard Deviation, population method: {{ obj.stddev_pop }}</li>
    <li>Standard Deviation, sample method: {{ obj.stddev_samp }}</li>
    <li>Mean: {{ obj.mean }}</li>
    <li>Reference Column: {{ obj.ref_col }}</li>
</ul>

{% if obj.ref_col %}
    {% with obj.ref_col as r %}
    <h2>Comparison with Reference Column</h2>
    <table>
    <tr>
        <th class="txt_col">Measure</th><th class="num_col">Observed</th><th class="num_col">Reference</th>
    </tr>
    <tr>
        <td class="txt_col">Count Not-Null</td><td class="num_col">{{ obj.count_notnull }}</td><td class="num_col">{{ r.count_notnull }}</td>
    </tr>
    <tr>
        <td class="txt_col">Count Null</td><td class="num_col">{{ obj.count_null }}</td><td class="num_col">{{ r.count_null }}</td>
    </tr>
    <tr>
        <td class="txt_col">Minimum</td><td class="num_col">{{ obj.min|floatformat:2 }}</td><td class="num_col">{{ r.min|floatformat:2 }}</td>
    </tr>
    <tr>
        <td class="txt_col">Maximum</td><td class="num_col">{{ obj.max|floatformat:2 }}</td><td class="num_col">{{ r.max|floatformat:2 }}</td>
    </tr>
    <tr>
        <td class="txt_col">Standard Deviation, population method</td><td class="num_col">{{ obj.stddev_pop|floatformat:2 }}</td><td class="num_col">{{ r.stddev_pop|floatformat:2 }}</td>
    </tr>
    <tr>
        <td class="txt_col">Standard Deviation, sample method</td><td class="num_col">{{ obj.stddev_samp|floatformat:2 }}</td><td class="num_col">{{ r.stddev_samp|floatformat:2 }}</td>
    </tr>
    <tr>
        <td class="txt_col">Mean</td><td class="num_col">{{ obj.mean|floatformat:2 }}</td><td class="num_col">{{ r.mean|floatformat:2 }}</td>
    </tr>
    </table>
    {% endwith %}
{% endif %}

{% endblock %}
