], "Services": ["50", "51", "52", "64", "71t74", "H", "J", "M", "N", "O"], } for year in config.STUDY_YEARS: path = fileutils.getcache("emissions_estimates_%d.csv" % year, "usa") emissions_fh = open(path, "w") emissions_csv = csv.writer(emissions_fh) path = fileutils.getcache("fossil_fuel_estimates_%d.csv" % year, "usa") energy_fh = open(path, "w") energy_csv = csv.writer(energy_fh) # yes hybrid, yes imports, no inflation iogen = common.iogen_for_year(year, True, True) # not hybrid, yes imports, yes inflation iogen_normal = common.iogen_for_year(year, False, True, True) pce = iogen_normal.get_Y(True).get_pce() xn = iogen_normal.get_x(True) A = iogen.get_A() # direct requirements Z = iogen.get_Z() hpce = iogen.get_Y().get_pce() header = ["sector", "total"] for source in eia.modified_sources: if source in eia.conversion_factors:
# space labels out by at least 0.04 so they don't overlap if prev_pos is not None and prev_pos - position < 0.03: position = prev_pos - 0.03 plot.add_custom_setup( "set label %d '%s' at graph 0.81, %.2f font 'Arial,8'" % (i + 1, group_name, position)) prev_pos = position plot.generate_plot() for year in config.STUDY_YEARS: # args: year, is_hybrid, allow_imports, adjust for inflation iogen = common.iogen_for_year(year, True, True, True) iogen_standard = common.iogen_for_year(year, False, True, True) energy_codes = [] for i in range(len(eia.modified_sources)): source = eia.modified_sources[i] naics = eia.source_naics_map[source][year] energy_codes.append(naics) L = iogen.get_L() Y = iogen.get_Y() # mixed units ###### hybrid vectors import_colname = bea.fd_sectors[year]["imports"] import_column = Y.get_named_column(import_colname)
"Services": [ "50", "51", "52", "64", "71t74", "H", "J", "M", "N", "O"], } for year in config.STUDY_YEARS: path = fileutils.getcache("emissions_estimates_%d.csv" % year, "usa") emissions_fh = open(path, "w") emissions_csv = csv.writer(emissions_fh) path = fileutils.getcache("fossil_fuel_estimates_%d.csv" % year, "usa") energy_fh = open(path, "w") energy_csv = csv.writer(energy_fh) # yes hybrid, yes imports, no inflation iogen = common.iogen_for_year(year, True, True) # not hybrid, yes imports, yes inflation iogen_normal = common.iogen_for_year(year, False, True, True) pce = iogen_normal.get_Y(True).get_pce() xn = iogen_normal.get_x(True) A = iogen.get_A() # direct requirements Z = iogen.get_Z() hpce = iogen.get_Y().get_pce() header = ["sector", "total"] for source in eia.modified_sources: if source in eia.conversion_factors: