# Dub Coverage & Reach Dashboard

## PURPOSE
The ad's closing line is the whole thesis: "Your audience already exists" — they
simply cannot understand the video yet. This project is a Streamlit + Plotly
dashboard that turns dubbing output into a decision: for a creator's catalog, how
many languages are covered, what share of the potential audience is reachable, and
where is the next dub most worth making? It ingests a job/output table (one row per
video per language) and visualises coverage, per-language completion, and a
reach estimate keyed to speaker counts of candidate languages.

## WHY THIS MATTERS
The transcript frames dubbing not as a curiosity but as reach expansion — "understood
by many more people now." A dashboard converts that narrative into the metrics a
creator or growth team actually acts on. Students learn that the last mile of an AI
feature is often a picture someone can make a decision from.

## HOW TO BUILD
Framework: **Streamlit** + **Plotly** + **Pandas**. Steps:
1. Load a CSV with `video_id`, `language`, `status`, `duration_s`.
2. `st.sidebar` filters by language and status.
3. Plot a coverage heatmap (videos × languages) and a bar chart of outputs per
   language.
4. Show headline KPIs: total outputs, % complete, and estimated reachable audience.

```python
import plotly.express as px
coverage = df.pivot_table(index="video_id", columns="language",
                          values="status", aggfunc="first")
fig = px.imshow(coverage.notna().astype(int), labels=dict(color="dubbed"))
st.plotly_chart(fig, use_container_width=True)
```

## WHEN TO USE IN PRODUCTION
Use it as the reporting surface of a dubbing platform: creator-facing analytics,
editorial dashboards deciding which languages to prioritise, and QA triage views
showing which languages lag. Do NOT use it as a real-time operations monitor — for
live job tracking prefer a metrics backend (Prometheus/Grafana). It is also the
wrong tool for per-word transcript review, which belongs in the QA CLI.

## HOW IT HELPS STUDENTS
Students practise Pandas pivots, Streamlit widgets, and Plotly figure construction,
plus the discipline of turning fuzzy product language ("reach more people") into
clear KPIs. It is an easy, high-signal portfolio piece.

## STARTER CODE
See `starter/main.py` for a Streamlit app with synthetic catalog data, KPI cards, a
coverage heatmap, and `# TODO` markers for wiring a real job store and audience
constants.
