Sha256: a737ae56cc657c436ed46a65a6f9bdf5a35687891381aac0968eee713fc30f5a

Contents?: true

Size: 870 Bytes

Versions: 23

Compression:

Stored size: 870 Bytes

Contents

Species.class_eval do
  data_miner do
    import "a list of pet species weights, dietary requirements, and diet emissions intensities",
           :url => 'http://static.brighterplanet.com/science/data/consumables/pets/species.csv' do
      key 'name', :field_name => 'species'
      store 'population'
      store 'weight', :from_units => :pounds, :to_units => :kilograms
      store 'marginal_dietary_requirement', :from_units => :kilocalories_per_pound, :to_units => :joules_per_kilogram
      store 'fixed_dietary_requirement', :from_units => :kilocalories, :to_units => :joules
      store 'diet_emission_intensity', :from_units => :grams_per_kilocalorie, :to_units => :kilograms_per_joule
      store 'minimum_weight', :from_units => :pounds, :to_units => :kilograms
      store 'maximum_weight', :from_units => :pounds, :to_units => :kilograms
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

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