earth 0.11.2 → 0.11.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/eia.rb +24 -0
- data/lib/earth/hospitality.rb +1 -0
- data/lib/earth/hospitality/commercial_building_energy_consumption_survey_response.rb +39 -0
- data/lib/earth/hospitality/commercial_building_energy_consumption_survey_response/data_miner.rb +56 -0
- data/lib/earth/hospitality/data_miner.rb +1 -0
- data/lib/earth/industry.rb +3 -0
- data/lib/earth/industry/cbecs_energy_intensity.rb +55 -0
- data/lib/earth/industry/cbecs_energy_intensity/data_miner.rb +54 -0
- data/lib/earth/industry/data_miner.rb +3 -0
- data/lib/earth/industry/industry.rb +7 -1
- data/lib/earth/industry/mecs_energy.rb +60 -0
- data/lib/earth/industry/mecs_energy/data_miner.rb +28 -0
- data/lib/earth/industry/mecs_ratio.rb +42 -0
- data/lib/earth/industry/mecs_ratio/data_miner.rb +20 -0
- data/lib/earth/version.rb +1 -1
- data/spec/earth/industry/mecs_energy_spec.rb +59 -0
- data/spec/earth/industry/mecs_ratio_spec.rb +33 -0
- metadata +60 -47
data/earth.gemspec
CHANGED
@@ -5,7 +5,7 @@ require "earth/version"
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "earth"
|
7
7
|
s.version = Earth::VERSION
|
8
|
-
s.date = "2011-12-
|
8
|
+
s.date = "2011-12-16"
|
9
9
|
s.platform = Gem::Platform::RUBY
|
10
10
|
s.authors = ["Seamus Abshere", "Derek Kastner", "Andy Rossmeissl"]
|
11
11
|
s.email = %q{andy@rossmeissl.net}
|
data/lib/earth/eia.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
module Earth
|
2
|
+
module EIA
|
3
|
+
extend self
|
4
|
+
|
5
|
+
def normalize(model, fields)
|
6
|
+
model.all.each do |record|
|
7
|
+
fields.each do |field|
|
8
|
+
value = record.send field
|
9
|
+
normalized_value = if value == 'Q'
|
10
|
+
0
|
11
|
+
elsif value == 'W'
|
12
|
+
0
|
13
|
+
elsif value == '*'
|
14
|
+
0
|
15
|
+
else
|
16
|
+
value
|
17
|
+
end
|
18
|
+
record.send "#{field}=", normalized_value
|
19
|
+
end
|
20
|
+
record.save
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/earth/hospitality.rb
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
class CommercialBuildingEnergyConsumptionSurveyResponse < ActiveRecord::Base
|
2
|
+
set_primary_key :id
|
3
|
+
set_table_name :cbecs_responses
|
4
|
+
|
5
|
+
extend CohortScope
|
6
|
+
self.minimum_cohort_size = 8 # CBECS doesn't report averages based on fewer than 20 samples
|
7
|
+
|
8
|
+
col :id, :type => :integer
|
9
|
+
col :census_region_number, :type => :integer
|
10
|
+
col :census_division_number, :type => :integer
|
11
|
+
col :heating_degree_days, :type => :integer
|
12
|
+
col :cooling_degree_days, :type => :integer
|
13
|
+
col :construction_year, :type => :integer
|
14
|
+
col :area, :type => :float
|
15
|
+
col :area_units
|
16
|
+
col :floors, :type => :integer
|
17
|
+
col :lodging_rooms, :type => :integer
|
18
|
+
col :principal_activity
|
19
|
+
col :detailed_activity
|
20
|
+
col :first_activity
|
21
|
+
col :second_activity
|
22
|
+
col :third_activity
|
23
|
+
col :first_activity_share, :type => :float
|
24
|
+
col :second_activity_share, :type => :float
|
25
|
+
col :third_activity_share, :type => :float
|
26
|
+
col :months_used, :type => :integer
|
27
|
+
col :weekly_hours, :type => :integer
|
28
|
+
col :electricity_use, :type => :float
|
29
|
+
col :electricity_use_units
|
30
|
+
col :natural_gas_use, :type => :float
|
31
|
+
col :natural_gas_use_units
|
32
|
+
col :fuel_oil_use, :type => :float
|
33
|
+
col :fuel_oil_use_units
|
34
|
+
col :district_heat_use, :type => :float
|
35
|
+
col :district_heat_use_units
|
36
|
+
col :stratum, :type => :integer
|
37
|
+
col :pair, :type => :integer
|
38
|
+
col :weighting, :type => :float
|
39
|
+
end
|
data/lib/earth/hospitality/commercial_building_energy_consumption_survey_response/data_miner.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
CommercialBuildingEnergyConsumptionSurveyResponse.class_eval do
|
2
|
+
data_miner do
|
3
|
+
import 'building characteristics from the 2003 EIA Commercial Building Energy Consumption Survey',
|
4
|
+
:url => 'http://www.eia.gov/emeu/cbecs/cbecs2003/public_use_2003/data/FILE01.csv',
|
5
|
+
:skip => 1,
|
6
|
+
:headers => ["PUBID8", "REGION8", "CENDIV8", "SQFT8", "SQFTC8", "YRCONC8", "PBA8", "ELUSED8", "NGUSED8", "FKUSED8", "PRUSED8", "STUSED8", "HWUSED8", "CLIMATE8", "FREESTN8", "WLCNS8", "RFCNS8", "GLSSPC8", "EQGLSS8", "SUNGLS8", "BLDSHP8", "NFLOOR8", "ELEVTR8", "NELVTR8", "ESCLTR8", "NESLTR8", "YRCON8", "MONCON8", "RENOV8", "RENADD8", "RENRDC8", "RENCOS8", "RENEXT8", "RENINT8", "RENHVC8", "RENLGT8", "RENWIN8", "RENPLB8", "RENINS8", "RENOTH8", "GOVOWN8", "GOVTYP8", "OWNER8", "OWNOCC8", "NOCC8", "NOCCAT8", "MONUSE8", "PORVAC8", "OPEN248", "OPNMF8", "OPNWE8", "WKHRS8", "WKHRSC8", "NWKER8", "NWKERC8", "HT18", "HT28", "COOL8", "WATR8", "COOK8", "MANU8", "GENR8", "ADJWT8", "STRATUM8", "PAIR8"] do
|
7
|
+
key 'id', :field_name => 'PUBID8'
|
8
|
+
store 'census_region_number', :field_name => 'REGION8'
|
9
|
+
store 'census_division_number', :field_name => 'CENDIV8'
|
10
|
+
store 'area', :field_name => 'SQFT8', :from_units => :square_feet, :to_units => :square_metres
|
11
|
+
store 'principal_activity', :field_name => 'PBA8', :dictionary => { :input => 'principal_activity_code', :output => 'principal_activity', :url => 'https://docs.google.com/spreadsheet/pub?key=0AoQJbWqPrREqdHRGVHczYXRoU2dFLV90aDdET0dQLUE&single=true&gid=2&output=csv' }
|
12
|
+
store 'floors', :field_name => 'NFLOOR8', :dictionary => { :input => 'floors_code', :output => 'floors', :url => 'https://docs.google.com/spreadsheet/pub?key=0AoQJbWqPrREqdHRGVHczYXRoU2dFLV90aDdET0dQLUE&single=true&gid=0&output=csv' }
|
13
|
+
store 'construction_year', :field_name => 'YRCON8'
|
14
|
+
store 'months_used', :field_name => 'MONUSE8'
|
15
|
+
store 'weekly_hours', :field_name => 'WKHRS8'
|
16
|
+
store 'stratum', :field_name => 'STRATUM8'
|
17
|
+
store 'pair', :field_name => 'PAIR8'
|
18
|
+
store 'weighting', :field_name => 'ADJWT8'
|
19
|
+
end
|
20
|
+
|
21
|
+
import 'building characteristics from the 2003 EIA Commercial Building Energy Consumption Survey',
|
22
|
+
:url => 'http://www.eia.gov/emeu/cbecs/cbecs2003/public_use_2003/data/FILE02.csv',
|
23
|
+
:skip => 1,
|
24
|
+
:headers => ["PUBID8","REGION8","CENDIV8","SQFT8","SQFTC8","YRCONC8","PBA8","ELUSED8","NGUSED8","FKUSED8","PRUSED8","STUSED8","HWUSED8","ONEACT8","ACT18","ACT28","ACT38","ACT1PCT8","ACT2PCT8","ACT3PCT8","PBAPLUS8","VACANT8","RWSEAT8","PBSEAT8","EDSEAT8","FDSEAT8","HCBED8","NRSBED8","LODGRM8","FACIL8","FEDFAC8","FACACT8","MANIND8","PLANT8","FACDST8","FACDHW8","FACDCW8","FACELC8","BLDPLT8","ADJWT8","STRATUM8","PAIR8"] do
|
25
|
+
key 'id', :field_name => 'PUBID8'
|
26
|
+
store 'detailed_activity', :field_name => 'PBAPLUS8', :dictionary => { :input => 'detailed_activity_code', :output => 'detailed_activity', :url => 'https://docs.google.com/spreadsheet/pub?&key=0AoQJbWqPrREqdHRGVHczYXRoU2dFLV90aDdET0dQLUE&single=true&gid=3&output=csv' }
|
27
|
+
store 'first_activity', :field_name => 'ACT18', :dictionary => { :input => 'activity_code', :output => 'activity', :url => 'https://docs.google.com/spreadsheet/pub?&key=0AoQJbWqPrREqdHRGVHczYXRoU2dFLV90aDdET0dQLUE&single=true&gid=4&output=csv' }
|
28
|
+
store 'second_activity', :field_name => 'ACT28', :dictionary => { :input => 'activity_code', :output => 'activity', :url => 'https://docs.google.com/spreadsheet/pub?&key=0AoQJbWqPrREqdHRGVHczYXRoU2dFLV90aDdET0dQLUE&single=true&gid=4&output=csv' }
|
29
|
+
store 'third_activity', :field_name => 'ACT38', :dictionary => { :input => 'activity_code', :output => 'activity', :url => 'https://docs.google.com/spreadsheet/pub?&key=0AoQJbWqPrREqdHRGVHczYXRoU2dFLV90aDdET0dQLUE&single=true&gid=4&output=csv' }
|
30
|
+
store 'first_activity_share', :synthesize => lambda { |row| row['ACT1PCT8'].blank? ? nil : row['ACT1PCT8'].to_f / 100.0 }
|
31
|
+
store 'second_activity_share', :synthesize => lambda { |row| row['ACT2PCT8'].blank? ? nil : row['ACT2PCT8'].to_f / 100.0 }
|
32
|
+
store 'third_activity_share', :synthesize => lambda { |row| row['ACT3PCT8'].blank? ? nil : row['ACT3PCT8'].to_f / 100.0 }
|
33
|
+
store 'lodging_rooms', :field_name => 'LODGRM8'
|
34
|
+
end
|
35
|
+
|
36
|
+
import 'electricity use from the 2003 EIA Commercial Building Energy Consumption Survey',
|
37
|
+
:url => 'http://www.eia.gov/emeu/cbecs/cbecs2003/public_use_2003/data/FILE15.csv',
|
38
|
+
:skip => 1,
|
39
|
+
:headers => ["PUBID8", "REGION8", "CENDIV8", "SQFT8", "SQFTC8", "YRCONC8", "PBA8", "ELUSED8", "NGUSED8", "FKUSED8", "PRUSED8", "STUSED8", "HWUSED8", "ADJWT8", "STRATUM8", "PAIR8", "HDD658", "CDD658", "MFUSED8", "MFBTU8", "MFEXP8", "ELCNS8", "ELBTU8", "ELEXP8", "ZELCNS8", "ZELEXP8"] do
|
40
|
+
key 'id', :field_name => 'PUBID8'
|
41
|
+
store 'heating_degree_days', :field_name => 'HDD658'
|
42
|
+
store 'cooling_degree_days', :field_name => 'CDD658'
|
43
|
+
store 'electricity_use', :field_name => 'ELCNS8', :units => :kilowatt_hours
|
44
|
+
end
|
45
|
+
|
46
|
+
import 'fuel use characteristics from the 2003 EIA Commercial Building Energy Consumption Survey',
|
47
|
+
:url => 'http://www.eia.gov/emeu/cbecs/cbecs2003/public_use_2003/data/FILE16.csv',
|
48
|
+
:skip => 1,
|
49
|
+
:headers => ["PUBID8", "REGION8", "CENDIV8", "SQFT8", "SQFTC8", "YRCONC8", "PBA8", "ELUSED8", "NGUSED8", "FKUSED8", "PRUSED8", "STUSED8", "HWUSED8", "ADJWT8", "STRATUM8", "PAIR8", "NGCNS8", "NGBTU8", "NGEXP8", "ZNGCNS8", "ZNGEXP8", "FKCNS8", "FKBTU8", "FKEXP8", "ZFKCNS8", "ZFKEXP8", "DHUSED8", "DHHT18", "DHHT28", "DHCOOL8", "DHWATR8", "DHCOOK8", "DHMANU8", "DHOTH8", "DHCNS8", "DHBTU8", "DHEXP8", "ZDHCNS8", "ZDHEXP8"] do
|
50
|
+
key 'id', :field_name => 'PUBID8'
|
51
|
+
store 'natural_gas_use', :field_name => 'NGBTU8', :units => :kbtus
|
52
|
+
store 'fuel_oil_use', :field_name => 'FKBTU8', :units => :kbtus
|
53
|
+
store 'district_heat_use', :field_name => 'DHBTU8', :units => :kbtus
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
1
|
require 'earth/hospitality/census_region_lodging_class/data_miner'
|
2
|
+
require 'earth/hospitality/commercial_building_energy_consumption_survey_response/data_miner'
|
2
3
|
require 'earth/hospitality/country_lodging_class/data_miner'
|
3
4
|
require 'earth/hospitality/lodging_class/data_miner'
|
data/lib/earth/industry.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
+
require 'earth/industry/cbecs_energy_intensity'
|
1
2
|
require 'earth/industry/industry_product_line'
|
2
3
|
require 'earth/industry/industry_sector'
|
3
4
|
require 'earth/industry/industry'
|
4
5
|
require 'earth/industry/industry_product'
|
6
|
+
require 'earth/industry/mecs_energy'
|
7
|
+
require 'earth/industry/mecs_ratio'
|
5
8
|
require 'earth/industry/merchant'
|
6
9
|
require 'earth/industry/merchant_category_industry'
|
7
10
|
require 'earth/industry/merchant_category'
|
@@ -0,0 +1,55 @@
|
|
1
|
+
class CbecsEnergyIntensity < ActiveRecord::Base
|
2
|
+
col :naics_code, :type => :string
|
3
|
+
col :census_division_number, :type => :integer
|
4
|
+
col :total_electricity_consumption, :type => :float
|
5
|
+
col :total_floorspace, :type => :float
|
6
|
+
col :electricity_intensity, :type => :float
|
7
|
+
|
8
|
+
CENSUS_DIVISIONS = {
|
9
|
+
'New England Division' => {
|
10
|
+
:column => 0,
|
11
|
+
:code => 1,
|
12
|
+
:table => 'c17'
|
13
|
+
},
|
14
|
+
'Middle Atlantic Division' => {
|
15
|
+
:column => 1,
|
16
|
+
:code => 2,
|
17
|
+
:table => 'c17'
|
18
|
+
},
|
19
|
+
'East North Central Division' => {
|
20
|
+
:column => 2,
|
21
|
+
:code => 3,
|
22
|
+
:table => 'c17'
|
23
|
+
},
|
24
|
+
'West North Central Division' => {
|
25
|
+
:column => 0,
|
26
|
+
:code => 4,
|
27
|
+
:table => 'c18'
|
28
|
+
},
|
29
|
+
'South Atlantic Division' => {
|
30
|
+
:column => 1,
|
31
|
+
:code => 5,
|
32
|
+
:table => 'c18'
|
33
|
+
},
|
34
|
+
'East South Central Division' => {
|
35
|
+
:column => 2,
|
36
|
+
:code => 6,
|
37
|
+
:table => 'c18'
|
38
|
+
},
|
39
|
+
'West South Central Division' => {
|
40
|
+
:column => 0,
|
41
|
+
:code => 7,
|
42
|
+
:table => 'c19'
|
43
|
+
},
|
44
|
+
'Mountain Division' => {
|
45
|
+
:column => 1,
|
46
|
+
:code => 8,
|
47
|
+
:table => 'c19'
|
48
|
+
},
|
49
|
+
'Pacific Division' => {
|
50
|
+
:column => 2,
|
51
|
+
:code => 9,
|
52
|
+
:table => 'c19'
|
53
|
+
}
|
54
|
+
}
|
55
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
CbecsEnergyIntensity.class_eval do
|
2
|
+
data_miner do
|
3
|
+
CENSUS_DIVISIONS.each do |division, data|
|
4
|
+
import "2003 CBECS #{data[:table].capitalize} - Electricity Consumption and Intensity - #{division}",
|
5
|
+
:url => "http://www.eia.gov/emeu/cbecs/cbecs2003/detailed_tables_2003/2003set10/2003excel/#{data[:table]}.xls"
|
6
|
+
:crop => (21..36)) do
|
7
|
+
key :name, :synthesize => Proc.new { |row| "#{Industry.format_naics_code(row[0])}-#{data[:code]}" }
|
8
|
+
store :naics_code, :synthesize => Proc.new do |row|
|
9
|
+
case row[0].gsub(/\./, '')
|
10
|
+
when 'Education' then
|
11
|
+
611110
|
12
|
+
when 'Food Sales' then
|
13
|
+
445
|
14
|
+
when 'Food Service' then
|
15
|
+
722
|
16
|
+
when 'Health Care' then
|
17
|
+
622110
|
18
|
+
when 'Inpatient' then
|
19
|
+
622110
|
20
|
+
when 'Outpatient' then
|
21
|
+
622111
|
22
|
+
when 'Lodging' then
|
23
|
+
721
|
24
|
+
when 'Retail (Other Than Mall)' then
|
25
|
+
44
|
26
|
+
when 'Office' then
|
27
|
+
#TODO
|
28
|
+
when 'Public Assembly' then
|
29
|
+
#TODO
|
30
|
+
when 'Public Order and Safety' then
|
31
|
+
922120
|
32
|
+
when 'Religious Worship' then
|
33
|
+
813110
|
34
|
+
when 'Service' then
|
35
|
+
#TODO
|
36
|
+
when 'Warehouse and Storage' then
|
37
|
+
493110
|
38
|
+
when 'Other' then
|
39
|
+
#TODO
|
40
|
+
when 'Vacant' then
|
41
|
+
#TODO
|
42
|
+
end
|
43
|
+
end
|
44
|
+
store :census_division_number, :static => data[:code]
|
45
|
+
store :total_electricity_consumption, :field_number => data[:column] + 1
|
46
|
+
store :total_floorspace, :field_number => data[:column] + 4
|
47
|
+
store :electricity_intensity, :field_number => data[:column] + 7
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
process :normalize_fuels do
|
52
|
+
EIA.normalize(CbecsEnergyIntensity, [:total_electricity_consumption, :total_floorspace, :electricity_intensity])
|
53
|
+
end
|
54
|
+
end
|
@@ -12,8 +12,14 @@ class Industry < ActiveRecord::Base
|
|
12
12
|
col :naics_code
|
13
13
|
col :description
|
14
14
|
|
15
|
+
class << self
|
16
|
+
def format_naics_code(input)
|
17
|
+
"%d" % input.to_i
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
15
21
|
def trade_industry?
|
16
22
|
prefix = naics_code.to_s[0,2]
|
17
23
|
%w{42 44 45}.include?(prefix)
|
18
24
|
end
|
19
|
-
end
|
25
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'earth/industry/industry'
|
2
|
+
|
3
|
+
class MecsEnergy < ActiveRecord::Base
|
4
|
+
col :name
|
5
|
+
col :census_region
|
6
|
+
col :naics_code
|
7
|
+
col :total, :type => :float
|
8
|
+
col :net_electricity, :type => :float
|
9
|
+
col :residual_fuel_oil, :type => :float
|
10
|
+
col :distillate_fuel_oil, :type => :float
|
11
|
+
col :natural_gas, :type => :float
|
12
|
+
col :lpg_and_ngl, :type => :float
|
13
|
+
col :coal, :type => :float
|
14
|
+
col :coke_and_breeze, :type => :float
|
15
|
+
col :other, :type => :float
|
16
|
+
|
17
|
+
CENSUS_REGIONS = {
|
18
|
+
'Total US' => {
|
19
|
+
:crop => (13..81),
|
20
|
+
:code => nil
|
21
|
+
},
|
22
|
+
'Northeast' => {
|
23
|
+
:crop => (88..156),
|
24
|
+
:code => 1
|
25
|
+
},
|
26
|
+
'Midwest' => {
|
27
|
+
:crop => (163..231),
|
28
|
+
:code => 2
|
29
|
+
},
|
30
|
+
'South' => {
|
31
|
+
:crop => (238..306),
|
32
|
+
:code => 3
|
33
|
+
},
|
34
|
+
'West' => {
|
35
|
+
:crop => (313..382),
|
36
|
+
:code => 4
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
FUELS = [:net_electricity, :residual_fuel_oil, :distillate_fuel_oil,
|
41
|
+
:natural_gas, :lpg_and_ngl, :coal, :coke_and_breeze, :other]
|
42
|
+
|
43
|
+
def self.find_by_naics_code_and_census_region(code, census_region)
|
44
|
+
if code.blank?
|
45
|
+
record = nil
|
46
|
+
else
|
47
|
+
code = Industry.format_naics_code code
|
48
|
+
record = where('census_region = ? AND naics_code LIKE ?', census_region, "#{code}%").first
|
49
|
+
record ||= find_by_naics_code_and_census_region(code[0..-2], census_region)
|
50
|
+
end
|
51
|
+
record
|
52
|
+
end
|
53
|
+
|
54
|
+
def fuel_ratios
|
55
|
+
FUELS.inject({}) do |ratios, fuel|
|
56
|
+
ratios[fuel] = send(fuel).to_f / total.to_f
|
57
|
+
ratios
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'earth/eia'
|
2
|
+
|
3
|
+
MecsEnergy.class_eval do
|
4
|
+
data_miner do
|
5
|
+
CENSUS_REGIONS.each do |region, data|
|
6
|
+
import("MECS table 3.2 #{region}",
|
7
|
+
:url => "http://205.254.135.24/emeu/mecs/mecs2006/excel/Table3_2.xls",
|
8
|
+
:crop => data[:crop]) do
|
9
|
+
key 'name', :synthesize => Proc.new { |row| "#{Industry.format_naics_code(row[0])}-#{data[:code]}" }
|
10
|
+
store 'naics_code', :field_number => 0
|
11
|
+
store :total, :field_number => 2
|
12
|
+
store :net_electricity, :field_number => 3
|
13
|
+
store :residual_fuel_oil, :field_number => 4
|
14
|
+
store :distillate_fuel_oil, :field_number => 5
|
15
|
+
store :natural_gas, :field_number => 6
|
16
|
+
store :lpg_and_ngl, :field_number => 7
|
17
|
+
store :coal, :field_number => 8
|
18
|
+
store :coke_and_breeze, :field_number => 9
|
19
|
+
store :other, :field_number => 10
|
20
|
+
store 'census_region', :static => data[:code]
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
process :normalize_fuels do
|
25
|
+
Earth::EIA.normalize(MecsEnergy, FUELS)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
class MecsRatio < ActiveRecord::Base
|
2
|
+
belongs_to :industry
|
3
|
+
|
4
|
+
col :name
|
5
|
+
col :census_region
|
6
|
+
col :naics_code
|
7
|
+
col :consumption_per_dollar_of_shipments, :type => :float
|
8
|
+
|
9
|
+
CENSUS_REGIONS = {
|
10
|
+
'Total US' => {
|
11
|
+
:crop => (16..94),
|
12
|
+
:code => nil
|
13
|
+
},
|
14
|
+
'Northeast' => {
|
15
|
+
:crop => (100..178),
|
16
|
+
:code => 1
|
17
|
+
},
|
18
|
+
'Midwest' => {
|
19
|
+
:crop => (184..262),
|
20
|
+
:code => 2
|
21
|
+
},
|
22
|
+
'South' => {
|
23
|
+
:crop => (268..346),
|
24
|
+
:code => 3
|
25
|
+
},
|
26
|
+
'West' => {
|
27
|
+
:crop => (352..430),
|
28
|
+
:code => 4
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
def self.find_by_naics_code_and_census_region(code, census_region)
|
33
|
+
if code.blank?
|
34
|
+
record = nil
|
35
|
+
else
|
36
|
+
code = Industry.format_naics_code code
|
37
|
+
record = where('census_region = ? AND naics_code LIKE ?', census_region, "#{code}%").first
|
38
|
+
record ||= find_by_naics_code_and_census_region(code[0..-2], census_region)
|
39
|
+
end
|
40
|
+
record
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'earth/eia'
|
2
|
+
|
3
|
+
MecsRatio.class_eval do
|
4
|
+
data_miner do
|
5
|
+
CENSUS_REGIONS.each do |region, data|
|
6
|
+
import( "MECS table 6.1 #{region}",
|
7
|
+
:url => "http://205.254.135.24/emeu/mecs/mecs2006/excel/Table6_1.xls",
|
8
|
+
:crop => data[:crop]) do
|
9
|
+
key 'name', :synthesize => Proc.new { |row| "#{Industry.format_naics_code(row[0])}-#{data[:code]}" }
|
10
|
+
store 'naics_code', :synthesize => Proc.new { |row| Industry.format_naics_code row[0] }
|
11
|
+
store 'consumption_per_dollar_of_shipments', :field_number => 4
|
12
|
+
store 'census_region', :static => data[:code]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
process :normalize_fuels do
|
17
|
+
Earth::EIA.normalize(MecsRatio, [:consumption_per_dollar_of_shipments])
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/earth/version.rb
CHANGED
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'earth/industry/mecs_energy'
|
3
|
+
|
4
|
+
describe MecsEnergy do
|
5
|
+
before(:all) do
|
6
|
+
MecsEnergy.auto_upgrade!
|
7
|
+
MecsEnergy.run_data_miner!
|
8
|
+
end
|
9
|
+
|
10
|
+
describe '.find_by_naics_code_and_census_region' do
|
11
|
+
before do
|
12
|
+
MecsEnergy.create! :naics_code => '312', :census_region => '1'
|
13
|
+
MecsEnergy.create! :naics_code => '3121', :census_region => '1'
|
14
|
+
MecsEnergy.create! :naics_code => '3122', :census_region => '1'
|
15
|
+
MecsEnergy.create! :naics_code => '312', :census_region => '2'
|
16
|
+
MecsEnergy.create! :naics_code => '3121', :census_region => '2'
|
17
|
+
MecsEnergy.create! :naics_code => '3122', :census_region => '2'
|
18
|
+
MecsEnergy.create! :naics_code => '312211', :census_region => '2'
|
19
|
+
end
|
20
|
+
it 'finds an exact match' do
|
21
|
+
MecsEnergy.find_by_naics_code_and_census_region('312211', '2').
|
22
|
+
naics_code.should == '312211'
|
23
|
+
end
|
24
|
+
it 'finds a parent category by prefix' do
|
25
|
+
MecsEnergy.find_by_naics_code_and_census_region('312199', '2').
|
26
|
+
naics_code.should == '3121'
|
27
|
+
end
|
28
|
+
it 'returns nil if no match found' do
|
29
|
+
MecsEnergy.find_by_naics_code_and_census_region('543211', '2').
|
30
|
+
should be_nil
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe '#fuel_ratios' do
|
35
|
+
it 'returns a list of fuel ratios for a given NAICS' do
|
36
|
+
energy = MecsEnergy.new :total => 100, :net_electricity => 20,
|
37
|
+
:residual_fuel_oil => 1, :distillate_fuel_oil => 2,
|
38
|
+
:natural_gas => 30, :lpg_and_ngl => 22, :coal => 22,
|
39
|
+
:coke_and_breeze => 1, :other => 1
|
40
|
+
energy.fuel_ratios.should == {
|
41
|
+
:net_electricity => 0.20,
|
42
|
+
:residual_fuel_oil => 0.01, :distillate_fuel_oil => 0.02,
|
43
|
+
:natural_gas => 0.3, :lpg_and_ngl => 0.22, :coal => 0.22,
|
44
|
+
:coke_and_breeze => 0.01, :other => 0.01
|
45
|
+
}
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe '.normalize_fuels' do
|
50
|
+
it 'transforms Q (witheld due to stddev error) into 0' do
|
51
|
+
MecsEnergy.all.each do |energy|
|
52
|
+
MecsEnergy::FUELS.each do |fuel|
|
53
|
+
%w{W Q *}.should_not include(energy.send(fuel))
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'earth/industry/mecs_ratio'
|
3
|
+
|
4
|
+
describe MecsRatio do
|
5
|
+
before :all do
|
6
|
+
MecsRatio.auto_upgrade!
|
7
|
+
end
|
8
|
+
|
9
|
+
describe '.find_by_naics_code_and_census_region' do
|
10
|
+
before do
|
11
|
+
MecsRatio.create! :naics_code => '312', :census_region => '1', :consumption_per_dollar_of_shipments => 11
|
12
|
+
MecsRatio.create! :naics_code => '3121', :census_region => '1', :consumption_per_dollar_of_shipments => 12
|
13
|
+
MecsRatio.create! :naics_code => '3122', :census_region => '1', :consumption_per_dollar_of_shipments => 13
|
14
|
+
MecsRatio.create! :naics_code => '312', :census_region => '2', :consumption_per_dollar_of_shipments => 17
|
15
|
+
MecsRatio.create! :naics_code => '3121', :census_region => '2', :consumption_per_dollar_of_shipments => 18
|
16
|
+
MecsRatio.create! :naics_code => '3122', :census_region => '2', :consumption_per_dollar_of_shipments => 19
|
17
|
+
MecsRatio.create! :naics_code => '312211', :census_region => '2', :consumption_per_dollar_of_shipments => 20
|
18
|
+
end
|
19
|
+
it 'finds an exact match' do
|
20
|
+
MecsRatio.find_by_naics_code_and_census_region('312211', '2').
|
21
|
+
naics_code.should == '312211'
|
22
|
+
end
|
23
|
+
it 'finds a parent category by prefix' do
|
24
|
+
MecsRatio.find_by_naics_code_and_census_region('312199', '2').
|
25
|
+
naics_code.should == '3121'
|
26
|
+
end
|
27
|
+
it 'returns nil if no match found' do
|
28
|
+
MecsRatio.find_by_naics_code_and_census_region('543211', '2').
|
29
|
+
should be_nil
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
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.11.
|
4
|
+
version: 0.11.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2011-12-
|
14
|
+
date: 2011-12-16 00:00:00.000000000Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: data_miner
|
18
|
-
requirement: &
|
18
|
+
requirement: &2154813320 !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: *2154813320
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: to_regexp
|
29
|
-
requirement: &
|
29
|
+
requirement: &2154812900 !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: *2154812900
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: cohort_scope
|
40
|
-
requirement: &
|
40
|
+
requirement: &2154812420 !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: *2154812420
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: table_warnings
|
51
|
-
requirement: &
|
51
|
+
requirement: &2154811720 !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: *2154811720
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: remote_table
|
62
|
-
requirement: &
|
62
|
+
requirement: &2154800400 !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: *2154800400
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: falls_back_on
|
73
|
-
requirement: &
|
73
|
+
requirement: &2154799440 !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: *2154799440
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: fixed_width-multibyte
|
84
|
-
requirement: &
|
84
|
+
requirement: &2154798640 !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: *2154798640
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: geokit-rails
|
95
|
-
requirement: &
|
95
|
+
requirement: &2154797720 !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: *2154797720
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
105
|
name: loose_tight_dictionary
|
106
|
-
requirement: &
|
106
|
+
requirement: &2154795920 !ruby/object:Gem::Requirement
|
107
107
|
none: false
|
108
108
|
requirements:
|
109
109
|
- - ! '>='
|
@@ -111,10 +111,10 @@ dependencies:
|
|
111
111
|
version: 0.2.3
|
112
112
|
type: :runtime
|
113
113
|
prerelease: false
|
114
|
-
version_requirements: *
|
114
|
+
version_requirements: *2154795920
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: weighted_average
|
117
|
-
requirement: &
|
117
|
+
requirement: &2154793780 !ruby/object:Gem::Requirement
|
118
118
|
none: false
|
119
119
|
requirements:
|
120
120
|
- - ! '>='
|
@@ -122,10 +122,10 @@ dependencies:
|
|
122
122
|
version: 1.0.2
|
123
123
|
type: :runtime
|
124
124
|
prerelease: false
|
125
|
-
version_requirements: *
|
125
|
+
version_requirements: *2154793780
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: mini_record-compat
|
128
|
-
requirement: &
|
128
|
+
requirement: &2154792680 !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: *2154792680
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: activesupport
|
139
|
-
requirement: &
|
139
|
+
requirement: &2154790860 !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: *2154790860
|
148
148
|
- !ruby/object:Gem::Dependency
|
149
149
|
name: activerecord
|
150
|
-
requirement: &
|
150
|
+
requirement: &2154789920 !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: *2154789920
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: bundler
|
161
|
-
requirement: &
|
161
|
+
requirement: &2154789280 !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: *2154789280
|
170
170
|
- !ruby/object:Gem::Dependency
|
171
171
|
name: bueller
|
172
|
-
requirement: &
|
172
|
+
requirement: &2154788780 !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: *2154788780
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: cucumber
|
183
|
-
requirement: &
|
183
|
+
requirement: &2154788100 !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: *2154788100
|
192
192
|
- !ruby/object:Gem::Dependency
|
193
193
|
name: rake
|
194
|
-
requirement: &
|
194
|
+
requirement: &2154787440 !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: *2154787440
|
203
203
|
- !ruby/object:Gem::Dependency
|
204
204
|
name: rdoc
|
205
|
-
requirement: &
|
205
|
+
requirement: &2154786780 !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: *2154786780
|
214
214
|
- !ruby/object:Gem::Dependency
|
215
215
|
name: rspec
|
216
|
-
requirement: &
|
216
|
+
requirement: &2154786100 !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: *2154786100
|
225
225
|
- !ruby/object:Gem::Dependency
|
226
226
|
name: sqlite3-ruby
|
227
|
-
requirement: &
|
227
|
+
requirement: &2154785400 !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: *2154785400
|
236
236
|
- !ruby/object:Gem::Dependency
|
237
237
|
name: mysql
|
238
|
-
requirement: &
|
238
|
+
requirement: &2154784660 !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: *2154784660
|
247
247
|
- !ruby/object:Gem::Dependency
|
248
248
|
name: pg
|
249
|
-
requirement: &
|
249
|
+
requirement: &2154770840 !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: *2154770840
|
258
258
|
description: An earth-simulation environment with ActiveRecord models and data
|
259
259
|
email: andy@rossmeissl.net
|
260
260
|
executables:
|
@@ -441,6 +441,7 @@ files:
|
|
441
441
|
- lib/earth/diet/diet_class/data_miner.rb
|
442
442
|
- lib/earth/diet/food_group.rb
|
443
443
|
- lib/earth/diet/food_group/data_miner.rb
|
444
|
+
- lib/earth/eia.rb
|
444
445
|
- lib/earth/fuel.rb
|
445
446
|
- lib/earth/fuel/data_miner.rb
|
446
447
|
- lib/earth/fuel/fuel.rb
|
@@ -456,18 +457,26 @@ files:
|
|
456
457
|
- lib/earth/hospitality.rb
|
457
458
|
- lib/earth/hospitality/census_region_lodging_class.rb
|
458
459
|
- lib/earth/hospitality/census_region_lodging_class/data_miner.rb
|
460
|
+
- lib/earth/hospitality/commercial_building_energy_consumption_survey_response.rb
|
461
|
+
- lib/earth/hospitality/commercial_building_energy_consumption_survey_response/data_miner.rb
|
459
462
|
- lib/earth/hospitality/country_lodging_class.rb
|
460
463
|
- lib/earth/hospitality/country_lodging_class/data_miner.rb
|
461
464
|
- lib/earth/hospitality/data_miner.rb
|
462
465
|
- lib/earth/hospitality/lodging_class.rb
|
463
466
|
- lib/earth/hospitality/lodging_class/data_miner.rb
|
464
467
|
- lib/earth/industry.rb
|
468
|
+
- lib/earth/industry/cbecs_energy_intensity.rb
|
469
|
+
- lib/earth/industry/cbecs_energy_intensity/data_miner.rb
|
465
470
|
- lib/earth/industry/data_miner.rb
|
466
471
|
- lib/earth/industry/industry.rb
|
467
472
|
- lib/earth/industry/industry/data_miner.rb
|
468
473
|
- lib/earth/industry/industry_product.rb
|
469
474
|
- lib/earth/industry/industry_product_line.rb
|
470
475
|
- lib/earth/industry/industry_sector.rb
|
476
|
+
- lib/earth/industry/mecs_energy.rb
|
477
|
+
- lib/earth/industry/mecs_energy/data_miner.rb
|
478
|
+
- lib/earth/industry/mecs_ratio.rb
|
479
|
+
- lib/earth/industry/mecs_ratio/data_miner.rb
|
471
480
|
- lib/earth/industry/merchant.rb
|
472
481
|
- lib/earth/industry/merchant_category.rb
|
473
482
|
- lib/earth/industry/merchant_category_industry.rb
|
@@ -569,6 +578,8 @@ files:
|
|
569
578
|
- spec/earth/bus/bus_class_spec.rb
|
570
579
|
- spec/earth/bus/bus_fuel_control_spec.rb
|
571
580
|
- spec/earth/bus/bus_fuel_year_control_spec.rb
|
581
|
+
- spec/earth/industry/mecs_energy_spec.rb
|
582
|
+
- spec/earth/industry/mecs_ratio_spec.rb
|
572
583
|
- spec/earth/pet/species_spec.rb
|
573
584
|
- spec/earth_spec.rb
|
574
585
|
- spec/spec_helper.rb
|
@@ -637,7 +648,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
637
648
|
version: '0'
|
638
649
|
requirements: []
|
639
650
|
rubyforge_project:
|
640
|
-
rubygems_version: 1.8.
|
651
|
+
rubygems_version: 1.8.11
|
641
652
|
signing_key:
|
642
653
|
specification_version: 3
|
643
654
|
summary: Land, sky, and sea
|
@@ -730,6 +741,8 @@ test_files:
|
|
730
741
|
- spec/earth/bus/bus_class_spec.rb
|
731
742
|
- spec/earth/bus/bus_fuel_control_spec.rb
|
732
743
|
- spec/earth/bus/bus_fuel_year_control_spec.rb
|
744
|
+
- spec/earth/industry/mecs_energy_spec.rb
|
745
|
+
- spec/earth/industry/mecs_ratio_spec.rb
|
733
746
|
- spec/earth/pet/species_spec.rb
|
734
747
|
- spec/earth_spec.rb
|
735
748
|
- spec/spec_helper.rb
|