USEPA / ElectricityLCI

Creative Commons Zero v1.0 Universal
24 stars 10 forks source link

Unused Argument found in generate regional grid loss function #181

Closed dt-woods closed 1 year ago

dt-woods commented 2 years ago

This is just an FYI that the function generate_regional_grid_loss in eia_trans_dist_grid_loss.py has three arguments, the first being final_database described in the doc string below; however, this data frame parameter is never used; rather, a new database is created using the build_generation_data function found in eia923_generation.py module.

You may want to consider removing this requirement.

def generate_regional_grid_loss(final_database, year, subregion="all"):
    """This function generates transmission and distribution losses for the
    provided generation data and given year, aggregated by subregion.

    Arguments:
        final_database: dataframe
            The database containing plant-level emissions.
        year: int
            Analysis year for the transmission and distribution loss data.
            Ideally this should match the year of your final_database.
    Returns:
        td_by_region: dataframe
            A dataframe of transmission and distribution loss rates as a
            fraction. This dataframe can be used to generate unit processes
            for transmission and distribution to match the regionally-
            aggregated emissions unit processes.
    """

Found in electricityLCI version: 1.0.1

dt-woods commented 2 years ago

Note that you are also missing the third argument from this doc string ;)