{% load intelligence_extras %} {% with video=result.video niche=result.niche %}
{% comment %} Hero, video identity. Channel title + raw counts + publish date below the headline. {% endcomment %}
{{ video.title }}
{{ video.channel_title }} {% if video.published_at %} · {{ video.published_at|parse_iso_datetime|date:"M j, Y" }} {% endif %}
{{ video.view_count|humanize_count }} views {% if video.like_count is not None %} {{ video.like_count|humanize_count }} likes {% endif %} {% if video.comment_count is not None %} {{ video.comment_count|humanize_count }} comments {% endif %}
{% comment %} Overall percentile + niche identity {% endcomment %}
Overall percentile
Composite rank of this video's engagement vs recent videos in the same niche. 50 is the median; 80+ is top-tier; below 30 means most niche videos outperform this one on the per-row metrics below.
{{ video.engagement_percentiles.overall }}
Niche
{{ niche.name }}
{{ niche.slug }} {% if niche.match_strength or niche.match_score %} {% if niche.match_strength %} {{ niche.match_strength }} {% endif %} {% if niche.match_strength and niche.match_score %}·{% endif %} {% if niche.match_score %}{{ niche.match_score|pretty_percent:0 }}{% endif %} {% endif %}
{% comment %} Engagement breakdown, 3 rows showing the video's raw ratio, where it sits in the niche percentile distribution, and the niche median for context. {% endcomment %} {% if video.engagement_percentiles %}
Engagement vs niche distribution
Each row compares this video's engagement ratio against the niche distribution. Views / sub is views divided by the channel's subscriber count; Likes / view and Comments / view are the per-video engagement rates.

Niche p50 is the median niche video on that ratio. The pNN readout on the right is this video's percentile rank: p50 is exactly median, p80 means it outperforms 80% of niche videos, p20 means 80% of niche videos outperform it.
{% with eng=video.engagement engp=video.engagement_percentiles nichep=niche.engagement %}
Views / sub
This video: {{ eng.view_to_sub_ratio|pretty_percent }} Niche p50: {{ nichep.view_to_sub_ratio.p50|pretty_percent }}
p{{ engp.view_to_sub_ratio }}
Likes / view
This video: {{ eng.like_to_view_ratio|pretty_percent:2 }} Niche p50: {{ nichep.like_to_view_ratio.p50|pretty_percent:2 }}
p{{ engp.like_to_view_ratio }}
Comments / view
This video: {{ eng.comment_to_view_ratio|pretty_percent:2 }} Niche p50: {{ nichep.comment_to_view_ratio.p50|pretty_percent:2 }}
p{{ engp.comment_to_view_ratio }}
{% endwith %}
{% endif %} {% comment %} Title patterns, single-video form. Each pattern is a boolean (or a single number) FOR THIS video, compared against the niche aggregate (a 0–1 share, except length which is an average). Render as a checklist so the user sees at-a-glance which conventions this title follows. {% endcomment %} {% if video.title_patterns and niche.title_patterns %}
Title patterns
Checks for niche-typical title conventions. The Niche column is the share of niche videos that follow each convention, so "Has a number · Niche 16%" means 16% of niche titles include a digit. The fits niche patterns flag at the bottom is the model's holistic verdict.
This video
Niche
{% with v=video.title_patterns nc=niche.title_patterns %}
Title length
{{ v.length_chars|default:"," }} characters
{{ nc.mean_length_chars|floatformat:0 }} characters avg
Has a question mark
{% if v.has_question %} Yes {% else %} No {% endif %}
{{ nc.share_with_question_mark|pretty_percent:0 }}
Has a number
{% if v.has_number %} Yes {% else %} No {% endif %}
{{ nc.share_with_number|pretty_percent:0 }}
Has an emoji
{% if v.has_emoji %} Yes {% else %} No {% endif %}
{{ nc.share_with_emoji|pretty_percent:0 }}
Fits niche patterns
{% if v.fits_niche_patterns %} Yes, follows niche conventions {% else %} No, diverges from niche norms {% endif %}
{% endwith %}
{% endif %} {% comment %} Common niche phrases. Same treatment as the channel benchmark, pills with frequencies; phrases the channel uses get the orange-tinted highlight + check mark. {% endcomment %} {% if niche.title_patterns.common_niche_phrases %}
Common phrases in niche
{% for ph in niche.title_patterns.common_niche_phrases|slice:":12" %} {% if ph.used_by_channel %} {% endif %} {{ ph.phrase }} {{ ph.frequency|pretty_percent:0 }} {% endfor %}
{% if niche.title_patterns.common_niche_phrases|length > 12 %}
+ {{ niche.title_patterns.common_niche_phrases|length|add:"-12" }} more
{% endif %}
{% endif %}
{% endwith %}