catalyst-cooperative / pudl

The Public Utility Data Liberation Project provides analysis-ready energy system data to climate advocates, researchers, policymakers, and journalists.
https://catalyst.coop/pudl
MIT License
456 stars 106 forks source link

Adjust line-number mapping for FERC ingest prior to 2006 #55

Closed zaneselvans closed 4 years ago

zaneselvans commented 7 years ago

Several of the FERC1 DB tables use line number to indicate the meaning of the value reported on that line, especially f1_plant_in_srvce and f1_accumprvsn_depr. However, over the years these line number occasionally change as new accounts are added or deleted. For those two tables, the lines appear to be consistent from 2006-2015. Prior to those years there was no line for regional transmission & distribution plant, which means for earlier years the line number => FERC account mappings will need to be different. This mapping is currently defined by data frames in constants.py: ferc_accumulated_depreciation and ferc_electric_plant_accounts. To accommodate mappings changing between years, a "year" column may be added to these frames, so that per-year mappings may be looked up.

Once that mapping is defined the pudl.ingest_plant_in_service_ferc1() and pudl.ingest_accumulated_depreciation() functions in pudl.py will need to be updated to use the new mappings.

zaneselvans commented 4 years ago

Superceded by #465