Sha256: 8fdb0edf8e4c53b39e4097537ba19ff140c9f39c7b6cff2b7112302f8322c186

Contents?: true

Size: 1.3 KB

Versions: 28

Compression:

Stored size: 1.3 KB

Contents

ZipCode.class_eval do
  data_miner do
    schema Earth.database_options do
      string   'name'
      string   'state_postal_abbreviation'
      string   'description'
      string   'latitude'
      string   'longitude'
      string   'egrid_subregion_abbreviation'
      string   'climate_division_name'
    end
    
    import 'the Mapping Hacks zipcode database',
           :url => 'http://mappinghacks.com/data/zipcode.zip',
           :filename => 'zipcode.csv' do
      key   'name', :field_name => 'zip', :sprintf => '%05d'
      store 'state_postal_abbreviation', :field_name => 'state'
      store 'description', :field_name => 'city'
      store 'latitude'
      store 'longitude'
    end
    
    import 'a list of zipcodes and eGRID Subregions',
           :url => 'http://static.brighterplanet.com/science/data/electricity/egrid/models_export/zip_subregions.csv' do
      key   'name', :field_name => 'zip', :sprintf => '%05d'
      store 'egrid_subregion_abbreviation', :field_name => 'primary_subregion'
    end
    
    import 'a list of zipcodes and Climate Divisions',
           :url => 'http://static.brighterplanet.com/science/data/geography/zip_code_name-climate_division_name.csv' do
      key   'name', :field_name => 'zip_code_name', :sprintf => '%05d'
      store 'climate_division_name'
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
earth-0.1.2 lib/earth/locality/zip_code/data_miner.rb
earth-0.1.1 lib/earth/locality/zip_code/data_miner.rb
earth-0.1.0 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.43 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.42 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.41 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.40 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.39 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.38 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.37 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.36 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.35 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.34 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.33 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.32 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.31 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.30 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.29 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.28 lib/earth/locality/zip_code/data_miner.rb
earth-0.0.27 lib/earth/locality/zip_code/data_miner.rb