Sha256: e094606871d93736622fbdd93dda71ca08024e519ca3082226fb5feea03911e0

Contents?: true

Size: 952 Bytes

Versions: 28

Compression:

Stored size: 952 Bytes

Contents

Breed.class_eval do
  data_miner do
    import "Brighter Planet's list of cat and dog breeds",
           :url => 'http://static.brighterplanet.com/science/data/consumables/pets/breed_genders.csv',
           :encoding => 'ISO-8859-1',
           :select => lambda { |row| row['gender'].blank? } do
      key 'name'
      store 'species_name', :field_name => 'species'
      store 'weight', :from_units => :pounds, :to_units => :kilograms
    end
    
    import "a list of horse breeds", :url => 'http://www.freebase.com/type/exporttypeinstances/base/horses/horse_breed?page=0&filter_mode=type&filter_view=table&show%01p%3D%2Ftype%2Fobject%2Fname%01index=0&show%01p%3D%2Fcommon%2Ftopic%2Fimage%01index=1&show%01p%3D%2Fcommon%2Ftopic%2Farticle%01index=2&sort%01p%3D%2Ftype%2Fobject%2Ftype%01p%3Dlink%01p%3D%2Ftype%2Flink%2Ftimestamp%01index=false&=&exporttype=csv-8' do
      key 'name'
      store 'species_name', :static => 'horse'
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
earth-0.11.16 lib/earth/pet/breed/data_miner.rb
earth-0.11.15 lib/earth/pet/breed/data_miner.rb
earth-0.11.14 lib/earth/pet/breed/data_miner.rb
earth-0.11.13 lib/earth/pet/breed/data_miner.rb
earth-0.11.12 lib/earth/pet/breed/data_miner.rb
earth-0.11.11 lib/earth/pet/breed/data_miner.rb
earth-0.11.10 lib/earth/pet/breed/data_miner.rb
earth-0.11.9 lib/earth/pet/breed/data_miner.rb
earth-0.11.8 lib/earth/pet/breed/data_miner.rb
earth-0.11.7 lib/earth/pet/breed/data_miner.rb
earth-0.11.6 lib/earth/pet/breed/data_miner.rb
earth-0.11.5 lib/earth/pet/breed/data_miner.rb
earth-0.11.4 lib/earth/pet/breed/data_miner.rb
earth-0.11.3 lib/earth/pet/breed/data_miner.rb
earth-0.11.2 lib/earth/pet/breed/data_miner.rb
earth-0.11.1 lib/earth/pet/breed/data_miner.rb
earth-0.11.0 lib/earth/pet/breed/data_miner.rb
earth-0.7.0 lib/earth/pet/breed/data_miner.rb
earth-0.6.6 lib/earth/pet/breed/data_miner.rb
earth-0.6.5 lib/earth/pet/breed/data_miner.rb