Sha256: 103554f75ba9f23badbcca11a12d70617f6d1a4bd894aa331af8f35482fd56d8

Contents?: true

Size: 595 Bytes

Versions: 8

Compression:

Stored size: 595 Bytes

Contents

FlightDistanceClass.class_eval do
  data_miner do
    schema Earth.database_options do
      string 'name'
      float  'distance'
      string 'distance_units'
    end
    
    import "a list of distance classes taken from the WRI business travel tool and UK DEFRA/DECC GHG Conversion Factors for Company Reporting",
           :url => 'https://spreadsheets.google.com/pub?key=0AoQJbWqPrREqdFBKM0xWaUhKVkxDRmdBVkE3VklxY2c&hl=en&single=true&gid=0&output=csv' do
      key   'name'
      store 'distance', :units_field_name => 'distance_units'
    end
    
    # FIXME TODO verify this
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
earth-0.4.4 lib/earth/air/flight_distance_class/data_miner.rb
earth-0.4.3 lib/earth/air/flight_distance_class/data_miner.rb
earth-0.4.2 lib/earth/air/flight_distance_class/data_miner.rb
earth-0.4.1 lib/earth/air/flight_distance_class/data_miner.rb
earth-0.4.0 lib/earth/air/flight_distance_class/data_miner.rb
earth-0.3.15 lib/earth/air/flight_distance_class/data_miner.rb
earth-0.3.14 lib/earth/air/flight_distance_class/data_miner.rb
earth-0.3.13 lib/earth/air/flight_distance_class/data_miner.rb