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.

Attributes

logger

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(self, df, page, **partition)[source]

Adds source column and report_year column if missing.

extract(self, settings: pudl.settings.Eia860Settings = Eia860Settings())[source]

Extracts dataframes.

Returns dict where keys are page names and values are DataFrames containing data across given years.

Parameters

settings – Object containing validated settings relevant to EIA 860m. Contains the tables and date to be loaded into PUDL.

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