<commit_before>define([
    'streamhub-map/point',
    'streamhub-map/views/marker-view',
    'inherits',
    'd3',
    'colorbrewer'
],
function (Point, MarkerView, inherits, d3, colorbrewer) {

    var SymbolView = function (point, opts) {
        opts = opts || {};
        this._maxMetricValue = opts.maxMetricValue;

        MarkerView.apply(this, arguments);
    };
    inherits(SymbolView, MarkerView);

    SymbolView.prototype.getRadius = function () {
        var getSize = d3.scale.linear()
            .domain(this.getDomain())
            .range([7.5, 25]);
        return getSize(this.getValue());
    };

    SymbolView.prototype.getValue = function () {
        return this._point.getCollection().heatIndex;
    };

    SymbolView.prototype.render = function () {
        MarkerView.prototype.render.call(this, this.getRadius());

        var getColor = d3.scale.quantize()
            .domain(this.getDomain())
            .range(colorbrewer.YlOrRd[9]);
        this.el.attr('fill', getColor(this.getValue()));
    };

    SymbolView.prototype.getDomain = function () {
        return [0, this._maxMetricValue()];
    };

    return SymbolView;
});
<commit_msg>Change cardinality of the color range<commit_after>define([
    'streamhub-map/point',
    'streamhub-map/views/marker-view',
    'inherits',
    'd3',
    'colorbrewer'
],
function (Point, MarkerView, inherits, d3, colorbrewer) {

    var SymbolView = function (point, opts) {
        opts = opts || {};
        this._maxMetricValue = opts.maxMetricValue;

        MarkerView.apply(this, arguments);
    };
    inherits(SymbolView, MarkerView);

    SymbolView.prototype.getRadius = function () {
        var getSize = d3.scale.linear()
            .domain(this.getDomain())
            .range([7.5, 25]);
        return getSize(this.getValue());
    };

    SymbolView.prototype.getValue = function () {
        return this._point.getCollection().heatIndex;
    };

    SymbolView.prototype.render = function () {
        MarkerView.prototype.render.call(this, this.getRadius());

        var getColor = d3.scale.quantize()
            .domain(this.getDomain())
            .range(colorbrewer.YlOrRd[5]);
        this.el.attr('fill', getColor(this.getValue()));
    };

    SymbolView.prototype.getDomain = function () {
        return [0, this._maxMetricValue()];
    };

    return SymbolView;
});

{'fraction_non_alphanumeric': 0.14705882352941177, 'fraction_numerical': 0.008403361344537815, 'mean_word_length': 2.575075075075075, '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': '6056573', 'n_tokens_mistral': 738, 'n_tokens_neox': 711, 'n_words': 119}