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

Raise error if FERC1 column renames don't match expected data #3791

Merged
merged 12 commits into from
Sep 5, 2024
122 changes: 122 additions & 0 deletions migrations/versions/a93bdb8d4fbd_constrain_ferc_xbrl_factoids.py

Large diffs are not rendered by default.

287 changes: 287 additions & 0 deletions src/pudl/metadata/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,290 @@

See https://eia.gov/outlooks/aeo/assumptions/case_descriptions.php .
"""

ENERGY_SOURCE_TYPES_FERC1: list[str] = [
"steam_generation",
"net_energy_generation",
"sources_of_energy",
"nuclear_generation",
"hydro_conventional_generation",
"megawatt_hours_purchased",
"energy_received_through_power_exchanges",
"energy_delivered_through_power_exchanges",
"net_energy_through_power_exchanges",
"electric_power_wheeling_energy_received",
"electric_power_wheeling_energy_delivered",
"net_transmission_energy_for_others_electric_power_wheeling",
"other_energy_generation",
"hydro_pumped_storage_generation",
"pumping_energy",
"transmission_losses_by_others_electric_power_wheeling",
"megawatt_hours_purchased_for_energy_storage",
"megawatt_hours_purchased_other_than_storage",
]
"""Energy source types for FERC Form 1 data."""

ENERGY_DISPOSITION_TYPES_FERC1: list[str] = [
"megawatt_hours_sold_non_requirements_sales",
"disposition_of_energy",
"megawatt_hours_sold_sales_to_ultimate_consumers",
"megawatt_hours_sold_requirements_sales",
"non_charged_energy",
"internal_use_energy",
"energy_losses",
"energy_stored",
]
"""Energy disposition types for FERC Form 1 data."""

UTILITY_PLANT_ASSET_TYPES_FERC1: list[str] = [
"abandonment_of_leases",
"accumulated_provision_for_depreciation_amortization_and_depletion_of_plant_utility",
"accumulated_provision_for_depreciation_amortization_and_depletion_of_plant_utility_reported",
"amortization_and_depletion_of_producing_natural_gas_land_and_land_rights_utility_plant_in_service",
"amortization_and_depletion_utility_plant_leased_to_others",
"amortization_of_other_utility_plant_utility_plant_in_service",
"amortization_of_plant_acquisition_adjustment",
"amortization_of_underground_storage_land_and_land_rights_utility_plant_in_service",
"amortization_utility_plant_held_for_future_use",
"construction_work_in_progress",
"depreciation_amortization_and_depletion_utility_plant_in_service",
"depreciation_amortization_and_depletion_utility_plant_leased_to_others",
"depreciation_and_amortization_utility_plant_held_for_future_use",
"depreciation_utility_plant_held_for_future_use",
"depreciation_utility_plant_in_service",
"depreciation_utility_plant_leased_to_others",
"utility_plant_acquisition_adjustment",
"utility_plant_and_construction_work_in_progress",
"utility_plant_held_for_future_use",
"utility_plant_in_service_classified",
"utility_plant_in_service_classified_and_property_under_capital_leases",
"utility_plant_in_service_classified_and_unclassified",
"utility_plant_in_service_completed_construction_not_classified",
"utility_plant_in_service_experimental_plant_unclassified",
"utility_plant_in_service_plant_purchased_or_sold",
"utility_plant_in_service_property_under_capital_leases",
"utility_plant_leased_to_others",
"utility_plant_net",
]
"""Utility plant asset types for FERC Form 1 data."""

LIABILITY_TYPES_FERC1: list[str] = [
"accounts_payable",
"accounts_payable_to_associated_companies",
"accumulated_deferred_income_taxes",
"accumulated_deferred_income_taxes_accelerated_amortization_property",
"accumulated_deferred_income_taxes_other",
"accumulated_deferred_income_taxes_other_property",
"accumulated_deferred_investment_tax_credits",
"accumulated_miscellaneous_operating_provisions",
"accumulated_other_comprehensive_income",
"accumulated_provision_for_injuries_and_damages",
"accumulated_provision_for_pensions_and_benefits",
"accumulated_provision_for_property_insurance",
"accumulated_provision_for_rate_refunds",
"advances_from_associated_companies",
"asset_retirement_obligations",
"bonds",
"capital_stock_expense",
"capital_stock_subscribed",
"common_stock_issued",
"current_and_accrued_liabilities",
"customer_advances_for_construction",
"customer_deposits",
"deferred_credits",
"deferred_gains_from_disposition_of_utility_plant",
"derivative_instrument_liabilities_hedges",
"derivatives_instrument_liabilities",
"discount_on_capital_stock",
"dividends_declared",
"installments_received_on_capital_stock",
"interest_accrued",
"less_long_term_portion_of_derivative_instrument_liabilities",
"less_long_term_portion_of_derivative_instrument_liabilities_hedges",
"liabilities_and_other_credits",
"long_term_debt",
"long_term_portion_of_derivative_instrument_liabilities",
"long_term_portion_of_derivative_instrument_liabilities_hedges",
"matured_interest",
"matured_long_term_debt",
"miscellaneous_current_and_accrued_liabilities",
"noncorporate_proprietorship",
"notes_payable",
"notes_payable_to_associated_companies",
"obligations_under_capital_lease_noncurrent",
"obligations_under_capital_leases_current",
"other_deferred_credits",
"other_long_term_debt",
"other_noncurrent_liabilities",
"other_paid_in_capital",
"other_regulatory_liabilities",
"preferred_stock_issued",
"premium_on_capital_stock",
"proprietary_capital",
"reacquired_bonds",
"reacquired_capital_stock",
"retained_earnings",
"stock_liability_for_conversion",
"tax_collections_payable",
"taxes_accrued",
"unamortized_discount_on_long_term_debt_debit",
"unamortized_gain_on_reacquired_debt",
"unamortized_premium_on_long_term_debt",
"unappropriated_undistributed_subsidiary_earnings",
]
"""Liability types for FERC Form 1 data."""

ASSET_TYPES_FERC1: list[str] = [
"accounts_receivable_from_associated_companies",
"accrued_utility_revenues",
"accumulated_deferred_income_taxes",
"accumulated_provision_for_amortization_of_nuclear_fuel_assemblies",
"accumulated_provision_for_depreciation_and_amortization_of_nonutility_property",
"accumulated_provision_for_uncollectible_accounts_credit",
"advances_for_gas",
"allowance_inventory_and_withheld",
"amortization_fund_federal",
"cash",
"cash_and_working_funds",
"clearing_accounts",
"current_and_accrued_assets",
"customer_accounts_receivable",
"deferred_debits",
"deferred_losses_from_disposition_of_utility_plant",
"depreciation_fund",
"derivative_instrument_assets",
"derivative_instrument_assets_hedges",
"derivative_instrument_assets_hedges_long_term",
"derivative_instrument_assets_long_term",
"extraordinary_property_losses",
"fuel_stock",
"fuel_stock_expenses_undistributed",
"gas_stored_current",
"gas_stored_underground_noncurrent",
"interest_and_dividends_receivable",
"investment_in_associated_companies",
"investment_in_subsidiary_companies",
"less_derivative_instrument_assets_hedges_long_term",
"less_derivative_instrument_assets_long_term",
"less_noncurrent_portion_of_allowances",
"liquefied_natural_gas_stored_and_held_for_processing",
"merchandise",
"miscellaneous_current_and_accrued_assets",
"miscellaneous_deferred_debits",
"noncurrent_portion_of_allowances",
"nonutility_property",
"notes_receivable",
"notes_receivable_from_associated_companies",
"nuclear_fuel",
"nuclear_fuel_assemblies_in_reactor_major_only",
"nuclear_fuel_in_process_of_refinement_conversion_enrichment_and_fabrication",
"nuclear_fuel_materials_and_assemblies_stock_account_major_only",
"nuclear_fuel_net",
"nuclear_fuel_under_capital_leases",
"nuclear_materials_held_for_sale",
"other_accounts_receivable",
"other_electric_plant_adjustments",
"other_investments",
"other_materials_and_supplies",
"other_preliminary_survey_and_investigation_charges",
"other_property_and_investments",
"other_regulatory_assets",
"other_special_funds",
"plant_materials_and_operating_supplies",
"preliminary_natural_gas_and_other_survey_and_investigation_charges",
"preliminary_natural_gas_survey_and_investigation_charges",
"preliminary_survey_and_investigation_charges",
"prepayments",
"rents_receivable",
"research_development_and_demonstration_expenditures",
"residuals",
"sinking_funds",
"special_deposits",
"special_funds",
"special_funds_all",
"spent_nuclear_fuel_major_only",
"stores_expense_undistributed",
"temporary_cash_investments",
"temporary_facilities",
"unamortized_debt_expense",
"unamortized_loss_on_reacquired_debt",
"unrecovered_plant_and_regulatory_study_costs",
"unrecovered_purchased_gas_costs",
"utility_plant_and_nuclear_fuel_net",
"utility_plant_net",
"working_funds",
]
"""Asset types for FERC Form 1 data."""

INCOME_TYPES_FERC1: list[str] = [
"accretion_expense",
"allowance_for_borrowed_funds_used_during_construction_credit",
"allowance_for_other_funds_used_during_construction",
"amortization_and_depletion_of_utility_plant",
"amortization_of_conversion_expenses",
"amortization_of_debt_discount_and_expense",
"amortization_of_electric_plant_acquisition_adjustments",
"amortization_of_gain_on_reacquired_debt_credit",
"amortization_of_loss_on_reacquired_debt",
"amortization_of_premium_on_debt_credit",
"amortization_of_property_losses_unrecovered_plant_and_regulatory_study_costs",
"costs_and_expenses_of_merchandising_jobbing_and_contract_work",
"depreciation_expense",
"depreciation_expense_for_asset_retirement_costs",
"donations",
"equity_in_earnings_of_subsidiary_companies",
"expenditures_for_certain_civic_political_and_related_activities",
"expenses_of_nonutility_operations",
"extraordinary_deductions",
"extraordinary_income",
"extraordinary_items_after_taxes",
"gain_on_disposition_of_property",
"gains_from_disposition_of_allowances",
"gains_from_disposition_of_plant",
"income_before_extraordinary_items",
"income_taxes_extraordinary_items",
"income_taxes_federal",
"income_taxes_operating_income",
"income_taxes_other",
"income_taxes_utility_operating_income_other",
"interest_and_dividend_income",
"interest_on_debt_to_associated_companies",
"interest_on_long_term_debt",
"investment_tax_credit_adjustments",
"investment_tax_credit_adjustments_nonutility_operations",
"investment_tax_credits",
"life_insurance",
"loss_on_disposition_of_property",
"losses_from_disposition_of_allowances",
"losses_from_disposition_of_service_company_plant",
"maintenance_expense",
"miscellaneous_amortization",
"miscellaneous_deductions",
"miscellaneous_nonoperating_income",
"net_extraordinary_items",
"net_income_loss",
"net_interest_charges",
"net_other_income_and_deductions",
"net_utility_operating_income",
"nonoperating_rental_income",
"operating_revenues",
"operation_expense",
"other_deductions",
"other_income",
"other_income_deductions",
"other_interest_expense",
"penalties",
"provision_for_deferred_income_taxes_credit_operating_income",
"provision_for_deferred_income_taxes_credit_other_income_and_deductions",
"provision_for_deferred_income_taxes_other_income_and_deductions",
"provisions_for_deferred_income_taxes_utility_operating_income",
"regulatory_credits",
"regulatory_debits",
"revenues_from_merchandising_jobbing_and_contract_work",
"revenues_from_nonutility_operations",
"taxes_on_other_income_and_deductions",
"taxes_other_than_income_taxes_other_income_and_deductions",
"taxes_other_than_income_taxes_utility_operating_income",
"utility_operating_expenses",
]
"""Income types for FERC Form 1 data."""
Loading
Loading