Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix missing generator_id #2122

Merged
merged 1 commit into from
Dec 14, 2022
Merged

Conversation

grgmiller
Copy link
Collaborator

In epacamd_eia.py when prepping the data for networkx, we created a new generator_id column that didn't have any overlapping id numbers. The problem was that this new unique id was assigned the same name as an existing column (generator_id), and this column was used as the target column in the network analysis. This was resulting in the final epacamd_eia crosswalk table missing a generator_id column. For our use in OGE, we need this crosswalk table to include the crosswalk to EIA generator ids.

To fix this, I just assigned the target column for the graph analysis a unique name that is different from the generator_id column.

@codecov
Copy link

codecov bot commented Dec 10, 2022

Codecov Report

Base: 85.2% // Head: 85.2% // No change to project coverage 👍

Coverage data is based on head (7cec90b) compared to base (4d994ae).
Patch coverage: 0.0% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           v2022.11.30   #2122   +/-   ##
===========================================
  Coverage         85.2%   85.2%           
===========================================
  Files               73      73           
  Lines             8555    8555           
===========================================
  Hits              7290    7290           
  Misses            1265    1265           
Impacted Files Coverage Δ
src/pudl/analysis/epacamd_eia.py 21.5% <0.0%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@zaneselvans
Copy link
Member

Does generator_id_unique get retained in the outputs, or is it only used for the network analysis that assigns a unit ID and then dropped? It would be confusing to have outputs with both generator_id and generator_id_unique in it.

@grgmiller
Copy link
Collaborator Author

grgmiller commented Dec 13, 2022

@zaneselvans The generator_id_unique is only used for the network analysis that assigns a unit ID and then it is dropped.

This is what the output of make_subplant_id() looks like now:
image

Copy link
Member

@aesharpe aesharpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me!

@zaneselvans zaneselvans merged commit b03f5f2 into v2022.11.30 Dec 14, 2022
@zaneselvans zaneselvans deleted the epacamd_eia_missing_generator_id branch December 14, 2022 15:06
@zaneselvans
Copy link
Member

I've merged these changes into the release branch, and also from there into dev so we'll see if anything happens with the nightly builds tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants