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

Add EIA AEO fuel cost projections #3656

Merged
merged 4 commits into from
Jun 17, 2024
Merged

Add EIA AEO fuel cost projections #3656

merged 4 commits into from
Jun 17, 2024

Conversation

jdangerx
Copy link
Member

@jdangerx jdangerx commented May 27, 2024

Overview

Closes #3649.

  • promotes core_eiaaeo__yearly_projected_fuel_cost_in_electric_sector_by_type resource + updates fields
  • adds real_cost_basis_year field so we know what the real cost actually means

Testing

How did you make sure this worked? How can a reviewer verify this?

Materialized assets via Dagster, asset checks passed, and made some graphs as seen in #3649 .

To-do list

Preview Give feedback

src/pudl/metadata/resources/eiaaeo.py Show resolved Hide resolved
@@ -266,6 +266,7 @@
"fuel_type_eiaaeo",
"fuel_cost_per_mmbtu",
"fuel_cost_real_per_mmbtu_eiaaeo",
"real_cost_basis_year",
Copy link
Member Author

Choose a reason for hiding this comment

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

Added this so we know what year the real cost refers to.

src/pudl/metadata/resources/eiaaeo.py Show resolved Hide resolved
src/pudl/transform/eiaaeo.py Show resolved Hide resolved
src/pudl/transform/eiaaeo.py Outdated Show resolved Hide resolved
@jdangerx jdangerx requested a review from aesharpe May 27, 2024 21:23
@jdangerx
Copy link
Member Author

FYI @anamileva and @gschivley, two people who have been curious about this.

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.

Generally looks good!

It looks like you added the resource metadata for this table in another PR? I have one comment about the table description (in metadata/resources/eiaaeo.py) containing the phrase: Projected fuel prices to the electric power sector -- what does "to the electric power sector" mean -- should this be "for"? It also doesn't quite match the description you put in the release notes that says "generation and capacity" and leaves out cost.

@@ -1644,6 +1644,15 @@
"description": "Average cost of fuel delivered in the report year per reported fuel unit (USD).",
"unit": "USD",
},
"fuel_cost_real_per_mmbtu_eiaaeo": {
Copy link
Member

Choose a reason for hiding this comment

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

why do we need the suffix eiaaeo?

Copy link
Member

Choose a reason for hiding this comment

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

Also this is a nit and not blocking but here we say: cost_real but in the other column we say real_cost. Maybe we should pick one?

Copy link
Member Author

Choose a reason for hiding this comment

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

We wanted to add the suffix eiaaeo because it's possible that other datasets mean something different by "real fuel cost" - maybe it is always based in the same year, for example. It's easier to remove a suffix and merge two fields into one than it is to have to tease apart the different use cases later.

I think this column would be named "Fuel Cost (Real 2022 USD/MMbtu)" and the other would be named "Real Cost Basis Year" (not "Cost (real) Basis Year") in English - which is why I put them that way. I think it's slightly less consistent but more readable the way it is, but happy to switch out if you feel strongly about it.

Copy link
Member

Choose a reason for hiding this comment

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

mmm yeah there is no great way to deal with this -- could say real_cost_fuel? but that is inconsistent with how we report fuel_cost in other columns too 🤷. I'll leave this up to you.

@jdangerx
Copy link
Member Author

It looks like you added the resource metadata for this table in another PR?

Yeah, see #3588 !

These resource schemas are pretty closely coupled to each other, so I wanted to design them all at the same time, but also I didn't want to have to implement all the resources at once.

I added the metadatas to a "staging" area, which let @cmgosnell review the schemas & fields on their own before I did any more implementation.

Now, when implementing a new AEO asset, I just promote the resource definition from the staging area.

I think it's a nice pattern to follow, it avoids huge PRs as well as re-work when we realize the asset design was wrong.

I have one comment about the table description (in metadata/resources/eiaaeo.py) containing the phrase: Projected fuel prices to the electric power sector -- what does "to the electric power sector" mean -- should this be "for"? It also doesn't quite match the description you put in the release notes that says "generation and capacity" and leaves out cost.

Yeah, good catch :) let me fix the docs!

@jdangerx jdangerx force-pushed the 3649-eiaaeo-fuel-cost branch from 21faaa6 to 30c3f2a Compare June 10, 2024 18:29
@jdangerx jdangerx requested a review from aesharpe June 10, 2024 18:29
@zaneselvans zaneselvans added new-data Requests for integration of new data. gridlab Work related to open modeling input data integration funded/coordinated by GridLab eiaaeo EIA Annual Energy Outlook labels Jun 17, 2024
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.

Nothing is blocking, so I'm approving this, but I have some questions!

Comment on lines +3295 to +3307
"real_cost_basis_year": {
"type": "integer",
"description": "Four-digit year which is the basis for any 'real cost' "
"monetary values (as opposed to nominal values).",
},
Copy link
Member

Choose a reason for hiding this comment

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

Is "real" vs. "nominal" cost something we should expect users to understand? TBH I don't know the difference so I don't want to assume other people do. Is this an easily googleable term, or should we go into more depth about what "real" means here. Also open to housing this explanation elsewhere (i.e.: the metadata table description, another/several column description(s)).

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a pretty easily searchable term - just going by this docstring and searching "real cost vs nominal value" gets you the right thing as the first hit on DuckDuckGo and the fourth hit on Google after the rando AI generated BS.

image

Comment on lines +256 to 258
"Projected fuel prices for the electric power sector, including "
"electricity-only and combined-heat-and-power plants that have a "
"regulatory status."
Copy link
Member

Choose a reason for hiding this comment

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

See comment above about describing real vs. nominal somewhere.

Comment on lines +586 to +593
check_specs = [
AeoCheckSpec(
name="gen_in_electric_sector_by_tech",
asset="core_eiaaeo__yearly_projected_generation_in_electric_sector_by_technology",
num_rows_by_report_year={2023: 166972},
category_counts=BASE_AEO_CATEGORIES
| {
"technology_description_eiaaeo": 13,
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason these aren't in test modules?

Copy link
Member

Choose a reason for hiding this comment

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

These are for defining asset checks, which get run during the ETL after an asset has been materialized.

@jdangerx jdangerx force-pushed the 3649-eiaaeo-fuel-cost branch from 30c3f2a to 15f3cf5 Compare June 17, 2024 21:41
@jdangerx jdangerx enabled auto-merge June 17, 2024 21:41
@jdangerx jdangerx added this pull request to the merge queue Jun 17, 2024
Merged via the queue into main with commit 4c89d53 Jun 17, 2024
12 checks passed
@jdangerx jdangerx deleted the 3649-eiaaeo-fuel-cost branch June 17, 2024 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eiaaeo EIA Annual Energy Outlook gridlab Work related to open modeling input data integration funded/coordinated by GridLab new-data Requests for integration of new data.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

core_eiaaeo__yearly_projected_fuel_cost_in_electric_sector_by_type
3 participants