lib/earth/locality/country.rb in earth-0.4.6 vs lib/earth/locality/country.rb in earth-0.4.7

- old
+ new

@@ -1,8 +1,18 @@ class Country < ActiveRecord::Base set_primary_key :iso_3166_code - falls_back_on :flight_route_inefficiency_factor => 1.10 # for international flights - this is the larger (European) factor from Kettunen et al. (2005) http://www.atmseminar.org/seminarContent/seminar6/papers/p_055_MPM.pdf + falls_back_on :name => 'fallback', + :automobile_urbanity => lambda { Country.united_states.automobile_urbanity }, # for now assume US represents world + :automobile_fuel_efficiency => ((22.5 + 16.2) / 2.0).miles_per_gallon.to(:kilometres_per_litre), # average of passenger car fuel unknown and light goods vehicle fuel unknown - WRI Mobile Combustion calculation tool v2.0 + :automobile_fuel_efficiency_units => 'kilometres_per_litre', + :automobile_city_speed => lambda { Country.united_states.automobile_city_speed }, # for now assume US represents world + :automobile_city_speed_units => lambda { Country.united_states.automobile_city_speed_units }, # for now assume US represents world + :automobile_highway_speed => lambda { Country.united_states.automobile_highway_speed }, # for now assume US represents world + :automobile_highway_speed_units => lambda { Country.united_states.automobile_highway_speed_units }, # for now assume US represents world + :automobile_trip_distance => lambda { Country.united_states.automobile_trip_distance }, # for now assume US represents world + :automobile_trip_distance_units => lambda { Country.united_states.automobile_trip_distance_units }, # for now assume US represents world + :flight_route_inefficiency_factor => lambda { Country.maximum(:flight_route_inefficiency_factor) } # default to the largest inefficiency factor data_miner do tap "Brighter Planet's sanitized countries list", Earth.taps_server end