Skip to content

Commit

Permalink
Merge pull request #2135 from catalyst-cooperative/v2022.11.30
Browse files Browse the repository at this point in the history
v2022.11.30
  • Loading branch information
zaneselvans authored Dec 14, 2022
2 parents e46873c + 18d3953 commit 2e8fa5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pudl/analysis/epacamd_eia.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _prep_for_networkx(crosswalk: pd.DataFrame) -> pd.DataFrame:
by=["plant_id_eia", "emissions_unit_id_epa"]
).ngroup()
# node IDs can't overlap so add (max + 1)
prepped["generator_id"] = (
prepped["generator_id_unique"] = (
prepped.groupby(by=["plant_id_eia", "generator_id"]).ngroup()
+ prepped["combustor_id"].max()
+ 1
Expand All @@ -141,7 +141,7 @@ def _subplant_ids_from_prepped_crosswalk(prepped: pd.DataFrame) -> pd.DataFrame:
graph = nx.from_pandas_edgelist(
prepped,
source="combustor_id",
target="generator_id",
target="generator_id_unique",
edge_attr=True,
)
for i, node_set in enumerate(nx.connected_components(graph)):
Expand Down

0 comments on commit 2e8fa5b

Please sign in to comment.