Skip to content

generation.py

Matt Jamieson edited this page May 15, 2020 · 3 revisions

Description: One of the main core python files of this module, it combines all the data and performs all necessary calculations for different eGRID subregions or other desired regional aggregation categories and creates the dictionaries ( the LCA inventories but in python dictionary form) stored in the computer memory.

Functions: This module provides three key functions:

  • create_generation_process_df() - Combines the emissions data from several sources, including STEWi and CEMS depending on the configuration. The emissions returned are facility-level emissions for the year.
  • aggregate_data(total_db, subregion="BA") - Aggregating a given set of facility-level emissions to the specified level of subregion (BA-balancing authority areas, FERC-Federal Energy Regulatory Commission regions, EIA-Energy Information Administration regions, all-EIA regions, NERC-National American Electric Reliability regions). In the process of aggregating data, a number of sub-routines are performed.
  • olcachema_genprocess(database, upstream_dict={}, subregion="BA") - Turns the dataframe of aggregated emissions into an openLCA-schema compatible dictionary.
Clone this wiki locally