-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: process plant data to create data frame #197
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rouille
reviewed
Jul 23, 2021
51471c3
to
d152077
Compare
9054db3
to
9f75dfe
Compare
9f75dfe
to
65d39d1
Compare
5e11dd1
to
7311ea9
Compare
6e2d509
to
f2d689b
Compare
830de6a
to
2cc6584
Compare
8 tasks
d074b52
to
0db0882
Compare
5735bca
to
0270072
Compare
rouille
reviewed
Sep 21, 2021
rouille
reviewed
Sep 21, 2021
rouille
reviewed
Sep 21, 2021
rouille
reviewed
Sep 21, 2021
rouille
reviewed
Sep 21, 2021
rouille
reviewed
Sep 21, 2021
rouille
reviewed
Sep 21, 2021
rouille
reviewed
Sep 21, 2021
0270072
to
e91be30
Compare
rouille
approved these changes
Sep 21, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
e91be30
to
19f5615
Compare
19f5615
to
df6e76e
Compare
danielolsen
added a commit
that referenced
this pull request
Sep 22, 2021
feat: process plant data to create data frame
danielolsen
added a commit
that referenced
this pull request
Dec 8, 2021
feat: process plant data to create data frame
danielolsen
added a commit
that referenced
this pull request
Jan 5, 2022
feat: process plant data to create data frame
danielolsen
added a commit
that referenced
this pull request
Jan 8, 2022
feat: process plant data to create data frame
danielolsen
added a commit
that referenced
this pull request
Jan 31, 2022
feat: process plant data to create data frame
danielolsen
added a commit
that referenced
this pull request
Feb 25, 2022
feat: process plant data to create data frame
danielolsen
added a commit
that referenced
this pull request
Mar 15, 2022
feat: process plant data to create data frame
danielolsen
added a commit
that referenced
this pull request
Apr 1, 2022
feat: process plant data to create data frame
danielolsen
added a commit
that referenced
this pull request
Apr 5, 2022
feat: process plant data to create data frame
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request doc
Purpose
Parse HIFLD data into the beginning of a
plant
data frame, for use with a Grid object.What the code is doing
build_plant
is the entry-point function, which will eventually return a data frame with all information, and all lower-level functions are accessed from this function.build_plant
effectively replaces the oldplant_agg
function, with different structure. The lower level functions are:map_generator_to_sub_by_location
: look up substations within that interconnect and ZIP code, or if there are none, look within that interconnect and 'nearby' ZIP codes (+- 100). The logic of 'nearby' could probably be improved, but this is what was implemented in the collaborators' code.map_generator_to_bus_by_sub
: pick the lowest voltage bus within a specified substation.add_locations_to_generators
: use the locations from Power_Plants.csv, map them to the generating units as best as possible.map_generators_to_interconnects
: look up the county for each substation using the Power Plant mapping, then determine the interconnect.add_pmin_to_generators
: look up Pmin values from EIA Form 860.helpers.map_state_and_county_to_interconnect
: look up information from const.py to map a state/county to an interconnection. We also call this fromdata_process.transmission
so that we can access this information for substations from withinmap_generator_to_sub_by_location
.There are also placeholders for:
estimate_heat_rate_from_ampd
add_heat_rate_to_generators
These will need further research into the best way to implement, but they are independent and so can wait for a follow-up PR.
Usage Example
Not all plant codes can be mapped successfully, and same with lats/lons, and therefore sub_id & bus_id, but we're only missing about 3%. Suggestions for improvement welcome.
Time to review
1 hour.