earth 0.0.37 → 0.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,4 @@ class LodgingClass < ActiveRecord::Base
6
6
  data_miner do
7
7
  tap "Brighter Planet's lodging class data", Earth.taps_server
8
8
  end
9
-
10
- # based on science/emitters/lodging/lodging_classes.xls
11
- falls_back_on :emission_factor => 20.976.pounds.to(:kilograms)
12
9
  end
@@ -2,9 +2,29 @@ LodgingClass.class_eval do
2
2
  data_miner do
3
3
  schema Earth.database_options do
4
4
  string 'name'
5
- float 'emission_factor'
6
- string 'emission_factor_units'
5
+ float 'natural_gas_intensity'
6
+ string 'natural_gas_intensity_units'
7
+ float 'fuel_oil_intensity'
8
+ string 'fuel_oil_intensity_units'
9
+ float 'electricity_intensity'
10
+ string 'electricity_intensity_units'
11
+ float 'district_heat_intensity'
12
+ string 'district_heat_intensity_units'
13
+ end
14
+
15
+ process "Define some unit conversions" do
16
+ Conversions.register :hundred_cubic_feet_per_room_night, :cubic_metres_per_room_night, 2.831685
17
+ Conversions.register :gallons_per_room_night, :litres_per_room_night, 3.785412
18
+ Conversions.register :thousand_btu_per_room_night, :joules_per_room_night, 1_055_056
19
+ end
20
+
21
+ import "a list of lodging classes and pre-calculated emission factors",
22
+ :url => 'https://spreadsheets.google.com/pub?key=0AoQJbWqPrREqdGZZWmZtWEJlYzhRNXlPdWpBTldlcUE&hl=en&output=csv' do
23
+ key 'name'
24
+ store 'natural_gas_intensity', :from_units => :hundred_cubic_feet_per_room_night, :to_units => :cubic_metres_per_room_night
25
+ store 'fuel_oil_intensity', :from_units => :gallons_per_room_night, :to_units => :litres_per_room_night
26
+ store 'electricity_intensity', :units_field_name => 'electricity_intensity_units'
27
+ store 'district_heat_intensity', :from_units => :thousand_btu_per_room_night, :to_units => :joules_per_room_night
7
28
  end
8
29
  end
9
30
  end
10
-
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: earth
3
3
  version: !ruby/object:Gem::Version
4
- hash: 85
4
+ hash: 83
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 37
10
- version: 0.0.37
9
+ - 38
10
+ version: 0.0.38
11
11
  platform: ruby
12
12
  authors:
13
13
  - Seamus Abshere
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-09-10 00:00:00 -07:00
20
+ date: 2010-09-13 00:00:00 -07:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency