pudl.output.ferc1
#
Functions for pulling FERC Form 1 data out of the PUDL DB.
Module Contents#
Functions#
|
Read a FERC1 table with a start and end date restriction. |
|
Build a dataframe of useful FERC Plant & Utility information. |
|
Select and joins some useful fields from the FERC Form 1 steam table. |
|
Calculate annual capital additions for FERC1 steam records. |
|
Add mean capital additions over lifetime of plant. |
|
Pull a useful dataframe related to FERC Form 1 fuel information. |
|
Summarize FERC fuel data by plant for output. |
|
Pull a useful dataframe related to the FERC Form 1 small plants. |
|
Pull a useful dataframe related to the FERC Form 1 hydro plants. |
|
Pull a dataframe of FERC Form 1 Pumped Storage plant data. |
|
Pull a useful dataframe of FERC Form 1 Purchased Power data. |
|
Pull a dataframe of FERC Form 1 Electric Plant in Service data. |
|
Combine the steam, small generators, hydro, and pumped storage tables. |
Attributes#
- pudl.output.ferc1.read_table_with_start_end_dates(table_name: str, start_date: pandas.Timestamp, end_date: pandas.Timestamp, pudl_engine: sqlalchemy.engine.Engine) pandas.DataFrame [source]#
Read a FERC1 table with a start and end date restriction.
Note: This is a FERC1 function instead of a general function because FERC1 uses
report_year
instead of the more standardreport_date
.- Parameters:
table_name – Name of FERC1 table.
start_date – Beginning date for data to pull from the PUDL DB.
end_date – End date for data to pull from the PUDL DB.
pudl_engine – : A connection engine for the PUDL DB.
- pudl.output.ferc1.plants_utils_ferc1(pudl_engine)[source]#
Build a dataframe of useful FERC Plant & Utility information.
- Parameters:
pudl_engine (sqlalchemy.engine.Engine) – Engine for connecting to the PUDL database.
- Returns:
A DataFrame containing useful FERC Form 1 Plant and Utility information.
- Return type:
- pudl.output.ferc1.plants_steam_ferc1(pudl_engine, start_date, end_date)[source]#
Select and joins some useful fields from the FERC Form 1 steam table.
Select the FERC Form 1 steam plant table entries, add in the reporting utility’s name, and the PUDL ID for the plant and utility for readability and integration with other tables that have PUDL IDs.
Also calculates
capacity_factor
(based onnet_generation_mwh
&capacity_mw
)- Parameters:
pudl_engine (sqlalchemy.engine.Engine) – Engine for connecting to the PUDL database.
- Returns:
A DataFrame containing useful fields from the FERC Form 1 steam table.
- Return type:
- pudl.output.ferc1.calc_annual_capital_additions_ferc1(steam_df: pandas.DataFrame, window: int = 3) pandas.DataFrame [source]#
Calculate annual capital additions for FERC1 steam records.
Convert the capex_total column into annual capital additons the capex_total column is the cumulative capital poured into the plant over time. This function takes the annual difference should generate the annual capial additions. It also want generates a rolling average, to smooth out the big annual fluxuations.
- Parameters:
steam_df – result of prep_plants_ferc()
window – number of years for window to generate rolling average. Argument for
pudl.helpers.generate_rolling_avg()
- Returns:
capex_annual_addition
andcapex_annual_addition_rolling
.- Return type:
Augemented version of steam_df with two additional columns
- pudl.output.ferc1.add_mean_cap_additions(steam_df)[source]#
Add mean capital additions over lifetime of plant.
- pudl.output.ferc1.fuel_ferc1(pudl_engine, start_date, end_date)[source]#
Pull a useful dataframe related to FERC Form 1 fuel information.
This function pulls the FERC Form 1 fuel data, and joins in the name of the reporting utility, as well as the PUDL IDs for that utility and the plant, allowing integration with other PUDL tables.
Useful derived values include:
fuel_consumed_mmbtu
(total fuel heat content consumed)fuel_consumed_total_cost
(total cost of that fuel)
- Parameters:
pudl_engine (sqlalchemy.engine.Engine) – Engine for connecting to the PUDL database.
- Returns:
A DataFrame containing useful FERC Form 1 fuel information.
- Return type:
- pudl.output.ferc1.fuel_by_plant_ferc1(pudl_engine, start_date, end_date, thresh=0.5)[source]#
Summarize FERC fuel data by plant for output.
This is mostly a wrapper around
pudl.analysis.classify_plants_ferc1.fuel_by_plant_ferc1()
which calculates some summary values on a per-plant basis (as indicated byutility_id_ferc1
andplant_name_ferc1
) related to fuel consumption.- Parameters:
pudl_engine (sqlalchemy.engine.Engine) – Engine for connecting to the PUDL database.
thresh (float) – Minimum fraction of fuel (cost and mmbtu) required in order for a plant to be assigned a primary fuel. Must be between 0.5 and 1.0. default value is 0.5.
- Returns:
A DataFrame with fuel use summarized by plant.
- Return type:
- pudl.output.ferc1.plants_small_ferc1(pudl_engine, start_date, end_date)[source]#
Pull a useful dataframe related to the FERC Form 1 small plants.
- pudl.output.ferc1.plants_hydro_ferc1(pudl_engine, start_date, end_date)[source]#
Pull a useful dataframe related to the FERC Form 1 hydro plants.
- pudl.output.ferc1.plants_pumped_storage_ferc1(pudl_engine, start_date, end_date)[source]#
Pull a dataframe of FERC Form 1 Pumped Storage plant data.
- pudl.output.ferc1.purchased_power_ferc1(pudl_engine, start_date, end_date)[source]#
Pull a useful dataframe of FERC Form 1 Purchased Power data.
- pudl.output.ferc1.plant_in_service_ferc1(pudl_engine, start_date, end_date)[source]#
Pull a dataframe of FERC Form 1 Electric Plant in Service data.
- pudl.output.ferc1.plants_all_ferc1(pudl_engine, start_date, end_date)[source]#
Combine the steam, small generators, hydro, and pumped storage tables.
While this table may have many purposes, the main one is to prepare it for integration with the EIA Master Unit List (MUL). All subtables included in this output table must have pudl ids. Table prepping involves ensuring that the individual tables can merge correctly (like columns have the same name) both with each other and the EIA MUL.