Sha256: 49fa35095ee54ee611a8a8343ce4c2d03c52716b360b22fd19a7b93f2961ea90

Contents?: true

Size: 832 Bytes

Versions: 5

Compression:

Stored size: 832 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 Kettunen et al. (2005)",
           :url => 'https://spreadsheets.google.com/pub?key=0AoQJbWqPrREqdEJoRVBZaGhnUmlhX240VXE3X0F3WkE&output=csv' do
      key   'iso_3166_code'
      store 'flight_route_inefficiency_factor'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
earth-0.4.4 lib/earth/locality/country/data_miner.rb
earth-0.4.3 lib/earth/locality/country/data_miner.rb
earth-0.4.2 lib/earth/locality/country/data_miner.rb
earth-0.4.1 lib/earth/locality/country/data_miner.rb
earth-0.4.0 lib/earth/locality/country/data_miner.rb