<commit_before>{% extends "base.html" %}


{% set current_navigation_link='high-volume-services' %}


{% macro money_cell(value) -%}
    &pound;{{ value|as_financial_magnitude }}
{%- endmacro %}

{% macro percentage_cell(value) -%}
    {{ value|as_percentage }}
{%- endmacro %}

{% macro number_cell(value) -%}
    {{ value|as_grouped_number }}
{%- endmacro %}

{% macro cell_content(value, quarter, cell_format) -%}
    {% if value != None -%}
        {% if quarter < latest_quarter -%}
            <span class="olddata" title="Data received {{ quarter }}; latest data not provided">{{ cell_format(value) }}*</span>
        {%- else -%}
            {{ cell_format(value) }}
        {%- endif %}
    {%- endif %}
{%- endmacro %}

{% macro th_content(text, sort, title=None, default_direction="ascending") -%}
    {% if sort != current_sort.order %}
        <a href="../{{ sort }}/{{ default_direction }}.html" title="{{ title }}">{{ text }}</a>
    {% elif current_sort.direction == "ascending" %}
        <a href="../{{ sort }}/descending.html" title="{{ title }}">{{ text }}</a>
        <span class="sort-ind">▲</span>
    {% else %}
        <a href="../{{ sort }}/ascending.html" title="{{ title }}">{{ text }}</a>
        <span class="sort-ind">▼</span>
    {% endif %}
{%- endmacro %}


{% block body %}

<header class="page-header group">
    <hgroup>
        <h1>High-volume services</h1><br/>

        <h2 id="narrative" class="module more_pad_top">
            The top 20 services account for <strong>90% of transactions</strong> with central government
        </h2>
    </hgroup>
</header>

<div class="group">
    <article role="article" class="group">
        <section class="content-group">

            <table id="transactions-table" class="full_width_table">
                <thead>
                    <tr>
                        <th scope="col">
                            {{ th_content("Transactional service",
                                          sort="by-name") }}
                        </th>
                        <th scope="col">
                            {{ th_content("Department",
                                          sort="by-department") }}
                        </th>
                        <th scope="col">
                            {{ th_content("Total cost",
                                          sort="by-total-cost",
                                          default_direction="descending") }}
                        </th>
                        <th scope="col">
                            {{ th_content("Cost per transaction",
                                          sort="by-cost-per-transaction",
                                          default_direction="descending") }}
                        </th>
                        <th scope="col">
                            {{ th_content("Digital take&#8209;up",
                                          sort="by-digital-takeup",
                                          default_direction="descending") }}
                        </th>
                        <th scope="col" class="amount">
                            {{ th_content("Transactions per year",
                                          sort="by-transactions-per-year",
                                          title="Transactions per year: most recent 12 months of data available across all channels",
                                          default_direction="descending") }}
                        </th>
                    </tr>
                </thead>

                <tbody>
                    {% for service in services %}
                        <tr data-volume="{{ service.most_recent_kpis.volume_num|int }}"
                            data-volumeLabel=" {{ service.most_recent_kpis.volume_num|as_grouped_number }} "
                            data-category="{{ service.category }}"
                            data-body="{{ service.body }}"
                            data-body-abbr="{{ service.agency_abbr }}"
                            data-url="{{ service.url }}"
                            data-bubbleLink="{{ service.link }}"
                            data-label="{{ service.short_service_name }}"
                            data-title="{{ service.name_of_service }}"
                            data-color="#2e358b"
                            data-text-color="#fff">

                            <th scope="row">
                                <a href="{{ service.link }}">{{ service.name_of_service }}</a>
                            </th>

                            <td>{{ service.abbr }}</td>

                            <td class="amount">
                                {{ cell_content(quarter=service.most_recent_kpis['quarter'],
                                                value=service.most_recent_kpis.cost,
                                                cell_format=money_cell) }}
                            </td>

                            <td class="amount">
                                {{ cell_content(quarter=service.most_recent_kpis['quarter'],
                                                value=service.most_recent_kpis.cost_per_number,
                                                cell_format=money_cell) }}
                            </td>

                            <td class="amount">
                                {{ cell_content(quarter=service.most_recent_kpis['quarter'],
                                                value=service.most_recent_kpis.takeup,
                                                cell_format=percentage_cell) }}
                            </td>

                            <td class="amount">
                                {{ cell_content(quarter=service.most_recent_kpis['quarter'],
                                                value=service.most_recent_kpis.volume_num,
                                                cell_format=number_cell) }}
                            </td>
<commit_msg>Fix links to service pages<commit_after>{% extends "base.html" %}


{% set current_navigation_link='high-volume-services' %}


{% macro money_cell(value) -%}
    &pound;{{ value|as_financial_magnitude }}
{%- endmacro %}

{% macro percentage_cell(value) -%}
    {{ value|as_percentage }}
{%- endmacro %}

{% macro number_cell(value) -%}
    {{ value|as_grouped_number }}
{%- endmacro %}

{% macro cell_content(value, quarter, cell_format) -%}
    {% if value != None -%}
        {% if quarter < latest_quarter -%}
            <span class="olddata" title="Data received {{ quarter }}; latest data not provided">{{ cell_format(value) }}*</span>
        {%- else -%}
            {{ cell_format(value) }}
        {%- endif %}
    {%- endif %}
{%- endmacro %}

{% macro th_content(text, sort, title=None, default_direction="ascending") -%}
    {% if sort != current_sort.order %}
        <a href="../{{ sort }}/{{ default_direction }}.html" title="{{ title }}">{{ text }}</a>
    {% elif current_sort.direction == "ascending" %}
        <a href="../{{ sort }}/descending.html" title="{{ title }}">{{ text }}</a>
        <span class="sort-ind">▲</span>
    {% else %}
        <a href="../{{ sort }}/ascending.html" title="{{ title }}">{{ text }}</a>
        <span class="sort-ind">▼</span>
    {% endif %}
{%- endmacro %}


{% block body %}

<header class="page-header group">
    <hgroup>
        <h1>High-volume services</h1><br/>

        <h2 id="narrative" class="module more_pad_top">
            The top 20 services account for <strong>90% of transactions</strong> with central government
        </h2>
    </hgroup>
</header>

<div class="group">
    <article role="article" class="group">
        <section class="content-group">

            <table id="transactions-table" class="full_width_table">
                <thead>
                    <tr>
                        <th scope="col">
                            {{ th_content("Transactional service",
                                          sort="by-name") }}
                        </th>
                        <th scope="col">
                            {{ th_content("Department",
                                          sort="by-department") }}
                        </th>
                        <th scope="col">
                            {{ th_content("Total cost",
                                          sort="by-total-cost",
                                          default_direction="descending") }}
                        </th>
                        <th scope="col">
                            {{ th_content("Cost per transaction",
                                          sort="by-cost-per-transaction",
                                          default_direction="descending") }}
                        </th>
                        <th scope="col">
                            {{ th_content("Digital take&#8209;up",
                                          sort="by-digital-takeup",
                                          default_direction="descending") }}
                        </th>
                        <th scope="col" class="amount">
                            {{ th_content("Transactions per year",
                                          sort="by-transactions-per-year",
                                          title="Transactions per year: most recent 12 months of data available across all channels",
                                          default_direction="descending") }}
                        </th>
                    </tr>
                </thead>

                <tbody>
                    {% for service in services %}
                        <tr data-volume="{{ service.most_recent_kpis.volume_num|int }}"
                            data-volumeLabel=" {{ service.most_recent_kpis.volume_num|as_grouped_number }} "
                            data-category="{{ service.category }}"
                            data-body="{{ service.body }}"
                            data-body-abbr="{{ service.agency_abbr }}"
                            data-url="{{ service.url }}"
                            data-bubbleLink="{{ service.link }}"
                            data-label="{{ service.short_service_name }}"
                            data-title="{{ service.name_of_service }}"
                            data-color="#2e358b"
                            data-text-color="#fff">

                            <th scope="row">
                                <a href="../../{{ service.link }}">{{ service.name_of_service }}</a>
                            </th>

                            <td>{{ service.abbr }}</td>

                            <td class="amount">
                                {{ cell_content(quarter=service.most_recent_kpis['quarter'],
                                                value=service.most_recent_kpis.cost,
                                                cell_format=money_cell) }}
                            </td>

                            <td class="amount">
                                {{ cell_content(quarter=service.most_recent_kpis['quarter'],
                                                value=service.most_recent_kpis.cost_per_number,
                                                cell_format=money_cell) }}
                            </td>

                            <td class="amount">
                                {{ cell_content(quarter=service.most_recent_kpis['quarter'],
                                                value=service.most_recent_kpis.takeup,
                                                cell_format=percentage_cell) }}
                            </td>

                            <td class="amount">
                                {{ cell_content(quarter=service.most_recent_kpis['quarter'],
                                                value=service.most_recent_kpis.volume_num,
                                                cell_format=number_cell) }}
                            </td>

{'fraction_non_alphanumeric': 0.13054699858463076, 'fraction_numerical': 0.0029972525185246856, 'mean_word_length': 1.1011019765611334, 'pattern_counts': {'":': 0, '<': 123, '<?xml version=': 0, '>': 121, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 86, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1866823', 'n_tokens_mistral': 2936, 'n_tokens_neox': 2697, 'n_words': 492}