<commit_before>'use strict';

vex.defaultOptions.className = 'vex-theme-plain';

/* The GeoJSON tile layer is excellent, but makes assumptions that we don't
 * want (like refreshing whenever zooming, and that a single logic layer is
 * encoded in the ajaxed data). We instead extend a simpler primitive, and
 * insert hooks where needed. */
L.TileLayer.GeoJSONData = L.TileLayer.Ajax.extend({
    addTileData: function (features, tilePoint) {
        if (this.options.filter) {
            features = _.filter(features, this.options.filter);
        }
        if (this.options.perGeo) {
            _.each(features, this.options.perGeo);
        }
        if (this.options.postTileLoaded) {
            this.options.postTileLoaded(features, tilePoint);
        }
    },
    _tileLoaded: function (tile, tilePoint) {
        L.TileLayer.Ajax.prototype._tileLoaded.apply(this, arguments);
        if (tile.datum !== null && tile.datum.features !== null) {
            if (this.options.initialTransform) {
                tile.datum = this.options.initialTransform(tile.datum);
            }
            this.addTileData(tile.datum.features, tilePoint);
        }
    }
});


var Mapusaurus = {
    //  Leaflet map
    map: null,
    //  The map can be locked to a specific metro area
    lockState: {
        locked: false,
        geoid: null,
        //  Bubbles outside the locked region may need to be added/removed on
        //  the fly. Keep a reference to them
        outsideBubbles: []
    },
    //  Leaflet layers
    layers: {tract: null, county: null, metro: null},
    //  Tracks layer data/stats
    dataStore: {tract: {}},
    //  Tracks which tracts have been drawn. Gets cleared when zooming
    drawn: {},
    notDrawn: function(feature) {
        return !_.has(Mapusaurus.drawn, feature.properties.geoid);
    },
    //  Stores stat data when the associated geos aren't loaded
    dataWithoutGeo: {minority: {}},
    //  Keep track of which stateXcounties we've loaded; also works as a list
    //  of data layers
    statsLoaded: {minority: {}},

    //  Some style info
    bubbleStyle: {stroke: false, fillOpacity: 0.9, weight: 2},
    //  fillColor and color will be assigned when rendering
    tractStyle: {stroke: false, fillOpacity: 0.4, weight: 2, fill: true,
                 smoothFactor: 0.1},
    //  used when loading census tracts
    loadingStyle: {stroke: true, weight: 2, color: '#babbbd', fill: false,
                   smoothFactor: 0.1},
    //  used when displayed outside metro area
    outsideStyle: {stroke: false, fill: false},
    //  population-less tracts
    noStyle: {stroke: false, fill: false},
    //  used when census tracts are visible
    zoomedCountyStyle: {stroke: true, color: '#fff', weight: 0.5, fill: false,
                        opacity: 1.0},
    zoomedMetroStyle: {stroke: true, color: '#fff', weight: 2, fill: false,
                       opacity: 1.0},
    //  used when census tracts are not visible
    biggerMetroStyle: {stroke: true, color: '#646464', weight: 4, fill: true,
                       opacity: 1.0, dashArray: '20,10', fillColor: '#646464',
                       fillOpacity: 0.5},

    initialize: function (map) {<commit_msg>Reducing opacity of census tract choropleth layer<commit_after>'use strict';

vex.defaultOptions.className = 'vex-theme-plain';

/* The GeoJSON tile layer is excellent, but makes assumptions that we don't
 * want (like refreshing whenever zooming, and that a single logic layer is
 * encoded in the ajaxed data). We instead extend a simpler primitive, and
 * insert hooks where needed. */
L.TileLayer.GeoJSONData = L.TileLayer.Ajax.extend({
    addTileData: function (features, tilePoint) {
        if (this.options.filter) {
            features = _.filter(features, this.options.filter);
        }
        if (this.options.perGeo) {
            _.each(features, this.options.perGeo);
        }
        if (this.options.postTileLoaded) {
            this.options.postTileLoaded(features, tilePoint);
        }
    },
    _tileLoaded: function (tile, tilePoint) {
        L.TileLayer.Ajax.prototype._tileLoaded.apply(this, arguments);
        if (tile.datum !== null && tile.datum.features !== null) {
            if (this.options.initialTransform) {
                tile.datum = this.options.initialTransform(tile.datum);
            }
            this.addTileData(tile.datum.features, tilePoint);
        }
    }
});


var Mapusaurus = {
    //  Leaflet map
    map: null,
    //  The map can be locked to a specific metro area
    lockState: {
        locked: false,
        geoid: null,
        //  Bubbles outside the locked region may need to be added/removed on
        //  the fly. Keep a reference to them
        outsideBubbles: []
    },
    //  Leaflet layers
    layers: {tract: null, county: null, metro: null},
    //  Tracks layer data/stats
    dataStore: {tract: {}},
    //  Tracks which tracts have been drawn. Gets cleared when zooming
    drawn: {},
    notDrawn: function(feature) {
        return !_.has(Mapusaurus.drawn, feature.properties.geoid);
    },
    //  Stores stat data when the associated geos aren't loaded
    dataWithoutGeo: {minority: {}},
    //  Keep track of which stateXcounties we've loaded; also works as a list
    //  of data layers
    statsLoaded: {minority: {}},

    //  Some style info
    bubbleStyle: {stroke: false, fillOpacity: 0.9, weight: 2},
    //  fillColor and color will be assigned when rendering
    tractStyle: {stroke: false, fillOpacity: 0.25, weight: 2, fill: true,
                 smoothFactor: 0.1},
    //  used when loading census tracts
    loadingStyle: {stroke: true, weight: 2, color: '#babbbd', fill: false,
                   smoothFactor: 0.1},
    //  used when displayed outside metro area
    outsideStyle: {stroke: false, fill: false},
    //  population-less tracts
    noStyle: {stroke: false, fill: false},
    //  used when census tracts are visible
    zoomedCountyStyle: {stroke: true, color: '#fff', weight: 0.5, fill: false,
                        opacity: 1.0},
    zoomedMetroStyle: {stroke: true, color: '#fff', weight: 2, fill: false,
                       opacity: 1.0},
    //  used when census tracts are not visible
    biggerMetroStyle: {stroke: true, color: '#646464', weight: 4, fill: true,
                       opacity: 1.0, dashArray: '20,10', fillColor: '#646464',
                       fillOpacity: 0.5},

    initialize: function (map) {
{'fraction_non_alphanumeric': 0.11380856656873357, 'fraction_numerical': 0.012215865161589609, 'mean_word_length': 2.3495598135680993, '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': '1681707', 'n_tokens_mistral': 1965, 'n_tokens_neox': 1865, 'n_words': 598}