---
type: "Source File"
title: "<div class=\"breadcrumb\">"
description: "{% extends \"base.html\" %} {% set countries = {country_code: country} %} {% block title %}{{ city.name }} — AI Displacement Score {{ city.score }}/100 | CopeCheck Cities{% endblock %} {% block content %} <div."
resource: "https://cities.copecheck.com"
tags: ["copecheck", "cities", "source-file", "html"]
timestamp: "2026-10-20T10:37:35Z"
site: "cities"
source_path: "copecheck-cities/templates/city.html"
---

# <div class="breadcrumb">

Source path: `copecheck-cities/templates/city.html`  
Index snapshot generated: `2026-11-24T13:27:52Z`  
File modified: `2026-10-20T10:37:35Z`

```html
{% extends "base.html" %}
{% set countries = {country_code: country} %}

{% block title %}{{ city.name }} — AI Displacement Score {{ city.score }}/100 | CopeCheck Cities{% endblock %}

{% block content %}
<div class="breadcrumb">
    <a href="/">Home</a> / <a href="/{{ country_code }}/">{{ country.flag }} {{ country.name }}</a> / <strong>{{ city.name }}</strong>
</div>

<h1>{{ city.name }}</h1>
<p class="subtitle">{{ city.region }} · Baseline population {{ "{:,}".format(city.population) }}</p>

<div class="detail-grid">
    <div class="detail-box">
        <div class="label">Vulnerability Score</div>
        <div class="value {% if city.score >= 60 %}score-high{% elif city.score >= 52 %}score-med{% else %}score-low{% endif %}">
            {{ city.score }}<span style="font-size: 0.9rem; color: #666;">/100</span>
        </div>
    </div>
    <div class="detail-box">
        <div class="label">National Rank</div>
        <div class="value">#{{ rank }}<span style="font-size: 0.9rem; color: #666;"> of {{ total_cities }}</span></div>
    </div>
</div>

<div style="margin: 1.5rem 0;">
    <div class="bar" style="height: 12px;">
        <div class="bar-fill" style="width: {{ city.score }}%; background: {% if city.score >= 60 %}#ff6b6b{% elif city.score >= 52 %}#ffa94d{% else %}#69db7c{% endif %};"></div>
    </div>
</div>

<!-- Live labour market (UK only) -->
{% if labour and labour.lfs %}
{% set l = labour.lfs %}
{% set uk = labour.uk.lfs if labour.uk else None %}
{% macro delta(v, invert=false) -%}
  {%- if v is none -%}&mdash;
  {%- else -%}
    {%- set good = (v < 0) if invert else (v > 0) -%}
    <span style="color: {{ '#69db7c' if good else ('#888' if v == 0 else '#ff6b6b') }}; font-size: 0.8rem;">
      {{ '+' if v > 0 else '' }}{{ v }} pp on the year</span>
  {%- endif -%}
{%- endmacro %}

<div style="margin: 2rem 0; padding: 1.2rem; background: #0d0d0d; border: 1px solid #1f1f1f; border-radius: 6px;">
    <h2 style="font-size: 1.05rem; margin-bottom: 0.3rem;">📊 Current labour market — {{ labour.region }}</h2>
    <p style="color: #888; font-size: 0.82rem; margin-bottom: 1rem;">
        Official ONS figures for the region {{ city.name }} sits in, published
        {{ l.period }}. These are <strong>measured statistics</strong>, separate from the
        structural exposure score above — they are reported here as context and are not
        an input to it. Region-level data is the finest geography ONS publishes monthly;
        it is not a {{ city.name }}-only figure.
    </p>

    <div class="detail-grid" style="margin-bottom: 0.8rem;">
        <div class="detail-box">
            <div class="label">Unemployment rate (16+)</div>
            <div class="value">{{ l.unemployment_rate_16_plus }}%</div>
            <div>{{ delta(l.unemployment_rate_change_on_year, invert=true) }}</div>
        </div>
        <div class="detail-box">
            <div class="label">Employment rate (16–64)</div>
            <div class="value">{{ l.employment_rate_16_64 }}%</div>
            <div>{{ delta(l.employment_rate_change_on_year) }}</div>
        </div>
        <div class="detail-box">
            <div class="label">Inactivity rate (16–64)</div>
            <div class="value">{{ l.inactivity_rate_16_64 }}%</div>
            <div>{{ delta(l.inactivity_rate_change_on_year, invert=true) }}</div>
        </div>
    </div>

    {% if uk %}
    <p style="color: #aaa; font-size: 0.85rem; margin-bottom: 0.8rem;">
        UK average for the same period: unemployment {{ uk.unemployment_rate_16_plus }}%,
        employment {{ uk.employment_rate_16_64 }}%, inactivity {{ uk.inactivity_rate_16_64 }}%.
        {% if l.unemployment_rank == 1 %}
        {{ labour.region }} has the <strong>highest unemployment rate of the
        {{ l.unemployment_rank_of }} UK regions and countries</strong>.
        {% elif l.unemployment_rank %}
        {{ labour.region }} ranks {{ l.unemployment_rank }} of {{ l.unemployment_rank_of }}
        UK regions and countries by unemployment rate.
        {% endif %}
    </p>
    {% endif %}

    {% if labour.claimant and labour.claimant.count %}
    {% set c = labour.claimant %}
    <h3 style="font-size: 0.95rem; margin: 1.2rem 0 0.4rem;">Claimant count</h3>
    <p style="color: #aaa; font-size: 0.85rem;">
        {{ "{:,}".format(c.count|int) }} people in {{ labour.region }} were claiming
        unemployment-related benefits in {{ c.latest_period }}
        {%- if c.rate %}, {{ c.rate }}% of economically active residents{% endif %}
        {%- if c.count_year_ago %},
        {% set diff = (c.count - c.count_year_ago)|int %}
        {{ 'up' if diff > 0 else 'down' }} {{ "{:,}".format(diff|abs) }} on
        {{ c.year_ago_period }}{% endif %}.
        {% if c.youth_count and c.youth_count_year_ago %}
        Among 16–24 year olds the count was {{ "{:,}".format(c.youth_count|int) }},
        {% set ydiff = (c.youth_count - c.youth_count_year_ago)|int %}
        {{ 'up' if ydiff > 0 else 'down' }} {{ "{:,}".format(ydiff|abs) }} on the year.
        {% endif %}
        Not seasonally adjusted; this is an administrative count, not a survey estimate.
    </p>
    {% endif %}

    {% if labour.rti %}
    {% set r = labour.rti %}
    {% set ruk = labour.rti_uk %}
    <h3 style="font-size: 0.95rem; margin: 1.2rem 0 0.4rem;">Payrolled employees (HMRC payroll records)</h3>
    <p style="color: #aaa; font-size: 0.85rem;">
        {{ "{:,}".format(r.latest) }} people were on a payroll in {{ labour.region }} in
        {{ r.latest_period }},
        <strong style="color: {{ '#ff6b6b' if r.change_on_year < 0 else '#69db7c' }};">
        {{ 'down' if r.change_on_year < 0 else 'up' }}
        {{ "{:,}".format(r.change_on_year|abs) }} ({{ "%.2f"|format(r.change_on_year_pct|abs) }}%)
        on the year</strong>{% if ruk %}, against
        {{ "%.2f"|format(ruk.change_on_year_pct|abs) }}%
        {{ 'down' if ruk.change_on_year < 0 else 'up' }} across the UK as a whole
        {%- if r.change_on_year_pct < ruk.change_on_year_pct %} — {{ labour.region }} is shedding
        payrolled jobs faster than the national average
        {%- endif %}{% endif %}.
        This is an administrative count of actual payroll records, not a survey estimate. The
        most recent month is a provisional flash estimate and is routinely revised.
    </p>
    {% endif %}

    {% if labour.divergence %}
    {% set d = labour.divergence %}
    <h3 style="font-size: 0.95rem; margin: 1.2rem 0 0.4rem;">Payroll records vs the household survey</h3>
    <p style="color: #aaa; font-size: 0.85rem;">
        The two UK-wide measures of employees disagree. On ONS's own like-for-like
        comparison, HMRC payroll (RTI) records show payrolled employees
        <strong>down {{ "{:,}".format(d.rti_change_on_year_june_to_august|abs) }} over the
        year</strong> and down
        {{ "{:,}".format(d.rti_change_on_quarter_june_to_august|abs) }} over the quarter in
        June to August 2026. Over the same period the Labour Force Survey shows employees
        <strong>up {{ "{:,}".format(d.lfs_employees_change_on_year) }}</strong> to
        {{ "%.1f"|format(d.lfs_employees_level / 1000000) }} million. The provisional September
        flash estimate puts payrolled employees at
        {{ "%.1f"|format(d.rti_level_september / 1000000) }} million, down
        {{ "{:,}".format(d.rti_flash_change_on_year_september|abs) }} on the year.
        {{ d.ons_interpretation }}
        {{ d.ons_reliability_position }}
        We surface both rather than quietly picking one.
        {% if d.flash_revision_note %}
        <br><br><em>{{ d.flash_revision_note }}</em>
        {% endif %}
        {% if d.linkage_research and d.linkage_research.published %}
        <br><br>ONS <a href="{{ d.linkage_research.url }}" rel="nofollow">research linking RTI
        to the LFS</a>, published {{ d.linkage_research.date }}:
        {{ d.linkage_research.findings }}
        {% endif %}
    </p>
    <p style="color: #666; font-size: 0.78rem; margin-top: 0.5rem;">
        The survey side is UK-wide; ONS publishes no regional split of this comparison.
        The payroll side is
        {% if d.manual %}pinned to the bulletin text{% else %}parsed from the ONS
        reference table ({{ d.rti_workbook }}){% endif %}.
        Source: {{ d.source }}.
        {% if d.next_release %}Next release {{ d.next_release }}.{% endif %}
    </p>
    {% endif %}

    <p style="color: #666; font-size: 0.78rem; margin-top: 1rem; border-top: 1px solid #1a1a1a; padding-top: 0.7rem;">
        <strong>Sources.</strong>
        {% for s in labour.sources %}
        <a href="{{ s.url }}" rel="nofollow">{{ s.name }}</a>;
        {% endfor %}
        {% if labour.rti_source %}
        <a href="{{ labour.rti_source.dataset_url }}" rel="nofollow">{{ labour.rti_source.name }}</a>.
        {% endif %}
        Retrieved {{ labour.generated_at[:10] }}.
        LFS and APS outputs moved from &ldquo;official statistics in development&rdquo; to
        &ldquo;official statistics&rdquo; on 11 August 2026 and ONS is not seeking
        reaccreditation; survey-based detail should be read with that in mind. Contains public
        sector information licensed under the Open Government Licence v3.0.
    </p>
</div>
{% endif %}

<!-- UK layoffs (country-level; the layoffs dataset records no city field) -->
{% if layoffs and layoffs.entries %}
<div style="margin: 2rem 0; padding: 1.2rem; background: #0d0d0d; border: 1px solid #1f1f1f; border-radius: 6px;">
    <h2 style="font-size: 1.05rem; margin-bottom: 0.3rem;">📉 Recent UK layoffs</h2>
    <p style="color: #888; font-size: 0.82rem; margin-bottom: 1rem;">
        Reported UK redundancy events from the
        <a href="{{ layoffs.site.url }}" rel="nofollow">{{ layoffs.site.name }}</a> tracker.
        <strong>These are UK-wide, not {{ city.name }} events</strong> — the tracker records the
        country a layoff was reported in, not the town or city, so nothing here is attributed to
        {{ city.name }}.
    </p>
    <table>
        <thead>
            <tr><th>Reported</th><th>Company</th><th>Roles</th><th>Sector</th><th>Source</th></tr>
        </thead>
        <tbody>
            {% for e in layoffs.entries[:8] %}
            <tr>
                <td style="color: #888; white-space: nowrap;">{{ e.date }}</td>
                <td>{{ e.company }}{% if e.ai_driven %}
                    <span class="risk-tag risk-high" style="margin-left: 0.4rem;">AI-linked</span>
                    {% endif %}</td>
                <td style="font-variant-numeric: tabular-nums;">
                    {{ "{:,}".format(e.laid_off) if e.laid_off else "—" }}</td>
                <td style="color: #888;">{{ e.sector or "—" }}</td>
                <td>{% if e.source_url %}<a href="{{ e.source_url }}" rel="nofollow">
                    {{ e.source or "report" }}</a>{% else %}—{% endif %}</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
    <p style="color: #666; font-size: 0.78rem; margin-top: 0.8rem;">
        {{ layoffs.counts.uk_entries_verified }} UK events recorded for 2026, of which
        {{ layoffs.counts.uk_entries_ai_driven }} are attributed by their source at least partly
        to AI or automation. {{ layoffs.caveat }}
        {% if layoffs.source_note %}{{ layoffs.source_note }}.{% endif %}
        Snapshot taken {{ layoffs.generated_at[:10] }}.
    </p>
</div>
{% endif %}

<!-- Oracle Verdict -->
{% if city.oracle_soft %}
<div class="oracle-section">
    <h2><span class="oracle-icon">🔮</span> The Oracle's Verdict</h2>
    <p style="color:#888;font-size:0.85rem;margin-bottom:0.8rem;">
        Model-generated scenario commentary, not reported fact. Specific claims about future employer or council
        behaviour are hypothetical; use the sector table, not the prose, as the reproducible input to the score.
    </p>
    <div class="tab-container">
        <div class="tab-buttons">
            <button class="tab-btn active" onclick="switchTab(this, 'oracle-soft')">Oracle's Verdict</button>
            <button class="tab-btn" onclick="switchTab(this, 'oracle-brutal')">Satirical Scenario</button>
        </div>
        <div id="oracle-soft" class="tab-panel active">
            <p>{{ city.oracle_soft }}</p>
        </div>
        <div id="oracle-brutal" class="tab-panel">
            <p>{{ city.oracle_brutal }}</p>
        </div>
    </div>
</div>
{% endif %}

<!-- Advice for Local Leaders -->
{% if city.advice_soft %}
<div class="oracle-section">
    <h2><span class="oracle-icon">🏛️</span> Advice for Local Leaders</h2>
    <div class="tab-container">
        <div class="tab-buttons">
            <button class="tab-btn active" onclick="switchTab(this, 'advice-soft')">What They Should Do</button>
            <button class="tab-btn" onclick="switchTab(this, 'advice-brutal')">Satirical Scenario</button>
        </div>
        <div id="advice-soft" class="tab-panel active">
            <p>{{ city.advice_soft }}</p>
        </div>
        <div id="advice-brutal" class="tab-panel">
            <p>{{ city.advice_brutal }}</p>
        </div>
    </div>
</div>
{% endif %}

<h2>Sector Breakdown</h2>
<p style="color: #666; font-size: 0.85rem; margin-bottom: 1rem;">
    Historical employment share by broad sector, with CopeCheck's heuristic exposure weight and contribution to
    the relative score. Higher weights contribute more; they are not probabilities.
</p>

<table>
    <thead>
        <tr>
            <th>Sector</th>
            <th>Employment %</th>
            <th>Exposure Weight</th>
            <th>Exposure Tier</th>
            <th>Contribution</th>
        </tr>
    </thead>
    <tbody>
        {% for s in sectors %}
        <tr>
            <td>{{ s.label }}</td>
            <td>{{ s.pct }}%</td>
            <td style="color: #888;">{{ s.weight }}</td>
            <td><span class="risk-tag risk-{{ s.risk }}">{{ s.risk }}</span></td>
            <td style="font-variant-numeric: tabular-nums;">{{ s.contribution }}</td>
        </tr>
        {% endfor %}
    </tbody>
</table>

<div style="margin-top: 2rem; padding: 1.2rem; background: #111; border: 1px solid #1a1a1a; border-radius: 6px;">
    <h2 style="font-size: 1rem;">How is this score calculated?</h2>
    <p style="color: #888; font-size: 0.85rem; margin-top: 0.5rem;">
        The vulnerability score is a weighted average of {{ city.name }}'s sector employment shares.
        Each broad sector carries a CopeCheck heuristic exposure weight (0.0–1.0). Frey &amp; Osborne's study
        estimated occupation-level susceptibility; it did not publish these sector weights. The bundled city files
        also lack record-level source dates and ledgers, so this is a historical structural comparison rather than
        an official current statistic. The weighted average is normalised to a 0–100 scale. A score of {{ city.score }} means
        {{ city.name }}'s workforce is {% if city.score >= 60 %}significantly{% elif city.score >= 52 %}moderately{% else %}relatively less{% endif %}
        concentrated in higher-weighted sectors compared with other {{ country.name }} cities in this dataset; it
        does not state a {{ city.score }}% probability of displacement.
    </p>
</div>

<script>
function switchTab(btn, panelId) {
    const container = btn.closest('.tab-container');
    container.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
    container.querySelectorAll('.tab-panel').forEach(p => p.classList.remove('active'));
    btn.classList.add('active');
    document.getElementById(panelId).classList.add('active');
}
</script>
{% endblock %}
```
