<commit_before>CensusReporter = {
    GeoIDLayer: L.GeoJSON.extend({
        addGeoID: function(geoid) {
            var request = new XMLHttpRequest();
            var url = this.options.api_url + "/1.0/geo/show/tiger2014?geo_ids=" + geoid;
            request.open('GET', url, true);
            var self = this;
            request.onreadystatechange = function() {
              if (this.readyState === 4) {
                if (this.status >= 200 && this.status < 400) {
                  // Success!
                  var data = JSON.parse(this.responseText);
                  self.addData(data);
                } else {
                  if (typeof(console) != 'undefined' && typeof(console.log) == 'function') {
                    console.log("Error ("+this.status+") getting data")
                    console.log(this.responseText)
                  }
                }
              }
            };
            request.send();
            request = null;
        },
        removeGeoID: function(geoid) {
            var layers = this.getLayers();
            for (var i = 0; i < layers.length; i++) {
                if (layers[i].feature.properties.geoid == geoid) {
                    this.removeLayer(layers[i]);
                    return layers[i];
                }
            }
            return null;
        },
        initialize: function(geoid_spec, options) {
            L.GeoJSON.prototype.initialize.call(this);
            var options = L.extend({
                api_url: 'http://api.censusreporter.org',
                censusreporter_url: 'http://staging.censusreporter.org',
                autoclick: true
            }, options);
            if (options.autoclick) {
                var censusreporter_url = options.censusreporter_url;
                var autoclick_handler = function(data, layer) {
                    layer.on('click',function() {
                        window.open(censusreporter_url + "/profiles/" + data.properties.geoid);
                    });
                }
                if (options.onEachFeature) {
                    var old_handler = options.onEachFeature;
                    options.onEachFeature = function(data, layer) {
                        old_handler(data, layer);
                        autoclick_handler(data, layer);
                    }
                } else {
                    options.onEachFeature = autoclick_handler;
                }
            }
            this.options = options;
            this.addGeoID(geoid_spec);
        }
    })
}

CensusReporter.AjaxLayer = L.TileLayer.extend({
    _requests: [],
    _addTile: function (tilePoint) {
        var tile = { datum: null, processed: false };
        this._tiles[tilePoint.x + ':' + tilePoint.y] = tile;<commit_msg>Missed a staging URL<commit_after>CensusReporter = {
    GeoIDLayer: L.GeoJSON.extend({
        addGeoID: function(geoid) {
            var request = new XMLHttpRequest();
            var url = this.options.api_url + "/1.0/geo/show/tiger2014?geo_ids=" + geoid;
            request.open('GET', url, true);
            var self = this;
            request.onreadystatechange = function() {
              if (this.readyState === 4) {
                if (this.status >= 200 && this.status < 400) {
                  // Success!
                  var data = JSON.parse(this.responseText);
                  self.addData(data);
                } else {
                  if (typeof(console) != 'undefined' && typeof(console.log) == 'function') {
                    console.log("Error ("+this.status+") getting data")
                    console.log(this.responseText)
                  }
                }
              }
            };
            request.send();
            request = null;
        },
        removeGeoID: function(geoid) {
            var layers = this.getLayers();
            for (var i = 0; i < layers.length; i++) {
                if (layers[i].feature.properties.geoid == geoid) {
                    this.removeLayer(layers[i]);
                    return layers[i];
                }
            }
            return null;
        },
        initialize: function(geoid_spec, options) {
            L.GeoJSON.prototype.initialize.call(this);
            var options = L.extend({
                api_url: 'http://api.censusreporter.org',
                censusreporter_url: 'http://censusreporter.org',
                autoclick: true
            }, options);
            if (options.autoclick) {
                var censusreporter_url = options.censusreporter_url;
                var autoclick_handler = function(data, layer) {
                    layer.on('click',function() {
                        window.open(censusreporter_url + "/profiles/" + data.properties.geoid);
                    });
                }
                if (options.onEachFeature) {
                    var old_handler = options.onEachFeature;
                    options.onEachFeature = function(data, layer) {
                        old_handler(data, layer);
                        autoclick_handler(data, layer);
                    }
                } else {
                    options.onEachFeature = autoclick_handler;
                }
            }
            this.options = options;
            this.addGeoID(geoid_spec);
        }
    })
}

CensusReporter.AjaxLayer = L.TileLayer.extend({
    _requests: [],
    _addTile: function (tilePoint) {
        var tile = { datum: null, processed: false };
        this._tiles[tilePoint.x + ':' + tilePoint.y] = tile;
{'fraction_non_alphanumeric': 0.11443503333934042, 'fraction_numerical': 0.005045954225986664, 'mean_word_length': 1.3270440251572326, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6713869', 'n_tokens_mistral': 1535, 'n_tokens_neox': 1440, 'n_words': 260}