lib/earth/locality/country/data_miner.rb in earth-0.11.7 vs lib/earth/locality/country/data_miner.rb in earth-0.11.8

- old
+ new

@@ -1,5 +1,9 @@ +require 'earth/automobile/data_miner' +require 'earth/hospitality/data_miner' +require 'earth/rail/data_miner' + Country.class_eval do data_miner do # http://www.iso.org/iso/list-en1-semic-3.txt # http://unstats.un.org/unsd/methods/m49/m49alpha.htm import "OpenGeoCode.org's Country Codes to Country Names list", @@ -80,10 +84,10 @@ EgridSubregion.run_data_miner! end process "Derive average US electricity emission factor from eGRID" do us = united_states - subregion = EgridSubregion.find_by_abbreviation 'US' + subregion = EgridSubregion.fallback us.electricity_emission_factor = ( subregion.electricity_co2_emission_factor + subregion.electricity_ch4_emission_factor + subregion.electricity_n2o_emission_factor