Sha256: 78128d5f0229e38f92c25b2e4f3d3850f08b6520e9e5e6ff72dd1f89006e4b14

Contents?: true

Size: 825 Bytes

Versions: 20

Compression:

Stored size: 825 Bytes

Contents

FoodGroup.class_eval do
  data_miner do
    import "a list of food groups and their emissions intensities",
           :url => 'http://static.brighterplanet.com/science/data/consumables/diets/food_groups.csv' do
      key   'name'
      store 'intensity', :units => :grams_per_kilocalorie #FIXME TODO make sure diet expects kg / joule and then do :from_units => :grams_per_kilocalorie, :to_units => :kilograms_per_joule
    end
    
    import "energy and units",
           :url => 'http://spreadsheets.google.com/pub?key=trkBEq5oFnUQE76gQ6VpQgw&gid=0&output=csv' do
      key   'name'
      store 'energy', :units => 'unknown' #FIXME this needs to be "kilocalories per" and then whatever the suggested imperial measurement is
      store 'suggested_imperial_measurement', :field_name => 'friendly_units'
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
earth-0.11.8 lib/earth/diet/food_group/data_miner.rb
earth-0.11.7 lib/earth/diet/food_group/data_miner.rb
earth-0.11.6 lib/earth/diet/food_group/data_miner.rb
earth-0.11.5 lib/earth/diet/food_group/data_miner.rb
earth-0.11.4 lib/earth/diet/food_group/data_miner.rb
earth-0.11.3 lib/earth/diet/food_group/data_miner.rb
earth-0.11.2 lib/earth/diet/food_group/data_miner.rb
earth-0.11.1 lib/earth/diet/food_group/data_miner.rb
earth-0.11.0 lib/earth/diet/food_group/data_miner.rb
earth-0.7.0 lib/earth/diet/food_group/data_miner.rb
earth-0.6.6 lib/earth/diet/food_group/data_miner.rb
earth-0.6.5 lib/earth/diet/food_group/data_miner.rb
earth-0.6.4 lib/earth/diet/food_group/data_miner.rb
earth-0.6.3 lib/earth/diet/food_group/data_miner.rb
earth-0.6.2 lib/earth/diet/food_group/data_miner.rb
earth-0.6.1 lib/earth/diet/food_group/data_miner.rb
earth-0.6.0 lib/earth/diet/food_group/data_miner.rb
earth-0.5.4 lib/earth/diet/food_group/data_miner.rb
earth-0.5.3 lib/earth/diet/food_group/data_miner.rb
earth-0.5.2 lib/earth/diet/food_group/data_miner.rb