Sha256: 29bee5680f4ff6859846a7e2f4459d42a8d5067a7a539e9d41479ed673c6fb54

Contents?: true

Size: 857 Bytes

Versions: 21

Compression:

Stored size: 857 Bytes

Contents

Country.class_eval do
  data_miner do
    schema Earth.database_options do
      string 'iso_3166_code'
      string 'name'
      float  'flight_route_inefficiency_factor'
    end
    
    import 'the official ISO country list',
           :url => 'http://www.iso.org/iso/list-en1-semic-3.txt',
           :skip => 2,
           :headers => false,
           :delimiter => ';',
           :encoding => 'ISO-8859-1' do
      key   'iso_3166_code', :field_number => 1
      store 'name', :field_number => 0
    end
    
    import 'country-specific flight route inefficiency factors derived from Ketteunen et al. (2005)',
           :url => 'https://spreadsheets.google.com/pub?key=0AoQJbWqPrREqdG0yc3BxYUkybWV5M3RKb2t4X0JUOFE&hl=en&single=true&gid=0&output=csv' do
      key   'iso_3166_code'
      store 'flight_route_inefficiency_factor'
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
earth-0.3.11 lib/earth/locality/country/data_miner.rb
earth-0.3.10 lib/earth/locality/country/data_miner.rb
earth-0.3.9 lib/earth/locality/country/data_miner.rb
earth-0.3.8 lib/earth/locality/country/data_miner.rb
earth-0.3.7 lib/earth/locality/country/data_miner.rb
earth-0.3.6 lib/earth/locality/country/data_miner.rb
earth-0.3.5 lib/earth/locality/country/data_miner.rb
earth-0.3.4 lib/earth/locality/country/data_miner.rb
earth-0.3.3 lib/earth/locality/country/data_miner.rb
earth-0.3.2 lib/earth/locality/country/data_miner.rb
earth-0.3.1 lib/earth/locality/country/data_miner.rb
earth-0.3.0 lib/earth/locality/country/data_miner.rb
earth-0.2.14 lib/earth/locality/country/data_miner.rb
earth-0.2.13 lib/earth/locality/country/data_miner.rb
earth-0.2.12 lib/earth/locality/country/data_miner.rb
earth-0.2.11 lib/earth/locality/country/data_miner.rb
earth-0.2.9 lib/earth/locality/country/data_miner.rb
earth-0.2.8 lib/earth/locality/country/data_miner.rb
earth-0.2.7 lib/earth/locality/country/data_miner.rb
earth-0.2.6 lib/earth/locality/country/data_miner.rb