Sha256: 434a9d610e850c9444874ea8b24927cbfbff9fc908675c358fafec836e310cf2

Contents?: true

Size: 968 Bytes

Versions: 13

Compression:

Stored size: 968 Bytes

Contents

ClothesMachineUse.class_eval do
  data_miner do
    process "Ensure ResidentialEnergyConsumptionSurveyResponse is populated" do
      ResidentialEnergyConsumptionSurveyResponse.run_data_miner!
    end
    
    process "Derive from ResidentialEnergyConsumptionSurveyResponse" do
      ::Earth::Utils.insert_ignore(
        :src => ResidentialEnergyConsumptionSurveyResponse,
        :dest => ClothesMachineUse,
        :cols => { :clothes_washer_use => :name }
      )
    end
    
    # sabshere 5/20/10 weird that this uses cohort
    process "precalculate annual energy use" do
      find_each do |record|
        record.annual_energy_from_electricity_for_clothes_driers = ResidentialEnergyConsumptionSurveyResponse.big_cohort(:clothes_machine_use_id => record.name).weighted_average :annual_energy_from_electricity_for_clothes_driers
        record.annual_energy_from_electricity_for_clothes_driers_units = 'joules'
        record.save!
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
earth-0.11.12 lib/earth/residence/clothes_machine_use/data_miner.rb
earth-0.11.11 lib/earth/residence/clothes_machine_use/data_miner.rb
earth-0.11.10 lib/earth/residence/clothes_machine_use/data_miner.rb
earth-0.11.9 lib/earth/residence/clothes_machine_use/data_miner.rb
earth-0.11.8 lib/earth/residence/clothes_machine_use/data_miner.rb
earth-0.11.7 lib/earth/residence/clothes_machine_use/data_miner.rb
earth-0.11.6 lib/earth/residence/clothes_machine_use/data_miner.rb
earth-0.11.5 lib/earth/residence/clothes_machine_use/data_miner.rb
earth-0.11.4 lib/earth/residence/clothes_machine_use/data_miner.rb
earth-0.11.3 lib/earth/residence/clothes_machine_use/data_miner.rb
earth-0.11.2 lib/earth/residence/clothes_machine_use/data_miner.rb
earth-0.11.1 lib/earth/residence/clothes_machine_use/data_miner.rb
earth-0.11.0 lib/earth/residence/clothes_machine_use/data_miner.rb