src/ei_mcoe/ei_mcoe.py
def disaggregate_ferc1(eia_pct_df, ferc1_plant_df):
    """Disaggregate FERC Form 1 Data based on EIA fuel breakdown percents.

    This is a meta function that brings together the outputs of several other
    functions to create a cohesive output: FERC Form 1 data broken down
    by plant and fuel type. It's ready to merge with EIA data from prep_eia_
    plant_fuel_data() and then for calculation of mcoe values.

    Args:
        eia_pct_df (pandas.DataFrame): A DataFrame with EIA aggregated by
            plant and fuel type.
        ferc1_plant_df (pandas.DataFrame): A DataFrame with FERC Form 1 data
            aggregated by plant.

    Returns:
        pandas.DataFrame: A DataFrame with FERC Form 1 data disaggregated
            by the fuel percentage breakdowns depicted in the EIA data.
    """
    logger.info(' - Merging FERC Form 1 data with EIA percent data')
    # Merge prepped EIA923 percent data with FERC1 cost data
    ferc1_pct_prep_df = (
        pd.merge(eia_pct_df, ferc1_plant_df, on=input_dict['plant_index_cols'],
                 how='outer'))
    disag_cols_ferc1 = ['opex_nofuel', 'net_generation_mwh']
    ferc1_pct_df = calc_cap_op_by_fuel_ferc1(ferc1_pct_prep_df)
    cols = ['plant_id_pudl', 'report_year',
            'ferc1_unit_count', 'fuel_type_code_pudl']
    opex_melt_df = pd.DataFrame(columns=cols)

    for col in disag_cols_ferc1:
        opex_melt_df = pd.merge(
            opex_melt_df,
            cost_subtable_maker(ferc1_pct_df, col),
            how='outer')
    return opex_melt_df
Disaggregate FERC Form 1 Data based on EIA fuel breakdown percents.

    This is a meta function that brings together the outputs of several other
    functions to create a cohesive output: FERC Form 1 data broken down
    by plant and fuel type. It's ready to merge with EIA data from prep_eia_
    plant_fuel_data() and then for calculation of mcoe values.

    Args:
        eia_pct_df (pandas.DataFrame): A DataFrame with EIA aggregated by
            plant and fuel type.
        ferc1_plant_df (pandas.DataFrame): A DataFrame with FERC Form 1 data
            aggregated by plant.

    Returns:
        pandas.DataFrame: A DataFrame with FERC Form 1 data disaggregated
            by the fuel percentage breakdowns depicted in the EIA data.
    
Disaggregate FERC Form 1 Data based on EIA fuel breakdown percents.
This is a meta function that brings together the outputs of several other
functions to create a cohesive output: FERC Form 1 data broken down
by plant and fuel type. It's ready to merge with EIA data from prep_eia_
plant_fuel_data() and then for calculation of mcoe values.
Disaggregate FERC Form 1 Data based on EIA fuel breakdown percents . This is a meta function that brings together the outputs of several other functions to create a cohesive output : FERC Form 1 data broken down by plant and fuel type . It ' s ready to merge with EIA data from prep_eia_ plant_fuel_data () and then for calculation of mcoe values .
def disaggregate_ferc1(eia_pct_df, ferc1_plant_df):
    logger.info(' - Merging FERC Form 1 data with EIA percent data')
    ferc1_pct_prep_df = (
        pd.merge(eia_pct_df, ferc1_plant_df, on=input_dict['plant_index_cols'],
                 how='outer'))
    disag_cols_ferc1 = ['opex_nofuel', 'net_generation_mwh']
    ferc1_pct_df = calc_cap_op_by_fuel_ferc1(ferc1_pct_prep_df)
    cols = ['plant_id_pudl', 'report_year',
            'ferc1_unit_count', 'fuel_type_code_pudl']
    opex_melt_df = pd.DataFrame(columns=cols)
    for col in disag_cols_ferc1:
        opex_melt_df = pd.merge(
            opex_melt_df,
            cost_subtable_maker(ferc1_pct_df, col),
            how='outer')
    return opex_melt_df
def disaggregate_ferc1 ( eia_pct_df , ferc1_plant_df ) : logger . info ( ' - Merging FERC Form 1 data with EIA percent data' ) ferc1_pct_prep_df = ( pd . merge ( eia_pct_df , ferc1_plant_df , on = input_dict [ 'plant_index_cols' ] , how = 'outer' ) ) disag_cols_ferc1 = [ 'opex_nofuel' , 'net_generation_mwh' ] ferc1_pct_df = calc_cap_op_by_fuel_ferc1 ( ferc1_pct_prep_df ) cols = [ 'plant_id_pudl' , 'report_year' , 'ferc1_unit_count' , 'fuel_type_code_pudl' ] opex_melt_df = pd . DataFrame ( columns = cols ) for col in disag_cols_ferc1 : opex_melt_df = pd . merge ( opex_melt_df , cost_subtable_maker ( ferc1_pct_df , col ) , how = 'outer' ) return opex_melt_df
Disaggregate FERC Form 1 Data based on EIA fuel breakdown percents.
Disaggregate FERC Form 1 Data based on EIA fuel breakdown percents .
"""Disaggregate FERC Form 1 Data based on EIA fuel breakdown percents.

    This is a meta function that brings together the outputs of several other
    functions to create a cohesive output: FERC Form 1 data broken down
    by plant and fuel type. It's ready to merge with EIA data from prep_eia_
    plant_fuel_data() and then for calculation of mcoe values.

    Args:
        eia_pct_df (pandas.DataFrame): A DataFrame with EIA aggregated by
            plant and fuel type.
        ferc1_plant_df (pandas.DataFrame): A DataFrame with FERC Form 1 data
            aggregated by plant.

    Returns:
        pandas.DataFrame: A DataFrame with FERC Form 1 data disaggregated
            by the fuel percentage breakdowns depicted in the EIA data.
    """ # Merge prepped EIA923 percent data with FERC1 cost data
A DataFrame with FERC Form 1 data disaggregated
by the fuel percentage breakdowns depicted in the EIA data.
A DataFrame with FERC Form 1 data disaggregated by the fuel percentage breakdowns depicted in the EIA data .
pandas.DataFrame
eia_pct_df
A DataFrame with EIA aggregated by
plant and fuel type.
A DataFrame with EIA aggregated by plant and fuel type .
ferc1_plant_df
A DataFrame with FERC Form 1 data
aggregated by plant.
A DataFrame with FERC Form 1 data aggregated by plant .