{% load intelligence_extras %} {% with channel=result.channel niche=result.niche %}
{% comment %} Hero, channel identity only. The niche match strength moved next to the niche name + percentage below so it's visually attached to the thing it qualifies. {% endcomment %}
{{ channel.title }}
{{ channel.subscriber_count|humanize_count }} subscribers · {{ channel.video_count|humanize_count }} videos {% if channel.sample_window_days %} · {{ channel.sample_window_days }}-day sample {% endif %}
{% comment %} Overall percentile + niche identity {% endcomment %}
Overall percentile
Composite rank vs other channels in the same niche. 50 is the median; 80+ is top-tier engagement; below 30 means most niche peers outperform this channel on the engagement metrics below.
{{ channel.engagement_percentiles.overall }}
Niche
{{ niche.name }}
{{ niche.slug }} {% comment %} Single pill combining the match-strength label and the raw match-score percentage. Co-locating the two makes it clear that "Strong" is a discrete label for the same underlying confidence number ("76%"), they were visually disconnected when the strength pill lived in the channel-identity row at the top of the card. {% endcomment %} {% 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 channel value, percentile rank (as a horizontal progress bar with brand fill), and niche median for context. Each row reuses the same grid template so labels and bars line up vertically. {% endcomment %} {% if channel.engagement_percentiles %}
Engagement vs niche distribution
Each row compares one engagement ratio against the niche's distribution. Views / sub is recent views divided by subscriber count; Likes / view and Comments / view are the equivalent per-video ratios.

Niche p50 is the median niche channel on that ratio, half of the niche scores below it, half above. The pNN readout on the right is your channel's percentile rank: p50 means you sit exactly at the niche median, p80 means you outperform 80% of niche peers, p20 means 80% of peers outperform you.
{% with eng=channel.engagement engp=channel.engagement_percentiles nichep=niche.engagement %}
Views / sub
You: {{ 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
You: {{ 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
You: {{ 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-pattern comparison: channel vs niche aggregate. Two-column table so the user can read each row as "is my channel above or below the typical niche channel on this dimension?" {% endcomment %} {% if channel.title_patterns and niche.title_patterns %}
Title patterns
You
Niche
{% with ch=channel.title_patterns nc=niche.title_patterns %}
Avg title length
{{ ch.mean_length_chars|floatformat:0 }} characters
{{ nc.mean_length_chars|floatformat:0 }} characters
Avg word count
{{ ch.mean_length_words|floatformat:1 }}
{{ nc.mean_length_words|floatformat:1 }}
Has a question mark
{{ ch.share_with_question_mark|pretty_percent:0 }}
{{ nc.share_with_question_mark|pretty_percent:0 }}
Has a number
{{ ch.share_with_number|pretty_percent:0 }}
{{ nc.share_with_number|pretty_percent:0 }}
Median uppercase ratio
{{ ch.median_uppercase_ratio|pretty_percent:0 }}
{{ nc.median_uppercase_ratio|pretty_percent:0 }}
Has an emoji
{{ ch.share_with_emoji|pretty_percent:0 }}
{{ nc.share_with_emoji|pretty_percent:0 }}
{% endwith %}
{% endif %} {% comment %} Common niche phrases. Tag-cloud-ish layout, each pill carries the phrase + its frequency. Phrases the channel ALSO uses get an orange tint so they pop out ("you're already on these trends"). Capped to the top ~12 server-side ordering. {% 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 %} {% comment %} Exemplar channels, peers in the niche {% endcomment %} {% if niche.exemplar_channels %}
Exemplar channels in this niche
{% endif %}
{% endwith %}