Sha256: 74f086e441a794ae8b6017b3c2d2472a490cb2ad70814876c1a66bf63f434362

Contents?: true

Size: 863 Bytes

Versions: 8

Compression:

Stored size: 863 Bytes

Contents

AutomobileTypeFuelYearControl.class_eval do
  data_miner do
    import "automobile type fuel year control data derived from the 2010 EPA GHG Inventory",
           :url => 'https://spreadsheets.google.com/pub?key=0AoQJbWqPrREqdGpQV2xMdlZkV1JzVlVTeU5ZalF6elE&hl=en&gid=0&output=csv' do
      key   'name'
      store 'type_name'
      store 'fuel_common_name'
      store 'year'
      store 'control_name'
      store 'total_travel_percent'
    end
    
    process "Derive type fuel control name for association with AutomobileTypeFuelControl" do
      update_all "type_fuel_control_name = type_name || ' ' || fuel_common_name || ' ' || control_name"
    end
    
    process "Derive type fuel year name for association with AutomobileTypeFuelYear" do
      update_all "type_fuel_year_name = type_name || ' ' || fuel_common_name || ' ' || year"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
earth-0.7.0 lib/earth/automobile/automobile_type_fuel_year_control/data_miner.rb
earth-0.6.6 lib/earth/automobile/automobile_type_fuel_year_control/data_miner.rb
earth-0.6.5 lib/earth/automobile/automobile_type_fuel_year_control/data_miner.rb
earth-0.6.4 lib/earth/automobile/automobile_type_fuel_year_control/data_miner.rb
earth-0.6.3 lib/earth/automobile/automobile_type_fuel_year_control/data_miner.rb
earth-0.6.2 lib/earth/automobile/automobile_type_fuel_year_control/data_miner.rb
earth-0.6.1 lib/earth/automobile/automobile_type_fuel_year_control/data_miner.rb
earth-0.6.0 lib/earth/automobile/automobile_type_fuel_year_control/data_miner.rb