-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Transform and harvesting the eia860 Energy Storage table #3526
Conversation
…ils tweaking some of the column names and skipfooters, and passing it through the harvesting process. Adds in new codes, fields, and a new alembic migration.
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.
It looks like you missed one code step, which is to define those tables as db tables. there are many examples of that in metadata.resources.eia
. This could be the cause of your pydantic error.
You also need to add the _core table in the tables to be harvested (see comment in transform.eia
I noticed that some of the columns that get dropped from the specific generator tables have values that aren't in the general generators table. We should probably do a comparison before we drop them, but that is OOS.
I'm not sure what you mean here. This maybe could be related to the previous harvest comment.
Looks like the boolean columns are coming out as 1/0 values in the core tables, need to figure out where to add the dtype fix to stop this.
Are you seeing this in the _core
table or in the core
table? the core
table is definitely getting dtyped with the dypes defined in the schema.
(i haven't tried to build these assets yet)
src/pudl/package_data/eia860/column_maps/generator_energy_storage_existing.csv
Outdated
Show resolved
Hide resolved
…so remove unecessary parenthesis
…e_power_rating from the energy table schema because it's in the generators generic table. Also rename that column to match the other harvested column with mvar.
Yeah, both tables just have 0 or 1 values instead of True/False |
… with a specific string
…olumns that was missing it, also rename yearly table to scd
Realized that this is because I was viewing them in SQL where the dtypes were dropped |
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.
I second zane's suggestion to remove the _application
suffix but that is not blocking for me. also one docs comment that is also not blocking.
Yeah, SQLite stores booleans as integers. It's generally kinda lazy about dtypes. If you want to see rich dtypes, you can always read from the parquet files, which is what you'll get if you use something like raw_weather = defs.load_asset_value(AssetKey("raw_gridpathratoolkit__daily_weather")) |
Happy to change if it's 2:1 |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Overview
Closes #3506 and #3536
What problem does this address?
What did you change?
core_eia__codes_storage_technology_types
andcore_eia__codes_storage_enclosure_types
core_eia860__yearly_generators_energy_storage
to the list of finished EIA assets and resource metadataNotes
core
tables, need to figure out where to add the dtype fix to stop this.Testing
How did you make sure this worked? How can a reviewer verify this?
To-do list