<commit_before>module Stats
  class MoneyClaimedPerMonthDataGenerator

    def initialize(date = Date.yesterday)
      @date = date
    end

    def run
      stats = Statistic.where(report_name: 'money_claimed_per_month').where('date > ?', 1.year.ago).order(:date)
      line_graph = Stats::GeckoWidgets::LineGraph.new
      line_graph.x_axis_labels = stats.pluck(:date).map{ |d| d.strftime('%b %y') }
      line_graph.add_dataset('Claimed (£ millions)', stats.pluck(:value_1).map{ |v| (v / 1_000_000.00).round(2)})
      line_graph
    end

  end
end


<commit_msg>Don't graph current month in money claimed per month geckoboard widget<commit_after>module Stats
  class MoneyClaimedPerMonthDataGenerator

    def initialize(date = Date.yesterday)
      @date = date
    end

    def run
      stats = Statistic.where(report_name: 'money_claimed_per_month').where(date: 1.year.ago..@date).order(:date)
      line_graph = Stats::GeckoWidgets::LineGraph.new
      line_graph.x_axis_labels = stats.pluck(:date).map{ |d| d.strftime('%b %y') }
      line_graph.add_dataset('Claimed (£ millions)', stats.pluck(:value_1).map{ |v| (v / 1_000_000.00).round(2)})
      line_graph
    end

  end
end



{'fraction_non_alphanumeric': 0.1325503355704698, 'fraction_numerical': 0.020134228187919462, 'mean_word_length': 3.7154150197628457, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '6077509', 'n_tokens_mistral': 443, 'n_tokens_neox': 404, 'n_words': 78}