Sha256: b159d1589be6dc0ed41308b94f5f6ead659634c9f50c5597923d60916ba5e9a3

Contents?: true

Size: 817 Bytes

Versions: 3

Compression:

Stored size: 817 Bytes

Contents

AirConditionerUse.class_eval do
  data_miner do
    schema do
      string 'name'
      float 'fugitive_emission'
      string 'fugitive_emission_units'
    end
    
    process "derive from ResidentialEnergyConsumptionSurveyResponse" do
      ResidentialEnergyConsumptionSurveyResponse.run_data_miner!
      INSERT_IGNORE %{INTO air_conditioner_uses(name)
        SELECT DISTINCT recs_responses.central_ac_use FROM recs_responses WHERE LENGTH(recs_responses.central_ac_use) > 0
      }
    end
    
    import "Ian's precalculated fugitive emissions values", :url => 'http://spreadsheets.google.com/pub?key=ri_380yQZAqBKeqie_TECgg' do
      key 'name', :field_name => 'air_conditioner_use_name'
      store 'fugitive_emission', :units_field_name => 'unit', :to_units => :kilograms_per_square_metre
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
earth-0.4.4 lib/earth/residence/air_conditioner_use/data_miner.rb
earth-0.4.3 lib/earth/residence/air_conditioner_use/data_miner.rb
earth-0.4.2 lib/earth/residence/air_conditioner_use/data_miner.rb