pudl.output.eia923 module¶
Functions for pulling EIA 923 data out of the PUDl DB.
-
pudl.output.eia923.
boiler_fuel_eia923
(pudl_engine, freq=None, start_date=None, end_date=None)[source]¶ Pull records from the boiler_fuel_eia923 table in a given data range.
Optionally, aggregate the records over some timescale – monthly, yearly, quarterly, etc. as well as by fuel type within a plant.
If the records are not being aggregated, all of the database fields are available. If they’re being aggregated, then we preserve the following fields. Per-unit values are re-calculated based on the aggregated totals. Totals are summed across whatever time range is being used, within a given plant and fuel type.
fuel_consumed_units
(sum)fuel_mmbtu_per_unit
(weighted average)total_heat_content_mmbtu
(sum)sulfur_content_pct
(weighted average)ash_content_pct
(weighted average)
In addition, plant and utility names and IDs are pulled in from the EIA 860 tables.
- Parameters
pudl_engine (sqlalchemy.engine.Engine) – SQLAlchemy connection engine for the PUDL DB.
freq (str) – a pandas timeseries offset alias. The original data is reported monthly, so the best time frequencies to use here are probably month start (freq=’MS’) and year start (freq=’YS’).
start_date (date-like) – date-like object, including a string of the form ‘YYYY-MM-DD’ which will be used to specify the date range of records to be pulled. Dates are inclusive.
end_date (date-like) – date-like object, including a string of the form ‘YYYY-MM-DD’ which will be used to specify the date range of records to be pulled. Dates are inclusive.
- Returns
A DataFrame containing all records from the EIA 923 Boiler Fuel table.
- Return type
-
pudl.output.eia923.
fuel_receipts_costs_eia923
(pudl_engine, freq=None, start_date=None, end_date=None, rolling=False)[source]¶ Pull records from
fuel_receipts_costs_eia923
table in given date range.Optionally, aggregate the records at a monthly or longer timescale, as well as by fuel type within a plant, by setting freq to something other than the default None value.
If the records are not being aggregated, then all of the fields found in the PUDL database are available. If they are being aggregated, then the following fields are preserved, and appropriately summed or re-calculated based on the specified aggregation. In both cases, new total values are calculated, for total fuel heat content and total fuel cost.
plant_id_eia
report_date
fuel_type_code_pudl
(formerly energy_source_simple)fuel_qty_units
(sum)fuel_cost_per_mmbtu
(weighted average)total_fuel_cost
(sum)total_heat_content_mmbtu
(sum)heat_content_mmbtu_per_unit
(weighted average)sulfur_content_pct
(weighted average)ash_content_pct
(weighted average)moisture_content_pct
(weighted average)mercury_content_ppm
(weighted average)chlorine_content_ppm
(weighted average)
In addition, plant and utility names and IDs are pulled in from the EIA 860 tables.
- Parameters
pudl_engine (sqlalchemy.engine.Engine) – SQLAlchemy connection engine for the PUDL DB.
freq (str) – a pandas timeseries offset alias. The original data is reported monthly, so the best time frequencies to use here are probably month start (freq=’MS’) and year start (freq=’YS’).
start_date (date-like) – date-like object, including a string of the form ‘YYYY-MM-DD’ which will be used to specify the date range of records to be pulled. Dates are inclusive.
end_date (date-like) – date-like object, including a string of the form ‘YYYY-MM-DD’ which will be used to specify the date range of records to be pulled. Dates are inclusive.
- Returns
A DataFrame containing all records from the EIA 923 Fuel Receipts and Costs table.
- Return type
-
pudl.output.eia923.
generation_eia923
(pudl_engine, freq=None, start_date=None, end_date=None)[source]¶ Pull records from the boiler_fuel_eia923 table in a given data range.
- Parameters
pudl_engine (sqlalchemy.engine.Engine) – SQLAlchemy connection engine for the PUDL DB.
freq (str) – a pandas timeseries offset alias. The original data is reported monthly, so the best time frequencies to use here are probably month start (freq=’MS’) and year start (freq=’YS’).
start_date (date-like) – date-like object, including a string of the form ‘YYYY-MM-DD’ which will be used to specify the date range of records to be pulled. Dates are inclusive.
end_date (date-like) – date-like object, including a string of the form ‘YYYY-MM-DD’ which will be used to specify the date range of records to be pulled. Dates are inclusive.
- Returns
A DataFrame containing all records from the EIA 923 Generation table.
- Return type
-
pudl.output.eia923.
generation_fuel_eia923
(pudl_engine, freq=None, start_date=None, end_date=None)[source]¶ Pull records from the generation_fuel_eia923 table in given date range.
Optionally, aggregate the records over some timescale – monthly, yearly, quarterly, etc. as well as by fuel type within a plant.
If the records are not being aggregated, all of the database fields are available. If they’re being aggregated, then we preserve the following fields. Per-unit values are re-calculated based on the aggregated totals. Totals are summed across whatever time range is being used, within a given plant and fuel type.
plant_id_eia
report_date
fuel_type_code_pudl
fuel_consumed_units
fuel_consumed_for_electricity_units
fuel_mmbtu_per_unit
fuel_consumed_mmbtu
fuel_consumed_for_electricity_mmbtu
net_generation_mwh
In addition, plant and utility names and IDs are pulled in from the EIA 860 tables.
- Parameters
pudl_engine (sqlalchemy.engine.Engine) – SQLAlchemy connection engine for the PUDL DB.
freq (str) – a pandas timeseries offset alias. The original data is reported monthly, so the best time frequencies to use here are probably month start (freq=’MS’) and year start (freq=’YS’).
start_date (date-like) – date-like object, including a string of the form ‘YYYY-MM-DD’ which will be used to specify the date range of records to be pulled. Dates are inclusive.
end_date (date-like) – date-like object, including a string of the form ‘YYYY-MM-DD’ which will be used to specify the date range of records to be pulled. Dates are inclusive.
- Returns
A DataFrame containing all records from the EIA 923 Generation Fuel table.
- Return type