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 electric_plant_depreciation_functional_ferc1 into the calc checking process #2687

Merged
merged 5 commits into from Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions docs/release_notes.rst
Expand Up @@ -200,10 +200,11 @@ Data Cleaning
* Fixed column naming issues in the :ref:`electric_operating_revenues_ferc1` table.
* Made minor calculation fixes in the metadata for :ref:`income_statement_ferc1`,
:ref:`utility_plant_summary_ferc1`, :ref:`electric_operating_revenues_ferc1`,
:ref:`balance_sheet_assets_ferc1`, :ref:`balance_sheet_liabilities_ferc1`,
:ref:`electric_operating_expenses_ferc1`, and
:ref:`electric_plant_depreciation_changes_ferc1`. See :issue:`2016`, :pr:`2563` and
:pr:`2662`.
:ref:`balance_sheet_assets_ferc1`, :ref:`balance_sheet_liabilities_ferc1`, and
:ref:`electric_operating_expenses_ferc1`,
:ref:`electric_plant_depreciation_changes_ferc1` and
:ref:`electric_plant_depreciation_functional_ferc1`. See :issue:`2016`, :pr:`2563`,
:pr:`2662` and :pr:`2687`.
* Changed the :ref:`retained_earnings_ferc1` table transform to restore factoids for
previous year balances, and added calculation metadata. See :issue:`1811`,
:issue:`2016`, and :pr:`2645`.
Expand Down
69 changes: 69 additions & 0 deletions src/pudl/transform/ferc1.py
Expand Up @@ -1963,6 +1963,75 @@ def apply_xbrl_calculation_fixes(
},
],
},
"electric_plant_depreciation_functional_ferc1": {
# We use this name for the calculation but it gets renamed in
# `process_xbrl_metadata` to total.
Comment on lines +1967 to +1968
Copy link
Member

Choose a reason for hiding this comment

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

hm yeah i think this is needed bc i never implemented a rename process for raw_xbrl_factoid_to_pudl_name for the unstack_balances_to_report_year_instant_xbrl transform.

"accumulated_provision_for_depreciation_of_electric_utility_plant": [
{
"calc_component_to_replace": {},
"calc_component_new": {
"name": "steam_production",
"weight": 1.0,
},
},
{
"calc_component_to_replace": {},
"calc_component_new": {
"name": "nuclear_production",
"weight": 1.0,
},
},
{
"calc_component_to_replace": {},
"calc_component_new": {
"name": "hydraulic_production_conventional",
"weight": 1.0,
},
},
{
"calc_component_to_replace": {},
"calc_component_new": {
"name": "hydraulic_production_pumped_storage",
"weight": 1.0,
},
},
{
"calc_component_to_replace": {},
"calc_component_new": {
"name": "other_production",
"weight": 1.0,
},
},
{
"calc_component_to_replace": {},
"calc_component_new": {
"name": "transmission",
"weight": 1.0,
},
},
{
"calc_component_to_replace": {},
"calc_component_new": {
"name": "distribution",
"weight": 1.0,
},
},
{
"calc_component_to_replace": {},
"calc_component_new": {
"name": "regional_transmission_and_market_operation",
"weight": 1.0,
},
},
{
"calc_component_to_replace": {},
"calc_component_new": {
"name": "general",
"weight": 1.0,
},
},
],
},
"electric_plant_depreciation_changes_ferc1": {
"ending_balance": [
{
Expand Down
4 changes: 4 additions & 0 deletions src/pudl/transform/params/ferc1.py
Expand Up @@ -4072,6 +4072,10 @@
"unstack_balances_to_report_year_instant_xbrl": {
"unstack_balances_to_report_year": True
},
"reconcile_table_calculations": {
"column_to_check": "ending_balance",
"subtotal_column": "plant_status",
},
},
"cash_flow_ferc1": {
"rename_columns_ferc1": {
Expand Down