earth 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- data/earth.gemspec +1 -1
- data/lib/earth/air/aircraft_class.rb +6 -9
- data/lib/earth/air/flight_segment.rb +3 -3
- data/lib/earth/air/flight_segment/data_miner.rb +2 -2
- data/lib/earth/automobile/automobile_fuel.rb +6 -6
- data/lib/earth/automobile/automobile_fuel/data_miner.rb +5 -5
- data/lib/earth/automobile/automobile_make_model_year_variant/data_miner.rb +3 -3
- data/lib/earth/automobile/automobile_type_fuel_age/data_miner.rb +2 -2
- data/lib/earth/automobile/automobile_type_fuel_year/data_miner.rb +3 -3
- data/lib/earth/automobile/automobile_type_fuel_year_age/data_miner.rb +2 -2
- data/lib/earth/automobile/automobile_type_year/data_miner.rb +1 -1
- data/lib/earth/bus/bus_fuel/data_miner.rb +7 -7
- data/lib/earth/bus/bus_fuel_control/data_miner.rb +2 -2
- data/lib/earth/fuel/fuel/data_miner.rb +5 -5
- data/lib/earth/fuel/fuel_year/data_miner.rb +6 -6
- data/lib/earth/hospitality/lodging_class/data_miner.rb +6 -6
- data/lib/earth/industry/industry.rb +1 -1
- data/lib/earth/industry/industry_product.rb +1 -1
- data/lib/earth/industry/merchant_category.rb +1 -1
- data/lib/earth/industry/product_line.rb +1 -1
- data/lib/earth/industry/sector.rb +1 -1
- data/lib/earth/locality/country/data_miner.rb +4 -4
- data/lib/earth/pet/species.rb +3 -3
- data/lib/earth/residence/residential_energy_consumption_survey_response/data_miner.rb +5 -5
- data/lib/earth/version.rb +1 -1
- metadata +46 -46
data/earth.gemspec
CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |s|
|
|
36
36
|
s.add_runtime_dependency 'fixed_width-multibyte'
|
37
37
|
s.add_runtime_dependency 'geokit-rails'
|
38
38
|
s.add_runtime_dependency 'loose_tight_dictionary', '>=0.2.3'
|
39
|
-
s.add_runtime_dependency 'weighted_average', '>=1'
|
39
|
+
s.add_runtime_dependency 'weighted_average', '>=1.0.1'
|
40
40
|
s.add_runtime_dependency 'mini_record-compat' # need https://github.com/DAddYE/mini_record/pull/7
|
41
41
|
s.add_runtime_dependency 'activesupport'
|
42
42
|
s.add_runtime_dependency 'activerecord'
|
@@ -28,10 +28,10 @@ class AircraftClass < ActiveRecord::Base
|
|
28
28
|
AircraftFuelUseEquation.run_data_miner!
|
29
29
|
find_each do |aircraft_class|
|
30
30
|
cumulative_passengers = 0
|
31
|
-
aircraft_class.m3 = 0
|
32
|
-
aircraft_class.m2 = 0
|
33
|
-
aircraft_class.m1 = 0
|
34
|
-
aircraft_class.b = 0
|
31
|
+
aircraft_class.m3 = 0.0
|
32
|
+
aircraft_class.m2 = 0.0
|
33
|
+
aircraft_class.m1 = 0.0
|
34
|
+
aircraft_class.b = 0.0
|
35
35
|
|
36
36
|
aircraft_class.aircraft.where('passengers > 0 AND fuel_use_code IS NOT NULL').each do |a|
|
37
37
|
cumulative_passengers += a.passengers
|
@@ -50,13 +50,10 @@ class AircraftClass < ActiveRecord::Base
|
|
50
50
|
|
51
51
|
aircraft_class.seats = aircraft_class.aircraft.weighted_average(:seats, :weighted_by => :passengers)
|
52
52
|
|
53
|
-
aircraft_class.m3_units = 'kilograms_per_cubic_nautical_mile'
|
54
|
-
aircraft_class.m2_units = 'kilograms_per_square_nautical_mile'
|
55
|
-
aircraft_class.m1_units = 'kilograms_per_nautical_mile'
|
56
|
-
aircraft_class.b_units = 'kilograms'
|
57
|
-
|
58
53
|
aircraft_class.save!
|
59
54
|
end
|
55
|
+
|
56
|
+
update_all :m3_units => 'kilograms_per_cubic_nautical_mile', :m2_units => 'kilograms_per_square_nautical_mile', :m1_units => 'kilograms_per_nautical_mile', :b_units => 'kilograms'
|
60
57
|
end
|
61
58
|
end
|
62
59
|
end
|
@@ -62,17 +62,17 @@ class FlightSegment < ActiveRecord::Base
|
|
62
62
|
|
63
63
|
def self.update_averages!
|
64
64
|
# Derive load factor, which is passengers divided by available seats
|
65
|
-
update_all 'load_factor = passengers / seats', 'seats > 0'
|
65
|
+
update_all 'load_factor = 1.0 * passengers / seats', 'seats > 0'
|
66
66
|
|
67
67
|
# Assume a load factor of 1 where passengers > available seats
|
68
68
|
update_all 'load_factor = 1', 'passengers > seats AND seats > 0'
|
69
69
|
|
70
70
|
# TODO: what is 90.718474
|
71
71
|
# Derive freight share as a fraction of the total weight carried
|
72
|
-
update_all 'freight_share = (freight + mail) / (freight + mail + (passengers * 90.718474))', '(freight + mail + passengers) > 0'
|
72
|
+
update_all 'freight_share = 1.0 * (freight + mail) / (freight + mail + (passengers * 90.718474))', '(freight + mail + passengers) > 0'
|
73
73
|
|
74
74
|
# Derive average seats per flight
|
75
|
-
update_all 'seats_per_flight = seats / flights', 'flights > 0'
|
75
|
+
update_all 'seats_per_flight = 1.0 * seats / flights', 'flights > 0'
|
76
76
|
|
77
77
|
# Add a useful date field
|
78
78
|
update_all %{approximate_date = DATE(year || '-' || month || '-' || '14')}, 'month IS NOT NULL'
|
@@ -172,7 +172,7 @@ FlightSegment.class_eval do
|
|
172
172
|
def self.form_data_per_month(year_range)
|
173
173
|
months = {}
|
174
174
|
year_range.each do |year|
|
175
|
-
(1..
|
175
|
+
(1..1).each do |month|
|
176
176
|
time = ::Time.gm year, month
|
177
177
|
form_data = FORM_DATA.dup
|
178
178
|
form_data.gsub! '__YEAR__', time.year.to_s
|
@@ -185,7 +185,7 @@ FlightSegment.class_eval do
|
|
185
185
|
end
|
186
186
|
|
187
187
|
data_miner do
|
188
|
-
form_data_per_month(2009..
|
188
|
+
form_data_per_month(2009..2009).each do |month, form_data|
|
189
189
|
import "T100 flight segment data for #{month.strftime('%B %Y')}",
|
190
190
|
:url => URL,
|
191
191
|
:form_data => form_data,
|
@@ -83,12 +83,12 @@ class AutomobileFuel < ActiveRecord::Base
|
|
83
83
|
latest_year = AutomobileTypeFuelYear.maximum('year')
|
84
84
|
gas_use = AutomobileTypeFuelYear.where(:year => latest_year, :fuel_common_name => 'gasoline').sum('fuel_consumption')
|
85
85
|
diesel_use = AutomobileTypeFuelYear.where(:year => latest_year, :fuel_common_name => 'diesel').sum('fuel_consumption')
|
86
|
-
diesel_use / (gas_use + diesel_use)
|
86
|
+
diesel_use.to_f / (gas_use + diesel_use)
|
87
87
|
end
|
88
88
|
|
89
89
|
def fallback_co2_emission_factor
|
90
|
-
(Fuel.find_by_name("Motor Gasoline").co2_emission_factor * (1 - AutomobileFuel.fallback_blend_portion)) +
|
91
|
-
(Fuel.find_by_name("Distillate Fuel Oil No. 2").co2_emission_factor * AutomobileFuel.fallback_blend_portion)
|
90
|
+
(Fuel.find_by_name("Motor Gasoline").co2_emission_factor.to_f * (1 - AutomobileFuel.fallback_blend_portion)) +
|
91
|
+
(Fuel.find_by_name("Distillate Fuel Oil No. 2").co2_emission_factor.to_f * AutomobileFuel.fallback_blend_portion)
|
92
92
|
end
|
93
93
|
|
94
94
|
def fallback_co2_emission_factor_units
|
@@ -109,7 +109,7 @@ class AutomobileFuel < ActiveRecord::Base
|
|
109
109
|
end
|
110
110
|
|
111
111
|
def fallback_ch4_emission_factor
|
112
|
-
fallback_latest_type_fuel_years.weighted_average(:ch4_emission_factor, :weighted_by => :total_travel) * GreenhouseGas[:ch4].global_warming_potential
|
112
|
+
fallback_latest_type_fuel_years.weighted_average(:ch4_emission_factor, :weighted_by => :total_travel).to_f * GreenhouseGas[:ch4].global_warming_potential
|
113
113
|
end
|
114
114
|
|
115
115
|
def fallback_ch4_emission_factor_units
|
@@ -119,7 +119,7 @@ class AutomobileFuel < ActiveRecord::Base
|
|
119
119
|
end
|
120
120
|
|
121
121
|
def fallback_n2o_emission_factor
|
122
|
-
fallback_latest_type_fuel_years.weighted_average(:n2o_emission_factor, :weighted_by => :total_travel) * GreenhouseGas[:n2o].global_warming_potential
|
122
|
+
fallback_latest_type_fuel_years.weighted_average(:n2o_emission_factor, :weighted_by => :total_travel).to_f * GreenhouseGas[:n2o].global_warming_potential
|
123
123
|
end
|
124
124
|
|
125
125
|
def fallback_n2o_emission_factor_units
|
@@ -130,7 +130,7 @@ class AutomobileFuel < ActiveRecord::Base
|
|
130
130
|
|
131
131
|
def fallback_hfc_emission_factor
|
132
132
|
fallback_latest_type_fuel_years.map do |tfy|
|
133
|
-
tfy.total_travel * tfy.type_year.hfc_emission_factor
|
133
|
+
tfy.total_travel.to_f * tfy.type_year.hfc_emission_factor
|
134
134
|
end.sum / fallback_latest_type_fuel_years.sum('total_travel')
|
135
135
|
end
|
136
136
|
|
@@ -39,8 +39,8 @@ AutomobileFuel.class_eval do
|
|
39
39
|
process "Derive co2 emission factor and co2 biogenic emission factors" do
|
40
40
|
find_each do |record|
|
41
41
|
if record.blend_fuel.present?
|
42
|
-
record.co2_emission_factor = (record.base_fuel.co2_emission_factor * (1 - record.blend_portion)) + (record.blend_fuel.co2_emission_factor * record.blend_portion)
|
43
|
-
record.co2_biogenic_emission_factor = (record.base_fuel.co2_biogenic_emission_factor * (1 - record.blend_portion)) + (record.blend_fuel.co2_biogenic_emission_factor * record.blend_portion)
|
42
|
+
record.co2_emission_factor = (record.base_fuel.co2_emission_factor.to_f * (1 - record.blend_portion)) + (record.blend_fuel.co2_emission_factor.to_f * record.blend_portion)
|
43
|
+
record.co2_biogenic_emission_factor = (record.base_fuel.co2_biogenic_emission_factor.to_f * (1 - record.blend_portion)) + (record.blend_fuel.co2_biogenic_emission_factor.to_f * record.blend_portion)
|
44
44
|
else
|
45
45
|
record.co2_emission_factor = record.base_fuel.co2_emission_factor
|
46
46
|
record.co2_biogenic_emission_factor = record.base_fuel.co2_biogenic_emission_factor
|
@@ -55,18 +55,18 @@ AutomobileFuel.class_eval do
|
|
55
55
|
find_each do |record|
|
56
56
|
scope = record.type_fuel_years.where(:year => record.type_fuel_years.maximum('year'))
|
57
57
|
|
58
|
-
record.ch4_emission_factor = scope.weighted_average(:ch4_emission_factor, :weighted_by => :total_travel) * GreenhouseGas[:ch4].global_warming_potential
|
58
|
+
record.ch4_emission_factor = scope.weighted_average(:ch4_emission_factor, :weighted_by => :total_travel).to_f * GreenhouseGas[:ch4].global_warming_potential
|
59
59
|
ch4_prefix = scope.first.ch4_emission_factor_units.split("_per_")[0]
|
60
60
|
ch4_suffix = scope.first.ch4_emission_factor_units.split("_per_")[1]
|
61
61
|
record.ch4_emission_factor_units = ch4_prefix + "_co2e_per_" + ch4_suffix
|
62
62
|
|
63
|
-
record.n2o_emission_factor = scope.weighted_average(:n2o_emission_factor, :weighted_by => :total_travel) * GreenhouseGas[:n2o].global_warming_potential
|
63
|
+
record.n2o_emission_factor = scope.weighted_average(:n2o_emission_factor, :weighted_by => :total_travel).to_f * GreenhouseGas[:n2o].global_warming_potential
|
64
64
|
n2o_prefix = scope.first.n2o_emission_factor_units.split("_per_")[0]
|
65
65
|
n2o_suffix = scope.first.n2o_emission_factor_units.split("_per_")[1]
|
66
66
|
record.n2o_emission_factor_units = n2o_prefix + "_co2e_per_" + n2o_suffix
|
67
67
|
|
68
68
|
record.hfc_emission_factor = scope.map do |tfy|
|
69
|
-
tfy.total_travel * tfy.type_year.hfc_emission_factor
|
69
|
+
tfy.total_travel.to_f * tfy.type_year.hfc_emission_factor
|
70
70
|
end.sum / scope.sum('total_travel')
|
71
71
|
record.hfc_emission_factor_units = scope.first.type_year.hfc_emission_factor_units
|
72
72
|
|
@@ -415,15 +415,15 @@ AutomobileMakeModelYearVariant.class_eval do
|
|
415
415
|
# Note: need to divide by 0.425143707 b/c equation is designed for miles / gallon not km / l
|
416
416
|
# Note: EPA seems to adjust differently for plug-in hybrid electric vehicles (e.g. Leaf and Volt)
|
417
417
|
process "Calculate adjusted fuel efficiency using the latest EPA equations from EPA Fuel Economy Trends report Appendix A including conversion from miles per gallon to kilometres per litre" do
|
418
|
-
update_all 'fuel_efficiency_city = 1 / ((0.003259 / 0.425143707) + (1.1805 / raw_fuel_efficiency_city))', 'raw_fuel_efficiency_city > 0'
|
419
|
-
update_all 'fuel_efficiency_highway = 1 / ((0.001376 / 0.425143707) + (1.3466 / raw_fuel_efficiency_highway))', 'raw_fuel_efficiency_highway > 0'
|
418
|
+
update_all 'fuel_efficiency_city = 1.0 / ((0.003259 / 0.425143707) + (1.1805 / raw_fuel_efficiency_city))', 'raw_fuel_efficiency_city > 0'
|
419
|
+
update_all 'fuel_efficiency_highway = 1.0 / ((0.001376 / 0.425143707) + (1.3466 / raw_fuel_efficiency_highway))', 'raw_fuel_efficiency_highway > 0'
|
420
420
|
end
|
421
421
|
|
422
422
|
# This will be useful later for calculating MakeModel and Make fuel efficiency based on Variant
|
423
423
|
# NOTE: we use a 43/57 city/highway weighting per the latest EPA analysis of real-world driving behavior
|
424
424
|
# This results in a deviation from EPA fuel economy label values which use a historical 55/45 weighting
|
425
425
|
process "Calculate combined adjusted fuel efficiency using the latest EPA equation" do
|
426
|
-
update_all "fuel_efficiency = 1 / ((0.43 / fuel_efficiency_city) + (0.57 / fuel_efficiency_highway))"
|
426
|
+
update_all "fuel_efficiency = 1.0 / ((0.43 / fuel_efficiency_city) + (0.57 / fuel_efficiency_highway))"
|
427
427
|
end
|
428
428
|
|
429
429
|
process "Set units" do
|
@@ -123,7 +123,7 @@ AutomobileTypeFuelAge.class_eval do
|
|
123
123
|
|
124
124
|
process "Convert annual distance from miles to kilometres" do
|
125
125
|
conversion_factor = 1.miles.to(:kilometres)
|
126
|
-
update_all "annual_distance = annual_distance * #{conversion_factor}"
|
126
|
+
update_all "annual_distance = 1.0 * annual_distance * #{conversion_factor}"
|
127
127
|
update_all "annual_distance_units = 'kilometres'"
|
128
128
|
end
|
129
129
|
|
@@ -142,7 +142,7 @@ AutomobileTypeFuelAge.class_eval do
|
|
142
142
|
t1.year = #{max_year}
|
143
143
|
AND t1.type_name = #{quoted_table_name}.type_name
|
144
144
|
AND t1.fuel_common_name = #{quoted_table_name}.fuel_common_name )
|
145
|
-
* #{quoted_table_name}.total_travel_percent / #{quoted_table_name}.annual_distance
|
145
|
+
* 1.0 * #{quoted_table_name}.total_travel_percent / #{quoted_table_name}.annual_distance
|
146
146
|
}
|
147
147
|
end
|
148
148
|
end
|
@@ -52,7 +52,7 @@ AutomobileTypeFuelYear.class_eval do
|
|
52
52
|
conversion_factor = 1_000_000_000.miles.to(:kilometres)
|
53
53
|
connection.execute %{
|
54
54
|
UPDATE automobile_type_fuel_years
|
55
|
-
SET total_travel = total_travel * #{conversion_factor},
|
55
|
+
SET total_travel = 1.0 * total_travel * #{conversion_factor},
|
56
56
|
total_travel_units = 'kilometres'
|
57
57
|
WHERE total_travel_units = 'billion_miles'
|
58
58
|
}
|
@@ -76,11 +76,11 @@ AutomobileTypeFuelYear.class_eval do
|
|
76
76
|
process "Calculate CH4 and N2O emision factors from AutomobileTypeFuelYearControl and AutomobileTypeFuelControl" do
|
77
77
|
AutomobileTypeFuelYear.all.each do |record|
|
78
78
|
record.ch4_emission_factor = record.year_controls.map do |year_control|
|
79
|
-
year_control.total_travel_percent * year_control.control.ch4_emission_factor
|
79
|
+
year_control.total_travel_percent.to_f * year_control.control.ch4_emission_factor
|
80
80
|
end.sum * record.total_travel / record.fuel_consumption
|
81
81
|
|
82
82
|
record.n2o_emission_factor = record.year_controls.map do |year_control|
|
83
|
-
year_control.total_travel_percent * year_control.control.n2o_emission_factor
|
83
|
+
year_control.total_travel_percent.to_f * year_control.control.n2o_emission_factor
|
84
84
|
end.sum * record.total_travel / record.fuel_consumption
|
85
85
|
|
86
86
|
record.ch4_emission_factor_units = 'kilograms_per_litre'
|
@@ -92,7 +92,7 @@ AutomobileTypeFuelYearAge.class_eval do
|
|
92
92
|
conversion_factor = 1.miles.to(:kilometres)
|
93
93
|
connection.execute %{
|
94
94
|
UPDATE automobile_type_fuel_year_ages
|
95
|
-
SET annual_distance = annual_distance * #{conversion_factor},
|
95
|
+
SET annual_distance = 1.0 * annual_distance * #{conversion_factor},
|
96
96
|
annual_distance_units = 'kilometres'
|
97
97
|
WHERE annual_distance_units = 'miles'
|
98
98
|
}
|
@@ -109,7 +109,7 @@ AutomobileTypeFuelYearAge.class_eval do
|
|
109
109
|
process "Calculate number of vehicles from total travel percent and AutomobileTypeFuelYear" do
|
110
110
|
total_travel = "(SELECT t1.total_travel FROM #{AutomobileTypeFuelYear.quoted_table_name} AS t1 WHERE t1.name = #{quoted_table_name}.type_fuel_year_name)"
|
111
111
|
update_all(
|
112
|
-
%{vehicles = total_travel_percent * #{total_travel} / annual_distance},
|
112
|
+
%{vehicles = 1.0 * total_travel_percent * #{total_travel} / annual_distance},
|
113
113
|
%{annual_distance > 0}
|
114
114
|
)
|
115
115
|
end
|
@@ -19,7 +19,7 @@ AutomobileTypeYear.class_eval do
|
|
19
19
|
process "Calculate HFC emission factor from AutomobileTypeFuelYear" do
|
20
20
|
total_fuel_consumption = "(SELECT SUM(src.fuel_consumption) FROM #{AutomobileTypeFuelYear.quoted_table_name} AS src WHERE src.type_year_name = #{quoted_table_name}.name)"
|
21
21
|
update_all(
|
22
|
-
%{hfc_emission_factor = hfc_emissions / #{total_fuel_consumption}},
|
22
|
+
%{hfc_emission_factor = 1.0 * hfc_emissions / #{total_fuel_consumption}},
|
23
23
|
%{#{total_fuel_consumption} > 0}
|
24
24
|
)
|
25
25
|
end
|
@@ -31,7 +31,7 @@ BusFuel.class_eval do
|
|
31
31
|
gwp_ch4 = GreenhouseGas[:ch4].global_warming_potential
|
32
32
|
connection.execute %{
|
33
33
|
UPDATE bus_fuels
|
34
|
-
SET ch4_emission_factor = ch4_emission_factor * #{conversion_factor} * #{gwp_ch4},
|
34
|
+
SET ch4_emission_factor = 1.0 * ch4_emission_factor * #{conversion_factor} * #{gwp_ch4},
|
35
35
|
ch4_emission_factor_units = 'kilograms_co2e_per_kilometre'
|
36
36
|
WHERE ch4_emission_factor_units = 'grams_per_mile'
|
37
37
|
}
|
@@ -39,7 +39,7 @@ BusFuel.class_eval do
|
|
39
39
|
gwp_n2o = GreenhouseGas[:n2o].global_warming_potential
|
40
40
|
connection.execute %{
|
41
41
|
UPDATE bus_fuels
|
42
|
-
SET n2o_emission_factor = n2o_emission_factor * #{conversion_factor} * #{gwp_n2o},
|
42
|
+
SET n2o_emission_factor = 1.0 * n2o_emission_factor * #{conversion_factor} * #{gwp_n2o},
|
43
43
|
n2o_emission_factor_units = 'kilograms_co2e_per_kilometre'
|
44
44
|
WHERE n2o_emission_factor_units = 'grams_per_mile'
|
45
45
|
}
|
@@ -49,7 +49,7 @@ BusFuel.class_eval do
|
|
49
49
|
conversion_factor = (1 / 947.81712) * (1 / 3.78541178) # Google: 1 MJ / 947.81712 btu * 1 gallon / 3.78541178 l
|
50
50
|
connection.execute %{
|
51
51
|
UPDATE bus_fuels
|
52
|
-
SET energy_content = energy_content * #{conversion_factor},
|
52
|
+
SET energy_content = 1.0 * energy_content * #{conversion_factor},
|
53
53
|
energy_content_units = 'megajoules_per_litre'
|
54
54
|
WHERE energy_content_units = 'btu_per_gallon'
|
55
55
|
}
|
@@ -59,14 +59,14 @@ BusFuel.class_eval do
|
|
59
59
|
BusFuel.all.each do |bus_fuel|
|
60
60
|
fuel = bus_fuel.fuel
|
61
61
|
if bus_fuel.energy_content.present?
|
62
|
-
co2_factor = (bus_fuel.energy_content * fuel.carbon_content * fuel.oxidation_factor * (1 - fuel.biogenic_fraction))
|
62
|
+
co2_factor = (bus_fuel.energy_content.to_f * fuel.carbon_content * fuel.oxidation_factor * (1 - fuel.biogenic_fraction))
|
63
63
|
bus_fuel.co2_emission_factor = co2_factor.grams.to(:kilograms).carbon.to(:co2)
|
64
64
|
|
65
65
|
co2_prefix = fuel.co2_emission_factor_units.split("_per_")[0]
|
66
66
|
co2_suffix = bus_fuel.energy_content_units.split("_per_")[1]
|
67
67
|
bus_fuel.co2_emission_factor_units = co2_prefix + "_per_" + co2_suffix
|
68
68
|
|
69
|
-
co2_biogenic_factor = (bus_fuel.energy_content * fuel.carbon_content * fuel.oxidation_factor * fuel.biogenic_fraction)
|
69
|
+
co2_biogenic_factor = (bus_fuel.energy_content.to_f * fuel.carbon_content * fuel.oxidation_factor * fuel.biogenic_fraction)
|
70
70
|
bus_fuel.co2_biogenic_emission_factor = co2_biogenic_factor.grams.to(:kilograms).carbon.to(:co2)
|
71
71
|
|
72
72
|
co2_biogenic_prefix = fuel.co2_biogenic_emission_factor_units.split("_per_")[0]
|
@@ -88,7 +88,7 @@ BusFuel.class_eval do
|
|
88
88
|
BusFuel.all.each do |bus_fuel|
|
89
89
|
if bus_fuel.latest_fuel_year_controls.present?
|
90
90
|
ch4_factors_by_year = bus_fuel.latest_fuel_year_controls.map do |fyc|
|
91
|
-
fyc.total_travel_percent * fyc.fuel_control.ch4_emission_factor
|
91
|
+
fyc.total_travel_percent.to_f * fyc.fuel_control.ch4_emission_factor
|
92
92
|
end
|
93
93
|
bus_fuel.ch4_emission_factor = ch4_factors_by_year.sum * GreenhouseGas[:ch4].global_warming_potential
|
94
94
|
|
@@ -97,7 +97,7 @@ BusFuel.class_eval do
|
|
97
97
|
bus_fuel.ch4_emission_factor_units = ch4_prefix + "_co2e_per_" + ch4_suffix
|
98
98
|
|
99
99
|
n2o_factors_by_year = bus_fuel.latest_fuel_year_controls.map do |fyc|
|
100
|
-
fyc.total_travel_percent * fyc.fuel_control.n2o_emission_factor
|
100
|
+
fyc.total_travel_percent.to_f * fyc.fuel_control.n2o_emission_factor
|
101
101
|
end
|
102
102
|
bus_fuel.n2o_emission_factor = n2o_factors_by_year.sum * GreenhouseGas[:n2o].global_warming_potential
|
103
103
|
|
@@ -13,14 +13,14 @@ BusFuelControl.class_eval do
|
|
13
13
|
conversion_factor = (1 / 1.609344) * (1.0 / 1_000.0 ) # Google: 1 mile / 1.609344 km * 1 kg / 1000 g
|
14
14
|
connection.execute %{
|
15
15
|
UPDATE bus_fuel_controls
|
16
|
-
SET ch4_emission_factor = ch4_emission_factor * #{conversion_factor},
|
16
|
+
SET ch4_emission_factor = 1.0 * ch4_emission_factor * #{conversion_factor},
|
17
17
|
ch4_emission_factor_units = 'kilograms_per_kilometre'
|
18
18
|
WHERE ch4_emission_factor_units = 'grams_per_mile'
|
19
19
|
}
|
20
20
|
|
21
21
|
connection.execute %{
|
22
22
|
UPDATE bus_fuel_controls
|
23
|
-
SET n2o_emission_factor = n2o_emission_factor * #{conversion_factor},
|
23
|
+
SET n2o_emission_factor = 1.0 * n2o_emission_factor * #{conversion_factor},
|
24
24
|
n2o_emission_factor_units = 'kilograms_per_kilometre'
|
25
25
|
WHERE n2o_emission_factor_units = 'grams_per_mile'
|
26
26
|
}
|
@@ -33,7 +33,7 @@ Fuel.class_eval do
|
|
33
33
|
conversion_factor = (1_055.05585 / 1.0) * (1.0 / 158.987295) # Google: 1_055.05585 MJ / 1 MMBtu * 1 barrel / 158.987295 l
|
34
34
|
connection.execute %{
|
35
35
|
UPDATE fuels
|
36
|
-
SET energy_content = energy_content * #{conversion_factor}, energy_content_units = 'megajoules_per_litre'
|
36
|
+
SET energy_content = 1.0 * energy_content * #{conversion_factor}, energy_content_units = 'megajoules_per_litre'
|
37
37
|
WHERE energy_content_units = 'million_btu_per_barrel'
|
38
38
|
}
|
39
39
|
end
|
@@ -42,7 +42,7 @@ Fuel.class_eval do
|
|
42
42
|
conversion_factor = (1.0 / 947.81712) * (35.3146667 / 1.0) # Google: 1.0 MJ / 947.81712 Btu * 35.3146667 cubic feet / 1 cubic m
|
43
43
|
connection.execute %{
|
44
44
|
UPDATE fuels
|
45
|
-
SET energy_content = energy_content * #{conversion_factor}, energy_content_units = 'megajoules_per_cubic_metre'
|
45
|
+
SET energy_content = 1.0 * energy_content * #{conversion_factor}, energy_content_units = 'megajoules_per_cubic_metre'
|
46
46
|
WHERE energy_content_units = 'btu_per_cubic_foot'
|
47
47
|
}
|
48
48
|
end
|
@@ -51,7 +51,7 @@ Fuel.class_eval do
|
|
51
51
|
conversion_factor = (1_000_000_000_000.0 / 1.0) * (1.0 / 1_055_055_852_620.0) # Google: 1e12 g / Tg * 1 QBtu / 1.055e12 MJ
|
52
52
|
connection.execute %{
|
53
53
|
UPDATE fuels
|
54
|
-
SET carbon_content = carbon_content * #{conversion_factor}, carbon_content_units = 'grams_per_megajoule'
|
54
|
+
SET carbon_content = 1.0 * carbon_content * #{conversion_factor}, carbon_content_units = 'grams_per_megajoule'
|
55
55
|
WHERE carbon_content_units = 'teragrams_per_quadrillion_btu'
|
56
56
|
}
|
57
57
|
end
|
@@ -60,8 +60,8 @@ Fuel.class_eval do
|
|
60
60
|
conversion_factor = (1.0 / 1_000.0) * (44.0 / 12.0) # Google: 1 kg / 1e3 g * 44 CO2 / 12 C
|
61
61
|
connection.execute %{
|
62
62
|
UPDATE fuels
|
63
|
-
SET co2_emission_factor = carbon_content * energy_content * oxidation_factor * (1 - biogenic_fraction) * #{conversion_factor},
|
64
|
-
co2_biogenic_emission_factor = carbon_content * energy_content * oxidation_factor * biogenic_fraction * #{conversion_factor}
|
63
|
+
SET co2_emission_factor = 1.0 * carbon_content * energy_content * oxidation_factor * (1 - biogenic_fraction) * #{conversion_factor},
|
64
|
+
co2_biogenic_emission_factor = 1.0 * carbon_content * energy_content * oxidation_factor * biogenic_fraction * #{conversion_factor}
|
65
65
|
}
|
66
66
|
end
|
67
67
|
|
@@ -15,7 +15,7 @@ FuelYear.class_eval do
|
|
15
15
|
conversion_factor = (1_055.05585 / 1.0) * (1.0 / 907.18474) # Google: 1_055.05585 MJ / 1 MMBtu * 1 short ton / 907.18474 kg
|
16
16
|
connection.execute %{
|
17
17
|
UPDATE fuel_years
|
18
|
-
SET energy_content = energy_content * #{conversion_factor}, energy_content_units = 'megajoules_per_kilogram'
|
18
|
+
SET energy_content = 1.0 * energy_content * #{conversion_factor}, energy_content_units = 'megajoules_per_kilogram'
|
19
19
|
WHERE energy_content_units = 'million_btu_per_short_ton'
|
20
20
|
}
|
21
21
|
end
|
@@ -24,7 +24,7 @@ FuelYear.class_eval do
|
|
24
24
|
conversion_factor = (1_055.05585 / 1.0) * (1.0 / 158.987295) # Google: 1_055.05585 MJ / 1 MMBtu * 1 barrel / 158.987295 l
|
25
25
|
connection.execute %{
|
26
26
|
UPDATE fuel_years
|
27
|
-
SET energy_content = energy_content * #{conversion_factor}, energy_content_units = 'megajoules_per_litre'
|
27
|
+
SET energy_content = 1.0 * energy_content * #{conversion_factor}, energy_content_units = 'megajoules_per_litre'
|
28
28
|
WHERE energy_content_units = 'million_btu_per_barrel'
|
29
29
|
}
|
30
30
|
end
|
@@ -33,7 +33,7 @@ FuelYear.class_eval do
|
|
33
33
|
conversion_factor = (1.0 / 947.81712) * (35.3146667 / 1.0) # Google: 1.0 MJ / 947.81712 Btu * 35.3146667 cubic feet / 1 cubic m
|
34
34
|
connection.execute %{
|
35
35
|
UPDATE fuel_years
|
36
|
-
SET energy_content = energy_content * #{conversion_factor}, energy_content_units = 'megajoules_per_cubic_metre'
|
36
|
+
SET energy_content = 1.0 * energy_content * #{conversion_factor}, energy_content_units = 'megajoules_per_cubic_metre'
|
37
37
|
WHERE energy_content_units = 'btu_per_cubic_foot'
|
38
38
|
}
|
39
39
|
end
|
@@ -42,7 +42,7 @@ FuelYear.class_eval do
|
|
42
42
|
conversion_factor = (1_000_000_000_000.0 / 1.0) * (1.0 / 1_055_055_852_620.0) # Google: 1e12 g / Tg * 1 QBtu / 1.055e12 MJ
|
43
43
|
connection.execute %{
|
44
44
|
UPDATE fuel_years
|
45
|
-
SET carbon_content = carbon_content * #{conversion_factor}, carbon_content_units = 'grams_per_megajoule'
|
45
|
+
SET carbon_content = 1.0 * carbon_content * #{conversion_factor}, carbon_content_units = 'grams_per_megajoule'
|
46
46
|
WHERE carbon_content_units = 'teragrams_per_quadrillion_btu'
|
47
47
|
}
|
48
48
|
end
|
@@ -51,8 +51,8 @@ FuelYear.class_eval do
|
|
51
51
|
conversion_factor = (1.0 / 1_000.0) * (44.0 / 12.0) # Google: 1 kg / 1e3 g * 44 CO2 / 12 C
|
52
52
|
connection.execute %{
|
53
53
|
UPDATE fuel_years
|
54
|
-
SET co2_emission_factor = carbon_content * energy_content * oxidation_factor * (1 - biogenic_fraction) * #{conversion_factor},
|
55
|
-
co2_biogenic_emission_factor = carbon_content * energy_content * oxidation_factor * biogenic_fraction * #{conversion_factor}
|
54
|
+
SET co2_emission_factor = 1.0 * carbon_content * energy_content * oxidation_factor * (1 - biogenic_fraction) * #{conversion_factor},
|
55
|
+
co2_biogenic_emission_factor = 1.0 * carbon_content * energy_content * oxidation_factor * biogenic_fraction * #{conversion_factor}
|
56
56
|
}
|
57
57
|
end
|
58
58
|
|
@@ -11,20 +11,20 @@ LodgingClass.class_eval do
|
|
11
11
|
|
12
12
|
process "Convert natural gas intensities to metric units" do
|
13
13
|
conversion_factor = 2.83168466 # Google: 2.83168466 cubic m / 100 cubic ft
|
14
|
-
update_all "natural_gas_intensity = natural_gas_intensity * #{conversion_factor}
|
15
|
-
update_all
|
14
|
+
update_all "natural_gas_intensity = 1.0 * natural_gas_intensity * #{conversion_factor}", :natural_gas_intensity_units => 'hundred_cubic_feet_per_room_night'
|
15
|
+
update_all({:natural_gas_intensity_units => 'cubic_metres_per_room_night'}, :natural_gas_intensity_units => 'hundred_cubic_feet_per_room_night')
|
16
16
|
end
|
17
17
|
|
18
18
|
process "Convert fuel oil intensities to metric units" do
|
19
19
|
conversion_factor = 3.78541178 # Google: 3.78541178 l / gal
|
20
|
-
update_all "fuel_oil_intensity = fuel_oil_intensity * #{conversion_factor}
|
21
|
-
update_all
|
20
|
+
update_all "fuel_oil_intensity = 1.0 * fuel_oil_intensity * #{conversion_factor}", :fuel_oil_intensity_units => 'gallons_per_room_night'
|
21
|
+
update_all({:fuel_oil_intensity_units => 'litres_per_room_night'}, :fuel_oil_intensity_units => 'gallons_per_room_night')
|
22
22
|
end
|
23
23
|
|
24
24
|
process "Convert district heat intensities to metric units" do
|
25
25
|
conversion_factor = 1.05505585 # Google: 1.05505585 MJ / 1000 Btu
|
26
|
-
update_all "district_heat_intensity = district_heat_intensity * #{conversion_factor}
|
27
|
-
update_all
|
26
|
+
update_all "district_heat_intensity = 1.0 * district_heat_intensity * #{conversion_factor}", :district_heat_intensity_units => 'thousand_btu_per_room_night'
|
27
|
+
update_all({:district_heat_intensity_units => 'megajoules_per_room_night'}, :district_heat_intensity_units => 'thousand_btu_per_room_night')
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -7,7 +7,7 @@ class ProductLine < ActiveRecord::Base
|
|
7
7
|
has_many :industry_products, :through => :product_line_industry_products
|
8
8
|
|
9
9
|
col :ps_code
|
10
|
-
col :description
|
10
|
+
col :description, :type => :text
|
11
11
|
col :broadline # FIXME TODO do we need this?
|
12
12
|
col :parent # FIXME TODO do we need this?
|
13
13
|
end
|
@@ -32,7 +32,7 @@ Country.class_eval do
|
|
32
32
|
# FIXME TODO eventually need to do this for all countries
|
33
33
|
process "Derive US average automobile fuel efficiency from AutomobileTypeFuelYear" do
|
34
34
|
scope = AutomobileTypeFuelYear.where(:year => AutomobileTypeFuelYear.maximum(:year))
|
35
|
-
fe = scope.sum(:total_travel) / scope.sum(:fuel_consumption)
|
35
|
+
fe = scope.sum(:total_travel).to_f / scope.sum(:fuel_consumption)
|
36
36
|
units = scope.first.total_travel_units + '_per_' + scope.first.fuel_consumption_units.singularize
|
37
37
|
|
38
38
|
connection.execute %{
|
@@ -47,7 +47,7 @@ Country.class_eval do
|
|
47
47
|
conversion_factor = 1.miles.to(:kilometres)
|
48
48
|
connection.execute %{
|
49
49
|
UPDATE countries
|
50
|
-
SET automobile_city_speed = automobile_city_speed * #{conversion_factor},
|
50
|
+
SET automobile_city_speed = 1.0 * automobile_city_speed * #{conversion_factor},
|
51
51
|
automobile_city_speed_units = 'kilometres_per_hour'
|
52
52
|
WHERE automobile_city_speed_units = 'miles_per_hour'
|
53
53
|
}
|
@@ -57,7 +57,7 @@ Country.class_eval do
|
|
57
57
|
conversion_factor = 1.miles.to(:kilometres)
|
58
58
|
connection.execute %{
|
59
59
|
UPDATE countries
|
60
|
-
SET automobile_highway_speed = automobile_highway_speed * #{conversion_factor},
|
60
|
+
SET automobile_highway_speed = 1.0 * automobile_highway_speed * #{conversion_factor},
|
61
61
|
automobile_highway_speed_units = 'kilometres_per_hour'
|
62
62
|
WHERE automobile_highway_speed_units = 'miles_per_hour'
|
63
63
|
}
|
@@ -67,7 +67,7 @@ Country.class_eval do
|
|
67
67
|
conversion_factor = 1.miles.to(:kilometres)
|
68
68
|
connection.execute %{
|
69
69
|
UPDATE countries
|
70
|
-
SET automobile_trip_distance = automobile_trip_distance * #{conversion_factor},
|
70
|
+
SET automobile_trip_distance = 1.0 * automobile_trip_distance * #{conversion_factor},
|
71
71
|
automobile_trip_distance_units = 'kilometres'
|
72
72
|
WHERE automobile_trip_distance_units = 'miles'
|
73
73
|
}
|
data/lib/earth/pet/species.rb
CHANGED
@@ -29,7 +29,7 @@ class Species < ActiveRecord::Base
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def marginal_dietary_requirement_fallback
|
32
|
-
total_diet_size = thoroughly_researched.map(&:weighted_diet_size).sum
|
32
|
+
total_diet_size = thoroughly_researched.map(&:weighted_diet_size).sum.to_f
|
33
33
|
total_population = thoroughly_researched.sum(:population)
|
34
34
|
return 0.0 unless total_population > 0.0
|
35
35
|
average_weight = thoroughly_researched.weighted_average(:weight, :weighted_by => :population)
|
@@ -40,12 +40,12 @@ class Species < ActiveRecord::Base
|
|
40
40
|
|
41
41
|
def diet_size
|
42
42
|
return unless weight and marginal_dietary_requirement and fixed_dietary_requirement
|
43
|
-
weight * marginal_dietary_requirement + fixed_dietary_requirement
|
43
|
+
weight.to_f * marginal_dietary_requirement + fixed_dietary_requirement
|
44
44
|
end
|
45
45
|
|
46
46
|
def weighted_diet_size
|
47
47
|
return unless _diet_size = diet_size and _population = population
|
48
|
-
_diet_size * _population
|
48
|
+
_diet_size.to_f * _population
|
49
49
|
end
|
50
50
|
|
51
51
|
def to_s
|
@@ -142,24 +142,24 @@ ResidentialEnergyConsumptionSurveyResponse.class_eval do
|
|
142
142
|
[ 'annual_energy_from_electricity_for_heating_water', :kbtus, :joules ],
|
143
143
|
[ 'annual_energy_from_electricity_for_other_appliances', :kbtus, :joules ],
|
144
144
|
].each do |attr_name, from_units, to_units|
|
145
|
-
update_all "#{attr_name} = #{attr_name} * #{Conversions::Unit.exchange_rate from_units, to_units}"
|
145
|
+
update_all "#{attr_name} = 1.0 * #{attr_name} * #{Conversions::Unit.exchange_rate from_units, to_units}"
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
149
149
|
process 'Add a new field "rooms" that estimates how many rooms are in the house' do
|
150
|
-
update_all 'rooms = total_rooms + full_bathrooms/2 + half_bathrooms/4 + heated_garage*(attached_1car_garage + detached_1car_garage + 2*(attached_2car_garage + detached_2car_garage) + 3*(attached_3car_garage + detached_3car_garage))'
|
150
|
+
update_all 'rooms = total_rooms + full_bathrooms/2.0 + half_bathrooms/4.0 + 1.0*heated_garage*(attached_1car_garage + detached_1car_garage + 2.0*(attached_2car_garage + detached_2car_garage) + 3.0*(attached_3car_garage + detached_3car_garage))'
|
151
151
|
end
|
152
152
|
|
153
153
|
process 'Add a new field "bathrooms" that synthesizes half and full bathrooms into one number' do
|
154
|
-
update_all 'bathrooms = full_bathrooms + 0.5
|
154
|
+
update_all 'bathrooms = full_bathrooms + 0.5*half_bathrooms'
|
155
155
|
end
|
156
156
|
|
157
157
|
process 'Add a new field "lighting_use" that estimates how many hours light bulbs are turned on in the house' do
|
158
|
-
update_all 'lighting_use = 2*(lights_on_1_to_4_hours + efficient_lights_on_1_to_4_hours) + 8*(lights_on_4_to_12_hours + efficient_lights_on_4_to_12_hours) + 16*(lights_on_over_12_hours + efficient_lights_on_over_12_hours) + 12*(outdoor_all_night_lights + outdoor_all_night_gas_lights)'
|
158
|
+
update_all 'lighting_use = 2.0*(lights_on_1_to_4_hours + efficient_lights_on_1_to_4_hours) + 8.0*(lights_on_4_to_12_hours + efficient_lights_on_4_to_12_hours) + 16.0*(lights_on_over_12_hours + efficient_lights_on_over_12_hours) + 12.0*(outdoor_all_night_lights + outdoor_all_night_gas_lights)'
|
159
159
|
end
|
160
160
|
|
161
161
|
process 'Add a new field "lighting_efficiency" that estimates what percentage of light bulbs in a house are energy-efficient' do
|
162
|
-
update_all 'lighting_efficiency = (2*efficient_lights_on_1_to_4_hours + 8*efficient_lights_on_4_to_12_hours + 16*efficient_lights_on_over_12_hours) / lighting_use', 'lighting_use > 0'
|
162
|
+
update_all 'lighting_efficiency = (2.0*efficient_lights_on_1_to_4_hours + 8.0*efficient_lights_on_4_to_12_hours + 16.0*efficient_lights_on_over_12_hours) / lighting_use', 'lighting_use > 0'
|
163
163
|
end
|
164
164
|
|
165
165
|
process "synthesize air conditioner use from central AC and window AC use" do
|
data/lib/earth/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: earth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -15,7 +15,7 @@ date: 2011-06-06 00:00:00.000000000Z
|
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: data_miner
|
18
|
-
requirement: &
|
18
|
+
requirement: &2164719040 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ! '>='
|
@@ -23,10 +23,10 @@ dependencies:
|
|
23
23
|
version: '1.3'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *2164719040
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: to_regexp
|
29
|
-
requirement: &
|
29
|
+
requirement: &2164718620 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ! '>='
|
@@ -34,10 +34,10 @@ dependencies:
|
|
34
34
|
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *2164718620
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: cohort_scope
|
40
|
-
requirement: &
|
40
|
+
requirement: &2164718100 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
@@ -45,10 +45,10 @@ dependencies:
|
|
45
45
|
version: '0'
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *2164718100
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: table_warnings
|
51
|
-
requirement: &
|
51
|
+
requirement: &2164717600 !ruby/object:Gem::Requirement
|
52
52
|
none: false
|
53
53
|
requirements:
|
54
54
|
- - ! '>='
|
@@ -56,10 +56,10 @@ dependencies:
|
|
56
56
|
version: 0.0.6
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
|
-
version_requirements: *
|
59
|
+
version_requirements: *2164717600
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: remote_table
|
62
|
-
requirement: &
|
62
|
+
requirement: &2164717020 !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
64
64
|
requirements:
|
65
65
|
- - ! '>='
|
@@ -67,10 +67,10 @@ dependencies:
|
|
67
67
|
version: 1.2.3
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
|
-
version_requirements: *
|
70
|
+
version_requirements: *2164717020
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: falls_back_on
|
73
|
-
requirement: &
|
73
|
+
requirement: &2164716640 !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
76
|
- - ! '>='
|
@@ -78,10 +78,10 @@ dependencies:
|
|
78
78
|
version: '0'
|
79
79
|
type: :runtime
|
80
80
|
prerelease: false
|
81
|
-
version_requirements: *
|
81
|
+
version_requirements: *2164716640
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: fixed_width-multibyte
|
84
|
-
requirement: &
|
84
|
+
requirement: &2164716160 !ruby/object:Gem::Requirement
|
85
85
|
none: false
|
86
86
|
requirements:
|
87
87
|
- - ! '>='
|
@@ -89,10 +89,10 @@ dependencies:
|
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
|
-
version_requirements: *
|
92
|
+
version_requirements: *2164716160
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: geokit-rails
|
95
|
-
requirement: &
|
95
|
+
requirement: &2164715700 !ruby/object:Gem::Requirement
|
96
96
|
none: false
|
97
97
|
requirements:
|
98
98
|
- - ! '>='
|
@@ -100,10 +100,10 @@ dependencies:
|
|
100
100
|
version: '0'
|
101
101
|
type: :runtime
|
102
102
|
prerelease: false
|
103
|
-
version_requirements: *
|
103
|
+
version_requirements: *2164715700
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
105
|
name: loose_tight_dictionary
|
106
|
-
requirement: &
|
106
|
+
requirement: &2164693640 !ruby/object:Gem::Requirement
|
107
107
|
none: false
|
108
108
|
requirements:
|
109
109
|
- - ! '>='
|
@@ -111,21 +111,21 @@ dependencies:
|
|
111
111
|
version: 0.2.3
|
112
112
|
type: :runtime
|
113
113
|
prerelease: false
|
114
|
-
version_requirements: *
|
114
|
+
version_requirements: *2164693640
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: weighted_average
|
117
|
-
requirement: &
|
117
|
+
requirement: &2164693060 !ruby/object:Gem::Requirement
|
118
118
|
none: false
|
119
119
|
requirements:
|
120
120
|
- - ! '>='
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
122
|
+
version: 1.0.1
|
123
123
|
type: :runtime
|
124
124
|
prerelease: false
|
125
|
-
version_requirements: *
|
125
|
+
version_requirements: *2164693060
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: mini_record-compat
|
128
|
-
requirement: &
|
128
|
+
requirement: &2164692660 !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|
131
131
|
- - ! '>='
|
@@ -133,10 +133,10 @@ dependencies:
|
|
133
133
|
version: '0'
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
|
-
version_requirements: *
|
136
|
+
version_requirements: *2164692660
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: activesupport
|
139
|
-
requirement: &
|
139
|
+
requirement: &2164692160 !ruby/object:Gem::Requirement
|
140
140
|
none: false
|
141
141
|
requirements:
|
142
142
|
- - ! '>='
|
@@ -144,10 +144,10 @@ dependencies:
|
|
144
144
|
version: '0'
|
145
145
|
type: :runtime
|
146
146
|
prerelease: false
|
147
|
-
version_requirements: *
|
147
|
+
version_requirements: *2164692160
|
148
148
|
- !ruby/object:Gem::Dependency
|
149
149
|
name: activerecord
|
150
|
-
requirement: &
|
150
|
+
requirement: &2164691740 !ruby/object:Gem::Requirement
|
151
151
|
none: false
|
152
152
|
requirements:
|
153
153
|
- - ! '>='
|
@@ -155,10 +155,10 @@ dependencies:
|
|
155
155
|
version: '0'
|
156
156
|
type: :runtime
|
157
157
|
prerelease: false
|
158
|
-
version_requirements: *
|
158
|
+
version_requirements: *2164691740
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: bundler
|
161
|
-
requirement: &
|
161
|
+
requirement: &2164691300 !ruby/object:Gem::Requirement
|
162
162
|
none: false
|
163
163
|
requirements:
|
164
164
|
- - ! '>='
|
@@ -166,10 +166,10 @@ dependencies:
|
|
166
166
|
version: '0'
|
167
167
|
type: :development
|
168
168
|
prerelease: false
|
169
|
-
version_requirements: *
|
169
|
+
version_requirements: *2164691300
|
170
170
|
- !ruby/object:Gem::Dependency
|
171
171
|
name: bueller
|
172
|
-
requirement: &
|
172
|
+
requirement: &2164690840 !ruby/object:Gem::Requirement
|
173
173
|
none: false
|
174
174
|
requirements:
|
175
175
|
- - ! '>='
|
@@ -177,10 +177,10 @@ dependencies:
|
|
177
177
|
version: '0'
|
178
178
|
type: :development
|
179
179
|
prerelease: false
|
180
|
-
version_requirements: *
|
180
|
+
version_requirements: *2164690840
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: cucumber
|
183
|
-
requirement: &
|
183
|
+
requirement: &2164690420 !ruby/object:Gem::Requirement
|
184
184
|
none: false
|
185
185
|
requirements:
|
186
186
|
- - ! '>='
|
@@ -188,10 +188,10 @@ dependencies:
|
|
188
188
|
version: '0'
|
189
189
|
type: :development
|
190
190
|
prerelease: false
|
191
|
-
version_requirements: *
|
191
|
+
version_requirements: *2164690420
|
192
192
|
- !ruby/object:Gem::Dependency
|
193
193
|
name: rake
|
194
|
-
requirement: &
|
194
|
+
requirement: &2164689940 !ruby/object:Gem::Requirement
|
195
195
|
none: false
|
196
196
|
requirements:
|
197
197
|
- - ! '>='
|
@@ -199,10 +199,10 @@ dependencies:
|
|
199
199
|
version: '0'
|
200
200
|
type: :development
|
201
201
|
prerelease: false
|
202
|
-
version_requirements: *
|
202
|
+
version_requirements: *2164689940
|
203
203
|
- !ruby/object:Gem::Dependency
|
204
204
|
name: rdoc
|
205
|
-
requirement: &
|
205
|
+
requirement: &2164689520 !ruby/object:Gem::Requirement
|
206
206
|
none: false
|
207
207
|
requirements:
|
208
208
|
- - ! '>='
|
@@ -210,10 +210,10 @@ dependencies:
|
|
210
210
|
version: '0'
|
211
211
|
type: :development
|
212
212
|
prerelease: false
|
213
|
-
version_requirements: *
|
213
|
+
version_requirements: *2164689520
|
214
214
|
- !ruby/object:Gem::Dependency
|
215
215
|
name: rspec
|
216
|
-
requirement: &
|
216
|
+
requirement: &2164689100 !ruby/object:Gem::Requirement
|
217
217
|
none: false
|
218
218
|
requirements:
|
219
219
|
- - ! '>='
|
@@ -221,10 +221,10 @@ dependencies:
|
|
221
221
|
version: '0'
|
222
222
|
type: :development
|
223
223
|
prerelease: false
|
224
|
-
version_requirements: *
|
224
|
+
version_requirements: *2164689100
|
225
225
|
- !ruby/object:Gem::Dependency
|
226
226
|
name: sqlite3-ruby
|
227
|
-
requirement: &
|
227
|
+
requirement: &2164688620 !ruby/object:Gem::Requirement
|
228
228
|
none: false
|
229
229
|
requirements:
|
230
230
|
- - ! '>='
|
@@ -232,10 +232,10 @@ dependencies:
|
|
232
232
|
version: '0'
|
233
233
|
type: :development
|
234
234
|
prerelease: false
|
235
|
-
version_requirements: *
|
235
|
+
version_requirements: *2164688620
|
236
236
|
- !ruby/object:Gem::Dependency
|
237
237
|
name: mysql
|
238
|
-
requirement: &
|
238
|
+
requirement: &2164688140 !ruby/object:Gem::Requirement
|
239
239
|
none: false
|
240
240
|
requirements:
|
241
241
|
- - ! '>='
|
@@ -243,10 +243,10 @@ dependencies:
|
|
243
243
|
version: '0'
|
244
244
|
type: :development
|
245
245
|
prerelease: false
|
246
|
-
version_requirements: *
|
246
|
+
version_requirements: *2164688140
|
247
247
|
- !ruby/object:Gem::Dependency
|
248
248
|
name: pg
|
249
|
-
requirement: &
|
249
|
+
requirement: &2164687720 !ruby/object:Gem::Requirement
|
250
250
|
none: false
|
251
251
|
requirements:
|
252
252
|
- - ! '>='
|
@@ -254,7 +254,7 @@ dependencies:
|
|
254
254
|
version: '0'
|
255
255
|
type: :development
|
256
256
|
prerelease: false
|
257
|
-
version_requirements: *
|
257
|
+
version_requirements: *2164687720
|
258
258
|
description: An earth-simulation environment with ActiveRecord models and data
|
259
259
|
email: andy@rossmeissl.net
|
260
260
|
executables:
|