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.2.3 lib/earth/locality/census_region/data_miner.rb
earth-0.2.2 lib/earth/locality/census_region/data_miner.rb
earth-0.2.1 lib/earth/locality/census_region/data_miner.rb
earth-0.2.0 lib/earth/locality/census_region/data_miner.rb
earth-0.1.4 lib/earth/locality/census_region/data_miner.rb
earth-0.1.3 lib/earth/locality/census_region/data_miner.rb
earth-0.1.2 lib/earth/locality/census_region/data_miner.rb
earth-0.1.1 lib/earth/locality/census_region/data_miner.rb
earth-0.1.0 lib/earth/locality/census_region/data_miner.rb
earth-0.0.43 lib/earth/locality/census_region/data_miner.rb
earth-0.0.42 lib/earth/locality/census_region/data_miner.rb
earth-0.0.41 lib/earth/locality/census_region/data_miner.rb
earth-0.0.40 lib/earth/locality/census_region/data_miner.rb
earth-0.0.39 lib/earth/locality/census_region/data_miner.rb
earth-0.0.38 lib/earth/locality/census_region/data_miner.rb
earth-0.0.37 lib/earth/locality/census_region/data_miner.rb
earth-0.0.36 lib/earth/locality/census_region/data_miner.rb
earth-0.0.35 lib/earth/locality/census_region/data_miner.rb
earth-0.0.34 lib/earth/locality/census_region/data_miner.rb
earth-0.0.33 lib/earth/locality/census_region/data_miner.rb