pudl.output.ferc1 module

Functions for pulling FERC Form 1 data out of the PUDL DB.

pudl.output.ferc1.fuel_by_plant_ferc1(pudl_engine, pt, thresh=0.5)[source]

Summarize FERC fuel data by plant for output.

This is mostly a wrapper around pudl.transform.ferc1.fuel_by_plant_ferc1 which calculates some summary values on a per-plant basis (as indicated by utility_id_ferc1 and plant_name) related to fuel consumption.

Parameters
  • pudl_engine (sqlalchemy.engine.Engine) – Engine for connecting to the PUDL database.

  • pt (immutabledict) – a sqlalchemy metadata dictionary of pudl tables

  • 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

pandas.DataFrame

pudl.output.ferc1.fuel_ferc1(pudl_engine, pt)[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.

Also calculates the total heat content consumed for each fuel, and the total cost for each fuel. Total cost is calculated in two different ways, on the basis of fuel units consumed(e.g. tons of coal, mcf of gas) and on the basis of heat content consumed. In theory these should give the same value for total cost, but this is not always the case.

Todo

Check whether this includes all of the fuel_ferc1 fields…

Parameters
  • pudl_engine (sqlalchemy.engine.Engine) – Engine for connecting to the PUDL database.

  • pt (immutabledict) – a sqlalchemy metadata dictionary of pudl tables

Returns

A DataFrame containing useful FERC Form 1 fuel information.

Return type

pandas.DataFrame

pudl.output.ferc1.plants_steam_ferc1(pudl_engine, pt)[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.

Parameters
  • pudl_engine (sqlalchemy.engine.Engine) – Engine for connecting to the PUDL database.

  • pt (immutabledict) – a sqlalchemy metadata dictionary of pudl tables

Returns

A DataFrame containing useful fields from the FERC Form 1 steam table.

Return type

pandas.DataFrame

pudl.output.ferc1.plants_utils_ferc1(pudl_engine, pt)[source]

Build a dataframe of useful FERC Plant & Utility information.

Parameters
  • pudl_engine (sqlalchemy.engine.Engine) – Engine for connecting to the PUDL database.

  • pt (immutabledict) – a sqlalchemy metadata dictionary of pudl tables

Returns

A DataFrame containing useful FERC Form 1 Plant and Utility information.

Return type

pandas.DataFrame