-
Notifications
You must be signed in to change notification settings - Fork 11
elementaryflows.py
Description: This script compares the names of the wastes and replaces them with names in the Federal LCA Commons elementary flows list. Other flows are also handled. Along with that, types of flows and compartment information are also determined and indexed.
- mapping_to_fedelemflows is a df that maps various emissions/waste streams to corresponding openLCA UUIDs.
- compartment_to_flowtype is a df that maps compartments to valid flow types for JSON or openLCA.
Functions: There are two main functions and 2 helper functions:
-
map_missions_to_fedelemflows
- Will map emissions from a given dataframe to the correct flows in the federal flow list based on matching sources (e.g., national emissions inventory [NEI], flow name, and compartment (e.g., emissions/air) -
map_renewable_heat_flows_to_fedelemflows
- Maps inputs of "Heat" to the various energy types for renewables. -
map_compartment_to_flow_type
- The primary purpose of this function is to take an input dataframe with compartment values and output the same dataframe but with a new column corresponding to flowtype values. -
add_flow_direction
- The main purpose of this function is to add a "FlowDirection" column to the input dataframe that indicates eitheroutput
direction orinput
direction. Setting toinput
requires either a compartment type of input, or a value in theElementaryFlowPrimeContext
equal toresources
.
Data: All dataframes used are inputted as arguments to the functions contained in this script.
Dependencies:
- pandas
- fedelemflowlist
- electricitylci
List of modules
__init__.py
aggregation_selector.py
ampd_plant_emissions.py
bulk_eia_data.py
cems_data.py
coal_upstream.py
combinator.py
consumption_mix.py
distribution.py
dqi.py
egrid_emissions_and_waste_by_facility.py
egrid_energy.py
egrid_facilities.py
egrid_filter.py
egrid_flowbyfacilty.py
egrid_FRS_matches.py
egrid_subregion_data_writer.py
eia860_facilities.py
eia923_generation.py
eia_io_trading.py
eia_trans_dist_grid_loss.py
elementaryflows.py
emissions_other_sources.py
generation.py
generation_mix.py
geothermal.py
globals.py
hydro_upstream.py
import_impacts.py
main.py
model_config.py
natural_gas_upstream.py
nuclear_upstream.py
olca_jsonld_writer.py
petroleum_upstream.py
PhysicalQuantities.py
plant_water_use.py
power_plant_construction.py
process_dictionary_writer.py
process_exchange_aggregator_uncertainty.py
solar_thermal_upstream.py
solar_upstream.py
technosphereflows.py
upstream_dict.py
utils.py
wind_upstream.py