pudl.extract.eia860m#

Retrieve data from EIA Form 860M spreadsheets for analysis.

This modules pulls data from EIA’s published Excel spreadsheets.

This code is for use analyzing EIA Form 860M data. EIA 860M is only used in conjunction with EIA 860. This module boths extracts EIA 860M and appends the extracted EIA 860M dataframes to the extracted EIA 860 dataframes. Example setup with pre-genrated eia860_raw_dfs and datastore as ds:

eia860m_raw_dfs = pudl.extract.eia860m.Extractor(ds).extract(

Eia860Settings.eia860m_date)

eia860_raw_dfs = pudl.extract.eia860m.append_eia860m(

eia860_raw_dfs=eia860_raw_dfs, eia860m_raw_dfs=eia860m_raw_dfs)

Module Contents#

Classes#

Extractor

Extractor for the excel dataset EIA860M.

Functions#

append_eia860m(eia860_raw_dfs, eia860m_raw_dfs)

Append EIA 860M to the pages to.

raw_eia860m__all_dfs(context)

Extract raw EIAm data from excel sheets into dict of dataframes.

extract_eia860m(raw_eia860m__all_dfs)

Extract raw EIA data from excel sheets into dataframes.

Attributes#

pudl.extract.eia860m.logger[source]#
class pudl.extract.eia860m.Extractor(*args, **kwargs)[source]#

Bases: pudl.extract.excel.GenericExtractor

Extractor for the excel dataset EIA860M.

process_raw(df, page, **partition)[source]#

Adds source column and report_year column if missing.

static get_dtypes(page, **partition)[source]#

Returns dtypes for plant id columns.

pudl.extract.eia860m.append_eia860m(eia860_raw_dfs, eia860m_raw_dfs)[source]#

Append EIA 860M to the pages to.

Parameters:
  • eia860_raw_dfs (dictionary) – dictionary of pandas.Dataframe’s from EIA 860 raw tables. Restult of pudl.extract.eia860.Extractor().extract()

  • eia860m_raw_dfs (dictionary) – dictionary of pandas.Dataframe’s from EIA 860M raw tables. Restult of pudl.extract.eia860m.Extractor().extract()

Returns:

augumented eia860_raw_dfs dictionary of pandas.DataFrame’s. Each raw page stored in eia860m_raw_dfs appened to its eia860_raw_dfs counterpart.

Return type:

dictionary

pudl.extract.eia860m.raw_eia860m__all_dfs(context)[source]#

Extract raw EIAm data from excel sheets into dict of dataframes.

pudl.extract.eia860m.raw_table_names = ('raw_eia860m__generator_existing', 'raw_eia860m__generator_proposed', 'raw_eia860m__generator_retired')[source]#
pudl.extract.eia860m.extract_eia860m(raw_eia860m__all_dfs)[source]#

Extract raw EIA data from excel sheets into dataframes.

Parameters:

context – dagster keyword that provides access to resources and config.

Returns:

A tuple of extracted EIA dataframes.