Sha256: 45c6bb20ca47d9b87a60a4345cb5f3ede5ef33c02a7ce098a73082e28f0354e4

Contents?: true

Size: 824 Bytes

Versions: 25

Compression:

Stored size: 824 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

25 entries across 25 versions & 1 rubygems

Version Path
earth-1.2.1 lib/earth/diet/food_group/data_miner.rb
earth-1.1.2 lib/earth/diet/food_group/data_miner.rb
earth-1.1.1 lib/earth/diet/food_group/data_miner.rb
earth-1.1.0 lib/earth/diet/food_group/data_miner.rb
earth-1.0.3 lib/earth/diet/food_group/data_miner.rb
earth-1.0.2 lib/earth/diet/food_group/data_miner.rb
earth-1.0.1 lib/earth/diet/food_group/data_miner.rb
earth-1.0.0 lib/earth/diet/food_group/data_miner.rb
earth-0.12.4 lib/earth/diet/food_group/data_miner.rb
earth-0.12.3 lib/earth/diet/food_group/data_miner.rb
earth-0.12.2 lib/earth/diet/food_group/data_miner.rb
earth-0.12.1 lib/earth/diet/food_group/data_miner.rb
earth-0.12.0 lib/earth/diet/food_group/data_miner.rb
earth-0.11.20 lib/earth/diet/food_group/data_miner.rb
earth-0.11.19 lib/earth/diet/food_group/data_miner.rb
earth-0.11.18 lib/earth/diet/food_group/data_miner.rb
earth-0.11.17 lib/earth/diet/food_group/data_miner.rb
earth-0.11.16 lib/earth/diet/food_group/data_miner.rb
earth-0.11.15 lib/earth/diet/food_group/data_miner.rb
earth-0.11.14 lib/earth/diet/food_group/data_miner.rb