def __init__(self, sector, directory, activity_data=None, residential_floorspace=None, nominal_energy_intensity=None,
              end_year=2018, projections=False):
     self.end_year = end_year
     self.directory = directory
     self.sector = sector
     self.activity_data = activity_data
     self.nominal_energy_intensity = nominal_energy_intensity
     self.residential_floorspace = residential_floorspace
     self.eia_data = GetEIAData(self.sector)
     self.projections = projections
     print("WEATHER FACTORS os.getcwd()", os.getcwd())
     # self.lmdi_prices = pd.read_excel(os.path.join(
     #     "..", 'Indicators_Spreadsheets_2020',
     #     'EnergyPrices_by_Sector_010820_DBB.xlsx'
     #     ), sheet_name='LMDI-Prices', header=14, usecols='A:B, EY')
     self.lmdi_prices = pd.read_excel(os.path.join(
         os.getcwd(), 'Indicators_Spreadsheets_2020',
         'EnergyPrices_by_Sector_010820_DBB.xlsx'
         ), sheet_name='LMDI-Prices', header=14, usecols='A:B, EY')
     self.regions_subregions = ['northeast', 'new_england', 'middle_atlantic', 'midwest', 
                                'east_north_central', 'west_north_central', 'south', 
                                'south_atlantic', 'east_south_central', 'west_south_central',
                                'west', 'mountain', 'pacific']
     self.sub_regions_dict = {'northeast': ['New England', 'Middle Atlantic'], 
                              'midwest': ['East North Central', 'West North Central'], 
                              'south': ['South Atlantic', 'East South Central', 'West South Central'],
                              'west': ['Mountain', 'Pacific']}
Esempio n. 2
0
    def electricity_projections():
        """Gather Commercial projections data
        activity: Million kWh
        energy: Energy Consumption Trillion Btu 
        """        
        electricity_eia = GetEIAData('electricity')

        data_dict = {'Elec Power Sector': 
                        {'Electricity Only':
                            {'Fossil Fuels': 
                                {'Coal':  {'energy': {'primary': electricity_eia.eia_api(id_='AEO.2020.REF2020.CNSM_ENU_ELEP_NA_STC_NA_NA_QBTU.A', id_type='series', new_name='Coal')}, 
                                            'activity': electricity_eia.eia_api(id_='AEO.2020.AEO2019REF.GEN_NA_ELEP_POW_CL_NA_USA_BLNKWH.A', id_type='series', new_name='Coal')}, 
                                'Petroleum':  {'energy': {'primary': electricity_eia.eia_api(id_='AEO.2020.REF2020.CNSM_ENU_ELEP_NA_LFL_NA_NA_QBTU.A', id_type='series', new_name='Petroleum')}, 
                                                'activity': electricity_eia.eia_api(id_='AEO.2020.AEO2019REF.GEN_NA_ELEP_POW_PET_NA_USA_BLNKWH.A', id_type='series', new_name='Petroleum')}, 
                                'Natural Gas':  {'energy': {'primary': electricity_eia.eia_api(id_='AEO.2020.REF2020.CNSM_ENU_ELEP_NA_NG_NA_NA_QBTU.A', id_type='series', new_name='Natural Gas')}, 
                                                    'activity': electricity_eia.eia_api(id_='AEO.2020.AEO2019REF.GEN_NA_ELEP_POW_NG_NA_USA_BLNKWH.A', id_type='series', new_name='Natural Gas')}},
                            'Nuclear':  {'energy': {'primary': electricity_eia.eia_api(id_='AEO.2020.REF2020.CNSM_ENU_ELEP_NA_NUC_NA_NA_QBTU.A', id_type='series', new_name='Nuclear')}, 
                                            'activity': electricity_eia.eia_api(id_='AEO.2020.AEO2019REF.GEN_NA_ELEP_POW_NUP_NA_USA_BLNKWH.A', id_type='series', new_name='Nuclear')}, 
                            # 'Hydro Electric':  {'energy': '', 
                            #                     'activity': electricity_eia.eia_api(id_='AEO.2020.REF2020.GEN_NA_ELEP_NA_HYD_CNV_NA_BLNKWH.A', id_type='series')}, 
                            'Renewable': 
                                {'Wood':  {'energy': {'primary': electricity_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_ELEP_NA_WBM_NA_NA_QBTU.A', id_type='series', new_name='Wood')}, 
                                            'activity': electricity_eia.eia_api(id_='AEO.2020.REF2020.GEN_NA_ELEP_NA_WBM_NA_NA_BLNKWH.A', id_type='series', new_name='Wood')}, # This is wood and other biomass
                                'Waste':  {'energy': {'primary': electricity_eia.eia_api(id_='AEO.2020.REF2020.CNSM_ENU_ELEP_NA_NBMSW_NA_NA_QBTU.A', id_type='series', new_name='Waste'), 
                                            'activity': electricity_eia.eia_api(id_='AEO.2020.REF2020.GEN_NA_ELEP_NA_BGM_NA_NA_BLNKWH.A', id_type='series', new_name='Waste')}}, # This is Biogenic Municipal Waste
                                # 'Solar':  {'Solar Photovoltaic': {'energy': electricity_eia.eia_api(id_='', id_type='series'), 
                                #                                     'activity': electricity_eia.eia_api(id_='AEO.2020.REF2020.GEN_NA_ELEP_NA_SLR_PHTVL_NA_BLNKWH.A', id_type='series')}, 
                                #             'Solar Thermal': {'energy': electricity_eia.eia_api(id_='', id_type='series'), 
                                #                                 'activity': electricity_eia.eia_api(id_='AEO.2020.REF2020.GEN_NA_ELEP_NA_SLR_THERM_NA_BLNKWH.A', id_type='series')}}, 
                                'Wind':  {'energy': {'primary': electricity_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_ELEP_NA_OFW_NA_NA_QBTU.A', id_type='series', new_name='Wind')}, 
                                            'activity': electricity_eia.eia_api(id_='AEO.2020.REF2020.GEN_NA_ELEP_NA_WND_NA_NA_BLNKWH.A', id_type='series', new_name='Wind')}}}}}
                                                    
        
        return data_dict 
Esempio n. 3
0
    def __init__(self, directory, output_directory, level_of_aggregation=None, lmdi_model='multiplicative', base_year=1985, end_year=2018):
        self.sub_categories_list = {'Manufacturing': {'Food, Beverages, & Tobacco': None, 'Textile Mills and Products': None, 
                                               'Apparel & Leather': None, 'Wood Products': None, 'Paper': None,
                                               'Printing & Allied Support': None, 'Petroleum & Coal Products': None, 'Chemicals': None,
                                               'Plastics & Rubber Products': None, 'Nonmetallic Mineral Products': None, 'Primary Metals': None,
                                               'Fabricated Metal Products': None, 'Machinery': None, 'Computer & Electronic Products': None,
                                               'Electical Equip. & Appliances': None, 'Transportation Equipment': None,
                                               'Furniture & Related Products': None, 'Miscellaneous': None},
                                    'Nonmanufacturing': {'Agriculture, Forestry & Fishing': None,
                                                         'Mining': {'Petroleum and Natural Gas': None, 
                                                                    'Other Mining': None, 
                                                                    'Petroleum drilling and Mining Services': None},
                                                         'Construction': None}}

        self.ind_eia = GetEIAData('industry')
        self.conversion_factors = self.ind_eia.conversion_factors()
        self.MER_Nov19_Table24 = self.ind_eia.eia_api(id_='711252') # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711252'
        self.AER10_Table21d = self.ind_eia.eia_api(id_='711252') # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711252'
        self.AER11_Table21d_MER0816 = self.ind_eia.eia_api(id_='711252') # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711252'
        self.mer_dataT0204 = self.ind_eia.eia_api(id_='711252') # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711252'
        self.BEA_Output_data = [0] # Chain-type Quantity Indexes for Value Added by Industry from Bureau of Economic Analysis
        self.energy_types = ['elec', 'fuels', 'deliv', 'source', 'source_adj']

        super().__init__(sector='industry', level_of_aggregation=level_of_aggregation, lmdi_models=lmdi_model, categories_dict=self.sub_categories_list, \
                    energy_types=self.energy_types, directory=directory, output_directory=output_directory, base_year=base_year)
Esempio n. 4
0
    def transportation_projections(self):
        """Gather Transportation projections data
        activity: 
            - Passenger-miles [P-M] (Passenger)
            - Ton-miles [T-M] (Freight)
        energy: Energy Consumption Trillion Btu
        """        

        # Commercial Carriers? --> domestic air carriers: AEO.2020.AEO2019REF.CNSM_NA_TRN_AIR_DAC_NA_NA_TRLBTU.A
        #                          international air carriers: AEO.2020.AEO2019REF.CNSM_NA_TRN_AIR_IAC_NA_NA_TRLBTU.A

        # Transportation Energy Use : Highway : Commercial Light Trucks, Reference, AEO2020: AEO.2020.REF2020.CNSM_NA_TRN_HWY_CML_NA_NA_TRLBTU.A
        # Transportation Energy Use : Highway : Freight Trucks : Large, Reference, AEO2020: AEO.2020.REF2020.CNSM_NA_TRN_HWY_FGHT_LGT26KLBS_NA_TRLBTU.A
        # Transportation Energy Use : Highway : Freight Trucks : Light Medium, Reference, AEO2020: AEO.2020.REF2020.CNSM_NA_TRN_HWY_FGHT_LITEMED_NA_TRLBTU.A
        # Transportation Energy Use : Highway : Freight Trucks : Medium, Reference, AEO2020: AEO.2020.REF2020.CNSM_NA_TRN_HWY_FGHT_MD10T26KLB_NA_TRLBTU.A
        # Transportation Energy Use : Highway : Freight Trucks, Reference, AEO2020: AEO.2020.REF2020.CNSM_NA_TRN_HWY_FGHT_NA_NA_TRLBTU.A

        # Transportation Energy Use : Non-Highway : Rail : Freight, Reference, AEO2020: AEO.2020.REF2020.CNSM_NA_TRN_RAIL_FGT_NA_NA_TRLBTU.A
        transportation_eia = GetEIAData('transportation')

        transportation_categories =  {'All_Passenger':
                                    {'Highway':  
                                        {'Passenger Cars and Trucks': 
                                            {'Light Trucks – LWB Vehicles': 
                                                {'Light Trucks': {'energy': {'primary': transportation_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_TRN_HWY_LDV_LTRT_NA_TRLBTU.A', id_type='series', new_name='Light Trucks')}, 
                                                                  'activity': transportation_eia.eia_api(id_='AEO.2020.REF2020.KEI_TRV_TRN_NA_CML_NA_NA_BLNVEHMLS.A', id_type='series', new_name='Light Trucks')},
                                                'Light-Duty Vehicles': {'energy': {'primary': transportation_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_TRN_HWY_LDV_LTRT_NA_TRLBTU.A', id_type='series', new_name='Light-Duty Vehicles')}, 
                                                                        'activity': transportation_eia.eia_api(id_='AEO.2020.REF2020.KEI_TRV_TRN_NA_LDV_NA_NA_BLNVEHMLS.A', id_type='series', new_name='Light-Duty Vehicles')}}}, 
                                        'Buses': {'activity': transportation_eia.eia_api(id_='AEO.2020.REF2020._TRV_TRN_NA_BST_NA_NA_BPM.A', id_type='series', new_name='Buses'),
                                                 'energy': {'primary': transportation_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_TRN_HWY_BUS_NA_NA_TRLBTU.A', id_type='series', new_name='Buses')}}}, 
                                    'Rail': {'energy': {'primary': transportation_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_TRN_RAIL_PSG_PSG_NA_TRLBTU.A', id_type='series', new_name='Rail')}, 
                                             'activity': transportation_eia.eia_api(id_='AEO.2020.REF2020._TRV_TRN_NA_RLP_NA_NA_BPM.A', id_type='series', new_name='Rail')},

                                    'Air': {'energy': {'primary': transportation_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_TRN_AIR_IAC_NA_NA_TRLBTU.A', id_type='series', new_name='Air')}, 
                                             'activity': transportation_eia.eia_api(id_='AEO.2020.REF2020.KEI_TRV_TRN_NA_AIR_NA_NA_BLNSEATMLS.A', id_type='series', new_name='Air')}}, 
                                'All_Freight': 
                                    {'Highway': 
                                        {'Freight-Trucks': {'energy': {'primary': transportation_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_TRN_FGHT_USE_NA_NA_QBTU.A', id_type='series', new_name='Freight-Trucks')},
                                                            'activity': transportation_eia.eia_api(id_='AEO.2020.REF2020.KEI_TRV_TRN_NA_FGHT_NA_NA_BLNVEHMLS.A', id_type='series', new_name='Freight-Trucks')}}, 
                                    'Rail': {'energy': {'primary': transportation_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_NA_TRN_RAIL_FGT_NA_NA_TRLBTU.A', id_type='series', new_name='Rail')}, 
                                             'activity': transportation_eia.eia_api(id_='AEO.2020.REF2020.KEI_TRV_TRN_NA_RAIL_NA_NA_BLNTNMLS.A', id_type='series', new_name='Rail')}, 
                                    'Air': {'energy': {'primary': transportation_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_TRN_AIR_FTC_NA_NA_TRLBTU.A', id_type='series', new_name='Air')}, 
                                            'activity': transportation_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_TRN_AIR_FTC_NA_NA_TRLBTU.A', id_type='series', new_name='Air')}}}

        energy_use_transportation_electricity_us = transportation_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_TRN_NA_ELC_NA_NA_QBTU.A', id_type='series', new_name='Transportation')
        energy_use_transportation_total_us = transportation_eia.eia_api(id_='YOUR_API_KEY_HERE&series_id=AEO.2020.AEO2019REF.CNSM_ENU_TRN_NA_TOT_NA_NA_QBTU.A', id_type='series', new_name='Transportation')
        energy_use_transportation_delivered_energy_us = transportation_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_TRN_NA_DELE_NA_NA_QBTU.A', id_type='series', new_name='Transportation')

        data_dict = transportation_categories
        return data_dict
Esempio n. 5
0
    def __init__(self, directory, output_directory, sector, config_path,
                 categories_dict, level_of_aggregation):
        self.sector = sector
        self.eia = GetEIAData('emissions')
        self.config_path = config_path
        self.level_of_aggregation = level_of_aggregation

        super().__init__(sector,
                         level_of_aggregation=self.level_of_aggregation,
                         categories_dict=categories_dict,
                         directory=directory,
                         output_directory=output_directory,
                         primary_activity=None,
                         unit_conversion_factor=1,
                         weather_activity=None,
                         use_yaml_config=True,
                         config_path=self.config_path)
    def __init__(self,
                 directory,
                 output_directory,
                 level_of_aggregation=None,
                 lmdi_model='multiplicative',
                 base_year=1985,
                 end_year=2018):

        self.eia_res = GetEIAData('residential')
        housing_types = \
            {'Single-Family': None,
             'Multi-Family': None,
             'Manufactured-Homes': None}
        self.sub_categories_list = \
            {'National':
                {'Northeast': housing_types,
                 'Midwest': housing_types,
                 'South': housing_types,
                 'West': housing_types}}

        self.national_calibration = \
            self.eia_res.national_calibration()
        self.seds_census_region = \
            self.eia_res.get_seds()  # energy_consumtpion_data_regional
        RF = ResidentialFloorspace()
        self.ahs_Data = RF.update_ahs_data()
        self.regions = ['Northeast', 'South', 'West', 'Midwest', 'National']
        self.base_year = base_year
        self.directory = directory
        self.end_year = end_year
        self.energy_types = ['elec', 'fuels', 'deliv', 'source']

        super().__init__(sector='residential',
                         level_of_aggregation=level_of_aggregation,
                         lmdi_models=lmdi_model,
                         categories_dict=self.sub_categories_list,
                         energy_types=self.energy_types,
                         directory=directory,
                         output_directory=output_directory,
                         primary_activity='occupied_housing_units',
                         base_year=base_year,
                         end_year=end_year,
                         weather_activity='floorspace_square_feet')

        print("self.dir()):", dir(self))
Esempio n. 7
0
 def __init__(self,
              directory,
              output_directory,
              level_of_aggregation,
              lmdi_model=['multiplicative'],
              end_year=2018,
              base_year=1985):
     self.end_year = end_year
     self.sub_categories_list = {
         'Commercial': {
             'Commercial_Total': None
         }
     }  #, 'Total_Commercial_LMDI_UtilAdj': None}
     self.eia_comm = GetEIAData('commercial')
     self.energy_types = ['elec', 'fuels', 'deliv', 'source', 'source_adj']
     super().__init__(sector='commercial', level_of_aggregation=level_of_aggregation,lmdi_models=lmdi_model, \
                      directory=directory, output_directory=output_directory, categories_dict=self.sub_categories_list, energy_types=self.energy_types, \
                      base_year=base_year)
Esempio n. 8
0
 def __init__(self,
              directory,
              output_directory,
              level_of_aggregation=None,
              lmdi_model='multiplicative',
              base_year=1985,
              end_year=2018):
     self.eia_res = GetEIAData('residential')
     self.sub_categories_list = {
         'National': {
             'Northeast': {
                 'Single-Family': None,
                 'Multi-Family': None,
                 'Manufactured-Homes': None
             },
             'Midwest': {
                 'Single-Family': None,
                 'Multi-Family': None,
                 'Manufactured-Homes': None
             },
             'South': {
                 'Single-Family': None,
                 'Multi-Family': None,
                 'Manufactured-Homes': None
             },
             'West': {
                 'Single-Family': None,
                 'Multi-Family': None,
                 'Manufactured-Homes': None
             }
         }
     }
     self.national_calibration = self.eia_res.national_calibration()
     self.seds_census_region = self.eia_res.get_seds(
     )  # energy_consumtpion_data_regional
     self.ahs_Data = ResidentialFloorspace.update_ahs_data()
     self.conversion_factors = self.eia_res.conversion_factors()
     self.regions = ['Northeast', 'South', 'West', 'Midwest', 'National']
     self.base_year = base_year
     self.directory = directory
     self.end_year = end_year
     self.energy_types = ['elec', 'fuels', 'deliv', 'source']
     super().__init__(sector='residential', level_of_aggregation=level_of_aggregation, lmdi_models=lmdi_model, categories_dict=self.sub_categories_list, \
                 energy_types=self.energy_types, directory=directory, output_directory=output_directory, base_year=base_year)
Esempio n. 9
0
 def __init__(self, sector, directory, activity_data=None, residential_floorspace=None, nominal_energy_intensity=None, \
              end_year=2018):
     self.end_year = end_year
     self.directory = directory
     self.sector = sector
     self.activity_data = activity_data
     self.nominal_energy_intensity = nominal_energy_intensity
     self.residential_floorspace = residential_floorspace
     self.eia_data = GetEIAData(self.sector)
     self.lmdi_prices = pd.read_excel(f'{self.directory}/EnergyPrices_by_Sector_010820_DBB.xlsx', 
                                      sheet_name='LMDI-Prices', header=14, usecols='A:B, EY')
     self.regions_subregions = ['northeast', 'new_england', 'middle_atlantic', 'midwest', 
                                'east_north_central', 'west_north_central', 'south', 
                                'south_atlantic', 'east_south_central', 'west_south_central',
                                'west', 'mountain', 'pacific']
     self.sub_regions_dict = {'northeast': ['New England', 'Middle Atlantic'], 
                              'midwest': ['East North Central', 'West North Central'], 
                              'south': ['South Atlantic', 'East South Central', 'West South Central'],
                              'west': ['Mountain', 'Pacific']}
    def commercial_projections(self):
        """activity: floorspace
        energy: consumption trillion Btu
        """        
        # Commercial : Total Floorspace : New Additions, AEO2019, AEO2020 --> 'AEO.2020.AEO2019REF.KEI_NA_COMM_NA_TFP_NADN_USA_BLNSQFT.A'
        # Commercial : Total Floorspace : Surviving, AEO2019, AEO2020 --> 'AEO.2020.AEO2019REF.KEI_NA_COMM_NA_TFP_SURV_USA_BLNSQFT.A'
        # Commercial : Total Floorspace : Total, AEO2019, AEO2020 --> 'AEO.2020.AEO2019REF.KEI_NA_COMM_NA_TFP_TOT_USA_BLNSQFT.A'


        commercial_categories = {'Commercial_Total': None, 'Total_Commercial_LMDI_UtilAdj': None}

        commercial_eia = GetEIAData('commercial')
        energy_use_commercial_electricity_us = commercial_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_COMM_NA_ELC_NA_NA_QBTU.A', id_type='series')
        energy_use_commercial_total_us = commercial_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_COMM_NA_TOT_NA_NA_QBTU.A', id_type='series')
        energy_use_commercial_delivered_energy_us = commercial_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_COMM_NA_DELE_NA_NA_QBTU.A', id_type='series')
        
        commercial_total_floorspace = commercial_eia.eia_api(id_='AEO.2020.AEO2019REF.KEI_NA_COMM_NA_TFP_TOT_USA_BLNSQFT.A', id_type='series')

        data_dict = {'Commercial_Total': {'energy': {'elec': energy_use_commercial_electricity_us, 'deliv': energy_use_commercial_delivered_energy_us}, 
                                          'activity': commercial_total_floorspace}, 
                     'Total_Commercial_LMDI_UtilAdj': None}
        
        return data_dict
Esempio n. 11
0
    def residential_projections(self):
        """Gather Residential projections data
        activity: 
            - Occupied Housing Units
            - Floorspace, Square Feet

        energy: Energy Consumption Trillion Btu
        """        
        # Residential : Key Indicators : Average House Square Footage, AEO2019, AEO2020 --> 'AEO.2020.AEO2019REF.KEI_HHD_RESD_NA_NA_NA_USA_SQFT.A'
        # Residential : Key Indicators : Households : Mobile Homes, AEO2019, AEO2020 --> 'AEO.2020.AEO2019REF.KEI_HHD_RESD_MBH_NA_NA_USA_MILL.A'
        # Residential : Key Indicators : Households : Multifamily, AEO2019, AEO2020 --> 'AEO.2020.AEO2019REF.KEI_HHD_RESD_MFR_NA_NA_USA_MILL.A'
        # Residential : Key Indicators : Households : Single-Family, AEO2019, AEO2020 --> 'AEO.2020.AEO2019REF.KEI_HHD_RESD_SFR_NA_NA_USA_MILL.A'
        # Residential : Key Indicators : Households : Total, AEO2019, AEO2020 --> 'AEO.2020.AEO2019REF.KEI_HHD_RESD_TEN_NA_NA_USA_MILL.A'

        self.sub_regions_dict = {'Northeast': {'New England': 'NENGL', 'Middle Atlantic': 'MATL'}, 'Midwest': {'East North Central': 'ENC', 'West North Central': 'WNC'}, 
                                 'South': {'South Atlantic': 'SATL', 'East South Central': 'ESC', 'West South Central': 'WSC'}, 'West': {'Mountain': 'MTN', 'Pacific': 'PCF'}}

        residential_eia = GetEIAData('residential')
        energy_use_residential_electricity_us = residential_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_RESD_NA_ELC_NA_NA_QBTU.A', id_type='series')
        energy_use_residential_total_us = residential_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_RESD_NA_TOT_NA_NA_QBTU.A', id_type='series')
        energy_use_residential_delivered_energy_us = residential_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_RESD_NA_DELE_NA_NA_QBTU.A', id_type='series')


        res_housholds= residential_eia.eia_api(id_='AEO.2020.AEO2019REF.KEI_HHD_RESD_TEN_NA_NA_USA_MILL.A', id_type='series', new_name='Residential')
        res_avg_size = residential_eia.eia_api(id_='AEO.2020.AEO2019REF.KEI_HHD_RESD_NA_NA_NA_USA_SQFT.A', id_type='series', new_name='Residential')
        residential_floorspace = res_avg_size.multiply(res_housholds.values)

        activity_data = {'households': res_housholds, 
                         'average_size': res_avg_size, 
                         'total_floorspace': residential_floorspace}

        energy_data =  {'elec': residential_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_RESD_NA_ELC_NA_NA_QBTU.A', id_type='series', new_name='Residential'),
                        'deliv': residential_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_RESD_NA_DELE_NA_NA_QBTU.A', id_type='series', new_name='Residential')}

        data_dict = {'energy': energy_data, 'activity': activity_data}
        
        return data_dict
Esempio n. 12
0
    def industrial_projections(self):
        """Gather Industrial projections data
        activity: 
                - Value added --> Gross Domestic Product (Total Industrial only)
                - Gross Output
                - Value Added
            energy: Energy Consumption Trillion Btu
        """        

        # Industrial : Value of Shipments : Agriculture, Mining, and Construction, AEO2019, AEO2020 --> 'AEO.2020.AEO2019REF.ECI_NA_IDAL_NMFG_VOS_NA_USA_BLNY09DLR.A'
        # Industrial : Value of Shipments : Manufacturing, AEO2019, AEO2020 --> 'AEO.2020.AEO2019REF.ECI_NA_IDAL_MANF_VOS_NA_USA_BLNY09DLR.A'
        # Industrial : Value of Shipments : Total, AEO2019, AEO2020 --> 'AEO.2020.AEO2019REF.ECI_NA_IDAL_NA_VOS_NA_USA_BLNY09DLR.A'
        industrial_eia = GetEIAData('industrial')

        data_dict = {'Manufacturing': {'Food, Beverages, & Tobacco': {'Food Products': {'energy': {'total_energy': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_FDP_NA_NA_NA_TRLBTU.A', id_type='series', new_name='Food Products'), 
                                                                                                               'purchased_electricity': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_FDP_PRC_NA_NA_TRLBTU.A', id_type='series', new_name='Food Products')}, 
                                                                                                    'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_IDAL_FDP_NA_NA_NA_BLNY09DLR.A', id_type='series', new_name='Food Products')}},
                                                                                #   'Beverages and Tobacco Products': {'energy': {'total_energy': , 'purchased_electricity': }, 
                                                                                #                                      'activity': {'value_of_shipments': 'AEO.2020.REF2020.ECI_VOS_MANF_BVTP_NA_NA_NA_BLNY09DLR.A'}}
                                                                                  }, 
                                                    # 'Textile Mills and Products': {'energy': {'total_energy': , 'purchased_electricity': }, 
                                                    #                                 'activity': {'shipments': 'AEO.2020.REF2020.ECI_VOS_MANF_TMP_NA_NA_NA_BLNY09DLR.A'}}, 
                                                    'Wood Products': {'energy': {'total_energy': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_WDP_NA_NA_NA_TRLBTU.A', id_type='series', new_name='Wood Products'), 
                                                                                 'purchased_electricity': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_WDP_ELC_NA_NA_TRLBTU.A', id_type='series', new_name='Wood Products')}, 
                                                                      'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_SHP_IDAL_WDP_NA_NA_NA_BLNY09DLR.A', id_type='series', new_name='Wood Products')}},  
                                                    'Paper': {'energy': {'total_energy': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_PPM_NA_NA_NA_TRLBTU.A', id_type='series', new_name='Paper'), 
                                                                         'purchased_electricity': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_PPM_PRC_NA_NA_TRLBTU.A', id_type='series', new_name='Paper')}, 
                                                              'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_IDAL_PPM_NA_NA_NA_BLNY09DLR.A', id_type='series', new_name='Paper')}} ,
                                                    # 'Printing': {'energy': {'total_energy': , 'purchased_electricity': }, 
                                                    #              'activity': {'value_of_shipments': 'AEO.2020.REF2020.ECI_VOS_MANF_PRN_NA_NA_NA_BLNY09DLR.A'}}, 
                                                    # 'Petroleum & Coal Products': {'energy': {'total_energy': industrial_eia.eia_api(id_='', id_type='series'), 
                                                    #                                          'purchased_electricity': industrial_eia.eia_api(id_='', id_type='series')}, 
                                                    #                               'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_MANF_PCL_NA_NA_NA_BLNY09DLR.A', id_type='series')}}, 
                                                    'Chemicals': {'energy': {'total_energy': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_BCH_NA_NA_NA_TRLBTU.A', id_type='series', new_name='Chemicals'), 
                                                                             'purchased_electricity': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_BCH_HAP_PRC_NA_TRLBTU.A', id_type='series', new_name='Chemicals')}, 
                                                                  'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_MANF_CHE_NA_NA_NA_BLNY09DLR.A', id_type='series', new_name='Chemicals')}},
                                                    'Plastics & Rubber Products': {'energy': {'total_energy': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_PLI_NA_NA_NA_TRLBTU.A', id_type='series', new_name='Plastics & Rubber Products'), 
                                                                                              'purchased_electricity': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_PLI_ELC_NA_NA_TRLBTU.A', id_type='series', new_name='Plastics & Rubber Products')}, 
                                                                                   'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_MANF_PRP_NA_NA_NA_BLNY09DLR.A', id_type='series', new_name='Plastics & Rubber Products')}},
                                                    # 'Nonmetallic Mineral Products': {'energy': {'total_energy': , 'purchased_electricity': }, 
                                                                                    #  'activity': {'shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_MANF_SCG_NA_NA_NA_BLNY09DLR.A', id_type='series')}}, , 
                                                    # 'Primary Metals': {'energy': {'total_energy': {'iron_and_steel': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_ISM_TOT_NA_NA_TRLBTU.A', id_type='series', new_name='Primary Metals'), 
                                                    #                                                'aluminum': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_AAP_TOT_NA_NA_TRLBTU.A', id_type='series', new_name='Primary Metals')}, 
                                                    #                               'purchased_electricity': {'iron_and_steel': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_ISM_PRC_NA_NA_TRLBTU.A', id_type='series', new_name='Primary Metals'), 
                                                    #                                                         'aluminum': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_AAP_PRC_NA_NA_TRLBTU.A', id_type='series', new_name='Primary Metals')}}, 
                                                    #                    'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_MANF_PMM_NA_NA_NA_BLNY09DLR.A', id_type='series', new_name='Primary Metals')}},
                                                    # 'Fabricated Metal Products': {'energy': {'total_energy': , 'purchased_electricity': }, 
                                                    #                               'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_IDAL_FABM_NA_NA_NA_BLNY09DLR.A', id_type='series')}}, , 
                                                    # 'Machinery': {'energy': {'total_energy': , 'purchased_electricity': }, 
                                                    #               'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_IDAL_MCHI_NA_NA_NA_BLNY09DLR.A', id_type='series')}}, , 
                                                    # 'Computer & Electronic Products': {'energy': {'total_energy': , 'purchased_electricity': }, 
                                                    #                                    'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_MANF_CMPEL_NA_NA_NA_BLNY09DLR.A', id_type='series')}}, 
                                                    # 'Electrical Equipment': {'energy': {'total_energy': , 'purchased_electricity': }, 
                                                    #                          'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_IDAL_EEI_NA_NA_NA_BLNY09DLR.A', id_type='series')}}},
                                                    # 'Transportation Equipment': {'energy': {'total_energy': , 'purchased_electricity': }, 
                                                    #                              'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_IDAL_TEQ_NA_NA_NA_BLNY09DLR.A', id_type='series')}}, 
                                                    # 'Furniture & Related Products': {'energy': {'total_energy': , 'purchased_electricity': }, 
                                                                                    #  'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_MANF_FRP_NA_NA_NA_BLNY09DLR.A', id_type='series')}}, 
                                                    'Miscellaneous': {'energy': {'total_energy': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_BMF_NA_NA_NA_TRLBTU.A', id_type='series', new_name='Miscellaneous'), 
                                                                                 'purchased_electricity': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_BMF_ELC_NA_NA_TRLBTU.A', id_type='series', new_name='Miscellaneous')}, # Energy data from "Balance of Manufacturing"
                                                                      'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_MANF_MISC_NA_NA_NA_BLNY09DLR.A', id_type='series', new_name='Miscellaneous')}}},
                     'Nonmanufacturing': {'Agriculture/Forestry/Fishing/Hunting': {'energy': {'total_energy': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_AGG_NA_NA_NA_TRLBTU.A', id_type='series', new_name='Agriculture/Forestry/Fishing/Hunting'),
                                                                                                'purchased_electricity': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_AGG_PRC_NA_NA_TRLBTU.A', id_type='series', new_name='Agriculture/Forestry/Fishing/Hunting')}, 
                                                                                    'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_NMFG_AFF_NA_NA_NA_BLNY09DLR.A', id_type='series', new_name='Agriculture/Forestry/Fishing/Hunting')}}, # here elec is purchased electricity, Note: try to find total elec
                                            'Mining': {'energy': {'total_energy': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_MING_NA_NA_NA_TRLBTU.A', id_type='series', new_name='Mining'), 
                                                                    'purchased_electricity': {'excluding_oil_shale': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_MING_PEO_NA_NA_TRLBTU.A', id_type='series', new_name='Mining'), 
                                                                                            'including_oil_shale': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_MING_PES_NA_NA_TRLBTU.A', id_type='series', new_name='Mining')}}, 
                                                        'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_NMFG_MING_NA_NA_NA_BLNY09DLR.A', id_type='series', new_name='Mining')}},
                                            'Construction': {'energy': {'total_energy': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_CNS_NA_NA_NA_TRLBTU.A', id_type='series', new_name='Construction'),
                                                                        'purchased_electricity': industrial_eia.eia_api(id_='AEO.2020.REF2020.CNSM_NA_IDAL_CNS_PRC_NA_NA_TRLBTU.A', id_type='series', new_name='Construction')}, 
                                                            'activity': {'value_of_shipments': industrial_eia.eia_api(id_='AEO.2020.REF2020.ECI_VOS_NMFG_CNS_NA_NA_NA_BLNY09DLR.A', id_type='series', new_name='Construction')}}}}



        energy_use_industrial_electricity_us = industrial_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_IDAL_NA_ELC_NA_NA_QBTU.A', id_type='series', new_name='Industry')
        energy_use_industrial_total_us = industrial_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_IDAL_NA_TOT_NA_NA_QBTU.A', id_type='series', new_name='Industry')
        energy_use_industrial_delivered_energy_us = industrial_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_IDAL_NA_DELE_NA_NA_QBTU.A', id_type='series', new_name='Industry')
        
        return data_dict
Esempio n. 13
0
 def __init__(self,
              directory,
              output_directory,
              level_of_aggregation,
              lmdi_model=['multiplicative'],
              base_year=1985):
     self.sub_categories_list = {
         'Elec Generation Total': {
             'Elec Power Sector': {
                 'Electricity Only': {
                     'Fossil Fuels': {
                         'Coal': None,
                         'Petroleum': None,
                         'Natural Gas': None,
                         'Other Gasses': None
                     },
                     'Nuclear': None,
                     'Hydro Electric': None,
                     'Renewable': {
                         'Wood': None,
                         'Waste': None,
                         'Geothermal': None,
                         'Solar': None,
                         'Wind': None
                     }
                 },
                 'Combined Heat & Power': {
                     'Fossil Fuels': {
                         'Coal': None,
                         'Petroleum': None,
                         'Natural Gas': None,
                         'Other Gasses': None
                     },
                     'Renewable': {
                         'Wood': None,
                         'Waste': None
                     }
                 }
             },
             'Commercial Sector': None,
             'Industrial Sector': None
         },
         'All CHP': {
             'Elec Power Sector': {
                 'Combined Heat & Power': {
                     'Fossil Fuels': {
                         'Coal': None,
                         'Petroleum': None,
                         'Natural Gas': None,
                         'Other Gasses': None
                     },
                     'Renewable': {
                         'Wood': None,
                         'Waste': None
                     },
                     'Other': None
                 }
             },
             'Commercial Sector': {
                 'Combined Heat & Power': {
                     'Fossil Fuels': {
                         'Coal': None,
                         'Petroleum': None,
                         'Natural Gas': None,
                         'Other Gasses': None
                     },
                     'Hydroelectric': None,
                     'Renewable': {
                         'Wood': None,
                         'Waste': None
                     },
                     'Other': None
                 }
             },
             'Industrial Sector': {
                 'Combined Heat & Power': {
                     'Fossil Fuels': {
                         'Coal': None,
                         'Petroleum': None,
                         'Natural Gas': None,
                         'Other Gasses': None
                     },
                     'Hydroelectric': None,
                     'Renewable': {
                         'Wood': None,
                         'Waste': None
                     },
                     'Other': None
                 }
             }
         }
     }
     self.elec_power_eia = GetEIAData(sector='electricity')
     # self.Table21f = pd.read_excel('https://www.eia.gov/totalenergy/data/browser/xls.php?tbl=T02.06') #self.elec_power_eia.eia_api(id_='711254') # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711254'
     # self.Table82a = self.elec_power_eia.eia_api(id_='3') # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=3'
     # self.Table82b = self.elec_power_eia.eia_api(id_='21')  # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=21'
     # self.Table82c = self.elec_power_eia.eia_api(id_='1736765') # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=1736765' ?
     # self.Table82d = self.elec_power_eia.eia_api(id_='711282') # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711282'
     # # self.Table82d_2012_and_later = self.elec_power_eia.eia_api(id_='1017') # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=1017'
     # self.Table83d_03 = self.elec_power_eia.eia_api(id_='711284') # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711284' ?
     # self.Table84b = self.elec_power_eia.eia_api(id_='711284') # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711284' ?
     # self.Table85c = self.elec_power_eia.eia_api(id_='379')  # ?
     # self.Table86b = self.elec_power_eia.eia_api(id_='463') # ?
     # self.MER_T72b_1013_AnnualData = self.elec_power_eia.eia_api(id_='21')  #'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=21'
     # self.MER_T72c_1013_AnnualData = self.elec_power_eia.eia_api(id_='2') # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=2'
     self.energy_types = ['primary']
     self.Table84c = pd.read_csv(
         'https://www.eia.gov/totalenergy/data/browser/csv.php?tbl=T07.03C'
     )  # Consumption of combustible fuels for electricity generation: Commercial and industrial sectors (selected fuels) # elec_power_eia.eia_api(id_='456')
     self.Table85c = pd.read_csv(
         'https://www.eia.gov/totalenergy/data/browser/csv.php?tbl=T07.03B'
     )  # Consumption of combustible fuels for electricity generation: Electric power sector
     self.Table82d = pd.read_csv(
         'https://www.eia.gov/totalenergy/data/browser/csv.php?tbl=T07.02C')
     super().__init__(sector='electric', level_of_aggregation=level_of_aggregation, lmdi_models=lmdi_model, categories_dict=self.sub_categories_list, \
                      energy_types=self.energy_types, directory=directory, output_directory=output_directory, base_year=base_year)
 def __init__(self,
              directory,
              output_directory,
              level_of_aggregation,
              lmdi_model='multiplicative',
              tedb_date='04302020',
              base_year=1985,
              end_year=2018):
     self.transit_eia = GetEIAData('transportation')
     self.mer_table25_dec_2019 = self.transit_eia.eia_api(
         id_='711272'
     )  # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711272'
     self.mer_table_43_nov2019 = self.transit_eia.eia_api(
         id_='711272'
     )  # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711272'
     self.aer_2010_table_65 = self.transit_eia.eia_api(
         id_='711272'
     )  # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711272'
     self.tedb_date = tedb_date
     self.energy_types = ['deliv']
     self.sub_categories_list = {
         'All_Passenger': {
             'Highway': {
                 'Passenger Cars and Trucks': {
                     'Passenger Car – SWB Vehicles': {
                         'Passenger Car': None,
                         'SWB Vehicles': None
                     },
                     'Light Trucks – LWB Vehicles': {
                         'Light Trucks': None,
                         'LWB Vehicles': None
                     },
                     'Motorcycles': None
                 },
                 'Buses': {
                     'Urban Bus': None,
                     'Intercity Bus': None,
                     'School Bus': None
                 },
                 'Paratransit': None
             },
             'Rail': {
                 'Urban Rail': {
                     'Commuter Rail': None,
                     'Heavy Rail': None,
                     'Light Rail': None
                 },
                 'Intercity Rail': None
             },
             'Air': {
                 'Commercial Carriers': None,
                 'General Aviation': None
             }
         },
         'All_Freight': {
             'Highway': {
                 'Single-Unit Truck': None,
                 'Combination Truck': None
             },
             'Rail': None,
             'Air': None,
             # 'Waterborne': None,
             'Pipeline': {
                 'Oil Pipeline': None,
                 'Natural Gas Pipeline': None
             }
         }
     }
     super().__init__(sector='transportation', level_of_aggregation=level_of_aggregation, lmdi_models=lmdi_model, categories_dict=self.sub_categories_list, \
                      energy_types=self.energy_types, directory=directory, output_directory=output_directory, base_year=base_year)
Esempio n. 15
0
    def __init__(self,
                 directory,
                 output_directory,
                 level_of_aggregation=None,
                 lmdi_model='multiplicative',
                 base_year=1985,
                 end_year=2018,
                 naics_digits=3):
        self.sub_categories_list = \
            {'Industry':
                {'Manufacturing':
                    {'Food and beverage and tobacco products': None,
                     'Textile mills and textile product mills': None,
                     'Apparel and leather and allied products': None,
                     'Wood products': None,
                     'Paper products': None,
                     'Printing and related support activities': None,
                     'Petroleum and coal products': None,
                     'Chemical products': None,
                     'Plastics and rubber products': None,
                     'Nonmetallic mineral products': None,
                     'Primary metals': None,
                     'Fabricated metal products': None,
                     'Machinery': None,
                     'Computer and electronic products': None,
                     'Electrical equipment, appliances, and components': None,
                     'Motor vehicles, bodies and trailers, and parts': None,
                     'Furniture and related products': None,
                     'Miscellaneous manufacturing': None},
                 'Nonmanufacturing':
                    {'Agriculture, Forestry & Fishing': None,
                     'Mining':
                        {'Petroleum and Natural Gas': None,
                         'Other Mining': None,
                         'Support Activities': None},
                     'Construction': None}}}

        self.ind_eia = GetEIAData('industry')
        # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711252'
        self.MER_Nov19_Table24 = \
            self.ind_eia.eia_api(id_='711252')
        # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711252'
        self.AER10_Table21d = \
            self.ind_eia.eia_api(id_='711252')
        # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711252'
        self.AER11_Table21d_MER0816 = \
            self.ind_eia.eia_api(id_='711252')
        # 'http://api.eia.gov/category/?api_key=YOUR_API_KEY_HERE&category_id=711252'
        self.mer_dataT0204 = \
            self.ind_eia.eia_api(id_='711252')
        self.energy_types = ['elec', 'fuels', 'deliv', 'source', 'source_adj']
        self.naics_digits = naics_digits

        super().__init__(sector='industry',
                         level_of_aggregation=level_of_aggregation,
                         lmdi_models=lmdi_model,
                         categories_dict=self.sub_categories_list,
                         energy_types=self.energy_types,
                         directory=directory,
                         output_directory=output_directory,
                         base_year=base_year,
                         primary_activity='value_added')
 def __init__(self):
     self.eia = GetEIAData('emissions')
                                                                                     'activity': {'value_of_shipments': 'AEO.2020.REF2020.ECI_VOS_MANF_FRP_NA_NA_NA_BLNY09DLR.A'}}, 
                                                    'Miscellaneous': {'energy': {'total_energy': 'AEO.2020.REF2020.CNSM_NA_IDAL_BMF_NA_NA_NA_TRLBTU.A', 
                                                                                 'purchased_electricity': 'AEO.2020.REF2020.CNSM_NA_IDAL_BMF_ELC_NA_NA_TRLBTU.A'}, # Energy data from "Balance of Manufacturing"
                                                                      'activity': {'value_of_shipments': 'AEO.2020.REF2020.ECI_VOS_MANF_MISC_NA_NA_NA_BLNY09DLR.A'}}},
                             'Nonmanufacturing': {'Agriculture/Forestry/Fishing/Hunting': {'energy': {'total_energy': 'AEO.2020.REF2020.CNSM_NA_IDAL_AGG_NA_NA_NA_TRLBTU.A',
                                                                                                      'purchased_electricity': 'AEO.2020.REF2020.CNSM_NA_IDAL_AGG_PRC_NA_NA_TRLBTU.A'}, 
                                                                                           'activity': {'value_of_shipments': 'AEO.2020.REF2020.ECI_VOS_NMFG_AFF_NA_NA_NA_BLNY09DLR.A'}}, # here elec is purchased electricity, Note: try to find total elec
                                                  'Mining': {{'energy': {'total_energy': 'AEO.2020.REF2020.CNSM_NA_IDAL_MING_NA_NA_NA_TRLBTU.A', 
                                                                         'purchased_electricity': {'excluding_oil_shale': 'AEO.2020.REF2020.CNSM_NA_IDAL_MING_PEO_NA_NA_TRLBTU.A', 
                                                                                                   'including_oil_shale': 'AEO.2020.REF2020.CNSM_NA_IDAL_MING_PES_NA_NA_TRLBTU.A'}}, 
                                                              'activity': {'value_of_shipments': 'AEO.2020.REF2020.ECI_VOS_NMFG_MING_NA_NA_NA_BLNY09DLR.A'}}},
                                                  'Construction': {'energy': {'total_energy': 'AEO.2020.REF2020.CNSM_NA_IDAL_CNS_NA_NA_NA_TRLBTU.A',
                                                                              'purchased_electricity': 'AEO.2020.REF2020.CNSM_NA_IDAL_CNS_PRC_NA_NA_TRLBTU.A'}, 
                                                                   'activity': {'value_of_shipments': 'AEO.2020.REF2020.ECI_VOS_NMFG_CNS_NA_NA_NA_BLNY09DLR.A'}}}}

        industrial_eia = GetEIAData('industrial')
        energy_use_industrial_electricity_us = industrial_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_IDAL_NA_ELC_NA_NA_QBTU.A', id_type='series')
        energy_use_industrial_total_us = industrial_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_IDAL_NA_TOT_NA_NA_QBTU.A', id_type='series')
        energy_use_industrial_delivered_energy_us = industrial_eia.eia_api(id_='AEO.2020.AEO2019REF.CNSM_ENU_IDAL_NA_DELE_NA_NA_QBTU.A', id_type='series')

        industrial_value_of_shipments_total = 

        activity_data = 
        energy_data = 
        

        pass

    def transportation_projections(self):
        """activity: 
                - Passenger-miles [P-M] (Passenger)