<commit_before>- content_for :title do
  Russian Novel-ness over past #{pluralize @days, 'day'}
  %small
    %span{day_links}

.bubble-chart= haml :'shared/progress'

- content_for :footer do
  :javascript
    (function() {
      var diameter = Math.min($('.bubble-chart').width(), window.innerHeight * 1.2),
          format = d3.format(',d'),
          color = d3.scale.category20c(),
          bubble = d3.layout.pack()
            .size([diameter, diameter])
            .sort(function(a, b) { return a.russianness - b.russianness; } )
            .value(function(d) { return d.russianness; })
            .padding(1.5),
          svg = d3.select('.bubble-chart').append('svg')
            .attr('height', diameter)
            .attr('width', diameter);

      d3.json('#{russian_novels_path(days: @days)}')
        .on('error', function() { $('.bubble-chart').displayAlert(); })
        .on('load', function(data) {
          $('.bubble-chart .progress').remove();
          var node = svg.selectAll('.node')
            .data(bubble.nodes(data).filter(function(d) { return !d.children; }))
            .enter().append('g')
              .attr('class', 'node')
              .attr('transform', function(d) { return "translate(" + d.x + ',' + d.y + ')'; });

          node.append('title')
            .text(function(d) {
              return 'Author: ' + d.author + ' (' + d.team + ')\n' +
                      'Russianness: ' + format(d.russianness) + '\n' +
                      'Flesch Reading Ease: ' + d3.round(d.flesch_reading_ease, 2);
            });

          node.append('circle')
            .attr('r', function(d) { return d.r; })
            .style('fill', function(d) { return color(d.team) });

          node.append('text')
            .attr('dy', '.3em')
            .style('text-anchor', 'middle')
            .text(function(d) { return d.author.substring(0, d.r / 4); });

          $('.bubble-chart svg').on('click', 'g', function(event) {
            window.location = '#{authors_path}/'+
              $(event.currentTarget).find('text').text().replace(/ /, '.');
          });
        }).get();
    })();<commit_msg>Apply simple alignment fixes<commit_after>- content_for :title do
  Russian Novel-ness over past #{pluralize @days, 'day'}
  %small
    %span{day_links}

.bubble-chart= haml :'shared/progress'

- content_for :footer do
  :javascript
    (function() {
      var diameter = Math.min($('.bubble-chart').width(), window.innerHeight * 1.2),
          format = d3.format(',d'),
          color = d3.scale.category20c(),
          bubble = d3.layout.pack()
            .size([diameter, diameter])
            .sort(function(a, b) { return a.russianness - b.russianness; } )
            .value(function(d) { return d.russianness; })
            .padding(1.5),
          svg = d3.select('.bubble-chart').append('svg')
            .attr('height', diameter)
            .attr('width', diameter);

      d3.json('#{russian_novels_path(days: @days)}')
        .on('error', function() { $('.bubble-chart').displayAlert(); })
        .on('load', function(data) {
          $('.bubble-chart .progress').remove();
          var node = svg.selectAll('.node')
            .data(bubble.nodes(data).filter(function(d) { return !d.children; }))
            .enter().append('g')
              .attr('class', 'node')
              .attr('transform', function(d) { return "translate(" + d.x + ',' + d.y + ')'; });

          node.append('title')
            .text(function(d) {
              return 'Author: ' + d.author + ' (' + d.team + ')\n' +
                     'Russianness: ' + format(d.russianness) + '\n' +
                     'Flesch Reading Ease: ' + d3.round(d.flesch_reading_ease, 2);
            });

          node.append('circle')
            .attr('r', function(d) { return d.r; })
            .style('fill', function(d) { return color(d.team) });

          node.append('text')
            .attr('dy', '.3em')
            .style('text-anchor', 'middle')
            .text(function(d) { return d.author.substring(0, d.r / 4); });

          $('.bubble-chart svg').on('click', 'g', function(event) {
            window.location = '#{authors_path}/'+
              $(event.currentTarget).find('text').text().replace(/ /, '.');
          });
        }).get();
    })();
{'fraction_non_alphanumeric': 0.200139308103088, 'fraction_numerical': 0.007429765498026469, 'mean_word_length': 1.9669421487603307, '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': '1071979', 'n_tokens_mistral': 1375, 'n_tokens_neox': 1351, 'n_words': 233}