earth 0.0.38 → 0.0.39

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,25 @@
1
1
  CensusDivision.class_eval do
2
2
  data_miner do
3
3
  schema Earth.database_options do
4
- integer 'number'
5
- string 'name'
6
- string 'census_region_name'
7
- integer 'census_region_number'
4
+ integer 'number'
5
+ string 'name'
6
+ string 'census_region_name'
7
+ integer 'census_region_number'
8
+ float 'meeting_building_natural_gas_intensity'
9
+ string 'meeting_building_natural_gas_intensity_units'
10
+ float 'meeting_building_fuel_oil_intensity'
11
+ string 'meeting_building_fuel_oil_intensity_units'
12
+ float 'meeting_building_electricity_intensity'
13
+ string 'meeting_building_electricity_intensity_units'
14
+ float 'meeting_building_district_heat_intensity'
15
+ string 'meeting_building_district_heat_intensity_units'
8
16
  end
9
17
 
18
+ falls_back_on :meeting_building_natural_gas_intensity => 0.011973,
19
+ :meeting_building_fuel_oil_intensity => 0.0037381,
20
+ :meeting_building_electricity_intensity => 0.072444,
21
+ :meeting_building_district_heat_intensity => 3458.7
22
+
10
23
  import 'the U.S. Census Geographic Terms and Definitions',
11
24
  :url => 'http://www.census.gov/popest/geographic/codes02.csv',
12
25
  :skip => 9,
@@ -16,6 +29,21 @@ CensusDivision.class_eval do
16
29
  store 'census_region_number', :field_name => 'Region'
17
30
  store 'census_region_name', :field_name => 'Region', :dictionary => { :input => 'number', :output => 'name', :url => 'http://data.brighterplanet.com/census_regions.csv' }
18
31
  end
32
+
33
+ process 'Define some unit conversions' do
34
+ Conversions.register :hundred_cubic_feet_per_square_foot_hour, :cubic_metres_per_square_metre_hour, 30.48
35
+ Conversions.register :gallons_per_square_foot_hour, :litres_per_square_metre_hour, 40.745833
36
+ Conversions.register :kilowatt_hours_per_square_foot_hour, :kilowatt_hours_per_square_metre_hour, 10.76391
37
+ Conversions.register :thousand_btu_per_square_foot_hour, :joules_per_square_metre_hour, 11_356_527
38
+ end
39
+
40
+ import 'meeting building fuel intensities calculated from CBECS 2003',
41
+ :url => 'https://spreadsheets.google.com/pub?key=0AoQJbWqPrREqdGotdjgtUEk0eUU0R3lxM1hHdlF1V0E&hl=en&output=csv' do
42
+ key 'number', :field_name => 'census_division'
43
+ store 'meeting_building_natural_gas_intensity', :from_units => :hundred_cubic_feet_per_square_foot_hour, :to_units => :cubic_metres_per_square_metre_hour
44
+ store 'meeting_building_fuel_oil_intensity', :from_units => :gallons_per_square_foot_hour, :to_units => :litres_per_square_metre_hour
45
+ store 'meeting_building_electricity_intensity', :from_units => :kilowatt_hours_per_square_foot_hour, :to_units => :kilowatt_hours_per_square_metre_hour
46
+ store 'meeting_building_district_heat_intensity', :from_units => :thousand_btu_per_square_foot_hour, :to_units => :joules_per_square_metre_hour
47
+ end
19
48
  end
20
49
  end
21
-
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: 83
4
+ hash: 81
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 38
10
- version: 0.0.38
9
+ - 39
10
+ version: 0.0.39
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-13 00:00:00 -07:00
20
+ date: 2010-09-14 00:00:00 -07:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency