Sha256: bcc9118b93efbdb8c037ce69296a2e079eed09688faf4f0bb31ff2d6dd32d60f

Contents?: true

Size: 841 Bytes

Versions: 20

Compression:

Stored size: 841 Bytes

Contents

CensusDivision.class_eval do
  data_miner do
    schema Earth.database_options do
      integer  'number'
      string   'name'
      string   'census_region_name'
      integer  'census_region_number'
    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['Division'].to_s.strip != 'X' and row['FIPS CODE STATE'].to_s.strip == 'X'} do
      key   'number', :field_name => 'Division'
      store 'name', :field_name => 'Name'
      store 'census_region_number', :field_name => 'Region'
      store 'census_region_name', :field_name => 'Region', :dictionary => { :input => 'number', :output => 'name', :url => 'http://data.brighterplanet.com/census_regions.csv' }
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
earth-0.0.38 lib/earth/locality/census_division/data_miner.rb
earth-0.0.37 lib/earth/locality/census_division/data_miner.rb
earth-0.0.36 lib/earth/locality/census_division/data_miner.rb
earth-0.0.35 lib/earth/locality/census_division/data_miner.rb
earth-0.0.34 lib/earth/locality/census_division/data_miner.rb
earth-0.0.33 lib/earth/locality/census_division/data_miner.rb
earth-0.0.32 lib/earth/locality/census_division/data_miner.rb
earth-0.0.31 lib/earth/locality/census_division/data_miner.rb
earth-0.0.30 lib/earth/locality/census_division/data_miner.rb
earth-0.0.29 lib/earth/locality/census_division/data_miner.rb
earth-0.0.28 lib/earth/locality/census_division/data_miner.rb
earth-0.0.27 lib/earth/locality/census_division/data_miner.rb
earth-0.0.26 lib/earth/locality/census_division/data_miner.rb
earth-0.0.24 lib/earth/locality/census_division/data_miner.rb
earth-0.0.23 lib/earth/locality/census_division/data_miner.rb
earth-0.0.22 lib/earth/locality/census_division/data_miner.rb
earth-0.0.21 lib/earth/locality/census_division/data_miner.rb
earth-0.0.20 lib/earth/locality/census_division/data_miner.rb
earth-0.0.19 lib/earth/locality/census_division/data_miner.rb
earth-0.0.18 lib/earth/locality/census_division/data_miner.rb