Sha256: 36f8956657231866cdc39d18a8b9bce05bc0999add5a0402761b3e0fcd962ae5

Contents?: true

Size: 508 Bytes

Versions: 74

Compression:

Stored size: 508 Bytes

Contents

CensusRegion.class_eval do
  data_miner do
    schema Earth.database_options do
      integer  'number'
      string   'name'
    end
    
    import 'the U.S. Census Geographic Terms and Definitions',
           :url => 'http://www.census.gov/popest/geographic/codes02.csv',
           :skip => 9,
           :select => lambda { |row| row['Region'].to_i > 0 and row['Division'].to_s.strip == 'X'} do
      key   'number', :field_name => 'Region'
      store 'name', :field_name => 'Name'
    end
  end
end

Version data entries

74 entries across 74 versions & 2 rubygems

Version Path
earth-0.5.0 lib/earth/locality/census_region/data_miner.rb
earth-0.4.12 lib/earth/locality/census_region/data_miner.rb
earth-0.4.11 lib/earth/locality/census_region/data_miner.rb
earth-0.4.10 lib/earth/locality/census_region/data_miner.rb
earth-0.4.9 lib/earth/locality/census_region/data_miner.rb
earth-0.4.8 lib/earth/locality/census_region/data_miner.rb
earth-0.4.7 lib/earth/locality/census_region/data_miner.rb
earth-0.4.6 lib/earth/locality/census_region/data_miner.rb
earth-0.4.5 lib/earth/locality/census_region/data_miner.rb
earth-0.4.4 lib/earth/locality/census_region/data_miner.rb
earth-0.4.3 lib/earth/locality/census_region/data_miner.rb
earth-0.4.2 lib/earth/locality/census_region/data_miner.rb
earth-0.4.1 lib/earth/locality/census_region/data_miner.rb
earth-0.4.0 lib/earth/locality/census_region/data_miner.rb
earth-0.3.15 lib/earth/locality/census_region/data_miner.rb
earth-0.3.14 lib/earth/locality/census_region/data_miner.rb
earth-0.3.13 lib/earth/locality/census_region/data_miner.rb
earth-0.3.11 lib/earth/locality/census_region/data_miner.rb
earth-0.3.10 lib/earth/locality/census_region/data_miner.rb
earth-0.3.9 lib/earth/locality/census_region/data_miner.rb