Sha256: c8c10bb80587cfbddf382817470248eb36d17e2be38f3735b72e94f5203e8dde

Contents?: true

Size: 1.01 KB

Versions: 11

Compression:

Stored size: 1.01 KB

Contents

class ResidentialEnergyConsumptionSurveyResponse < ActiveRecord::Base
  set_primary_key :department_of_energy_identifier
  set_table_name :res_surveys
    
  belongs_to :census_division,     :foreign_key => 'census_division_number'
  belongs_to :census_region,       :foreign_key => 'census_region_number'
  # what follows are entirely derived here
  belongs_to :residence_class
  belongs_to :urbanity
  belongs_to :dishwasher_use
  belongs_to :air_conditioner_use
  belongs_to :clothes_machine_use
  
  extend CohortScope
  self.minimum_cohort_size = 5
  SUBCOHORT_THRESHOLD = 5 # per Matt
  
  INPUT_CHARACTERISTICS = [
    :census_region,
    :heating_degree_days,
    :cooling_degree_days,
    :residence_class,
    :rooms,
    :bedrooms,
    :bathrooms,
    :floorspace,
    :residents,
    :urbanity,
    :construction_year,
    :ownership,
  ]
  
  data_miner do
    tap "Brighter Planet's sanitized RECS 2005", Earth.taps_server

    process "pull dependencies" do
      run_data_miner_on_belongs_to_associations
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
earth-0.3.11 lib/earth/residence/residential_energy_consumption_survey_response.rb
earth-0.3.10 lib/earth/residence/residential_energy_consumption_survey_response.rb
earth-0.3.9 lib/earth/residence/residential_energy_consumption_survey_response.rb
earth-0.3.8 lib/earth/residence/residential_energy_consumption_survey_response.rb
earth-0.3.7 lib/earth/residence/residential_energy_consumption_survey_response.rb
earth-0.3.6 lib/earth/residence/residential_energy_consumption_survey_response.rb
earth-0.3.5 lib/earth/residence/residential_energy_consumption_survey_response.rb
earth-0.3.4 lib/earth/residence/residential_energy_consumption_survey_response.rb
earth-0.3.3 lib/earth/residence/residential_energy_consumption_survey_response.rb
earth-0.3.2 lib/earth/residence/residential_energy_consumption_survey_response.rb
earth-0.3.1 lib/earth/residence/residential_energy_consumption_survey_response.rb