earth 0.3.3 → 0.3.4
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.
- data/lib/earth/automobile/automobile_fuel_type.rb +0 -2
- data/lib/earth/automobile/automobile_make_model_year.rb +0 -1
- data/lib/earth/automobile/automobile_make_model_year_variant.rb +0 -1
- data/lib/earth/automobile/automobile_size_class.rb +0 -2
- data/lib/earth/bus/bus_class.rb +0 -2
- data/lib/earth/diet/diet_class.rb +0 -2
- data/lib/earth/hospitality/lodging_class.rb +0 -2
- data/lib/earth/locality/urbanity.rb +0 -1
- data/lib/earth/locality/zip_code.rb +0 -2
- data/lib/earth/pet/breed.rb +0 -1
- data/lib/earth/pet/gender.rb +0 -1
- data/lib/earth/pet/species.rb +0 -2
- data/lib/earth/rail/rail_class.rb +0 -2
- data/lib/earth/residence/air_conditioner_use.rb +0 -1
- data/lib/earth/residence/clothes_machine_use.rb +0 -1
- data/lib/earth/residence/dishwasher_use.rb +0 -1
- data/lib/earth/residence/residence_class.rb +0 -1
- metadata +3 -3
@@ -1,8 +1,6 @@
|
|
1
1
|
class AutomobileFuelType < ActiveRecord::Base
|
2
2
|
set_primary_key :code
|
3
3
|
|
4
|
-
has_many :automobiles, :foreign_key => 'fuel_type_code'
|
5
|
-
|
6
4
|
scope :ordered, :order => 'name'
|
7
5
|
|
8
6
|
falls_back_on :emission_factor => 20.781.pounds_per_gallon.to(:kilograms_per_litre) # https://brighterplanet.sifterapp.com/projects/30/issues/428
|
@@ -3,7 +3,6 @@ class AutomobileMakeModelYear < ActiveRecord::Base
|
|
3
3
|
|
4
4
|
belongs_to :make_year, :class_name => 'AutomobileMakeYear', :foreign_key => 'make_year_name'
|
5
5
|
has_many :make_model_year_variants, :class_name => 'AutomobileMakeModelYearVariant', :foreign_key => 'make_model_year_name'
|
6
|
-
has_many :automobiles, :foreign_key => 'make_model_year_name'
|
7
6
|
|
8
7
|
data_miner do
|
9
8
|
tap "Brighter Planet's model year data", Earth.taps_server
|
@@ -5,7 +5,6 @@ class AutomobileMakeModelYearVariant < ActiveRecord::Base
|
|
5
5
|
belongs_to :make_model, :class_name => 'AutomobileMakeModel', :foreign_key => 'make_model_name'
|
6
6
|
belongs_to :make_model_year, :class_name => 'AutomobileMakeModelYear', :foreign_key => 'make_model_year_name'
|
7
7
|
belongs_to :fuel_type, :class_name => 'AutomobileFuelType', :foreign_key => 'fuel_type_code'
|
8
|
-
has_many :automobiles, :foreign_key => 'make_model_year_variant_row_hash'
|
9
8
|
|
10
9
|
data_miner do
|
11
10
|
tap "Brighter Planet's sanitized automobile make model year variant data", Earth.taps_server
|
@@ -1,8 +1,6 @@
|
|
1
1
|
class AutomobileSizeClass < ActiveRecord::Base
|
2
2
|
set_primary_key :name
|
3
3
|
|
4
|
-
has_many :automobiles, :foreign_key => 'size_class_name'
|
5
|
-
|
6
4
|
falls_back_on :hybrid_fuel_efficiency_city_multiplier => 1.651, # https://brighterplanet.sifterapp.com/issue/667
|
7
5
|
:hybrid_fuel_efficiency_highway_multiplier => 1.213,
|
8
6
|
:conventional_fuel_efficiency_city_multiplier => 0.987,
|
data/lib/earth/bus/bus_class.rb
CHANGED
@@ -6,8 +6,6 @@ class ZipCode < ActiveRecord::Base
|
|
6
6
|
belongs_to :state, :foreign_key => 'state_postal_abbreviation'
|
7
7
|
# has_one :census_division, :through => :state
|
8
8
|
# has_one :census_region, :through => :state
|
9
|
-
has_many :residences
|
10
|
-
|
11
9
|
|
12
10
|
acts_as_mappable :default_units => :miles, # FIXME imperial
|
13
11
|
:lat_column_name => :latitude,
|
data/lib/earth/pet/breed.rb
CHANGED
data/lib/earth/pet/gender.rb
CHANGED
data/lib/earth/pet/species.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
class Species < ActiveRecord::Base
|
2
2
|
set_primary_key :name
|
3
3
|
|
4
|
-
has_many :pets
|
5
|
-
|
6
4
|
scope :thoroughly_researched, :conditions => 'marginal_dietary_requirement IS NOT NULL'
|
7
5
|
|
8
6
|
falls_back_on :diet_emission_intensity => lambda { weighted_average :diet_emission_intensity, :weighted_by => :population }, # kg CO2 / joule
|
@@ -1,7 +1,6 @@
|
|
1
1
|
class AirConditionerUse < ActiveRecord::Base
|
2
2
|
set_primary_key :name
|
3
3
|
|
4
|
-
has_many :residences
|
5
4
|
has_many :residential_energy_consumption_survey_responses
|
6
5
|
|
7
6
|
falls_back_on :fugitive_emission => 0.102295.pounds_per_square_foot.to(:kilograms_per_square_metre), # https://brighterplanet.sifterapp.com/projects/30/issues/430
|
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:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 4
|
10
|
+
version: 0.3.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Seamus Abshere
|