From 39a49bbdc1d138d7638432dd66839a30168798ff Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 24 Jan 2024 15:27:38 -0500 Subject: [PATCH 1/2] update egrid fields for 2020 and 2021, resolves #153 --- stewi/data/eGRID/eGRID_required_fields.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stewi/data/eGRID/eGRID_required_fields.csv b/stewi/data/eGRID/eGRID_required_fields.csv index 233e615..790d80b 100644 --- a/stewi/data/eGRID/eGRID_required_fields.csv +++ b/stewi/data/eGRID/eGRID_required_fields.csv @@ -14,7 +14,7 @@ Nitrous oxide,1,,Plant annual N2O emissions (lbs),Plant annual N2O emissions (lb Plant primary fuel,1,1,Plant primary fuel,Plant primary fuel,Plant primary fuel,Plant primary fuel,Plant primary fuel,Plant primary fuel Plant nameplate capacity (MW),,,Plant nameplate capacity (MW),Plant nameplate capacity (MW),Plant nameplate capacity (MW),Plant nameplate capacity (MW),Plant nameplate capacity (MW),Plant nameplate capacity (MW) Plant capacity factor,,,Plant capacity factor,Plant capacity factor,Plant capacity factor,Plant capacity factor,Plant capacity factor,Plant capacity factor -Plant primary coal/oil/gas/ other fossil fuel category,,1,Plant primary coal/oil/gas/ other fossil fuel category,Plant primary coal/oil/gas/ other fossil fuel category,Plant primary coal/oil/gas/ other fossil fuel category,Plant primary coal/oil/gas/ other fossil fuel category,, +Plant primary coal/oil/gas/ other fossil fuel category,,1,Plant primary coal/oil/gas/ other fossil fuel category,Plant primary coal/oil/gas/ other fossil fuel category,Plant primary coal/oil/gas/ other fossil fuel category,Plant primary coal/oil/gas/ other fossil fuel category,Plant primary fuel category,Plant primary fuel category NERC region acronym,,1,NERC region acronym,NERC region acronym,NERC region acronym,NERC region acronym,NERC region acronym,NERC region acronym eGRID subregion acronym,,1,eGRID subregion acronym,eGRID subregion acronym,eGRID subregion acronym,eGRID subregion acronym,eGRID subregion acronym,eGRID subregion acronym Balancing Authority Name,,1,Balancing Authority Name,Balancing Authority Name,Balancing Authority Name,Balancing Authority Name,Balancing Authority Name,Balancing Authority Name From 28ea74cf75bf62c9dfc34d6342998ae5707bfba3 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 1 Apr 2024 12:29:24 -0400 Subject: [PATCH 2/2] update xml element tag resolves #156 --- stewi/GHGRP.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stewi/GHGRP.py b/stewi/GHGRP.py index 55447b9..3cc597d 100644 --- a/stewi/GHGRP.py +++ b/stewi/GHGRP.py @@ -123,7 +123,7 @@ def get_row_count(table, report_year): try: count_request = make_url_request(count_url) count_xml = minidom.parseString(count_request.text) - table_count = count_xml.getElementsByTagName('TOTALQUERYRESULTS') + table_count = count_xml.getElementsByTagName('REQUESTRECORDCOUNT') table_count = int(table_count[0].firstChild.nodeValue) except IndexError as e: raise Exception(f'error accessing table count for {table}') from e