Sha256: de75ca4d78dda9bce8d67360e8d45bf6d86a8d3b7e11b031e777acd07472857f

Contents?: true

Size: 624 Bytes

Versions: 2

Compression:

Stored size: 624 Bytes

Contents

ShipmentMode.class_eval do
  data_miner do
    schema Earth.database_options do
      string 'name'
      float  'route_inefficiency_factor'
      float  'transport_emission_factor'
      string 'transport_emission_factor_units'
    end
    
    import "a list of shipment modes and their characteristics",
           :url => 'https://spreadsheets.google.com/pub?key=0AoQJbWqPrREqdGR2a2RYcEg2RnRKbkRQcXc0ZkQ5U0E&hl=en&single=true&gid=0&output=csv' do
      key   'name'
      store 'route_inefficiency_factor'
      store 'transport_emission_factor', :units_field_name => 'transport_emission_factor_units'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
earth-0.3.8 lib/earth/shipping/shipment_mode/data_miner.rb
earth-0.3.7 lib/earth/shipping/shipment_mode/data_miner.rb