Skip to content

egrid_energy.py

jgrooviest edited this page Aug 6, 2019 · 4 revisions

Description: This module performs calculations on eGrid data from egrid_flowbyfacility.py to calculate efficiency of each facility. Calculations and data input will execute immediately upon import.

  • The dataframe generated from egrid_flowbyfacility.py is modified to calculate the energy efficiency of each facility. Efficiency is calculated as the amount of electricity produced divided by the amount of heat required as an input. The original dataframe's configuration has facility input/output streams as rows and flow amounts and units as columns. A pivot method modifies this such that a dataframe is created with discrete facility IDs as rows, and heat input (MJ), electricity output (MJ) and efficiency (%) as columns. The values thus indicate the flow volumes.

Functions:

  • list_egrid_facilities_with_positive_generation - Returns a list of all facilities with an electricity product greater than zero, using egrid_net_generation which pulls from egrid_flowbyfacility.
  • list_egrid_facilities_in_efficiency_range - Returns a list of all facilities operating with an efficiency that lies between the two input parameters.

Data:

  • egrid_energy.py calls egrid_flowbyfacility, a function from egrid_flowbyfacilty.py that returns a dataframe sorted by FacilityID and various flow types.

Dependencies:

  1. numpy
  2. pandas
  3. os.path --> join
Clone this wiki locally