Sha256: 5c801619b48b045ba4c6fb34c61ea10c4fef05a60c989130b9febc10ff8a2cec

Contents?: true

Size: 928 Bytes

Versions: 8

Compression:

Stored size: 928 Bytes

Contents

ElectricMarket.class_eval do
  data_miner do
    import 'IOU markets',
           :url => 'http://en.openei.org/datasets/files/899/pub/iou_zipcodes.csv',
           :errata => { :url => "file://#{Earth::ERRATA_DIR}/electricity/electric_market/nrel_errata.csv" } do
      key 'id', :synthesize => proc { |row| row['compid'].to_i.to_s + '-' + row['zip'] }
      store 'zip_code_name', :field_name => 'zip'
      store 'electric_utility_eia_id', :field_name => 'compid'
    end
    
    import 'Non-IOU markets',
           :url => 'http://en.openei.org/datasets/files/899/pub/non-iou_zipcodes.csv',
           :errata => { :url => "file://#{Earth::ERRATA_DIR}/electricity/electric_market/nrel_errata.csv" } do
      key 'id', :synthesize => proc { |row| row['compid'].to_i.to_s + '-' + row['zip'] }
      store 'zip_code_name', :field_name => 'zip'
      store 'electric_utility_eia_id', :field_name => 'compid'
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
earth-1.2.1 lib/earth/electricity/electric_market/data_miner.rb
earth-1.1.2 lib/earth/electricity/electric_market/data_miner.rb
earth-1.1.1 lib/earth/electricity/electric_market/data_miner.rb
earth-1.1.0 lib/earth/electricity/electric_market/data_miner.rb
earth-1.0.3 lib/earth/electricity/electric_market/data_miner.rb
earth-1.0.2 lib/earth/electricity/electric_market/data_miner.rb
earth-1.0.1 lib/earth/electricity/electric_market/data_miner.rb
earth-1.0.0 lib/earth/electricity/electric_market/data_miner.rb