<commit_before>var binLabel = function(startDate) {
  return moment(startDate).fromNow();
  //Settings.numBins - Math.round((Date.now() - startDate) / Settings.binWidth.asMilliseconds()) - 1;
};

Template.LumenWidget.helpers({
  binWidth: function() { return Settings.binWidth.humanize().replace(/^a /, ''); }
});

Template.LumenWidget.onCreated(function() {
  this.subscribe('lumen_counts');
});

Template.LumenWidget.onRendered(function() {
  var template = this;
  this.autorun(function() {
    if (!template.subscriptionsReady()) {
      return;
    }

    template.$('.url-counts').empty();

    var urlCounts = LumenCounts.find().map(function(bin) {
      return { x: bin.start, y: bin.urlCount };
    });

    var binStarts = _.map(urlCounts, function(d) { return d.x; });
    var tickValues = function(binStarts, numTicks) {
      var total = binStarts.length;
      var step = Math.ceil(total / numTicks) || 0;
      var ticks = [];
      var i;
      for (i = 0; i < total; i += step) {<commit_msg>actually flip chill axis - #12176<commit_after>var binLabel = function(startDate) {
  return moment(startDate).fromNow();
  //Settings.numBins - Math.round((Date.now() - startDate) / Settings.binWidth.asMilliseconds()) - 1;
};

Template.LumenWidget.helpers({
  binWidth: function() { return Settings.binWidth.humanize().replace(/^a /, ''); }
});

Template.LumenWidget.onCreated(function() {
  this.subscribe('lumen_counts');
});

Template.LumenWidget.onRendered(function() {
  var template = this;
  this.autorun(function() {
    if (!template.subscriptionsReady()) {
      return;
    }

    template.$('.url-counts').empty();

    var urlCounts = LumenCounts.find({}, { sort: { start: 1 } }).map(
      function(bin) { return { x: bin.start, y: bin.urlCount }; }
    );

    var binStarts = _.map(urlCounts, function(d) { return d.x; });
    var tickValues = function(binStarts, numTicks) {
      var total = binStarts.length;
      var step = Math.ceil(total / numTicks) || 0;
      var ticks = [];
      var i;
      for (i = 0; i < total; i += step) {
{'fraction_non_alphanumeric': 0.17199612403100775, 'fraction_numerical': 0.005813953488372093, 'mean_word_length': 3.375, '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': '2467099', 'n_tokens_mistral': 704, 'n_tokens_neox': 688, 'n_words': 135}