src/ei_mcoe/ei_mcoe.py
def build_part3_output(raw_eia_df, part1_df, bga_df, cems_df, level):
    """Merge EIA, CEMS, and GREET data based on specified agg level.

    Args:
        raw_eia_df (pandas.DataFrame): A DataFrame containing EIA data from the
            pudl_out.mcoe() function that has been run through the prep_raw_
            eia() function.
        bga_df (pandas.DataFrame): The output from running
            pudl_out.bga_eia860()
        cems_df (pandas.DataFrame): The output of running get_cems(). Added as
            a parameter so only have to run get_cems() once because it takes a
            while.
        level (str): A string indicating the level of desired aggregation.
            Either 'plant-fuel' or 'unit-fuel' are acceptable.
    """
    logger.info('Building Part 3 output')
    # part1_df = build_part1_output(raw_eia_df, level)
    eia_cems_df = add_cems_to_eia(part1_df, bga_df, cems_df, raw_eia_df, level)
    greet_df = add_pm_values(raw_eia_df, level)
    eia_cems_greet_df = (
        pd.merge(eia_cems_df, greet_df, on=input_dict[level + '_index_cols'],
                 how='outer'))
    with_damages_df = calc_public_health_damages(eia_cems_greet_df)
    with_prem_death_df = calc_value_of_life(with_damages_df)
    logger.info(f'Finished building Part 3 {level} level data')
    return with_prem_death_df
Merge EIA, CEMS, and GREET data based on specified agg level.

    Args:
        raw_eia_df (pandas.DataFrame): A DataFrame containing EIA data from the
            pudl_out.mcoe() function that has been run through the prep_raw_
            eia() function.
        bga_df (pandas.DataFrame): The output from running
            pudl_out.bga_eia860()
        cems_df (pandas.DataFrame): The output of running get_cems(). Added as
            a parameter so only have to run get_cems() once because it takes a
            while.
        level (str): A string indicating the level of desired aggregation.
            Either 'plant-fuel' or 'unit-fuel' are acceptable.
    
Merge EIA, CEMS, and GREET data based on specified agg level.
Merge EIA CEMS and GREET data based on specified agg level .
def build_part3_output(raw_eia_df, part1_df, bga_df, cems_df, level):
    logger.info('Building Part 3 output')
    eia_cems_df = add_cems_to_eia(part1_df, bga_df, cems_df, raw_eia_df, level)
    greet_df = add_pm_values(raw_eia_df, level)
    eia_cems_greet_df = (
        pd.merge(eia_cems_df, greet_df, on=input_dict[level + '_index_cols'],
                 how='outer'))
    with_damages_df = calc_public_health_damages(eia_cems_greet_df)
    with_prem_death_df = calc_value_of_life(with_damages_df)
    logger.info(f'Finished building Part 3 {level} level data')
    return with_prem_death_df
def build_part3_output ( raw_eia_df , part1_df , bga_df , cems_df , level ) : logger . info ( 'Building Part 3 output' ) eia_cems_df = add_cems_to_eia ( part1_df , bga_df , cems_df , raw_eia_df , level ) greet_df = add_pm_values ( raw_eia_df , level ) eia_cems_greet_df = ( pd . merge ( eia_cems_df , greet_df , on = input_dict [ level + '_index_cols' ] , how = 'outer' ) ) with_damages_df = calc_public_health_damages ( eia_cems_greet_df ) with_prem_death_df = calc_value_of_life ( with_damages_df ) logger . info ( f'Finished building Part 3 {level} level data' ) return with_prem_death_df
Merge EIA, CEMS, and GREET data based on specified agg level.
Merge EIA CEMS and GREET data based on specified agg level .
"""Merge EIA, CEMS, and GREET data based on specified agg level.

    Args:
        raw_eia_df (pandas.DataFrame): A DataFrame containing EIA data from the
            pudl_out.mcoe() function that has been run through the prep_raw_
            eia() function.
        bga_df (pandas.DataFrame): The output from running
            pudl_out.bga_eia860()
        cems_df (pandas.DataFrame): The output of running get_cems(). Added as
            a parameter so only have to run get_cems() once because it takes a
            while.
        level (str): A string indicating the level of desired aggregation.
            Either 'plant-fuel' or 'unit-fuel' are acceptable.
    """ # part1_df = build_part1_output(raw_eia_df, level)
raw_eia_df
A DataFrame containing EIA data from the
pudl_out.mcoe() function that has been run through the prep_raw_
eia() function.
A DataFrame containing EIA data from the pudl_out . mcoe () function that has been run through the prep_raw_ eia () function .
part1_df
bga_df
The output from running
pudl_out.bga_eia860()
The output from running pudl_out . bga_eia860 ()
cems_df
The output of running get_cems(). Added as
a parameter so only have to run get_cems() once because it takes a
while.
The output of running get_cems () . Added as a parameter so only have to run get_cems () once because it takes a while .
level
A string indicating the level of desired aggregation.
Either 'plant-fuel' or 'unit-fuel' are acceptable.
A string indicating the level of desired aggregation . Either ' plant - fuel ' or ' unit - fuel ' are acceptable .