{% extends "base.html" %} {% block title %}DAT — Diplomatic Activity Tracker{% endblock %} {% block content %} {# CUI // SP-CTI #}
CUI // SP-CTI

Diplomatic Activity Tracker (DAT)

Diplomatic Tension Index updated every {{ update_interval_h }} hours — synthesized from State Dept cable traffic, UNSC meeting schedules, and back-channel metadata.

{# ── Stat cards ── #}
Diplomatic Tension Index
{{ dti_score|round(1) }}
{{ dti_band|upper }}
Events Ingested (48 h)
{{ recent_events|length }}
across all sources
DTI Snapshots (48 h)
{{ dti_history|length }}
computed cycles
Last Computed
{% if current_dti %}{{ current_dti.computed_at[:16]|replace('T',' ') }} Z{% else %}—{% endif %}
UTC
{# ── DTI Trend chart ── #} {% if dti_history %}

DTI Trend — Last 48 Hours

{% endif %} {# ── Sub-score breakdown ── #} {% if current_dti %}

Source Sub-Scores

{% for src in source_types %}
{{ source_labels[src] }}
{% if src == 'cable_traffic' %}{{ current_dti.cable_sub|round(1) }} {% elif src == 'unsc_schedule' %}{{ current_dti.unsc_sub|round(1) }} {% else %}{{ current_dti.backchannel_sub|round(1) }}{% endif %}
weight {{ ({"cable_traffic":0.45,"unsc_schedule":0.30,"backchannel_metadata":0.25})[src] }}
{% endfor %}
{% endif %} {# ── Event feed ── #}

Recent DAT Events

{% if recent_events %} {% for ev in recent_events[:50] %} {% endfor %}
SourceSenderRecipient Tension SignalClassificationIngested
{{ source_labels.get(ev.source_type, ev.source_type) }} {{ ev.sender }} {{ ev.recipient }} {% set sig = ev.tension_signal|float %} {{ (sig * 100)|round(1) }} {{ ev.classification }} {{ ev.ingested_at[:16]|replace('T',' ') }}
{% else %}

No events ingested yet. POST to /api/dat/events to begin.

{% endif %}
{# ── IQE Query Widget ── #}
{% include "includes/iqe_query_widget.html" ignore missing %}
CUI // SP-CTI
{% endblock %}