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

{% block title %}{{ area.name }}{% endblock title %}

{% block content %}

    <header class="area_info">
        <h2>{{ area.name }} <em class="area_id">ID {{ area.id }}</em></h2>
        <ul>
            <li>Type: {{ area.type.description }} <small>({{ area.type.code }})</small></li>
            <li>Exists in generations: {{ area.generation_low.id }}&ndash;{{ area.generation_high.id }}</li>
            <li>Country: {{ area.country }}</li>
            {% if area.parent_area %}
            <li>A child of <a href="{% url mapit_index %}area/{{ area.parent_area.id }}.html">{{ area.parent_area.name }}</a>.</li>
            {% endif %}
            {% if country != 'Global' %}
            {% if area.polygons.count or area.postcodes.count %}
            <li><a href="{% url mapit_index %}area/{{ area.id }}/example_postcode.html">Example postcode</a></li>
            {% endif %}
            {% endif %}
            {% if area.children.count %}
            <li><a href="{% url mapit_index %}area/{{ area.id }}/children.html">Children</a></li>
            {% endif %}
        </ul>
        <p>Get <a href="{% url mapit_index %}area/{{ area.id }}">this data as JSON</a></p>
    </header>

{% if area.polygons.count and show_geometry %}
<div id="map"></div>
<script>
    var map = new L.Map("map");
    var osm = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
        attribution: 'Map data © OpenStreetMap contributors',
        maxZoom: 18
    });
    map.addLayer(osm);

    reqwest({
        url: "{% url mapit_index %}area/{{ area.id }}.geojson?simplify_tolerance=0.0001",
        type: 'json',
        success: function(data) {
            var area = new L.GeoJSON(data);
            map.addLayer(area);

            var bounds = new L.LatLngBounds();
            area._iterateLayers(function (layer) {
                if (layer instanceof L.MultiPolygon) {
                    layer._iterateLayers(function(layer2) {
                        var new_bounds = layer2.getBounds();
                        bounds.extend(new_bounds.getSouthWest());
                        bounds.extend(new_bounds.getNorthEast());
                    });
                }
                if (layer instanceof L.Polygon) {
                    bounds = layer.getBounds();
                }
            }, area);
            map.fitBounds(bounds);
        }
    });

</script>
{% endif %}

    <section class="details">
        <ul>
            <li>
{% if area.polygons.count and show_geometry %}
                <h3>Geometry:</h3>
                <ul>
                    <li><a href="{% url mapit_index %}area/{{ area.id }}/geometry">Geometry (<small>JSON</small>)</a></li>
                    <li><a href="{% url mapit_index %}area/{{ area.id }}.wkt">WKT</a></li>
                    <li><a href="{% url mapit_index %}area/{{ area.id }}.geojson">GeoJSON</a></li>
                    <li><a href="{% url mapit_index %}area/{{ area.id }}.kml">KML</a>
                    (<a href="http://maps.google.co.uk/maps?q=http://{{ request.META.HTTP_HOST }}{% url mapit_index %}area/{{ area.id }}.kml">on a Google Map</a>)</li>
                </ul>
{% endif %}
            </li>
            <li>
{% if area.polygons.count and show_geometry %}
                <h3>Areas:</h3>
                <ul>
                    <li><a rel="nofollow" href="{% url mapit_index %}area/{{ area.id }}/touches.html">Touching this area</a></li>
                    <li><a rel="nofollow" href="{% url mapit_index %}area/{{ area.id }}/overlaps.html">Overlapping this area</a></li>
                    <li><a rel="nofollow" href="{% url mapit_index %}area/{{ area.id }}/covered.html">Covering this area</a></li>
                    <li><a rel="nofollow" href="{% url mapit_index %}area/{{ area.id }}/covers.html">Covered by this area</a></li>
                    <li><a rel="nofollow" href="{% url mapit_index %}area/{{ area.id }}/coverlaps.html">Covered by or overlapping this area</a></li>
                </ul>
{% endif %}
            </li>
            <li>
                <h3>Codes:</h3>
                <ul>
{% for code_type, code, code_link in codes %}
<li>{{ code_type }}:
{% if code_link %}
<a href="{{ code_link }}">{{ code }}</a>
{% else %}
{{ code }}
{% endif %}
</li>
{% empty %}
<li>No codes found.</li>
{% endfor %}
                </ul>
            </li>
            <li>
                <h3>Alternative Names</h3>
                <ul>
{% for language, name in alternative_names %}
<li>{{ name }} in <span class="language-name">{{ language }}</span></li>
{% empty %}
<li>No alternative names found.</li>
{% endfor %}

                </ul>
    </section>

{% endblock %}
<commit_msg>No need for country line.<commit_after>{% extends "mapit/base.html" %}

{% block title %}{{ area.name }}{% endblock title %}

{% block content %}

    <header class="area_info">
        <h2>{{ area.name }} <em class="area_id">ID {{ area.id }}</em></h2>
        <ul>
            <li>Type: {{ area.type.description }} <small>({{ area.type.code }})</small></li>
            <li>Exists in generations: {{ area.generation_low.id }}&ndash;{{ area.generation_high.id }}</li>
            {% if country != 'Global' %}
            <li>Country: {{ area.country }}</li>
            {% endif %}
            {% if area.parent_area %}
            <li>A child of <a href="{% url mapit_index %}area/{{ area.parent_area.id }}.html">{{ area.parent_area.name }}</a>.</li>
            {% endif %}
            {% if country != 'Global' %}
            {% if area.polygons.count or area.postcodes.count %}
            <li><a href="{% url mapit_index %}area/{{ area.id }}/example_postcode.html">Example postcode</a></li>
            {% endif %}
            {% endif %}
            {% if area.children.count %}
            <li><a href="{% url mapit_index %}area/{{ area.id }}/children.html">Children</a></li>
            {% endif %}
        </ul>
        <p>Get <a href="{% url mapit_index %}area/{{ area.id }}">this data as JSON</a></p>
    </header>

{% if area.polygons.count and show_geometry %}
<div id="map"></div>
<script>
    var map = new L.Map("map");
    var osm = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
        attribution: 'Map data © OpenStreetMap contributors',
        maxZoom: 18
    });
    map.addLayer(osm);

    reqwest({
        url: "{% url mapit_index %}area/{{ area.id }}.geojson?simplify_tolerance=0.0001",
        type: 'json',
        success: function(data) {
            var area = new L.GeoJSON(data);
            map.addLayer(area);

            var bounds = new L.LatLngBounds();
            area._iterateLayers(function (layer) {
                if (layer instanceof L.MultiPolygon) {
                    layer._iterateLayers(function(layer2) {
                        var new_bounds = layer2.getBounds();
                        bounds.extend(new_bounds.getSouthWest());
                        bounds.extend(new_bounds.getNorthEast());
                    });
                }
                if (layer instanceof L.Polygon) {
                    bounds = layer.getBounds();
                }
            }, area);
            map.fitBounds(bounds);
        }
    });

</script>
{% endif %}

    <section class="details">
        <ul>
            <li>
{% if area.polygons.count and show_geometry %}
                <h3>Geometry:</h3>
                <ul>
                    <li><a href="{% url mapit_index %}area/{{ area.id }}/geometry">Geometry (<small>JSON</small>)</a></li>
                    <li><a href="{% url mapit_index %}area/{{ area.id }}.wkt">WKT</a></li>
                    <li><a href="{% url mapit_index %}area/{{ area.id }}.geojson">GeoJSON</a></li>
                    <li><a href="{% url mapit_index %}area/{{ area.id }}.kml">KML</a>
                    (<a href="http://maps.google.co.uk/maps?q=http://{{ request.META.HTTP_HOST }}{% url mapit_index %}area/{{ area.id }}.kml">on a Google Map</a>)</li>
                </ul>
{% endif %}
            </li>
            <li>
{% if area.polygons.count and show_geometry %}
                <h3>Areas:</h3>
                <ul>
                    <li><a rel="nofollow" href="{% url mapit_index %}area/{{ area.id }}/touches.html">Touching this area</a></li>
                    <li><a rel="nofollow" href="{% url mapit_index %}area/{{ area.id }}/overlaps.html">Overlapping this area</a></li>
                    <li><a rel="nofollow" href="{% url mapit_index %}area/{{ area.id }}/covered.html">Covering this area</a></li>
                    <li><a rel="nofollow" href="{% url mapit_index %}area/{{ area.id }}/covers.html">Covered by this area</a></li>
                    <li><a rel="nofollow" href="{% url mapit_index %}area/{{ area.id }}/coverlaps.html">Covered by or overlapping this area</a></li>
                </ul>
{% endif %}
            </li>
            <li>
                <h3>Codes:</h3>
                <ul>
{% for code_type, code, code_link in codes %}
<li>{{ code_type }}:
{% if code_link %}
<a href="{{ code_link }}">{{ code }}</a>
{% else %}
{{ code }}
{% endif %}
</li>
{% empty %}
<li>No codes found.</li>
{% endfor %}
                </ul>
            </li>
            <li>
                <h3>Alternative Names</h3>
                <ul>
{% for language, name in alternative_names %}
<li>{{ name }} in <span class="language-name">{{ language }}</span></li>
{% empty %}
<li>No alternative names found.</li>
{% endfor %}

                </ul>
    </section>

{% endblock %}

{'fraction_non_alphanumeric': 0.19361947738482527, 'fraction_numerical': 0.003987826634484206, 'mean_word_length': 1.8678904604273248, 'pattern_counts': {'":': 0, '<': 231, '<?xml version=': 0, '>': 231, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1055546', 'n_tokens_mistral': 3295, 'n_tokens_neox': 2979, 'n_words': 660}