<commit_before>var gl_layers = [
    {
       name: 'water_ocean',
       data: function (json) {
           return {
               type: 'FeatureCollection',
               features: json['water-areas'].features.filter(function (feature) {
                   return feature.properties.kind == 'ocean';
               })
           };
       }
    },
    {
       name: 'land',
       data: function (json) { return json['land-usages']; }
    },
    {
       name: 'water_areas',
       data: function (json) {
           return {
               type: 'FeatureCollection',
               features: json['water-areas'].features.filter(function (feature) {
                   return feature.properties.kind != 'ocean';
               })
           };
       }
    },
    {
        name: 'roads',
        data: function (json) {
            // Order roads using provided 'sort_key'
            var data = {
                type: 'FeatureCollection',
                features: json['highroad'].features.sort(function(a, b) {
                    return (a.properties.sort_key > b.properties.sort_key);
                })
            };

            // Normalize sort keys (there are some really high and low values that cause too much spatial separation of layers)
            var i = 0, last_sort_key = null;
            for (var f in data.features) {
                var sort_key = data.features[f].properties.sort_key;
                if (sort_key != last_sort_key) {
                    i = i++ || 0;
                    last_sort_key = sort_key;
                }
                data.features[f].properties.sort_key = i;
            };

            return data;
        }
    },
    {
        name: 'buildings',
        data: function (json) { return json['buildings']; }
    }
];

var canvas_layers = [
    {
        name: 'land_unlabeled',
        data: function (json) {
            // Only land features WITHOUT names
            return {
                type: 'FeatureCollection',
                features: json['land-usages'].features.filter(function (feature) {
                    return !(feature.properties.name != null && feature.properties.name != '');
                })
            };
        },
        selection: true
    },
    {
        name: 'land_labeled',
        data: function (json) {
            // Only land features WITH names
            return {
                type: 'FeatureCollection',
                features: json['land-usages'].features.filter(function (feature) {
                    return (feature.properties.name != null && feature.properties.name != '');
                })
            };
        },
        selection: true
    },
    {
        name: 'water',
        data: function (json) { return json['water-areas']; },
        selection: true
    },
    {
        name: 'roads',
        data: function (json) {
            // Order roads using provided 'sort_key'
            return {
                type: 'FeatureCollection',
                features: json['highroad'].features.sort(function(a, b) {
                    return (a.properties.sort_key > b.properties.sort_key);
                })
            };
        }
    },
    {
        name: 'road_labels',
        data: function (json) {
            // Order roads using provided 'sort_key'
            return {
                type: 'FeatureCollection',
                features: json['skeletron'].features.sort(function(a, b) {
                    return (a.properties.sort_key > b.properties.sort_key);
                })
            };
        },
        visible: false,
        selection: true
    },
    {
        name: 'buildings',
        data: function (json) { return json['buildings']; }
    },<commit_msg>turn selection on buildings on canvas renderer (now that they sometimes have name data)<commit_after>var gl_layers = [
    {
       name: 'water_ocean',
       data: function (json) {
           return {
               type: 'FeatureCollection',
               features: json['water-areas'].features.filter(function (feature) {
                   return feature.properties.kind == 'ocean';
               })
           };
       }
    },
    {
       name: 'land',
       data: function (json) { return json['land-usages']; }
    },
    {
       name: 'water_areas',
       data: function (json) {
           return {
               type: 'FeatureCollection',
               features: json['water-areas'].features.filter(function (feature) {
                   return feature.properties.kind != 'ocean';
               })
           };
       }
    },
    {
        name: 'roads',
        data: function (json) {
            // Order roads using provided 'sort_key'
            var data = {
                type: 'FeatureCollection',
                features: json['highroad'].features.sort(function(a, b) {
                    return (a.properties.sort_key > b.properties.sort_key);
                })
            };

            // Normalize sort keys (there are some really high and low values that cause too much spatial separation of layers)
            var i = 0, last_sort_key = null;
            for (var f in data.features) {
                var sort_key = data.features[f].properties.sort_key;
                if (sort_key != last_sort_key) {
                    i = i++ || 0;
                    last_sort_key = sort_key;
                }
                data.features[f].properties.sort_key = i;
            };

            return data;
        }
    },
    {
        name: 'buildings',
        data: function (json) { return json['buildings']; }
    }
];

var canvas_layers = [
    {
        name: 'land_unlabeled',
        data: function (json) {
            // Only land features WITHOUT names
            return {
                type: 'FeatureCollection',
                features: json['land-usages'].features.filter(function (feature) {
                    return !(feature.properties.name != null && feature.properties.name != '');
                })
            };
        },
        selection: true
    },
    {
        name: 'land_labeled',
        data: function (json) {
            // Only land features WITH names
            return {
                type: 'FeatureCollection',
                features: json['land-usages'].features.filter(function (feature) {
                    return (feature.properties.name != null && feature.properties.name != '');
                })
            };
        },
        selection: true
    },
    {
        name: 'water',
        data: function (json) { return json['water-areas']; },
        selection: true
    },
    {
        name: 'roads',
        data: function (json) {
            // Order roads using provided 'sort_key'
            return {
                type: 'FeatureCollection',
                features: json['highroad'].features.sort(function(a, b) {
                    return (a.properties.sort_key > b.properties.sort_key);
                })
            };
        }
    },
    {
        name: 'road_labels',
        data: function (json) {
            // Order roads using provided 'sort_key'
            return {
                type: 'FeatureCollection',
                features: json['skeletron'].features.sort(function(a, b) {
                    return (a.properties.sort_key > b.properties.sort_key);
                })
            };
        },
        visible: false,
        selection: true
    },
    {
        name: 'buildings',
        data: function (json) { return json['buildings']; },
        selection: true
    },
{'fraction_non_alphanumeric': 0.11931592204693094, 'fraction_numerical': 0.0005302929868752485, 'mean_word_length': 1.348692403486924, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6452423', 'n_tokens_mistral': 1978, 'n_tokens_neox': 1904, 'n_words': 439}