src/ei_mcoe/ei_mcoe.py
def make_confidence_tier(mcoe_plant):
    """Label records with a confidence tier."""
    mask_1 = (
        ~mcoe_plant.fix_var_is_NEMS
        & (mcoe_plant.fuel_cost_per_mmbtu.notnull()
           | mcoe_plant.fuel_cost_mwh_eia923.notnull())
        & ~mcoe_plant.fuel_cost_from_eiaapi
    )
    mask_2 = (
        mcoe_plant.fix_var_is_NEMS
        & (mcoe_plant.fuel_cost_per_mmbtu.notnull()
           | mcoe_plant.fuel_cost_mwh_eia923.notnull())
        & ~mcoe_plant.fuel_cost_from_eiaapi
    )
    mask_3 = (
        mcoe_plant.fix_var_om_is_avg
        & (mcoe_plant.fuel_cost_per_mmbtu.notnull()
           | mcoe_plant.fuel_cost_mwh_eia923.notnull())
        & ~mcoe_plant.fuel_cost_from_eiaapi
    )
    mask_4 = (
        ~mcoe_plant.fix_var_is_NEMS
        & mcoe_plant.fuel_cost_mwh_eia923.isnull()
    )
    mask_5 = (
        mcoe_plant.fix_var_is_NEMS
        & mcoe_plant.fuel_cost_mwh_eia923.isnull()
    )
    mask_6 = (
        mcoe_plant.fix_var_om_is_avg
        & mcoe_plant.fuel_cost_mwh_eia923.isnull()
    )

    mcoe_plant.loc[mask_1, 'confidence_tier'] = 1
    mcoe_plant.loc[mask_2, 'confidence_tier'] = 2
    mcoe_plant.loc[mask_3, 'confidence_tier'] = 3
    mcoe_plant.loc[mask_4, 'confidence_tier'] = 4
    mcoe_plant.loc[mask_5, 'confidence_tier'] = 5
    mcoe_plant.loc[mask_6, 'confidence_tier'] = 6
    return mcoe_plant
Label records with a confidence tier.
Label records with a confidence tier.
Label records with a confidence tier .
def make_confidence_tier(mcoe_plant):
    mask_1 = (
        ~mcoe_plant.fix_var_is_NEMS
        & (mcoe_plant.fuel_cost_per_mmbtu.notnull()
           | mcoe_plant.fuel_cost_mwh_eia923.notnull())
        & ~mcoe_plant.fuel_cost_from_eiaapi
    )
    mask_2 = (
        mcoe_plant.fix_var_is_NEMS
        & (mcoe_plant.fuel_cost_per_mmbtu.notnull()
           | mcoe_plant.fuel_cost_mwh_eia923.notnull())
        & ~mcoe_plant.fuel_cost_from_eiaapi
    )
    mask_3 = (
        mcoe_plant.fix_var_om_is_avg
        & (mcoe_plant.fuel_cost_per_mmbtu.notnull()
           | mcoe_plant.fuel_cost_mwh_eia923.notnull())
        & ~mcoe_plant.fuel_cost_from_eiaapi
    )
    mask_4 = (
        ~mcoe_plant.fix_var_is_NEMS
        & mcoe_plant.fuel_cost_mwh_eia923.isnull()
    )
    mask_5 = (
        mcoe_plant.fix_var_is_NEMS
        & mcoe_plant.fuel_cost_mwh_eia923.isnull()
    )
    mask_6 = (
        mcoe_plant.fix_var_om_is_avg
        & mcoe_plant.fuel_cost_mwh_eia923.isnull()
    )
    mcoe_plant.loc[mask_1, 'confidence_tier'] = 1
    mcoe_plant.loc[mask_2, 'confidence_tier'] = 2
    mcoe_plant.loc[mask_3, 'confidence_tier'] = 3
    mcoe_plant.loc[mask_4, 'confidence_tier'] = 4
    mcoe_plant.loc[mask_5, 'confidence_tier'] = 5
    mcoe_plant.loc[mask_6, 'confidence_tier'] = 6
    return mcoe_plant
def make_confidence_tier ( mcoe_plant ) : mask_1 = ( ~ mcoe_plant . fix_var_is_NEMS & ( mcoe_plant . fuel_cost_per_mmbtu . notnull ( ) | mcoe_plant . fuel_cost_mwh_eia923 . notnull ( ) ) & ~ mcoe_plant . fuel_cost_from_eiaapi ) mask_2 = ( mcoe_plant . fix_var_is_NEMS & ( mcoe_plant . fuel_cost_per_mmbtu . notnull ( ) | mcoe_plant . fuel_cost_mwh_eia923 . notnull ( ) ) & ~ mcoe_plant . fuel_cost_from_eiaapi ) mask_3 = ( mcoe_plant . fix_var_om_is_avg & ( mcoe_plant . fuel_cost_per_mmbtu . notnull ( ) | mcoe_plant . fuel_cost_mwh_eia923 . notnull ( ) ) & ~ mcoe_plant . fuel_cost_from_eiaapi ) mask_4 = ( ~ mcoe_plant . fix_var_is_NEMS & mcoe_plant . fuel_cost_mwh_eia923 . isnull ( ) ) mask_5 = ( mcoe_plant . fix_var_is_NEMS & mcoe_plant . fuel_cost_mwh_eia923 . isnull ( ) ) mask_6 = ( mcoe_plant . fix_var_om_is_avg & mcoe_plant . fuel_cost_mwh_eia923 . isnull ( ) ) mcoe_plant . loc [ mask_1 , 'confidence_tier' ] = 1 mcoe_plant . loc [ mask_2 , 'confidence_tier' ] = 2 mcoe_plant . loc [ mask_3 , 'confidence_tier' ] = 3 mcoe_plant . loc [ mask_4 , 'confidence_tier' ] = 4 mcoe_plant . loc [ mask_5 , 'confidence_tier' ] = 5 mcoe_plant . loc [ mask_6 , 'confidence_tier' ] = 6 return mcoe_plant
Label records with a confidence tier.
Label records with a confidence tier .
"""Label records with a confidence tier."""
mcoe_plant