Sha256: 47b055dfccbf595dac73e5851883d181133158f91fd6e4a03bcf4b93dc550dd6

Contents?: true

Size: 707 Bytes

Versions: 16

Compression:

Stored size: 707 Bytes

Contents

BusFuelYearControl.class_eval do
  data_miner do
    process "Ensure BusFuelControl is populated" do
      BusFuelControl.run_data_miner!
    end
    
    import "a list of bus fuel year controls",
           :url => 'https://spreadsheets.google.com/pub?key=0AoQJbWqPrREqdGhHQkZPZW4zbXYzZ3NkYThBWnQ2QXc&gid=0&output=csv' do
      key   'name'
      store 'bus_fuel_name'
      store 'year'
      store 'control'
      store 'total_travel_percent'
    end
    
    process "Derive bus fuel control name for association with BusFuelControl" do
      update_all "bus_fuel_control_name = bus_fuel_name || ' ' || control"
    end
    
    # FIXME TODO verify that for any year the percentages sum to 1
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
earth-0.11.7 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.11.6 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.11.5 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.11.4 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.11.3 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.11.2 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.11.1 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.11.0 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.7.0 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.6.6 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.6.5 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.6.4 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.6.3 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.6.2 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.6.1 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-0.6.0 lib/earth/bus/bus_fuel_year_control/data_miner.rb