carbon 2.2.3 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +15 -0
- data/Gemfile +0 -10
- data/Rakefile +10 -11
- data/carbon.gemspec +18 -6
- data/lib/carbon.rb +9 -61
- data/lib/carbon/query.rb +140 -0
- data/lib/carbon/query_pool.rb +11 -0
- data/lib/carbon/shell/emitter.rb +1 -1
- data/lib/carbon/version.rb +1 -1
- data/spec/carbon/query_spec.rb +106 -0
- data/spec/carbon_spec.rb +237 -0
- data/spec/cassettes/2006_Altima.yml +69 -0
- data/spec/cassettes/2006_Altima_in_2010.yml +230 -0
- data/spec/cassettes/2006_Altima_in_2011.yml +1239 -0
- data/spec/cassettes/Flight.yml +59 -0
- data/spec/cassettes/Flight_and_Automobile.yml +60 -0
- data/spec/cassettes/LAX-_SFO_flight.yml +74 -0
- data/spec/cassettes/Monkey.yml +42 -0
- data/spec/cassettes/carbon_bp_com_flight.yml +58 -0
- data/spec/cassettes/flight_with_key_1.yml +59 -0
- data/spec/cassettes/flight_with_key_2.yml +59 -0
- data/spec/cassettes/timeframed_flight.yml +59 -0
- data/spec/helper.rb +25 -0
- data/spec/support/my_nissan_altima.rb +36 -0
- metadata +200 -13
- data/lib/carbon/future.rb +0 -109
- data/test/carbon_test.rb +0 -302
- data/test/helper.rb +0 -25
@@ -0,0 +1,59 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://impact.brighterplanet.com/flights.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: key=carbon_test
|
9
|
+
headers:
|
10
|
+
accept:
|
11
|
+
- ! '*/*'
|
12
|
+
user-agent:
|
13
|
+
- Ruby
|
14
|
+
content-type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 08 Jun 2012 21:05:37 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- keep-alive
|
31
|
+
status:
|
32
|
+
- 200 OK
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"compliance":[],"decisions":{"carbon":{"description":"1087.2 kg","object":{"value":1087.1649532388976,"units":"kilograms"},"methodology":"from
|
36
|
+
fuel use and greenhouse gas emission factor"},"ghg_emission_factor":{"description":"5.15214","object":5.15214,"methodology":"from
|
37
|
+
fuel and aviation multiplier"},"aviation_multiplier":{"description":"2.0","object":2.0,"methodology":"default"},"energy":{"description":"7939.7
|
38
|
+
MJ","object":{"value":7939.69681453416,"units":"megajoules"},"methodology":"from
|
39
|
+
fuel use and fuel"},"fuel_use":{"description":"211.0123081358227","object":211.0123081358227,"methodology":"from
|
40
|
+
fuel per segment, segments per trip, trips, freight_share, passengers, seat
|
41
|
+
class multiplier, fuel, date, and timeframe"},"fuel_per_segment":{"description":"8477.788829453548","object":8477.788829453548,"methodology":"from
|
42
|
+
adjusted distance per segment and fuel use coefficients"},"seat_class_multiplier":{"description":"1.0","object":1.0,"methodology":"default"},"distance_class":{"description":"short
|
43
|
+
haul","object":{"flight_distance_class":{"distance":1108.0,"distance_units":"kilometres","max_distance":3700.0,"max_distance_units":"kilometres","min_distance":0.0,"min_distance_units":"kilometres","name":"short
|
44
|
+
haul"}},"methodology":"from adjusted distance per segment"},"adjusted_distance_per_segment":{"description":"962.1615428278766","object":962.1615428278766,"methodology":"from
|
45
|
+
adjusted distance and segments per trip"},"adjusted_distance":{"description":"1616.4313919508327","object":1616.4313919508327,"methodology":"from
|
46
|
+
distance, route inefficiency factor, and dogleg factor"},"distance":{"description":"1262.599964160848","object":1262.599964160848,"methodology":"default"},"route_inefficiency_factor":{"description":"1.100000023841858","object":1.100000023841858,"methodology":"default"},"dogleg_factor":{"description":"1.1638548181950328","object":1.1638548181950328,"methodology":"from
|
47
|
+
segments per trip"},"fuel_use_coefficients":{"description":"BrighterPlanet::Flight::ImpactModel::FuelUseEquation::Given","object":{"m3":1.0532072472371498e-07,"m2":-0.00015627733290887285,"m1":7.148223019744806,"b":1650.9061605236384},"methodology":"default"},"fuel":{"description":"Jet
|
48
|
+
Fuel","object":{"fuel":{"biogenic_fraction":0.0,"carbon_content":18.672,"carbon_content_units":"grams_per_megajoule","co2_biogenic_emission_factor":0.0,"co2_biogenic_emission_factor_units":"kilograms_per_litre","co2_emission_factor":2.57607,"co2_emission_factor_units":"kilograms_per_litre","density":0.8156,"density_units":"kilograms_per_litre","energy_content":37.6267,"energy_content_units":"megajoules_per_litre","name":"Jet
|
49
|
+
Fuel","oxidation_factor":1.0,"physical_units":null}},"methodology":"default"},"passengers":{"description":"131","object":131,"methodology":"from
|
50
|
+
seats and load factor"},"seats":{"description":"169.27798641328772","object":169.27798641328772,"methodology":"default"},"load_factor":{"description":"0.7731146349652108","object":0.7731146349652108,"methodology":"default"},"freight_share":{"description":"0.06885888622195808","object":0.06885888622195808,"methodology":"default"},"trips":{"description":"1.7","object":1.7,"methodology":"default"},"segments_per_trip":{"description":"1.68","object":1.68,"methodology":"default"},"date":{"description":"2012-01-01","object":"2012-01-01","methodology":"from
|
51
|
+
timeframe"}},"emitter":"Flight","equivalents":{"cars_off_the_road_for_a_year":0.19786402148947937,"cars_off_the_road_for_a_month":2.3721939279672744,"cars_off_the_road_for_a_week":10.279144632873777,"cars_off_the_road_for_a_day":72.15078928665267,"cars_to_priuses_for_a_year":0.39572804297895875,"cars_to_priuses_for_a_month":4.744387855934549,"cars_to_priuses_for_a_week":20.558289265747554,"cars_to_priuses_for_a_day":144.30157857330533,"one_way_domestic_flight":3.533286098026417,"round_trip_domestic_flight":1.7666430490132086,"one_way_cross_country_flight":1.2415423765988212,"round_trip_cross_country_flight":0.6207711882994106,"vegan_meals_instead_of_non_vegan_ones":874.8275047269489,"days_of_veganism":291.6091682423163,"weeks_of_veganism":41.657986678208076,"months_of_veganism":9.720341846908983,"years_of_veganism":0.7990662406305897,"barrels_of_petroleum":2.528745681233676,"canisters_of_bbq_propane":45.29890210660515,"railroad_cars_full_of_coal":0.005435824766194489,"homes_energy_in_a_year":0.10545500046417307,"homes_energy_in_a_month":1.2600241808038823,"homes_energy_in_a_week":5.458655230212505,"homes_energy_in_a_day":38.319303106811425,"homes_electricity_in_a_year":0.15981324812611794,"homes_electricity_in_a_month":1.9123231527472209,"homes_electricity_in_a_week":8.286371273586878,"homes_electricity_in_a_day":58.16223783332778,"homes_with_lowered_thermostat_2_degrees_for_a_winter":5.706528839550974,"homes_with_raised_thermostat_3_degrees_for_a_summer":2.5657092896437987,"replaced_refrigerators":1.09477510791157,"loads_of_cold_laundry":498.5325352871354,"lightbulbs_for_a_year":2.006906503679005,"lightbulbs_for_a_month":24.423160674511834,"lightbulbs_for_a_week":104.67006736793459,"lightbulbs_for_a_day":732.6937330704019,"lightbulbs_for_an_evening":4396.1634855873635,"lightbulbs_to_CFLs_for_a_day":12471.386669121135,"lightbulbs_to_CFLs_for_a_week":1781.626356398747,"lightbulbs_to_CFLs_for_a_month":415.7133963143494,"lightbulbs_to_CFLs_for_a_year":34.16850731534531,"days_with_lightbulbs_to_CFLs":277.14226420956624,"weeks_with_lightbulbs_to_CFLs":39.59128610210093,"months_with_lightbulbs_to_CFLs":9.237640607670912,"years_with_lightbulbs_to_CFLs":0.7588411373607507,"recycled_kgs_of_trash":749.7687458259719,"recycled_bags_of_trash":415.44377940594615},"methodology":"http://impact.brighterplanet.com/flights?timeframe=2012-01-01%2F2013-01-01","scope":"The
|
52
|
+
flight greenhouse gas emission is the anthropogenic greenhouse gas emissions
|
53
|
+
attributed to a single passenger on this flight. It includes CO2 emissions
|
54
|
+
from combustion of non-biogenic fuel and extra forcing effects of high-altitude
|
55
|
+
fuel combustion.","timeframe":"2012-01-01/2013-01-01","characteristics":{},"errors":["API
|
56
|
+
key \"carbon_test\" could not be verified. Please register at http://keys.brighterplanet.com"]}'
|
57
|
+
http_version: '1.1'
|
58
|
+
recorded_at: Fri, 08 Jun 2012 21:05:37 GMT
|
59
|
+
recorded_with: VCR 2.2.0
|
@@ -0,0 +1,60 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://impact.brighterplanet.com/automobiles.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: key=carbon_test
|
9
|
+
headers:
|
10
|
+
accept:
|
11
|
+
- ! '*/*'
|
12
|
+
user-agent:
|
13
|
+
- Ruby
|
14
|
+
content-type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 08 Jun 2012 21:05:38 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- keep-alive
|
31
|
+
status:
|
32
|
+
- 200 OK
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"compliance":[],"decisions":{"carbon":{"description":"5372.7 kg","object":{"value":5372.7062359752135,"units":"kilograms"},"methodology":"from
|
36
|
+
co2 emission, ch4 emission, n2o emission, and hfc emission"},"co2_emission":{"description":"5120.937371594278","object":5120.937371594278,"methodology":"from
|
37
|
+
fuel use and automobile fuel"},"co2_biogenic_emission":{"description":"0.0","object":0.0,"methodology":"from
|
38
|
+
fuel use and automobile fuel"},"ch4_emission":{"description":"5.274612816444227","object":5.274612816444227,"methodology":"from
|
39
|
+
fuel use and automobile fuel"},"n2o_emission":{"description":"17.935591286653448","object":17.935591286653448,"methodology":"from
|
40
|
+
fuel use and automobile fuel"},"hfc_emission":{"description":"228.55866027783722","object":228.55866027783722,"methodology":"from
|
41
|
+
fuel use and automobile fuel"},"energy":{"description":"75646.8 MJ","object":{"value":75646.77442646708,"units":"megajoules"},"methodology":"from
|
42
|
+
fuel use and automobile fuel"},"fuel_use":{"description":"2,178.696861134417
|
43
|
+
l","object":{"value":2178.696861134417,"units":"litres"},"methodology":"from
|
44
|
+
fuel efficiency and distance"},"distance":{"description":"17923.116724381467","object":17923.116724381467,"methodology":"from
|
45
|
+
annual distance"},"annual_distance":{"description":"17,923.116724381467 km","object":{"value":17923.116724381467,"units":"kilometres"},"methodology":"from
|
46
|
+
automobile fuel"},"automobile_fuel":{"description":"fallback","object":{"automobile_fuel":{"annual_distance":17923.116724381467,"annual_distance_units":"kilometres","base_fuel_name":null,"blend_fuel_name":null,"blend_portion":null,"ch4_emission_factor":0.002420994361601003,"ch4_emission_factor_units":"kilograms_co2e_per_litre","co2_biogenic_emission_factor":0.0,"co2_biogenic_emission_factor_units":"kilograms_per_litre","co2_emission_factor":2.3504588742684827,"co2_emission_factor_units":"kilograms_per_litre","code":null,"distance_key":null,"ef_key":null,"emission_factor":null,"emission_factor_units":null,"energy_content":34.72111048394262,"energy_content_units":null,"hfc_emission_factor":0.1049061318970414,"hfc_emission_factor_units":"kilograms_co2e_per_litre","n2o_emission_factor":0.008232256449534075,"n2o_emission_factor_units":"kilograms_co2e_per_litre","name":"fallback"}},"methodology":"default"},"speed":{"description":"50.94382232429702
|
47
|
+
km/h","object":{"value":50.94382232429702,"units":"kilometres_per_hour"},"methodology":"from
|
48
|
+
urbanity and safe country"},"fuel_efficiency":{"description":"8.226530750610781
|
49
|
+
km/l","object":{"value":8.226530750610781,"units":"kilometres_per_litre"},"methodology":"from
|
50
|
+
hybridity multiplier and safe country"},"hybridity_multiplier":{"description":"1.0","object":1.0,"methodology":"default"},"urbanity":{"description":"0.43","object":0.43,"methodology":"from
|
51
|
+
safe country"},"safe_country":{"description":null,"object":{"country":{"automobile_city_speed":32.0259,"automobile_city_speed_units":"kilometres_per_hour","automobile_fuel_efficiency":8.226530750610781,"automobile_fuel_efficiency_units":"kilometres_per_litre","automobile_highway_speed":91.8935,"automobile_highway_speed_units":"kilometres_per_hour","automobile_trip_distance":16.3348,"automobile_trip_distance_units":"kilometres","automobile_urbanity":0.43,"cooling_degree_days":null,"cooling_degree_days_units":null,"electricity_emission_factor":0.626089,"electricity_emission_factor_units":"kilograms_co2e_per_kilowatt_hour","electricity_loss_factor":0.096,"flight_route_inefficiency_factor":1.100000023841858,"heating_degree_days":null,"heating_degree_days_units":null,"iso_3166_alpha_3_code":null,"iso_3166_code":null,"iso_3166_numeric_code":null,"lodging_district_heat_intensity":1.7463,"lodging_district_heat_intensity_units":"megajoules_per_occupied_room_night","lodging_electricity_intensity":32.906,"lodging_electricity_intensity_units":"kilowatt_hours_per_occupied_room_night","lodging_fuel_oil_intensity":0.412389,"lodging_fuel_oil_intensity_units":"gallons_per_occupied_room_night","lodging_natural_gas_intensity":1.93316,"lodging_natural_gas_intensity_units":"cubic_metres_per_occupied_room_night","lodging_occupancy_rate":0.601,"name":"fallback","rail_passengers":null,"rail_speed":32.49720001220703,"rail_speed_units":"kilometres_per_hour","rail_trip_co2_emission_factor":0.06364482122342524,"rail_trip_co2_emission_factor_units":"kilograms_per_passenger_kilometre","rail_trip_diesel_intensity":0.008762920291076415,"rail_trip_diesel_intensity_units":"litres_per_passenger_kilometre","rail_trip_distance":37.11446191042177,"rail_trip_distance_units":"kilometres","rail_trip_electricity_intensity":0.10806735200626398,"rail_trip_electricity_intensity_units":"kilowatt_hour_per_passenger_kilometre"}},"methodology":"default"},"active_subtimeframe":{"description":"2012-01-01/2013-01-01","object":"2012-01-01/2013-01-01","methodology":"from
|
52
|
+
acquisition and retirement"},"acquisition":{"description":"2012-01-01","object":"2012-01-01","methodology":"default"},"retirement":{"description":"2013-01-01","object":"2013-01-01","methodology":"default"}},"emitter":"Automobile","equivalents":{"cars_off_the_road_for_a_year":0.9778325349474889,"cars_off_the_road_for_a_month":11.723245006897915,"cars_off_the_road_for_a_week":50.79893746114564,"cars_off_the_road_for_a_day":356.565022056731,"cars_to_priuses_for_a_year":1.9556650698949778,"cars_to_priuses_for_a_month":23.44649001379583,"cars_to_priuses_for_a_week":101.59787492229128,"cars_to_priuses_for_a_day":713.130044113462,"one_way_domestic_flight":17.461295266919443,"round_trip_domestic_flight":8.730647633459721,"one_way_cross_country_flight":6.1356305214836935,"round_trip_cross_country_flight":3.0678152607418467,"vegan_meals_instead_of_non_vegan_ones":4323.346862908187,"days_of_veganism":1441.1156209693954,"weeks_of_veganism":205.87135755009822,"months_of_veganism":48.03736645585438,"years_of_veganism":3.9489390834417817,"barrels_of_petroleum":12.496914704878346,"canisters_of_bbq_propane":223.86455073437924,"railroad_cars_full_of_coal":0.02686353117987607,"homes_energy_in_a_year":0.5211525048895957,"homes_energy_in_a_month":6.226966527495273,"homes_energy_in_a_week":26.97635801083155,"homes_energy_in_a_day":189.37177669941835,"homes_electricity_in_a_year":0.7897878166883564,"homes_electricity_in_a_month":9.4505902690804,"homes_electricity_in_a_week":40.95076693060308,"homes_electricity_in_a_day":287.43441091843795,"homes_with_lowered_thermostat_2_degrees_for_a_winter":28.201335032633896,"homes_with_raised_thermostat_3_degrees_for_a_summer":12.679586716901504,"replaced_refrigerators":5.41031517962704,"loads_of_cold_laundry":2463.718916981266,"lightbulbs_for_a_year":9.918015711610245,"lightbulbs_for_a_month":120.69784559118317,"lightbulbs_for_a_week":517.2734109872216,"lightbulbs_for_a_day":3620.9299950292593,"lightbulbs_for_an_evening":21725.58534288179,"lightbulbs_to_CFLs_for_a_day":61632.87064104,"lightbulbs_to_CFLs_for_a_week":8804.694270803931,"lightbulbs_to_CFLs_for_a_month":2054.4315286309097,"lightbulbs_to_CFLs_for_a_year":168.85878429046497,"days_with_lightbulbs_to_CFLs":1369.6210190872732,"weeks_with_lightbulbs_to_CFLs":195.65784299550933,"months_with_lightbulbs_to_CFLs":45.65188488708139,"years_with_lightbulbs_to_CFLs":3.7501489527106995,"recycled_kgs_of_trash":3705.313719171486,"recycled_bags_of_trash":2053.099097484388},"methodology":"http://impact.brighterplanet.com/automobiles?timeframe=2012-01-01%2F2013-01-01","scope":"The
|
53
|
+
automobile emission estimate is the total anthropogenic emissions from fuel
|
54
|
+
and air conditioning used by the automobile during the timeframe. It includes
|
55
|
+
CO2 emissions from combustion of non-biogenic fuel, CH4 and N2O emissions
|
56
|
+
from combustion of all fuel, and fugitive HFC emissions from air conditioning.","timeframe":"2012-01-01/2013-01-01","characteristics":{},"errors":["API
|
57
|
+
key \"carbon_test\" could not be verified. Please register at http://keys.brighterplanet.com"]}'
|
58
|
+
http_version: '1.1'
|
59
|
+
recorded_at: Fri, 08 Jun 2012 21:05:38 GMT
|
60
|
+
recorded_with: VCR 2.2.0
|
@@ -0,0 +1,74 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://impact.brighterplanet.com/flights.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: origin_airport=LAX&destination_airport=SFO&segments_per_trip=1&trips=1&key=carbon_test
|
9
|
+
headers:
|
10
|
+
accept:
|
11
|
+
- ! '*/*'
|
12
|
+
user-agent:
|
13
|
+
- Ruby
|
14
|
+
content-type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 08 Jun 2012 21:05:39 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- keep-alive
|
31
|
+
status:
|
32
|
+
- 200 OK
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"compliance":[],"decisions":{"carbon":{"description":"158.9 kg","object":{"value":158.88245012544277,"units":"kilograms"},"methodology":"from
|
36
|
+
fuel use and greenhouse gas emission factor"},"ghg_emission_factor":{"description":"5.15214","object":5.15214,"methodology":"from
|
37
|
+
fuel and aviation multiplier"},"aviation_multiplier":{"description":"2.0","object":2.0,"methodology":"default"},"energy":{"description":"1160.3
|
38
|
+
MJ","object":{"value":1160.3377016414531,"units":"megajoules"},"methodology":"from
|
39
|
+
fuel use and fuel"},"fuel_use":{"description":"30.838146891474757","object":30.838146891474757,"methodology":"from
|
40
|
+
fuel per segment, segments per trip, trips, freight_share, passengers, seat
|
41
|
+
class multiplier, fuel, date, and timeframe"},"fuel_per_segment":{"description":"2809.4943974548605","object":2809.4943974548605,"methodology":"from
|
42
|
+
adjusted distance per segment and fuel use coefficients"},"seat_class_multiplier":{"description":"1.0","object":1.0,"methodology":"default"},"distance_class":{"description":"short
|
43
|
+
haul","object":{"flight_distance_class":{"distance":1108.0,"distance_units":"kilometres","max_distance":3700.0,"max_distance_units":"kilometres","min_distance":0.0,"min_distance_units":"kilometres","name":"short
|
44
|
+
haul"}},"methodology":"from adjusted distance per segment"},"adjusted_distance_per_segment":{"description":"314.11399481652126","object":314.11399481652126,"methodology":"from
|
45
|
+
adjusted distance and segments per trip"},"adjusted_distance":{"description":"314.11399481652126","object":314.11399481652126,"methodology":"from
|
46
|
+
distance, route inefficiency factor, and dogleg factor"},"distance":{"description":"293.56448113693574","object":293.56448113693574,"methodology":"from
|
47
|
+
airports"},"route_inefficiency_factor":{"description":"1.07","object":1.07,"methodology":"from
|
48
|
+
country"},"dogleg_factor":{"description":"1.0","object":1.0,"methodology":"from
|
49
|
+
segments per trip"},"fuel_use_coefficients":{"description":"Fuel use equation","object":{"m3":1.0348093300372378e-07,"m2":-0.00023017671642226525,"m1":5.385202868809918,"b":1137.430624447256},"methodology":"from
|
50
|
+
cohort"},"fuel":{"description":"Jet Fuel","object":{"fuel":{"biogenic_fraction":0.0,"carbon_content":18.672,"carbon_content_units":"grams_per_megajoule","co2_biogenic_emission_factor":0.0,"co2_biogenic_emission_factor_units":"kilograms_per_litre","co2_emission_factor":2.57607,"co2_emission_factor_units":"kilograms_per_litre","density":0.8156,"density_units":"kilograms_per_litre","energy_content":37.6267,"energy_content_units":"megajoules_per_litre","name":"Jet
|
51
|
+
Fuel","oxidation_factor":1.0,"physical_units":null}},"methodology":"default"},"passengers":{"description":"110","object":110,"methodology":"from
|
52
|
+
seats and load factor"},"seats":{"description":"141.62026378724536","object":141.62026378724536,"methodology":"from
|
53
|
+
cohort"},"load_factor":{"description":"0.7786548902022515","object":0.7786548902022515,"methodology":"from
|
54
|
+
cohort"},"freight_share":{"description":"0.01524089564944548","object":0.01524089564944548,"methodology":"from
|
55
|
+
cohort"},"country":{"description":"US","object":{"country":{"automobile_city_speed":32.0259,"automobile_city_speed_units":"kilometres_per_hour","automobile_fuel_efficiency":9.2669,"automobile_fuel_efficiency_units":"kilometres_per_litre","automobile_highway_speed":91.8935,"automobile_highway_speed_units":"kilometres_per_hour","automobile_trip_distance":16.3348,"automobile_trip_distance_units":"kilometres","automobile_urbanity":0.43,"cooling_degree_days":882.0,"cooling_degree_days_units":"degrees_celsius","electricity_emission_factor":0.589455,"electricity_emission_factor_units":"kilograms_co2e_per_kilowatt_hour","electricity_loss_factor":0.0615633,"flight_route_inefficiency_factor":1.07,"heating_degree_days":2159.0,"heating_degree_days_units":"degrees_celsius","iso_3166_alpha_3_code":"USA","iso_3166_code":"US","iso_3166_numeric_code":840,"lodging_district_heat_intensity":1.7463,"lodging_district_heat_intensity_units":"megajoules_per_occupied_room_night","lodging_electricity_intensity":32.906,"lodging_electricity_intensity_units":"kilowatt_hours_per_occupied_room_night","lodging_fuel_oil_intensity":0.412389,"lodging_fuel_oil_intensity_units":"gallons_per_occupied_room_night","lodging_natural_gas_intensity":1.93316,"lodging_natural_gas_intensity_units":"cubic_metres_per_occupied_room_night","lodging_occupancy_rate":0.601,"name":"United
|
56
|
+
States","rail_passengers":4467000000.0,"rail_speed":32.4972,"rail_speed_units":"kilometres_per_hour","rail_trip_co2_emission_factor":0.0957617,"rail_trip_co2_emission_factor_units":"kilograms_per_passenger_kilometre","rail_trip_diesel_intensity":0.0194247,"rail_trip_diesel_intensity_units":"litres_per_passenger_kilometre","rail_trip_distance":12.9952,"rail_trip_distance_units":"kilometres","rail_trip_electricity_intensity":0.140512,"rail_trip_electricity_intensity_units":"kilowatt_hours_per_passenger_kilometre"}},"methodology":"from
|
57
|
+
origin airport and destination airport"},"cohort":{"description":"BrighterPlanet::Flight::ImpactModel::FlightSegmentCohort","object":{"members":157,"sql":"SELECT
|
58
|
+
* FROM `flight_segments` WHERE (`flight_segments`.`source` = ''BTS T100''
|
59
|
+
AND `flight_segments`.`year` IN (2011, 2012) AND `flight_segments`.`passengers`
|
60
|
+
> 0) AND `flight_segments`.`origin_airport_iata_code` = ''LAX'' AND `flight_segments`.`destination_airport_iata_code`
|
61
|
+
= ''SFO''"},"methodology":"from segments per trip and input"},"date":{"description":"2012-01-01","object":"2012-01-01","methodology":"from
|
62
|
+
timeframe"}},"emitter":"Flight","equivalents":{"cars_off_the_road_for_a_year":0.028916605922830584,"cars_off_the_road_for_a_month":0.3466815061737161,"cars_off_the_road_for_a_week":1.5022335659360615,"cars_off_the_road_for_a_day":10.544392685025134,"cars_to_priuses_for_a_year":0.05783321184566117,"cars_to_priuses_for_a_month":0.6933630123474323,"cars_to_priuses_for_a_week":3.004467131872123,"cars_to_priuses_for_a_day":21.088785370050267,"one_way_domestic_flight":0.5163679629076889,"round_trip_domestic_flight":0.25818398145384447,"one_way_cross_country_flight":0.18144375804325566,"round_trip_cross_country_flight":0.09072187902162783,"vegan_meals_instead_of_non_vegan_ones":127.85064214409218,"days_of_veganism":42.61688071469739,"weeks_of_veganism":6.088057723906716,"months_of_veganism":1.4205679865715837,"years_of_veganism":0.11677860084220043,"barrels_of_petroleum":0.36956057899177985,"canisters_of_bbq_propane":6.620155049376825,"railroad_cars_full_of_coal":0.000794412250627214,"homes_energy_in_a_year":0.01541159766216795,"homes_energy_in_a_month":0.18414475969538818,"homes_energy_in_a_week":0.7977487820798482,"homes_energy_in_a_day":5.600129719571481,"homes_electricity_in_a_year":0.023355720168440088,"homes_electricity_in_a_month":0.27947422977065384,"homes_electricity_in_a_week":1.2110020348561248,"homes_electricity_in_a_day":8.500052199261063,"homes_with_lowered_thermostat_2_degrees_for_a_winter":0.8339739807084492,"homes_with_raised_thermostat_3_degrees_for_a_summer":0.37496258229604496,"replaced_refrigerators":0.15999462727632088,"loads_of_cold_laundry":72.85745409442329,"lightbulbs_for_a_year":0.29329700293156735,"lightbulbs_for_a_month":3.5692942420680716,"lightbulbs_for_a_week":15.29688453317738,"lightbulbs_for_a_day":107.07866837959203,"lightbulbs_for_an_evening":642.4721691600023,"lightbulbs_to_CFLs_for_a_day":1822.6162134352137,"lightbulbs_to_CFLs_for_a_week":260.37369938147333,"lightbulbs_to_CFLs_for_a_month":60.75394792631718,"lightbulbs_to_CFLs_for_a_year":4.993516524992541,"days_with_lightbulbs_to_CFLs":40.50263195087812,"weeks_with_lightbulbs_to_CFLs":5.786022186218249,"months_with_lightbulbs_to_CFLs":1.350024178715887,"years_with_lightbulbs_to_CFLs":0.11089995018755906,"recycled_kgs_of_trash":109.57407614126224,"recycled_bags_of_trash":60.71454507868607},"methodology":"http://impact.brighterplanet.com/flights?destination_airport=SFO&origin_airport=LAX&segments_per_trip=1&timeframe=2012-01-01%2F2013-01-01&trips=1","scope":"The
|
63
|
+
flight greenhouse gas emission is the anthropogenic greenhouse gas emissions
|
64
|
+
attributed to a single passenger on this flight. It includes CO2 emissions
|
65
|
+
from combustion of non-biogenic fuel and extra forcing effects of high-altitude
|
66
|
+
fuel combustion.","timeframe":"2012-01-01/2013-01-01","characteristics":{"segments_per_trip":{"description":"1","object":1},"trips":{"description":"1","object":1},"origin_airport":{"description":"LAX","object":{"airport":{"city":"Los
|
67
|
+
Angeles","country_iso_3166_code":"US","country_name":"United States","iata_code":"LAX","latitude":33.9425,"longitude":-118.408,"name":"Los
|
68
|
+
Angeles International"}}},"destination_airport":{"description":"SFO","object":{"airport":{"city":"San
|
69
|
+
Francisco","country_iso_3166_code":"US","country_name":"United States","iata_code":"SFO","latitude":37.619,"longitude":-122.375,"name":"San
|
70
|
+
Francisco International"}}}},"errors":["API key \"carbon_test\" could not
|
71
|
+
be verified. Please register at http://keys.brighterplanet.com"]}'
|
72
|
+
http_version: '1.1'
|
73
|
+
recorded_at: Fri, 08 Jun 2012 21:05:39 GMT
|
74
|
+
recorded_with: VCR 2.2.0
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://impact.brighterplanet.com/monkeys.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: key=carbon_test
|
9
|
+
headers:
|
10
|
+
accept:
|
11
|
+
- ! '*/*'
|
12
|
+
user-agent:
|
13
|
+
- Ruby
|
14
|
+
content-type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 404
|
19
|
+
message: Not Found
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 08 Jun 2012 21:05:40 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- keep-alive
|
31
|
+
status:
|
32
|
+
- 404 Not Found
|
33
|
+
etag:
|
34
|
+
- b0dcd496ec3896280a7c636e2d5b9870
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! '{name: "HTTPError", message: "404 Not found"}
|
38
|
+
|
39
|
+
'
|
40
|
+
http_version: '1.1'
|
41
|
+
recorded_at: Fri, 08 Jun 2012 21:05:40 GMT
|
42
|
+
recorded_with: VCR 2.2.0
|
@@ -0,0 +1,58 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://carbon.brighterplanet.com/flights.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: key=carbon_test
|
9
|
+
headers:
|
10
|
+
accept:
|
11
|
+
- ! '*/*'
|
12
|
+
user-agent:
|
13
|
+
- Ruby
|
14
|
+
content-type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 08 Jun 2012 21:05:43 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- keep-alive
|
31
|
+
status:
|
32
|
+
- 200 OK
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"emission":1087.1649532388976,"emitter":"Flight","timeframe":"2012-01-01/2013-01-01","methodology":"http://impact.brighterplanet.com/flights?timeframe=2012-01-01%2F2013-01-01","scope":"The
|
36
|
+
flight greenhouse gas emission is the anthropogenic greenhouse gas emissions
|
37
|
+
attributed to a single passenger on this flight. It includes CO2 emissions
|
38
|
+
from combustion of non-biogenic fuel and extra forcing effects of high-altitude
|
39
|
+
fuel combustion.","complies":[],"equivalents":{"cars_off_the_road_for_a_year":0.19786402148947937,"cars_off_the_road_for_a_month":2.3721939279672744,"cars_off_the_road_for_a_week":10.279144632873777,"cars_off_the_road_for_a_day":72.15078928665267,"cars_to_priuses_for_a_year":0.39572804297895875,"cars_to_priuses_for_a_month":4.744387855934549,"cars_to_priuses_for_a_week":20.558289265747554,"cars_to_priuses_for_a_day":144.30157857330533,"one_way_domestic_flight":3.533286098026417,"round_trip_domestic_flight":1.7666430490132086,"one_way_cross_country_flight":1.2415423765988212,"round_trip_cross_country_flight":0.6207711882994106,"vegan_meals_instead_of_non_vegan_ones":874.8275047269489,"days_of_veganism":291.6091682423163,"weeks_of_veganism":41.657986678208076,"months_of_veganism":9.720341846908983,"years_of_veganism":0.7990662406305897,"barrels_of_petroleum":2.528745681233676,"canisters_of_bbq_propane":45.29890210660515,"railroad_cars_full_of_coal":0.005435824766194489,"homes_energy_in_a_year":0.10545500046417307,"homes_energy_in_a_month":1.2600241808038823,"homes_energy_in_a_week":5.458655230212505,"homes_energy_in_a_day":38.319303106811425,"homes_electricity_in_a_year":0.15981324812611794,"homes_electricity_in_a_month":1.9123231527472209,"homes_electricity_in_a_week":8.286371273586878,"homes_electricity_in_a_day":58.16223783332778,"homes_with_lowered_thermostat_2_degrees_for_a_winter":5.706528839550974,"homes_with_raised_thermostat_3_degrees_for_a_summer":2.5657092896437987,"replaced_refrigerators":1.09477510791157,"loads_of_cold_laundry":498.5325352871354,"lightbulbs_for_a_year":2.006906503679005,"lightbulbs_for_a_month":24.423160674511834,"lightbulbs_for_a_week":104.67006736793459,"lightbulbs_for_a_day":732.6937330704019,"lightbulbs_for_an_evening":4396.1634855873635,"lightbulbs_to_CFLs_for_a_day":12471.386669121135,"lightbulbs_to_CFLs_for_a_week":1781.626356398747,"lightbulbs_to_CFLs_for_a_month":415.7133963143494,"lightbulbs_to_CFLs_for_a_year":34.16850731534531,"days_with_lightbulbs_to_CFLs":277.14226420956624,"weeks_with_lightbulbs_to_CFLs":39.59128610210093,"months_with_lightbulbs_to_CFLs":9.237640607670912,"years_with_lightbulbs_to_CFLs":0.7588411373607507,"recycled_kgs_of_trash":749.7687458259719,"recycled_bags_of_trash":415.44377940594615},"emission_units":"kilograms","execution_id":"UNSUPPORTED","errors":["API
|
40
|
+
key \"carbon_test\" could not be verified. Please register at http://keys.brighterplanet.com"],"reports":[{"committee":{"name":"emission"},"conclusion":{"value":1087.1649532388976,"units":"kilograms"},"quorum":{"name":"from
|
41
|
+
fuel use and greenhouse gas emission factor"}},{"committee":{"name":"ghg_emission_factor"},"conclusion":5.15214,"quorum":{"name":"from
|
42
|
+
fuel and aviation multiplier"}},{"committee":{"name":"aviation_multiplier"},"conclusion":2.0,"quorum":{"name":"default"}},{"committee":{"name":"energy"},"conclusion":{"value":7939.69681453416,"units":"megajoules"},"quorum":{"name":"from
|
43
|
+
fuel use and fuel"}},{"committee":{"name":"fuel_use"},"conclusion":211.0123081358227,"quorum":{"name":"from
|
44
|
+
fuel per segment, segments per trip, trips, freight_share, passengers, seat
|
45
|
+
class multiplier, fuel, date, and timeframe"}},{"committee":{"name":"fuel_per_segment"},"conclusion":8477.788829453548,"quorum":{"name":"from
|
46
|
+
adjusted distance per segment and fuel use coefficients"}},{"committee":{"name":"seat_class_multiplier"},"conclusion":1.0,"quorum":{"name":"default"}},{"committee":{"name":"distance_class"},"conclusion":{"flight_distance_class":{"distance":1108.0,"distance_units":"kilometres","max_distance":3700.0,"max_distance_units":"kilometres","min_distance":0.0,"min_distance_units":"kilometres","name":"short
|
47
|
+
haul"}},"quorum":{"name":"from adjusted distance per segment"}},{"committee":{"name":"adjusted_distance_per_segment"},"conclusion":962.1615428278766,"quorum":{"name":"from
|
48
|
+
adjusted distance and segments per trip"}},{"committee":{"name":"adjusted_distance"},"conclusion":1616.4313919508327,"quorum":{"name":"from
|
49
|
+
distance, route inefficiency factor, and dogleg factor"}},{"committee":{"name":"distance"},"conclusion":1262.599964160848,"quorum":{"name":"default"}},{"committee":{"name":"route_inefficiency_factor"},"conclusion":1.100000023841858,"quorum":{"name":"default"}},{"committee":{"name":"dogleg_factor"},"conclusion":1.1638548181950328,"quorum":{"name":"from
|
50
|
+
segments per trip"}},{"committee":{"name":"fuel_use_coefficients"},"conclusion":{"m3":1.0532072472371498e-07,"m2":-0.00015627733290887285,"m1":7.148223019744806,"b":1650.9061605236384},"quorum":{"name":"default"}},{"committee":{"name":"fuel"},"conclusion":{"fuel":{"biogenic_fraction":0.0,"carbon_content":18.672,"carbon_content_units":"grams_per_megajoule","co2_biogenic_emission_factor":0.0,"co2_biogenic_emission_factor_units":"kilograms_per_litre","co2_emission_factor":2.57607,"co2_emission_factor_units":"kilograms_per_litre","density":0.8156,"density_units":"kilograms_per_litre","energy_content":37.6267,"energy_content_units":"megajoules_per_litre","name":"Jet
|
51
|
+
Fuel","oxidation_factor":1.0,"physical_units":null}},"quorum":{"name":"default"}},{"committee":{"name":"passengers"},"conclusion":131,"quorum":{"name":"from
|
52
|
+
seats and load factor"}},{"committee":{"name":"seats"},"conclusion":169.27798641328772,"quorum":{"name":"default"}},{"committee":{"name":"load_factor"},"conclusion":0.7731146349652108,"quorum":{"name":"default"}},{"committee":{"name":"freight_share"},"conclusion":0.06885888622195808,"quorum":{"name":"default"}},{"committee":{"name":"trips"},"conclusion":1.7,"quorum":{"name":"default"}},{"committee":{"name":"segments_per_trip"},"conclusion":1.68,"quorum":{"name":"default"}},{"committee":{"name":"date"},"conclusion":"2012-01-01","quorum":{"name":"from
|
53
|
+
timeframe"}}],"carbon":{"value":1087.1649532388976,"units":"kilograms"},"ghg_emission_factor":5.15214,"aviation_multiplier":2.0,"energy":{"value":7939.69681453416,"units":"megajoules"},"fuel_use":211.0123081358227,"fuel_per_segment":8477.788829453548,"seat_class_multiplier":1.0,"distance_class":{"flight_distance_class":{"distance":1108.0,"distance_units":"kilometres","max_distance":3700.0,"max_distance_units":"kilometres","min_distance":0.0,"min_distance_units":"kilometres","name":"short
|
54
|
+
haul"}},"adjusted_distance_per_segment":962.1615428278766,"adjusted_distance":1616.4313919508327,"distance":1262.599964160848,"route_inefficiency_factor":1.100000023841858,"dogleg_factor":1.1638548181950328,"fuel_use_coefficients":{"m3":1.0532072472371498e-07,"m2":-0.00015627733290887285,"m1":7.148223019744806,"b":1650.9061605236384},"fuel":{"fuel":{"biogenic_fraction":0.0,"carbon_content":18.672,"carbon_content_units":"grams_per_megajoule","co2_biogenic_emission_factor":0.0,"co2_biogenic_emission_factor_units":"kilograms_per_litre","co2_emission_factor":2.57607,"co2_emission_factor_units":"kilograms_per_litre","density":0.8156,"density_units":"kilograms_per_litre","energy_content":37.6267,"energy_content_units":"megajoules_per_litre","name":"Jet
|
55
|
+
Fuel","oxidation_factor":1.0,"physical_units":null}},"passengers":131,"seats":169.27798641328772,"load_factor":0.7731146349652108,"freight_share":0.06885888622195808,"trips":1.7,"segments_per_trip":1.68,"date":"2012-01-01"}'
|
56
|
+
http_version: '1.1'
|
57
|
+
recorded_at: Fri, 08 Jun 2012 21:05:43 GMT
|
58
|
+
recorded_with: VCR 2.2.0
|
@@ -0,0 +1,59 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://impact.brighterplanet.com/flights.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: key=carbon_test1
|
9
|
+
headers:
|
10
|
+
accept:
|
11
|
+
- ! '*/*'
|
12
|
+
user-agent:
|
13
|
+
- Ruby
|
14
|
+
content-type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 08 Jun 2012 21:05:41 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- keep-alive
|
31
|
+
status:
|
32
|
+
- 200 OK
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"compliance":[],"decisions":{"carbon":{"description":"1087.2 kg","object":{"value":1087.1649532388976,"units":"kilograms"},"methodology":"from
|
36
|
+
fuel use and greenhouse gas emission factor"},"ghg_emission_factor":{"description":"5.15214","object":5.15214,"methodology":"from
|
37
|
+
fuel and aviation multiplier"},"aviation_multiplier":{"description":"2.0","object":2.0,"methodology":"default"},"energy":{"description":"7939.7
|
38
|
+
MJ","object":{"value":7939.69681453416,"units":"megajoules"},"methodology":"from
|
39
|
+
fuel use and fuel"},"fuel_use":{"description":"211.0123081358227","object":211.0123081358227,"methodology":"from
|
40
|
+
fuel per segment, segments per trip, trips, freight_share, passengers, seat
|
41
|
+
class multiplier, fuel, date, and timeframe"},"fuel_per_segment":{"description":"8477.788829453548","object":8477.788829453548,"methodology":"from
|
42
|
+
adjusted distance per segment and fuel use coefficients"},"seat_class_multiplier":{"description":"1.0","object":1.0,"methodology":"default"},"distance_class":{"description":"short
|
43
|
+
haul","object":{"flight_distance_class":{"distance":1108.0,"distance_units":"kilometres","max_distance":3700.0,"max_distance_units":"kilometres","min_distance":0.0,"min_distance_units":"kilometres","name":"short
|
44
|
+
haul"}},"methodology":"from adjusted distance per segment"},"adjusted_distance_per_segment":{"description":"962.1615428278766","object":962.1615428278766,"methodology":"from
|
45
|
+
adjusted distance and segments per trip"},"adjusted_distance":{"description":"1616.4313919508327","object":1616.4313919508327,"methodology":"from
|
46
|
+
distance, route inefficiency factor, and dogleg factor"},"distance":{"description":"1262.599964160848","object":1262.599964160848,"methodology":"default"},"route_inefficiency_factor":{"description":"1.100000023841858","object":1.100000023841858,"methodology":"default"},"dogleg_factor":{"description":"1.1638548181950328","object":1.1638548181950328,"methodology":"from
|
47
|
+
segments per trip"},"fuel_use_coefficients":{"description":"BrighterPlanet::Flight::ImpactModel::FuelUseEquation::Given","object":{"m3":1.0532072472371498e-07,"m2":-0.00015627733290887285,"m1":7.148223019744806,"b":1650.9061605236384},"methodology":"default"},"fuel":{"description":"Jet
|
48
|
+
Fuel","object":{"fuel":{"biogenic_fraction":0.0,"carbon_content":18.672,"carbon_content_units":"grams_per_megajoule","co2_biogenic_emission_factor":0.0,"co2_biogenic_emission_factor_units":"kilograms_per_litre","co2_emission_factor":2.57607,"co2_emission_factor_units":"kilograms_per_litre","density":0.8156,"density_units":"kilograms_per_litre","energy_content":37.6267,"energy_content_units":"megajoules_per_litre","name":"Jet
|
49
|
+
Fuel","oxidation_factor":1.0,"physical_units":null}},"methodology":"default"},"passengers":{"description":"131","object":131,"methodology":"from
|
50
|
+
seats and load factor"},"seats":{"description":"169.27798641328772","object":169.27798641328772,"methodology":"default"},"load_factor":{"description":"0.7731146349652108","object":0.7731146349652108,"methodology":"default"},"freight_share":{"description":"0.06885888622195808","object":0.06885888622195808,"methodology":"default"},"trips":{"description":"1.7","object":1.7,"methodology":"default"},"segments_per_trip":{"description":"1.68","object":1.68,"methodology":"default"},"date":{"description":"2012-01-01","object":"2012-01-01","methodology":"from
|
51
|
+
timeframe"}},"emitter":"Flight","equivalents":{"cars_off_the_road_for_a_year":0.19786402148947937,"cars_off_the_road_for_a_month":2.3721939279672744,"cars_off_the_road_for_a_week":10.279144632873777,"cars_off_the_road_for_a_day":72.15078928665267,"cars_to_priuses_for_a_year":0.39572804297895875,"cars_to_priuses_for_a_month":4.744387855934549,"cars_to_priuses_for_a_week":20.558289265747554,"cars_to_priuses_for_a_day":144.30157857330533,"one_way_domestic_flight":3.533286098026417,"round_trip_domestic_flight":1.7666430490132086,"one_way_cross_country_flight":1.2415423765988212,"round_trip_cross_country_flight":0.6207711882994106,"vegan_meals_instead_of_non_vegan_ones":874.8275047269489,"days_of_veganism":291.6091682423163,"weeks_of_veganism":41.657986678208076,"months_of_veganism":9.720341846908983,"years_of_veganism":0.7990662406305897,"barrels_of_petroleum":2.528745681233676,"canisters_of_bbq_propane":45.29890210660515,"railroad_cars_full_of_coal":0.005435824766194489,"homes_energy_in_a_year":0.10545500046417307,"homes_energy_in_a_month":1.2600241808038823,"homes_energy_in_a_week":5.458655230212505,"homes_energy_in_a_day":38.319303106811425,"homes_electricity_in_a_year":0.15981324812611794,"homes_electricity_in_a_month":1.9123231527472209,"homes_electricity_in_a_week":8.286371273586878,"homes_electricity_in_a_day":58.16223783332778,"homes_with_lowered_thermostat_2_degrees_for_a_winter":5.706528839550974,"homes_with_raised_thermostat_3_degrees_for_a_summer":2.5657092896437987,"replaced_refrigerators":1.09477510791157,"loads_of_cold_laundry":498.5325352871354,"lightbulbs_for_a_year":2.006906503679005,"lightbulbs_for_a_month":24.423160674511834,"lightbulbs_for_a_week":104.67006736793459,"lightbulbs_for_a_day":732.6937330704019,"lightbulbs_for_an_evening":4396.1634855873635,"lightbulbs_to_CFLs_for_a_day":12471.386669121135,"lightbulbs_to_CFLs_for_a_week":1781.626356398747,"lightbulbs_to_CFLs_for_a_month":415.7133963143494,"lightbulbs_to_CFLs_for_a_year":34.16850731534531,"days_with_lightbulbs_to_CFLs":277.14226420956624,"weeks_with_lightbulbs_to_CFLs":39.59128610210093,"months_with_lightbulbs_to_CFLs":9.237640607670912,"years_with_lightbulbs_to_CFLs":0.7588411373607507,"recycled_kgs_of_trash":749.7687458259719,"recycled_bags_of_trash":415.44377940594615},"methodology":"http://impact.brighterplanet.com/flights?timeframe=2012-01-01%2F2013-01-01","scope":"The
|
52
|
+
flight greenhouse gas emission is the anthropogenic greenhouse gas emissions
|
53
|
+
attributed to a single passenger on this flight. It includes CO2 emissions
|
54
|
+
from combustion of non-biogenic fuel and extra forcing effects of high-altitude
|
55
|
+
fuel combustion.","timeframe":"2012-01-01/2013-01-01","characteristics":{},"errors":["API
|
56
|
+
key \"carbon_test1\" could not be verified. Please register at http://keys.brighterplanet.com"]}'
|
57
|
+
http_version: '1.1'
|
58
|
+
recorded_at: Fri, 08 Jun 2012 21:05:42 GMT
|
59
|
+
recorded_with: VCR 2.2.0
|
@@ -0,0 +1,59 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://impact.brighterplanet.com/flights.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: key=carbon_test2
|
9
|
+
headers:
|
10
|
+
accept:
|
11
|
+
- ! '*/*'
|
12
|
+
user-agent:
|
13
|
+
- Ruby
|
14
|
+
content-type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 08 Jun 2012 21:05:42 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- keep-alive
|
31
|
+
status:
|
32
|
+
- 200 OK
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"compliance":[],"decisions":{"carbon":{"description":"1087.2 kg","object":{"value":1087.1649532388976,"units":"kilograms"},"methodology":"from
|
36
|
+
fuel use and greenhouse gas emission factor"},"ghg_emission_factor":{"description":"5.15214","object":5.15214,"methodology":"from
|
37
|
+
fuel and aviation multiplier"},"aviation_multiplier":{"description":"2.0","object":2.0,"methodology":"default"},"energy":{"description":"7939.7
|
38
|
+
MJ","object":{"value":7939.69681453416,"units":"megajoules"},"methodology":"from
|
39
|
+
fuel use and fuel"},"fuel_use":{"description":"211.0123081358227","object":211.0123081358227,"methodology":"from
|
40
|
+
fuel per segment, segments per trip, trips, freight_share, passengers, seat
|
41
|
+
class multiplier, fuel, date, and timeframe"},"fuel_per_segment":{"description":"8477.788829453548","object":8477.788829453548,"methodology":"from
|
42
|
+
adjusted distance per segment and fuel use coefficients"},"seat_class_multiplier":{"description":"1.0","object":1.0,"methodology":"default"},"distance_class":{"description":"short
|
43
|
+
haul","object":{"flight_distance_class":{"distance":1108.0,"distance_units":"kilometres","max_distance":3700.0,"max_distance_units":"kilometres","min_distance":0.0,"min_distance_units":"kilometres","name":"short
|
44
|
+
haul"}},"methodology":"from adjusted distance per segment"},"adjusted_distance_per_segment":{"description":"962.1615428278766","object":962.1615428278766,"methodology":"from
|
45
|
+
adjusted distance and segments per trip"},"adjusted_distance":{"description":"1616.4313919508327","object":1616.4313919508327,"methodology":"from
|
46
|
+
distance, route inefficiency factor, and dogleg factor"},"distance":{"description":"1262.599964160848","object":1262.599964160848,"methodology":"default"},"route_inefficiency_factor":{"description":"1.100000023841858","object":1.100000023841858,"methodology":"default"},"dogleg_factor":{"description":"1.1638548181950328","object":1.1638548181950328,"methodology":"from
|
47
|
+
segments per trip"},"fuel_use_coefficients":{"description":"BrighterPlanet::Flight::ImpactModel::FuelUseEquation::Given","object":{"m3":1.0532072472371498e-07,"m2":-0.00015627733290887285,"m1":7.148223019744806,"b":1650.9061605236384},"methodology":"default"},"fuel":{"description":"Jet
|
48
|
+
Fuel","object":{"fuel":{"biogenic_fraction":0.0,"carbon_content":18.672,"carbon_content_units":"grams_per_megajoule","co2_biogenic_emission_factor":0.0,"co2_biogenic_emission_factor_units":"kilograms_per_litre","co2_emission_factor":2.57607,"co2_emission_factor_units":"kilograms_per_litre","density":0.8156,"density_units":"kilograms_per_litre","energy_content":37.6267,"energy_content_units":"megajoules_per_litre","name":"Jet
|
49
|
+
Fuel","oxidation_factor":1.0,"physical_units":null}},"methodology":"default"},"passengers":{"description":"131","object":131,"methodology":"from
|
50
|
+
seats and load factor"},"seats":{"description":"169.27798641328772","object":169.27798641328772,"methodology":"default"},"load_factor":{"description":"0.7731146349652108","object":0.7731146349652108,"methodology":"default"},"freight_share":{"description":"0.06885888622195808","object":0.06885888622195808,"methodology":"default"},"trips":{"description":"1.7","object":1.7,"methodology":"default"},"segments_per_trip":{"description":"1.68","object":1.68,"methodology":"default"},"date":{"description":"2012-01-01","object":"2012-01-01","methodology":"from
|
51
|
+
timeframe"}},"emitter":"Flight","equivalents":{"cars_off_the_road_for_a_year":0.19786402148947937,"cars_off_the_road_for_a_month":2.3721939279672744,"cars_off_the_road_for_a_week":10.279144632873777,"cars_off_the_road_for_a_day":72.15078928665267,"cars_to_priuses_for_a_year":0.39572804297895875,"cars_to_priuses_for_a_month":4.744387855934549,"cars_to_priuses_for_a_week":20.558289265747554,"cars_to_priuses_for_a_day":144.30157857330533,"one_way_domestic_flight":3.533286098026417,"round_trip_domestic_flight":1.7666430490132086,"one_way_cross_country_flight":1.2415423765988212,"round_trip_cross_country_flight":0.6207711882994106,"vegan_meals_instead_of_non_vegan_ones":874.8275047269489,"days_of_veganism":291.6091682423163,"weeks_of_veganism":41.657986678208076,"months_of_veganism":9.720341846908983,"years_of_veganism":0.7990662406305897,"barrels_of_petroleum":2.528745681233676,"canisters_of_bbq_propane":45.29890210660515,"railroad_cars_full_of_coal":0.005435824766194489,"homes_energy_in_a_year":0.10545500046417307,"homes_energy_in_a_month":1.2600241808038823,"homes_energy_in_a_week":5.458655230212505,"homes_energy_in_a_day":38.319303106811425,"homes_electricity_in_a_year":0.15981324812611794,"homes_electricity_in_a_month":1.9123231527472209,"homes_electricity_in_a_week":8.286371273586878,"homes_electricity_in_a_day":58.16223783332778,"homes_with_lowered_thermostat_2_degrees_for_a_winter":5.706528839550974,"homes_with_raised_thermostat_3_degrees_for_a_summer":2.5657092896437987,"replaced_refrigerators":1.09477510791157,"loads_of_cold_laundry":498.5325352871354,"lightbulbs_for_a_year":2.006906503679005,"lightbulbs_for_a_month":24.423160674511834,"lightbulbs_for_a_week":104.67006736793459,"lightbulbs_for_a_day":732.6937330704019,"lightbulbs_for_an_evening":4396.1634855873635,"lightbulbs_to_CFLs_for_a_day":12471.386669121135,"lightbulbs_to_CFLs_for_a_week":1781.626356398747,"lightbulbs_to_CFLs_for_a_month":415.7133963143494,"lightbulbs_to_CFLs_for_a_year":34.16850731534531,"days_with_lightbulbs_to_CFLs":277.14226420956624,"weeks_with_lightbulbs_to_CFLs":39.59128610210093,"months_with_lightbulbs_to_CFLs":9.237640607670912,"years_with_lightbulbs_to_CFLs":0.7588411373607507,"recycled_kgs_of_trash":749.7687458259719,"recycled_bags_of_trash":415.44377940594615},"methodology":"http://impact.brighterplanet.com/flights?timeframe=2012-01-01%2F2013-01-01","scope":"The
|
52
|
+
flight greenhouse gas emission is the anthropogenic greenhouse gas emissions
|
53
|
+
attributed to a single passenger on this flight. It includes CO2 emissions
|
54
|
+
from combustion of non-biogenic fuel and extra forcing effects of high-altitude
|
55
|
+
fuel combustion.","timeframe":"2012-01-01/2013-01-01","characteristics":{},"errors":["API
|
56
|
+
key \"carbon_test2\" could not be verified. Please register at http://keys.brighterplanet.com"]}'
|
57
|
+
http_version: '1.1'
|
58
|
+
recorded_at: Fri, 08 Jun 2012 21:05:43 GMT
|
59
|
+
recorded_with: VCR 2.2.0
|
@@ -0,0 +1,59 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://impact.brighterplanet.com/flights.json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: timeframe=2009-01-01%2F2010-01-01&key=carbon_test
|
9
|
+
headers:
|
10
|
+
accept:
|
11
|
+
- ! '*/*'
|
12
|
+
user-agent:
|
13
|
+
- Ruby
|
14
|
+
content-type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 08 Jun 2012 21:05:40 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- keep-alive
|
31
|
+
status:
|
32
|
+
- 200 OK
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"compliance":[],"decisions":{"carbon":{"description":"1087.2 kg","object":{"value":1087.1649532388976,"units":"kilograms"},"methodology":"from
|
36
|
+
fuel use and greenhouse gas emission factor"},"ghg_emission_factor":{"description":"5.15214","object":5.15214,"methodology":"from
|
37
|
+
fuel and aviation multiplier"},"aviation_multiplier":{"description":"2.0","object":2.0,"methodology":"default"},"energy":{"description":"7939.7
|
38
|
+
MJ","object":{"value":7939.69681453416,"units":"megajoules"},"methodology":"from
|
39
|
+
fuel use and fuel"},"fuel_use":{"description":"211.0123081358227","object":211.0123081358227,"methodology":"from
|
40
|
+
fuel per segment, segments per trip, trips, freight_share, passengers, seat
|
41
|
+
class multiplier, fuel, date, and timeframe"},"fuel_per_segment":{"description":"8477.788829453548","object":8477.788829453548,"methodology":"from
|
42
|
+
adjusted distance per segment and fuel use coefficients"},"seat_class_multiplier":{"description":"1.0","object":1.0,"methodology":"default"},"distance_class":{"description":"short
|
43
|
+
haul","object":{"flight_distance_class":{"distance":1108.0,"distance_units":"kilometres","max_distance":3700.0,"max_distance_units":"kilometres","min_distance":0.0,"min_distance_units":"kilometres","name":"short
|
44
|
+
haul"}},"methodology":"from adjusted distance per segment"},"adjusted_distance_per_segment":{"description":"962.1615428278766","object":962.1615428278766,"methodology":"from
|
45
|
+
adjusted distance and segments per trip"},"adjusted_distance":{"description":"1616.4313919508327","object":1616.4313919508327,"methodology":"from
|
46
|
+
distance, route inefficiency factor, and dogleg factor"},"distance":{"description":"1262.599964160848","object":1262.599964160848,"methodology":"default"},"route_inefficiency_factor":{"description":"1.100000023841858","object":1.100000023841858,"methodology":"default"},"dogleg_factor":{"description":"1.1638548181950328","object":1.1638548181950328,"methodology":"from
|
47
|
+
segments per trip"},"fuel_use_coefficients":{"description":"BrighterPlanet::Flight::ImpactModel::FuelUseEquation::Given","object":{"m3":1.0532072472371498e-07,"m2":-0.00015627733290887285,"m1":7.148223019744806,"b":1650.9061605236384},"methodology":"default"},"fuel":{"description":"Jet
|
48
|
+
Fuel","object":{"fuel":{"biogenic_fraction":0.0,"carbon_content":18.672,"carbon_content_units":"grams_per_megajoule","co2_biogenic_emission_factor":0.0,"co2_biogenic_emission_factor_units":"kilograms_per_litre","co2_emission_factor":2.57607,"co2_emission_factor_units":"kilograms_per_litre","density":0.8156,"density_units":"kilograms_per_litre","energy_content":37.6267,"energy_content_units":"megajoules_per_litre","name":"Jet
|
49
|
+
Fuel","oxidation_factor":1.0,"physical_units":null}},"methodology":"default"},"passengers":{"description":"131","object":131,"methodology":"from
|
50
|
+
seats and load factor"},"seats":{"description":"169.27798641328772","object":169.27798641328772,"methodology":"default"},"load_factor":{"description":"0.7731146349652108","object":0.7731146349652108,"methodology":"default"},"freight_share":{"description":"0.06885888622195808","object":0.06885888622195808,"methodology":"default"},"trips":{"description":"1.7","object":1.7,"methodology":"default"},"segments_per_trip":{"description":"1.68","object":1.68,"methodology":"default"},"date":{"description":"2009-01-01","object":"2009-01-01","methodology":"from
|
51
|
+
timeframe"}},"emitter":"Flight","equivalents":{"cars_off_the_road_for_a_year":0.19786402148947937,"cars_off_the_road_for_a_month":2.3721939279672744,"cars_off_the_road_for_a_week":10.279144632873777,"cars_off_the_road_for_a_day":72.15078928665267,"cars_to_priuses_for_a_year":0.39572804297895875,"cars_to_priuses_for_a_month":4.744387855934549,"cars_to_priuses_for_a_week":20.558289265747554,"cars_to_priuses_for_a_day":144.30157857330533,"one_way_domestic_flight":3.533286098026417,"round_trip_domestic_flight":1.7666430490132086,"one_way_cross_country_flight":1.2415423765988212,"round_trip_cross_country_flight":0.6207711882994106,"vegan_meals_instead_of_non_vegan_ones":874.8275047269489,"days_of_veganism":291.6091682423163,"weeks_of_veganism":41.657986678208076,"months_of_veganism":9.720341846908983,"years_of_veganism":0.7990662406305897,"barrels_of_petroleum":2.528745681233676,"canisters_of_bbq_propane":45.29890210660515,"railroad_cars_full_of_coal":0.005435824766194489,"homes_energy_in_a_year":0.10545500046417307,"homes_energy_in_a_month":1.2600241808038823,"homes_energy_in_a_week":5.458655230212505,"homes_energy_in_a_day":38.319303106811425,"homes_electricity_in_a_year":0.15981324812611794,"homes_electricity_in_a_month":1.9123231527472209,"homes_electricity_in_a_week":8.286371273586878,"homes_electricity_in_a_day":58.16223783332778,"homes_with_lowered_thermostat_2_degrees_for_a_winter":5.706528839550974,"homes_with_raised_thermostat_3_degrees_for_a_summer":2.5657092896437987,"replaced_refrigerators":1.09477510791157,"loads_of_cold_laundry":498.5325352871354,"lightbulbs_for_a_year":2.006906503679005,"lightbulbs_for_a_month":24.423160674511834,"lightbulbs_for_a_week":104.67006736793459,"lightbulbs_for_a_day":732.6937330704019,"lightbulbs_for_an_evening":4396.1634855873635,"lightbulbs_to_CFLs_for_a_day":12471.386669121135,"lightbulbs_to_CFLs_for_a_week":1781.626356398747,"lightbulbs_to_CFLs_for_a_month":415.7133963143494,"lightbulbs_to_CFLs_for_a_year":34.16850731534531,"days_with_lightbulbs_to_CFLs":277.14226420956624,"weeks_with_lightbulbs_to_CFLs":39.59128610210093,"months_with_lightbulbs_to_CFLs":9.237640607670912,"years_with_lightbulbs_to_CFLs":0.7588411373607507,"recycled_kgs_of_trash":749.7687458259719,"recycled_bags_of_trash":415.44377940594615},"methodology":"http://impact.brighterplanet.com/flights?timeframe=2009-01-01%2F2010-01-01","scope":"The
|
52
|
+
flight greenhouse gas emission is the anthropogenic greenhouse gas emissions
|
53
|
+
attributed to a single passenger on this flight. It includes CO2 emissions
|
54
|
+
from combustion of non-biogenic fuel and extra forcing effects of high-altitude
|
55
|
+
fuel combustion.","timeframe":"2009-01-01/2010-01-01","characteristics":{},"errors":["API
|
56
|
+
key \"carbon_test\" could not be verified. Please register at http://keys.brighterplanet.com"]}'
|
57
|
+
http_version: '1.1'
|
58
|
+
recorded_at: Fri, 08 Jun 2012 21:05:40 GMT
|
59
|
+
recorded_with: VCR 2.2.0
|