---
type: "Source File"
title: "<section class=\"page-hero\">"
description: "{% extends \"base.html\" %} {% block title %}Youth Unemployment{% endblock %} {% block content %} <section class=\"page-hero\"> <h1 class=\"section-title\">Youth Unemployment (15-24)</h1> <p class=\"section-subtitle\">The."
resource: "https://data.copecheck.com"
tags: ["copecheck", "data", "source-file", "html"]
timestamp: "2026-05-04T16:40:58Z"
site: "data"
source_path: "copecheck-data/templates/youth.html"
---

# <section class="page-hero">

Source path: `copecheck-data/templates/youth.html`  
Index snapshot generated: `2026-11-24T13:27:52Z`  
File modified: `2026-05-04T16:40:58Z`

```html
{% extends "base.html" %}
{% block title %}Youth Unemployment{% endblock %}

{% block content %}
<section class="page-hero">
    <h1 class="section-title">Youth Unemployment (15-24)</h1>
    <p class="section-subtitle">The generation entering the workforce as AI reshapes it. Data from World Bank, Eurostat, and BLS.</p>
</section>

<section class="chart-section">
    <h2 class="chart-title">Latest Youth Unemployment by Country</h2>
    <div class="chart-container chart-tall">
        <canvas id="youthBarChart"></canvas>
    </div>
    <p class="chart-source-label">Source: {{ freshness.youth_unemployment.source | default("World Bank / Eurostat") }} · Updated: {{ freshness.youth_unemployment.latest_date | default("—") }}</p>
</section>

<section class="chart-section">
    <h2 class="chart-title">Youth Unemployment Over Time</h2>
    <div class="country-filter">
        {% for code, name in country_names.items() %}
        <button class="filter-btn" data-country="{{ code }}" onclick="toggleCountry('{{ code }}', this)">{{ country_flags.get(code, '') }} {{ code }}</button>
        {% endfor %}
    </div>
    <div class="chart-container chart-tall">
        <canvas id="youthLineChart"></canvas>
    </div>
    <p class="chart-source-label">Source: {{ freshness.youth_unemployment.source | default("World Bank / Eurostat") }} · Updated: {{ freshness.youth_unemployment.latest_date | default("—") }}</p>
</section>

<section class="data-table-section">
    <h2 class="chart-title">Latest Values</h2>
    <div class="data-table-wrap">
        <table class="data-table" id="youthTable">
            <thead><tr><th>Country</th><th>Year</th><th>Rate (%)</th><th>Severity</th></tr></thead>
            <tbody></tbody>
        </table>
    </div>
</section>

{% if comments %}
<section class="commentary-section">
    <h2 class="section-title">Oracle Commentary</h2>
    <div class="comment-grid">
        {% for c in comments %}
        <div class="comment-card expandable" onclick="toggleExpand(this)">
            <div class="comment-header">
                <span class="cope-badge {{ c.cope_type or 'unscored' }}">{{ c.cope_score | default('—') }}</span>
                <span class="comment-country">{{ country_flags.get(c.country, '') }} {{ country_names.get(c.country, c.country) }}</span>
                <span class="expand-icon">&#x25BC;</span>
            </div>
            <h3 class="comment-headline">{{ c.headline }}</h3>
            <p class="comment-excerpt">{{ c.commentary_md[:250] | strip_md }}{% if c.commentary_md|length > 250 %}...{% endif %}</p>
            <div class="comment-full" style="display:none;">{{ c.commentary_md | md }}</div>
            <div class="comment-meta">{{ c.model or 'Oracle' }} &middot; {{ c.created_at[:10] if c.created_at else '' }}</div>
        </div>
        {% endfor %}
    </div>
</section>
<script>
function toggleExpand(card) {
    const excerpt = card.querySelector('.comment-excerpt');
    const full = card.querySelector('.comment-full');
    const icon = card.querySelector('.expand-icon');
    if (!full) return;
    const isOpen = full.style.display !== 'none';
    if (isOpen) {
        full.style.display = 'none';
        excerpt.style.display = '';
        icon.textContent = '▼';
        card.classList.remove('expanded');
    } else {
        full.style.display = 'block';
        excerpt.style.display = 'none';
        icon.textContent = '▲';
        card.classList.add('expanded');
    }
}
</script>
{% endif %}
{% endblock %}

{% block scripts %}
<script>
const COLORS = ['#2a9d8f','#e63946','#f4a261','#4ade80','#9b59b6','#3b82f6','#e76f51','#06b6d4','#fbbf24','#a78bfa'];
const FLAGS = {{ country_flags | tojson }};
const NAMES = {{ country_names | tojson }};

// Bar chart — latest values
fetch('/api/series/youth_unemployment').then(r=>r.json()).then(data => {
    const pts = data.data_points || [];
    const tbody = document.querySelector('#youthTable tbody');
    pts.forEach((p, i) => {
        const sev = p.value >= 25 ? 'critical' : p.value >= 15 ? 'high' : p.value >= 10 ? 'moderate' : 'low';
        tbody.innerHTML += `<tr><td>${FLAGS[p.country]||''} ${NAMES[p.country]||p.country}</td><td>${p.date}</td><td><strong>${p.value.toFixed(1)}%</strong></td><td><span class="severity-badge ${sev}">${sev}</span></td></tr>`;
    });
    new Chart(document.getElementById('youthBarChart'), {
        type: 'bar',
        data: {
            labels: pts.map(p => (FLAGS[p.country]||'')+' '+p.country),
            datasets: [{
                label: 'Youth Unemployment %',
                data: pts.map(p => p.value),
                backgroundColor: pts.map(p => p.value >= 20 ? '#e6394699' : p.value >= 15 ? '#f4a26199' : '#2a9d8f99'),
                borderColor: pts.map(p => p.value >= 20 ? '#e63946' : p.value >= 15 ? '#f4a261' : '#2a9d8f'),
                borderWidth: 1, borderRadius: 4
            }]
        },
        options: {
            indexAxis: 'y', responsive: true, maintainAspectRatio: false,
            plugins: { legend: { display: false } },
            scales: {
                x: { grid: { color: 'rgba(255,255,255,0.06)' }, ticks: { color: '#8a8d96', callback: v => v+'%' } },
                y: { grid: { display: false }, ticks: { color: '#c8cad0' } }
            }
        }
    });
});

// Line chart — time series
let lineChart = null;
const activeCountries = new Set(['ES','IT','FR','UK','US']);

function toggleCountry(code, btn) {
    if (activeCountries.has(code)) { activeCountries.delete(code); btn.classList.remove('active'); }
    else { activeCountries.add(code); btn.classList.add('active'); }
    loadLineChart();
}

async function loadLineChart() {
    const datasets = [];
    let i = 0;
    for (const code of activeCountries) {
        const r = await fetch(`/api/countries/youth_unemployment?country=${code}`);
        const d = await r.json();
        const pts = (d.data || []).sort((a,b) => a.date.localeCompare(b.date));
        datasets.push({
            label: (FLAGS[code]||'')+' '+code,
            data: pts.map(p => ({x: p.date, y: p.value})),
            borderColor: COLORS[i % COLORS.length],
            backgroundColor: COLORS[i % COLORS.length] + '33',
            tension: 0.3, pointRadius: 2, borderWidth: 2
        });
        i++;
    }
    if (lineChart) lineChart.destroy();
    lineChart = new Chart(document.getElementById('youthLineChart'), {
        type: 'line',
        data: { datasets },
        options: {
            responsive: true, maintainAspectRatio: false,
            plugins: { legend: { labels: { color: '#c8cad0' } } },
            scales: {
                x: { grid: { color: 'rgba(255,255,255,0.06)' }, ticks: { color: '#8a8d96' } },
                y: { grid: { color: 'rgba(255,255,255,0.06)' }, ticks: { color: '#8a8d96', callback: v => v+'%' } }
            }
        }
    });
}

// Init
document.querySelectorAll('.filter-btn').forEach(b => {
    if (activeCountries.has(b.dataset.country)) b.classList.add('active');
});
loadLineChart();
</script>
{% endblock %}
```
