<commit_before>class RailClass < ActiveRecord::Base
  set_primary_key :name
  
  has_many :rail_trips

  data_miner do
    tap "Brighter Planet's rail class data", Earth.taps_server
  end
  
  # speed is missing
  # https://brighterplanet.sifterapp.com/projects/30/issues/455
  falls_back_on :passengers => 25.06,
                :distance => 8.57.miles.to(:kilometres),
                :diesel_intensity => 0.05.gallons_per_mile.to(:litres_per_kilometre),
                :electricity_intensity => 8.89.miles.to(:kilometres)
end<commit_msg>We need a fallback speed - for now just use the simple average speed of all rail classes<commit_after>class RailClass < ActiveRecord::Base
  set_primary_key :name
  
  has_many :rail_trips

  data_miner do
    tap "Brighter Planet's rail class data", Earth.taps_server
  end
  
  # speed is missing
  # https://brighterplanet.sifterapp.com/projects/30/issues/455
  falls_back_on :passengers => 25.06,
                :distance => 8.57.miles.to(:kilometres),
                :speed => 25.04.miles.to(:kilometres),
                :diesel_intensity => 0.05.gallons_per_mile.to(:litres_per_kilometre),
                :electricity_intensity => 8.89.miles.to(:kilometres)
end
{'fraction_non_alphanumeric': 0.10478547854785479, 'fraction_numerical': 0.033003300330033, 'mean_word_length': 3.05685618729097, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 2, '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': '7221043', 'n_tokens_mistral': 455, 'n_tokens_neox': 400, 'n_words': 79}