<commit_before>module EventsHelper

  def make_event_split_id_array(event_id, splits)
    event_split_id_array = []
    splits.each do |split|
      @event_split = AidStation.find_by(event_id: event_id, split_id: split.id)
      event_split_id_array << @event_split.id
    end
    event_split_id_array
  end

  def make_suggested_match_id_hash(efforts)
    id_hash = {}
    efforts.each do |effort|
      id_hash[effort.id] = effort.suggested_match.id if effort.suggested_match
    end
    id_hash
  end

  def suggested_match_count(efforts)
    make_suggested_match_id_hash(efforts).count
  end

  def data_status(status_int)
    Effort.data_statuses.key(status_int)
  end

end
<commit_msg>Refactor EventsHelper and remove unused code.<commit_after>module EventsHelper

  def suggested_match_id_hash(efforts)
    efforts.select(&:suggested_match).map { |effort| [effort.id, effort.suggested_match.id] }.to_h
  end

  def suggested_match_count(efforts)
    suggested_match_id_hash(efforts).count
  end

  def data_status(status_int)
    Effort.data_statuses.key(status_int)
  end

end

{'fraction_non_alphanumeric': 0.07834101382488479, 'fraction_numerical': 0.0, 'mean_word_length': 4.349753694581281, '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': '4795179', 'n_tokens_mistral': 402, 'n_tokens_neox': 391, 'n_words': 65}