-
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate 2023 EIA 860 Early Release (#3681)
* extract: column maps * add the new proposed tab to the assets * fix column names & add new bools & add field descriptions * pudl id mapping, removing null generator ids, light updates to mapping notebook * add in the less than 5 MW plants into the pudl id mapping sheet * validation updates and pr responses * fix asset_checks * clean up helper function * Update src/pudl/helpers.py Co-authored-by: E. Belfer <[email protected]> --------- Co-authored-by: E. Belfer <[email protected]>
- Loading branch information
Showing
50 changed files
with
1,649 additions
and
1,220 deletions.
There are no files selected for viewing
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
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
60 changes: 60 additions & 0 deletions
60
migrations/versions/b9b6cb1a5405_add_2023_eia_860er_storage_and_solar_.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
"""add 2023 EIA 860ER storage and solar columns | ||
Revision ID: b9b6cb1a5405 | ||
Revises: da38a41d7f99 | ||
Create Date: 2024-06-20 10:00:37.339814 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'b9b6cb1a5405' | ||
down_revision = 'da38a41d7f99' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('core_eia860__scd_generators_energy_storage', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('is_ac_coupled', sa.Boolean(), nullable=True, comment='Indicates if this energy storage device is AC-coupled (means the energy storage device and the PV system are not installed on the same side of an inverter).')) | ||
batch_op.add_column(sa.Column('is_dc_coupled', sa.Boolean(), nullable=True, comment='Indicates if this energy storage device is DC-coupled (means the energy storage device and the PV system are on the same side of an inverter and the battery can still charge from the grid).')) | ||
batch_op.add_column(sa.Column('id_dc_coupled_tightly', sa.Boolean(), nullable=True, comment='Indicates if this energy storage device is DC tightly coupled (means the energy storage device and the PV system are on the same side of an inverter and the battery cannot charge from the grid).')) | ||
batch_op.add_column(sa.Column('is_independent', sa.Boolean(), nullable=True, comment='Indicates if this energy storage device is independent (not coupled with another generators)')) | ||
batch_op.add_column(sa.Column('is_transmission_and_distribution_asset_support', sa.Boolean(), nullable=True, comment='Indicate if the energy storage system is intended to support a specific substation, transmission or distribution asset.')) | ||
batch_op.add_column(sa.Column('is_direct_support', sa.Boolean(), nullable=True, comment='Indicates if this energy storage device is intended for dedicated generator firming or storing excess generation of other units.')) | ||
batch_op.add_column(sa.Column('plant_id_eia_direct_support_1', sa.Float(), nullable=True, comment='The EIA Plant ID of the primary unit whose generation this energy storage device is intended to firm or store.')) | ||
batch_op.add_column(sa.Column('generator_id_direct_support_1', sa.Text(), nullable=True, comment='The EIA Generator ID of the primary unit whose generation this energy storage device is intended to firm or store.')) | ||
batch_op.add_column(sa.Column('plant_id_eia_direct_support_2', sa.Float(), nullable=True, comment='The EIA Plant ID of the secondary unit whose generation this energy storage device is intended to firm or store.')) | ||
batch_op.add_column(sa.Column('generator_id_direct_support_2', sa.Text(), nullable=True, comment='The EIA Generator ID of the secondary unit whose generation this energy storage device is intended to firm or store.')) | ||
batch_op.add_column(sa.Column('plant_id_eia_direct_support_3', sa.Float(), nullable=True, comment='The EIA Plant ID of the tertiary unit whose generation this energy storage device is intended to firm or store.')) | ||
batch_op.add_column(sa.Column('generator_id_direct_support_3', sa.Text(), nullable=True, comment='The EIA Generator ID of the tertiary unit whose generation this energy storage device is intended to firm or store.')) | ||
|
||
with op.batch_alter_table('core_eia860__scd_generators_solar', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('uses_bifacial_panels', sa.Boolean(), nullable=True, comment='Indicates whether bifacial solar panels are used at this solar generating unit.')) | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('core_eia860__scd_generators_solar', schema=None) as batch_op: | ||
batch_op.drop_column('uses_bifacial_panels') | ||
|
||
with op.batch_alter_table('core_eia860__scd_generators_energy_storage', schema=None) as batch_op: | ||
batch_op.drop_column('generator_id_direct_support_3') | ||
batch_op.drop_column('plant_id_eia_direct_support_3') | ||
batch_op.drop_column('generator_id_direct_support_2') | ||
batch_op.drop_column('plant_id_eia_direct_support_2') | ||
batch_op.drop_column('generator_id_direct_support_1') | ||
batch_op.drop_column('plant_id_eia_direct_support_1') | ||
batch_op.drop_column('is_direct_support') | ||
batch_op.drop_column('is_transmission_and_distribution_asset_support') | ||
batch_op.drop_column('is_independent') | ||
batch_op.drop_column('id_dc_coupled_tightly') | ||
batch_op.drop_column('is_dc_coupled') | ||
batch_op.drop_column('is_ac_coupled') | ||
|
||
# ### end Alembic commands ### |
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
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
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
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
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
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
Oops, something went wrong.