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