Sha256: 24175e48aa688f799317e8d85dd1932946a821b93b6f709ee92d7a89ddda2f5c

Contents?: true

Size: 669 Bytes

Versions: 5

Compression:

Stored size: 669 Bytes

Contents

require 'earth/industry/naics_2002'
require 'earth/industry/sic_1987'

Naics2002Sic1987Concordance.class_eval do
  data_miner do
    import "the US Census SIC 1987 to NAICS 2002 concordance",
           :url => 'http://www.census.gov/eos/www/naics/concordances/1987_SIC_to_2002_NAICS.xls',
           :select => lambda {|row| row['SIC'].to_i > 0} do
      key 'row_hash'
      store 'naics_2002_code', :synthesize => lambda { |row| "%06d" % row['2002 NAICS'].to_i }
      store 'sic_1987_code',   :synthesize => lambda { |row| "%04d" % row['SIC'].to_i }
      store 'sic_note', :synthesize => lambda { |row| extract_note row['SIC Title (and note)'] }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
earth-0.11.16 lib/earth/industry/naics_2002_sic_1987_concordance/data_miner.rb
earth-0.11.15 lib/earth/industry/naics_2002_sic_1987_concordance/data_miner.rb
earth-0.11.14 lib/earth/industry/naics_2002_sic_1987_concordance/data_miner.rb
earth-0.11.13 lib/earth/industry/naics_2002_sic_1987_concordance/data_miner.rb
earth-0.11.12 lib/earth/industry/naics_2002_sic_1987_concordance/data_miner.rb