Move v3 from Development to Master Branch - #339
Merged
Merged
Conversation
still need stewicombo_file for each. #275
…de more reusable and tractable Co-contributor: Daniel Naiman
Moved some functions around to provide more flexiblity using EIA and EPA APIs with run_from_api method. New archive_epa_cems method tries to download EPA hourly, daily, and annual data to CSV files in the electricitylci output folder. Read from API now returns the header dictionary from an API call, which, for EPA, includes the total records and your rate limit. If you exceed the rate limit, or get close to it, I think a recommended wait time is also provided. To be tested.
Also includes a new remove table note method to remove the lingering NOTE from some 860 worksheets. Note that the fixes are only valid for eia860_boiler_info_design and not for eia860_generator_info. Pre-2013 EIA 860 do not appear to have data compatabile with EnviroAssoc methods (there is no Nox or SO2 boiler worksheets).
See solution provided by Ben, 6b859fa
- updated egrid_facilities.py to account for FuelCategory column name in new stewi data - updated eia_trans_dist_grid_loss.py to account for new link format for 2023 data
Updated parameter type for 'year' to accept both string and integer. Added type check to convert 'year' to string if passed as an integer. Adjusted DataFrame selection to use double brackets for consistency.
Updates for ELCI2023 + other minor bug fixes
- added ng_model_year parameter to the modelconfig files
- added new function to generate the ng lci based on the ng_model_year parameter
- added NG_MODEL_YEARS to globals.py
- added the ng_model_year to the config files
- minor fix in eia_trans_dist_grid_loss.py
- important note: modified generate_upstream_ng to handle NaN values.
See comments in the code.
create new global param, GH_URL, for consistency
Checked web resources and the new www.nlr.gov works for green power data workbook. Did not change NREL in report numbers or older source citations.
see #276 for HECO removal justification
Note marked only in 2023 and 2024 configuration files; however, 2022 also shows greater than 100 percent efficiency for OTHF facilities.
Create two new global strings for LCI Method---cradle-to-gate and gate-to-gate. Remove mention of cradle-to-gate in generation process descriptions (except for Canadian). In clean_json, check each process type and whether its exchange table has a default provider and use this info to determine if its C2G or G2G.
Remove aggregate_wind reference.
Make sure the two groupby data frames are aligned and nan-filled. Completely changes trading composition. Consider marking this for v3 upgrade.
Tested the gapfill_construction method mentioned in #325; it worked, but I can not make any guarantees over the LCI scaling. It seems fine to allow these as known and acceptable data gaps (generation, but no tracked emissions and no facilities for construction). Other minor comments added for clarity.
Noting version update due to now significant changes (new natural gas, new residual mixes, and fixed consumption trades. Add F. Hanna who developed the 2020 natural gas extension and fixed API issues. New TOML for systems that prefer its use over setup.py. Addresses #325.
Add new optional parameter for post-processing existing JSON-LD to add residual mix processes and product systems. Building product systems on a JSON-LD will skip product systems that already exist (no worries about duplicates). Fix the residual process description, which was missing the gen weighting method. Note that an additional Source for NLR should be added to residual gen processes, which is not yet implemented.
…-sub or deeper folders.
ElectricityLCI v3 and 2023 baseline code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Officially adopt v3 into master branch. See PR #334 for details.