I hereby claim:
- I am ihough on github.
- I am ihough (https://keybase.io/ihough) on keybase.
- I have a public key whose fingerprint is A211 9A50 D014 6681 BEC5 ECBD A14F FF0F EC89 48C6
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I'm finding it frustrating to have to use an individual committee to look up each gas-specific electricity emission factor in an emitter model. For example:
committee :electricity_co2_emission_factor do
quorum 'from eGRID subregion' do
egrid_subregion.co2_emission_factor
end
quorum 'from state' do
state.electricity_co2_emission_factor
end
quorum 'from country' do
# Country Codes to Country Names | |
# Created by OpenGeoCode.Org, Submitted into the Public Domain October 3rd, 2011 (version 8) | |
# | |
# Abbreviations: | |
# ISO : International Standards Organization | |
# BGN : U.S. Board on Geographic Names | |
# UNGEGN : United Nations Group of Experts on Geographic Names | |
# PCGN : UK Permanent Committee on Geographic Names | |
# FAO : Food and Agriculture Organization of the United Nations | |
# |
When working on emitter gems I often find myself wondering what assumptions I can make about the quality of our reference data, and how I should deal with any quality issues. | |
For example, in the AutomobileTrip emitter: | |
committee :fuel_efficiency | |
:quorum 'from make year and hybridity multipler', | |
:needs => [:make_year, :hybridity_multiplier] do |characteristics| | |
# This will fail or give an improper value unless both are numbers > 0 | |
characteristics[:make_year].fuel_efficiency * characteristics[:hybridity_multiplier] | |
end |
class NationalTransitDatabaseCompany < ActiveRecord::Base | |
# This returns an array of all NTD companies that provide rail service | |
def self.rail_companies | |
NationalTransitDatabaseRecord.rail_records.map(&:ntd_company).uniq | |
end | |
# This lets you calculate things from the NTD records associated with the company | |
def method_missing | |
... | |
end |
Follow-up to https://gist.github.com/1215053 | |
committee :emission | |
from co2 emission, ch4 emission, and n2o emission | |
from distance and rail company rail traction rail class | |
from distance and rail company rail traction | |
from distance and rail company |
In US we have: | |
Country | |
US | |
rail_trip_diesel_intensity | |
rail_trip_electricity_intensity | |
electricity_co2_emission_factor | |
electricity_co2_biogenic_emission_factor | |
electricity_ch4_emission_factor | |
electricity_n2o_emission_factor |