<commit_before>"use strict";

/*global module, require*/

/*
 This file is where all the mess and wiring goes.
 We should always aim to reduce its size.
 */
var startCoordinates = [55.5, 0],
    zoom = 6,
    d3 = require("d3"),
    _ = require("lodash"),
    leaflet = require("leaflet"),
    body = d3.select("body"),
    mapDiv = body.append("div").attr("id", "map"),
    legend = body.append("div").attr("id", "legend"),
    map = new leaflet.Map("map", {
	doubleClickZoom: false
	/* WGS 84 World Mercator */
	,crs: leaflet.CRS.EPSG3857
	,minZoom: 7
	,maxBounds: leaflet.latLngBounds(
	    leaflet.latLng(49.871159, -6.379880),
	    leaflet.latLng(55.811741, 1.768960)
	)
    })
	.setView(startCoordinates, zoom),
    tileLayers = require("./js/tile-layers.js")(map),
    reverseColour = require("./js/colour.js").reverse;

require("leaflet-control-geocoder");
var geocoder = new leaflet.Control.Geocoder({
    email: "<EMAIL>",
    geocoder: require("./js/geocoder.js")()
});

require("./js/search-legend.js")(map, tileLayers.overlay).modifyGeocoder(geocoder);
    
map
    .addControl(geocoder)
    .addLayer(tileLayers.base)
    .addLayer(tileLayers.overlay);

tileLayers.overlay.colourChanged(function(colour) {
    legend
	.style("background-color", colour)
	.style("color", reverseColour(colour))
	.html(tileLayers.overlay.legend(colour));

    legend.selectAll("a")
	.style("color", reverseColour(colour));
});<commit_msg>Search box is now always expanded.<commit_after>"use strict";

/*global module, require*/

/*
 This file is where all the mess and wiring goes.
 We should always aim to reduce its size.
 */
var startCoordinates = [55.5, 0],
    zoom = 6,
    d3 = require("d3"),
    _ = require("lodash"),
    leaflet = require("leaflet"),
    body = d3.select("body"),
    mapDiv = body.append("div").attr("id", "map"),
    legend = body.append("div").attr("id", "legend"),
    map = new leaflet.Map("map", {
	doubleClickZoom: false
	/* WGS 84 World Mercator */
	,crs: leaflet.CRS.EPSG3857
	,minZoom: 7
	,maxBounds: leaflet.latLngBounds(
	    leaflet.latLng(49.871159, -6.379880),
	    leaflet.latLng(55.811741, 1.768960)
	)
    })
	.setView(startCoordinates, zoom),
    tileLayers = require("./js/tile-layers.js")(map),
    reverseColour = require("./js/colour.js").reverse;

require("leaflet-control-geocoder");
var geocoder = new leaflet.Control.Geocoder({
    collapsed: false,
    email: "<EMAIL>",
    geocoder: require("./js/geocoder.js")()
});

require("./js/search-legend.js")(map, tileLayers.overlay).modifyGeocoder(geocoder);
    
map
    .addControl(geocoder)
    .addLayer(tileLayers.base)
    .addLayer(tileLayers.overlay);

tileLayers.overlay.colourChanged(function(colour) {
    legend
	.style("background-color", colour)
	.style("color", reverseColour(colour))
	.html(tileLayers.overlay.legend(colour));

    legend.selectAll("a")
	.style("color", reverseColour(colour));
});
{'fraction_non_alphanumeric': 0.1763492609144036, 'fraction_numerical': 0.030938466827088347, 'mean_word_length': 3.9574105621805793, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5402688', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1042, 'n_words': 191}