<commit_before>/* app.js */

//= require OpenLayers

/*globals $,OpenLayers,otm*/
/*jslint indent: 4, white: true */

var app = (function ($,L,config) {
    "use strict";
    return {
        createMap: function (elmt) {
            var map = new L.Map({
                div: elmt,
                projection: 'EPSG:3857',
                layers: this.getBasemapLayers(config)
            });

            map.setCenter(config.instance.center, 10);

            return map;
        },

        getBasemapLayers: function (config) {
            var layer;
            if (config.instance.basemap.type === 'bing') {
                layer = new L.Layer.Bing({
                    name: 'Road',
                    key: config.instance.basemap.bing_api_key,
                    type: 'Road'
                });
            } else if (config.instance.basemap.type === 'tms') {
                layer = new L.Layer.XYZ(
                    'xyz',
                    config.instance.basemap.data);
            } else {
                layer = new L.Layer.Google(
                    "Google Streets",
                    {numZoomLevels: 20});
            }
            return [layer];
        },

        createPlotTileLayer: function(config) {
            return new L.Layer.XYZ(
                'tiles',
                '/tile/' +
                    config.instance.rev +
                    '/database/otm/table/treemap_plot/${z}/${x}/${y}.png',
            { isBaseLayer: false });

        },

        init: function () {<commit_msg>Replace L with OL to make to clear we're using OpenLayers<commit_after>/* app.js */

//= require OpenLayers

/*globals $,OpenLayers,otm*/
/*jslint indent: 4, white: true */

var app = (function ($,OL,config) {
    "use strict";
    return {
        createMap: function (elmt) {
            var map = new OL.Map({
                div: elmt,
                projection: 'EPSG:3857',
                layers: this.getBasemapLayers(config)
            });

            map.setCenter(config.instance.center, 10);

            return map;
        },

        getBasemapLayers: function (config) {
            var layer;
            if (config.instance.basemap.type === 'bing') {
                layer = new OL.Layer.Bing({
                    name: 'Road',
                    key: config.instance.basemap.bing_api_key,
                    type: 'Road'
                });
            } else if (config.instance.basemap.type === 'tms') {
                layer = new OL.Layer.XYZ(
                    'xyz',
                    config.instance.basemap.data);
            } else {
                layer = new OL.Layer.Google(
                    "Google Streets",
                    {numZoomLevels: 20});
            }
            return [layer];
        },

        createPlotTileLayer: function(config) {
            return new OL.Layer.XYZ(
                'tiles',
                '/tile/' +
                    config.instance.rev +
                    '/database/otm/table/treemap_plot/${z}/${x}/${y}.png',
            { isBaseLayer: false });

        },

        init: function () {
{'fraction_non_alphanumeric': 0.12748876043673732, 'fraction_numerical': 0.005780346820809248, 'mean_word_length': 1.2014134275618376, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3506784', 'n_tokens_mistral': 940, 'n_tokens_neox': 853, 'n_words': 178}