Code Monkey home page Code Monkey logo

electricitylci's Introduction

Electricity Life Cycle Inventory

A python package that uses standardized facility release and generation data to create regionalized life cycle inventory (LCI) models for the generation, mix of generation, mix of consumption, and distribution of electricity to end users for the US, with embedded system processes of upstream fuel production and infrastructure. Pre-configured model specifications are included or users can specify their own models. The created LCI models can be exported for use in standard life cycle assessment software.

See the wiki for installation and use instructions, descriptions of files, and a list of contributors.

This code was created as part of a collaboration between US EPA Office of Research and Development (USEPA) and the National Energy Technology Laboratory (NETL) with contributions from the National Renewable Energy Laboratory (NREL) and support from Eastern Research Group (ERG). More information on this effort can be found in the Framework for an Open-Source Life Cycle Baseline for Electricity Consumption in the United States.

Disclaimer

This United States Environmental Protection Agency (EPA) and National Energy Technology Laboratory (NETL) GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. EPA and NETL have relinquished control of the information and no longer has responsibility to protect the integrity, confidentiality, or availability of the information. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by EPA or NETL.

electricitylci's People

Contributors

bl-young avatar dyoung11 avatar gschivley avatar hottleta avatar m-jamieson avatar msrocka avatar rwashing523 avatar tghoshnrel avatar tjlca avatar wesingwersen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

electricitylci's Issues

Update sampling procedure

Current text is

BOUNDARY CONDITIONS
All processes are compiled by US region using boundaries based on electricity trading defined as 'subregions' in the Emissions and Generation Resource Integrated Database (eGRID). Generation processes are also aggregated by fuel or energy source and provide the flow of electricity after it has been transformed for transmission on average US high voltage transmission lines (230 - 765 kV ). Mix processes are mixes of generation by fuel type representing the average mix of electricity available on the grid within the region either based on production or consumption. Delivery to the final user is targeted toward an average end user without separation between different user types. The time span for all processes is one year, with the goal to represent the current (2018) year. DATA COLLECTION
All inventories were calculated using secondary data from publicly available datasets. UNCERTAINTY ESTIMATION
Flow-level data quality scores are assigned to each elementary flow exchange and process-level scores to each process using the USEPA LCA Data Quality Assessment guidance . In the generation processes, for each emission factor, five data quality scores were assigned on flow-level data quality scoring. Process data quality scores draw on the process US EPA DQ indicator guidance. Process completeness is calculated by first creating a list of expected flows for each fuel type. U.S. average profiles for the fuels used in electricity generation are developed for expected flows in the following categories: greenhouse gases (GHG), CAPs, toxic and hazardous air pollutants (HAP), toxic water discharges, toxic soil releases, and hazardous waste. To determine the expected flows in each category the number of flows reported in the underlying data sources NEI, TRI, eGRID, RCRAInfo are summed across eGRID subregions by fuel type. Expected flows by fuel type for other inputs and outputs including intermediate inputs, raw energy demands, and water inputs are determined based on flows reported for the relevant electricity generation fuel type in existing LCI datasets such as ANL's GREET model, NREL's USLCI, and ecoinvent. Expected nutrient discharges to water are derived from a sample of electric facilities reporting to USEPA's Discharge Monitoring Report (DMR). The actual flows evaluated for each fuel type by eGRID subregion can then be documented and compared to the U.S. average electrical fuel generation profiles to determine the overall process completeness according to the method described in USEPA LCA Data Quality Assessment guidance. Air emission flow data collection scores can also draw on these fuel-specific profiles by documenting whether an expected flow is being reported by the fuel type in the relevant eGRID subregion. An expected emission may not be captured if there are discrepancies between the facilities covered in eGRID and those reporting to the USEPA databases TRI, NEI, RCRAInfo. 

egrid_facilities has multiple NERC for same Subregion

This seems to be present in original eGRID data.
Proposed solution is to remove NERC from incoming StEWI and assign it via a lookup to a new correspondence table.
Effect unknown but should be checked in generation.py, generation_mix.py, etc.

Use of main with pip install

The recommended install method and organization of the module to run from main.py is not compatible unless I'm missing something. If you install via the method in the Wiki it will install it on your python version site packages like installing python packages from Pypi. The problem is that then the user won't be working in those module directories like when working from a github pull.thks means at least for me

import electricitylci
electricitylci.main()
Or
electricitylci.main.main()

Do not work and I don't know another way to run main within another python script and I also don't think you can run

python electricitylci.main()
Or something like that from the terminal either

Create model config files representing all reasonable configurations

As a first step, I'm starting a table of all input data and currently available years in electricitylci in DataYears.md. I intend to add years for all other datasets. This table, along with an understanding of possible constraints of using different datasets together, is how I propose to determine possible config files. @jump2conclusionsmatt @TJTapajyoti

groupby in olcaschema_genprocess() expecting 'Balancing Authority Name' when subregion='FERC'

I encountered the error trying to use electricitylci.write_gen_fuel_database_to_dict() to write the aggregate_df and upstream_dict to a dictionary.. its shouldn't be looking for this field I don't think but it still is

aggregate_dict = electricitylci.write_gen_fuel_database_to_dict(
aggregate_df, upstream_dict, subregion=subregion
)
Converting generator dataframe to dictionaries...
Traceback (most recent call last):
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\IPython\core\interactiveshell.py", line 3326, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 2, in
aggregate_df, upstream_dict, subregion=subregion
File "C:\Users\wesle\ElectricityLCI\electricitylci_init_.py", line 517, in write_gen_fuel_database_to_dict
gen_plus_fuel_df, upstream_dict, subregion=subregion
File "C:\Users\wesle\ElectricityLCI\electricitylci\alt_generation.py", line 986, in olcaschema_genprocess
database_groupby = database.groupby(by=base_cols)

Product flow categorization

NAICS based categories for product flows need to be within the "Technosphere Flows" subfolder to match the FLCAC
image

ZeroDivisionError in emission factor calcs

With new stewicombo update, zero emissions are present for some facilities and emissions (eg. CO2 for eGRID solar facilities). This is throwing the following division by zero error:

File "C:\Users\wingwers\ElectricityLCI\electricitylci_init_.py", line 7, in get_generation_process_df
generation_process_df = create_generation_process_df(electricity_for_selected_egrid_facilities,emissions_and_waste_for_selected_egrid_facilities,subregion=regions)
File "C:\Users\wingwers\ElectricityLCI\electricitylci\generation.py", line 171, in create_generation_process_df
weights=database_f3['FlowAmount'])
File "C:\Users\wingwers\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\lib\function_base.py", line 386, in average
"Weights sum to zero, can't be normalized")
ZeroDivisionError: Weights sum to zero, can't be normalized

Include federal elementary flows list, impacts, and DQI in json-ld export

I think this could be done without too much difficulty. I think there'd essentially be an existing zip file in json-ld format containing all of the required info (likely can just use a json-ld exported by openLCA), copy that file into the output folder with a new name, and then the processes are inserted in - seems like the olca json-ld writer already supports this. This way, a user doesn't need to be responsible for generating their own databases to import the elci data.

Some non-mapped emissions present

All eGRID, TRI, and NEI emissions should be mapped to FEDEFL flows. Identify these and add them to the appropriate flow mapping file in fedelemflowlist so that there are no emissions with compartments like 'air', 'soil' and 'water' which reflect original unmapped flows

Plant/Facility ID type mismatch between eGRID and 923

When trying to run lines in the build_model.py script I encountered the following exception:

>>> from electricitylci.globals import output_dir,model_name
>>> all_generation_db = electricitylci.get_generation_process_df(regions='all')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/greg/Documents/NETL work/ElectricityLCI/electricitylci/__init__.py", line 5, in get_generation_process_df
    generation_process_df = create_generation_process_df(electricity_for_selected_egrid_facilities,emissions_and_waste_for_selected_egrid_facilities,subregion=regions)
  File "/Users/greg/Documents/NETL work/ElectricityLCI/electricitylci/generation.py", line 42, in create_generation_process_df
    database_with_new_generation = combined_data.merge(EIA_923_gen_data, left_on = ['eGRID_ID'],right_on = ['Plant Id'],how = 'left')
  File "/Users/greg/miniconda3/envs/elci/lib/python3.7/site-packages/pandas/core/frame.py", line 6389, in merge
    copy=copy, indicator=indicator, validate=validate)
  File "/Users/greg/miniconda3/envs/elci/lib/python3.7/site-packages/pandas/core/reshape/merge.py", line 61, in merge
    validate=validate)
  File "/Users/greg/miniconda3/envs/elci/lib/python3.7/site-packages/pandas/core/reshape/merge.py", line 555, in __init__
    self._maybe_coerce_merge_keys()
  File "/Users/greg/miniconda3/envs/elci/lib/python3.7/site-packages/pandas/core/reshape/merge.py", line 986, in _maybe_coerce_merge_keys
    raise ValueError(msg)
ValueError: You are trying to merge on object and int64 columns. If you wish to proceed you should use pd.concat

Upon inspection it appears that the eGRID FacilityID values are strings and the EIA923 Plant Id values are integers.

Configuring to upstream coal and gas models

To map and connect with the upstream coal and gas models, I am recommending adjustments to the categorization and flow names of the upstream processes and product flows, which I believe should only impact upstream_dict.py, and possible fuelname_1.csv. Because these processes span multiple stages (i.e. extraction and processing) I propose mapping them to the processing NAICs where the reference product flow will reside in the upstream models for both flows and processes.

e.g. "natural gas, at transmission" in 22: Utilities/2212: Natural Gas Distribution instead of
21: Mining, Quarrying, and Oil and Gas Extraction/2111: Oil and Gas Extraction

@jump2conclusionsmatt I can implement this change if all agree

generation.py - single emission factor applied to multiple coal types

When use_primaryfuel_for_coal is set to 1 - the population is first down-selected to fuelcategory coal and then the fuel category is essentially replaced by coal type (bit, sub, lig). If a region has multiple fuel types (e.g., ERCO-Coal has sub and lig) then a single emission factor is calculated using all of the coal types and then applied throughout. for example, ERCO-LIG-Hexane-0.0002 and ERCO-SUB-0.0002. Is this the intended result?

StEWI error

Error upon build
Getting reported emissions for generators...
Traceback (most recent call last):
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\electricitylci\main.py", line 122, in
main()
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\electricitylci\main.py", line 31, in main
upstream_df=upstream_df, upstream_dict=upstream_dict
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\electricitylci_init
.py", line 51, in get_generation_process_df
generation_process_df=get_gen_plus_netl()
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\electricitylci_init
.py", line 395, in get_gen_plus_netl
gen_df = gen.create_generation_process_df()
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\electricitylci\generation.py", line 448, in create_generation_process_df
from electricitylci.egrid_filter import (
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\electricitylci\egrid_filter.py", line 10, in
from electricitylci.egrid_emissions_and_waste_by_facility import emissions_and_wastes_by_facility
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\electricitylci\egrid_emissions_and_waste_by_facility.py", line 2, in
import stewicombo
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\stewicombo_init_.py", line 5, in
from stewicombo.overlaphandler import aggregate_and_remove_overlap
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\stewicombo\overlaphandler.py", line 2, in
from stewicombo.globals import *
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\stewicombo\globals.py", line 3, in
import chemicalmatcher
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\chemicalmatcher_init_.py", line 7, in
from chemicalmatcher.programsynonymlookupbyCAS import programsynonymlookupbyCAS
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\chemicalmatcher\programsynonymlookupbyCAS.py", line 6, in
from chemicalmatcher.globals import base, config
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\chemicalmatcher\globals.py", line 20, in
base = config()['databases']['SRS']['url']
File "C:\Users\wesle\AppData\Local\Programs\Python\Python37\lib\site-packages\chemicalmatcher\globals.py", line 16, in config
with open(modulepath + 'config.yaml', mode='r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/wesle/AppData/Local/Programs/Python/Python37/lib/site-packages/chemicalmatcher/config.yaml'

Coal upstream metadata

Metadata for DataTreatment in coal_upstream and coal_transport use text from petroleum

Conda package support

Create conda build recipe so that eLCI can be installed using conda in addition to pip.

Assess replacement of generation.py with alt_generation.py

The goal is this assessment is to see if alt_generation.py can replace the old generation_py

-Test old generation based EFs from generation.py against those for the same model with alt_generation. Also compare against output from an earlier code version. See if any differences exist

-Evaluate how uncertainty function can be moved over to represent uncertainty method in generation.py along with the new method in alt_generation

-Determine if there are any other output differences to be addressed.

Duplicate emission factors in gen_db for ELCI_3

Recreating the old model there are indeed duplicate emission factors in the gen_db. The duplicates appears to be due to different ReliabilityScores. Actually in cases the scores are the same but looking closely its the only difference in other records.

import electricitylci

#Select model ELCI_3
from electricitylci.utils import fill_default_provider_uuids
all_generation_db = electricitylci.get_generation_process_df()
all_generation_db_cols = all_generation_db.columns
all_generation_db_cols_minus_reliability = all_generation_db_cols.drop('ReliabilityScore')
dups_true_or_false = all_generation_db.duplicated(subset=all_generation_db_cols_minus_reliability)
#lots of Trues indicating duplicate cols when reliability score is dropped

Fed Commons template - Output to template not working

Writing the Fed Commons template is no longer working. It should be acknowledged that even getting the template to work will not result in the same processes as in the JSON-LD export.
Anticipated limitations of template:
(1) These processes would not have consistent flow names within the same life cycle stage, because process linking by specifying the default provider is not supported by the template.
(2) Scoring data quality using the EPA data quality schema for openLCA is not possible
(3) Elementary flows will not link to Fed Commons Elementary Flows because the template does not create or link to existing flow UUIDs

Generation mixes not created for certain scenarios

In the configuration I'm currently troubleshooting:

  • replace_egrid = False
  • model_specs["regional_aggregation"] = False
    This configuration places us into generation_mix.create_generation_mix_df_from_egrid_ref_data but the region column gets incorrectly specified so no generation mixes are created.

I'm going to create a branch to hopefully get this working. I think the worst-case outcome is that this is added to the list of invalid configurations.

plant water use flows getting dropped

Power plant water use data is provided by plant_water_use.py. This data is getting dropped along the way. Problem can be re-created by running main.py with include_netl_water: True - water resource flows do not make it into the final generator unit processes (e.g., PJM - COAL).

Create main.py

The current design puts all top-level functions in __init__.py. It isn't clear from the wiki how these should be accessed by a user. How about setting up a main.py (or something with a more specific name) that can be run as a script?

python main.py

I'm also bringing this up because everything in the __init__.py is run whenever any functions are imported. Since commit 58cb178 added the import of model_name to the top of init it has become a little harder to build and test individual functions (need to comment the line out or set set_model_name_with_stdin = False).

Updates to flowlist causing null flow exchanges

Due to some changes in FEDEFL, some mappings used in eLCI are now outdated, namely radioisotopes from upstream inventories (not StEWI based) including:

Radon-222
Thorium-230
Lead-210
Polonium-210
Radium-226
Cesium-137
Tritium
Radium-228
Radium-224
Iodine-131
Thorium-232
Strontium-90
Iodine-129

This resulted in exchanges with NULL values and display issues in openLCA. eLCI was generated specifying v.1.0.1 of FEDEFL.
Updating the mapping file should fix this issue, but raises the question of whether mapping files need version control, if users are able to adjust the version of FEDEFL used.

Dictionary mismatches upon model creation

Linkages are not being created due to match failures. ELCI_1 model.

At generation mix stage (from main.py log):
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for OIL - El Paso Electric Company
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for GAS - Electric Energy, Inc.
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for SOLAR - Florida Municipal Power Pool
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for SOLAR - Idaho Power Company
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for SOLARTHERMAL - Nevada Power Company
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for OTHF - Nevada Power Company
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for OFSL - PJM Interconnection, LLC
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for OTHF - PacifiCorp East
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for GEOTHERMAL - PacifiCorp West
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for BIOMASS - Portland General Electric Company
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for OIL - Public Service Company of New Mexico
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for SOLAR - South Carolina Electric & Gas Company
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for OFSL - Southwest Power Pool
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for SOLAR - Southwestern Power Administration
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for WIND - Southwestern Power Administration
WARNING:generation_mix.py:olcaschema_genmix:Trouble matching dictionary for SOLAR - Western Area Power Administration - Desert

At consumption mix stage (from main.py log):
write consumption mix to dict
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - Avista Corporation
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - Bonneville Power Administration
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - Public Utility District No. 1 of Chelan County
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - California Independent System Operator
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Duke Energy Progress West - Duke Energy Progress West
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - Gridforce Energy Management, LLC
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce South - Gridforce South
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - Idaho Power Company
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - Los Angeles Department of Water and Power
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - Nevada Power Company
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for New Smyrna Beach, Utilities Commission of - New Smyrna Beach, Utilities Commission of
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - PacifiCorp West
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - Portland General Electric Company
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - Puget Sound Energy, Inc.
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - Seattle City Light
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - Turlock Irrigation District
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - City of Tacoma, Department of Public Utilities, Light Division
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Western Area Power Administration - Upper Great Plains East - Western Area Power Administration - Upper Great Plains East
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - CAISO
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - Northwest
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Duke Energy Progress West - Southeast
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Duke Energy Progress West - US
WARNING:eia_io_trading.py:olca_schema_consumption_mix:Trouble matching dictionary for Gridforce Energy Management, LLC - US

See the attached images showing lack of providers in openLCA processes.

The results is a lack of providers in the JSON-LD export and therefore linkages not properly created in openLCA.

Add sympy as a dependency

Sympy is used in the process_exchange_aggregator_uncertainty.py script. It isn't listed as a required package in setup.py.

Add process completness score for generation processes

Significant task to automate the calculation of the process completeness scores (See EPA DQ Guidance).
For each fuel type, a template has been prepared for scoring. The number of flows in each of these flow types in the produced data should be compared to the number of fuel type flows in the template for that fuel category. The ratio is used to derive points for each flow type, and those are summed together to calculate an overall percentage of # flows present/# flows expected.
The template and description of the origin of these values are attached.
emissions_and_wastes_with_fuelcategory_processcompleteness.xlsx
Methodology for process data quality scores.docx

Add in SF6 emissions from distribution

No inputs or emissions are associated with distribution yet. These need to be added. A logical one for which data likely exist are SF6 emissions from the GHGRP data. Once this is in StEWI, these could potentially be extracted.

NETL flowmapping - migrate to fedelemflowlist

@jump2conclusionsmatt . I see there is a flow mapping file Elementary_Flows_NETL.csv that was being used
in upstream_dict
but commented out.

The way flowmapping is working for the FEDEFL is a mapping in a standard format to the flowmapping folder, like NETL.csv, which makes it accessible via
get_flowmapping(source=NETL), and applying it from there. So I propose moving the data in `Elementary_Flows_NETL.csv' to an NETL.csv mapping file in the standard FlowMapping format to add to the fedelemflowlist repository. I can ask for assistance in working with you on the mapping.

Is this working?

@WesIngwersen is this line wokring on your end?

Mine says its missing the last column.

                database_f2 = database_f2[['Subregion', 'FuelCategory', 'PrimaryFuel',
                                           'eGRID_ID', 'Electricity', 'FlowName', 'FlowAmount', 'FlowUUID',
                                           'Compartment', 'Year', 'Source', 'ReliabilityScore', 'Unit',
                                           'NERC', 'PercentGenerationfromDesignatedFuelCategory',
                                           'Balancing Authority Name', 'Balancing Authority Code',
                                           'Ref_Electricity_Subregion_FuelCategory']]

ELCI_3 gen mix dictionary not writing ...

Using the model config that recreates the old EPA ELCI_3, it works except the generation_mix dictionary is not being written. The attached script shows the errors.

Changes were made to the olcaschema_genmix function including a matching_dict check which looks up processes in the process dictionaries matching by name. It finds processes but those processes do not have a uuid field. I guess that there was a change at some point to add the uuid field to the generation process dictionaries before JSON-LD creation? Previously, the process UUIDs were not created until the JSON-LD files were created in olca_jsonld_writer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.