<commit_before>'use strict';

var VisBubbleLegend = Class.extend({
  init: function(divId) {
    this.container = divId;
    this.isMobile = window.innerWidth <= 740;

    var colors =['#b2182b','#d6604d','#f4a582','#fddbc7','#f7f7f7','#d1e5f0','#92c5de','#4393c3','#2166ac'];

    var scale = d3.scaleOrdinal()
      .domain(colors.reverse())
      .range([0, 11.1, 25, 37.5, 50, 62.5, 87.5, 100]);

    var margin = {top: 15, right: 5, bottom: 15, left: 5},
      width = parseInt(d3.select(this.container).style('width')) - margin.left - margin.right,
      height = this.isMobile ? 320 : 520 - margin.top - margin.bottom;

    var svg = d3.select(this.container).append('svg')
      .attr('width', width + margin.left + margin.right)
      .attr('height', height + margin.top + margin.bottom)
      .style('overflow', 'visible')
      .append('g')
      .attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');

    var defs = svg.append('defs');

    defs.append('marker')
      .attr('id', 'arrow_start')<commit_msg>Use d3.range for the scale<commit_after>'use strict';

var VisBubbleLegend = Class.extend({
  init: function(divId) {
    this.container = divId;
    this.isMobile = window.innerWidth <= 740;

    var colors =['#b2182b','#d6604d','#f4a582','#fddbc7','#f7f7f7','#d1e5f0','#92c5de','#4393c3','#2166ac'];

    var scale = d3.scaleOrdinal()
      .domain(colors.reverse())
      .range(d3.range(0, 100, 100 / colors.length));

    var margin = {top: 15, right: 5, bottom: 15, left: 5},
      width = parseInt(d3.select(this.container).style('width')) - margin.left - margin.right,
      height = this.isMobile ? 320 : 520 - margin.top - margin.bottom;

    var svg = d3.select(this.container).append('svg')
      .attr('width', width + margin.left + margin.right)
      .attr('height', height + margin.top + margin.bottom)
      .style('overflow', 'visible')
      .append('g')
      .attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');

    var defs = svg.append('defs');

    defs.append('marker')
      .attr('id', 'arrow_start')
{'fraction_non_alphanumeric': 0.19990412272291466, 'fraction_numerical': 0.060882070949185046, 'mean_word_length': 3.347916666666667, 'pattern_counts': {'":': 0, '<': 5, '<?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': '259113', 'n_tokens_mistral': 824, 'n_tokens_neox': 744, 'n_words': 141}