From 89f02cbc141995347800732a3d2a43c11c3647f3 Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 14 Jul 2021 11:38:18 -0400 Subject: [PATCH 001/319] Added electricity disagg model specs yml file --- .../USEEIOv2.0_electricitydisagg.yml | 880 ++++++++++++++++++ 1 file changed, 880 insertions(+) create mode 100644 inst/extdata/modelspecs/USEEIOv2.0_electricitydisagg.yml diff --git a/inst/extdata/modelspecs/USEEIOv2.0_electricitydisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0_electricitydisagg.yml new file mode 100644 index 00000000..f25526bb --- /dev/null +++ b/inst/extdata/modelspecs/USEEIOv2.0_electricitydisagg.yml @@ -0,0 +1,880 @@ +Model: "USEEIOv2.0_electricitydisagg" +BaseIOSchema: 2012 +BaseIOLevel: "Detail" +IOYear: 2012 # Year for IO data +ModelRegionAcronyms: ["US"] +ModelType: "EEIO" +IODataSource: "BEA" +BasePriceType: "PRO" #producer +BasewithRedefinitions: FALSE +CommodityorIndustryType: "Commodity" +ScrapIncluded: FALSE +DisaggregationSpecs: "ElectricityDisaggregationDetail" #Name of disaggregation yml file. + +SatelliteTable: + WAT: + FullName: "Water withdrawals" + Abbreviation: "WAT" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v0.1_864d573.parquet" + FileLocation: "DataCommons" + DataYears: [2015] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + USGS_NWIS_WU_2015: + Title: "Water Use in the US" + Author: "USGS" + DataYear: 2015 + URL: "https://waterdata.usgs.gov/" + Primary: TRUE + CHAIR: + FullName: "Criteria and Hazardous Air Emissions" + Abbreviation: "CHAIR" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/CAP_HAP_national_2017_v0.1_864d573.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + EPA_NEI_2017: + Title: "National Emissions Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/air-emissions-inventories/national-emissions-inventory-nei" + Primary: TRUE + EPA_TRI_2017: + Title: "Toxic Release Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/toxics-release-inventory-tri-program" + Primary: TRUE + GRDREL: + FullName: "Point source industrial releases to ground" + Abbreviation: "GRDREL" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/GRDREL_national_2017_v0.1_864d573.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + EPA_TRI_2017: + Title: "Toxic Release Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/toxics-release-inventory-tri-program" + Primary: TRUE + WATREL: + FullName: "Point source releases to water" + Abbreviation: "WATREL" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/TRI_DMR_national_2017_v0.1_864d573.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + EPA_TRI_2017: + Title: "Toxic Release Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/toxics-release-inventory-tri-program" + Primary: TRUE + EPA_DMR_2017: + Title: "Discharge Monitoring Report" + Author: "EPA" + DataYear: 2017 + URL: "https://echo.epa.gov/tools/data-downloads/icis-npdes-dmr-and-limit-data-set" + Primary: TRUE + GHG: + FullName: "Greenhouse Gases" + Abbreviation: "GHG" + StaticSource: TRUE + StaticFile: "useeior/NGHGIAM_GHG_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2016] + Locations: ["US"] + SectorListSource: "BEA" # or, NAICS + SectorListYear: 2012 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USEPA_GHG_2018: + Title: "GHG Inventory" + Author: "USEPA" + DataYear: 2016 + URL: "https://www.epa.gov/ghgemissions/inventory-us-greenhouse-gas-emissions-and-sinks-1990-2016" + Primary: TRUE + LAND: + FullName: "Land use" + Abbreviation: "LAND" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/Land_national_2012_v0.1.1_66af8ab.parquet" + FileLocation: "DataCommons" + DataYears: [2012] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + BLM_PLS: + Title: "Public Land Statistics" + Author: "BLM" + DataYear: 2012 + URL: "https://www.blm.gov/about/data/public-land-statistics" + Primary: FALSE + EIA_CBECS_Land: + Title: "Commercial Building Energy Consumption Survey" + Author: "EIA" + DataYear: 2012 + URL: "https://www.eia.gov/consumption/commercial/data/2012/" + Primary: FALSE + EIA_MECS_Land: + Title: "Manufacturing Energy Consumption Survey" + Author: "EIA" + DataYear: 2014 + URL: "https://www.eia.gov/consumption/manufacturing/data/2014/" + Primary: FALSE + USDA_ERS_MLU: + Title: "Major Uses of Land in the United States" + Author: "USDA" + DataYear: 2012 + URL: "https://www.ers.usda.gov/data-products/major-land-uses/" + Primary: TRUE + MINE: + FullName: "Mineral extraction" + Abbreviation: "MINE" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_MINE_TotalsBySector_FEDEFL.csv" + FileLocation: "DataCommons" + DataYears: [2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USGS_MCS: + Title: "Mineral Commodity Summary" + Author: "USGS" + DataYear: 2014 + URL: "https://www.usgs.gov/centers/nmic/mineral-commodity-summaries" + Primary: TRUE + ENERGY: + FullName: "Energy extraction" + Abbreviation: "ENERGY" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_Energy_TotalsBySector_FEDEFL.csv" + FileLocation: "DataCommons" + DataYears: [2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + EIA_MER: + Title: "Monthly Energy Review" + Author: "EIA" + DataYear: 2014 + URL: "http://www.eia.gov/totalenergy/data/monthly/" + Primary: TRUE + EIA_923: + Title: "Form EIA-923 Detailed" + Author: "EIA" + DataYear: 2014 + URL: "https://www.eia.gov/electricity/data/eia923/" + Primary: TRUE + NPAG: + FullName: "Nitrogen and Phosphorus Releases from Agriculture" + Abbreviation: "NPAG" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_NPAG_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2013, 2015] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USDA_CUS_Corn_Potatoes: + Title: "Chemical Use Survey - Corn and Potatoes" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" + Primary: FALSE + USDA_CUS_Cotton: + Title: "Chemical Use Survey - Cotton" + Author: "USDA" + DataYear: 2010 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" + Primary: FALSE + USDA_CUS_Fruit: + Title: "Chemical Use Survey - Fruit" + Author: "USDA" + DataYear: 2011 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" + Primary: FALSE + USDA_CUS_Peanuts_Rice: + Title: "Chemical Use Survey - Peanuts and Rice" + Author: "USDA" + DataYear: 2013 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" + Primary: FALSE + USDA_CUS_Soybeans_Wheat: + Title: "Chemical Use Survey - Soybeans and Wheat" + Author: "USDA" + DataYear: 2012 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" + Primary: FALSE + USDA_CUS_Vegetables: + Title: "Chemical Use Survey - Vegetables" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" + Primary: FALSE + PEST: + FullName: "Pesticide releases" + Abbreviation: "PEST" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_PEST_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2004, 2005, 2010, 2011, 2012, 2013, 2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USDA_CUS_Corn_Potatoes: + Title: "Chemical Use Survey - Corn and Potatoes" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" + Primary: FALSE + USDA_CUS_Cotton: + Title: "Chemical Use Survey - Cotton" + Author: "USDA" + DataYear: 2010 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" + Primary: FALSE + USDA_CUS_Fruit: + Title: "Chemical Use Survey - Fruit" + Author: "USDA" + DataYear: 2011 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" + Primary: FALSE + USDA_CUS_Peanuts_Rice: + Title: "Chemical Use Survey - Peanuts and Rice" + Author: "USDA" + DataYear: 2013 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" + Primary: FALSE + USDA_CUS_Soybeans_Wheat: + Title: "Chemical Use Survey - Soybeans and Wheat" + Author: "USDA" + DataYear: 2012 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" + Primary: FALSE + USDA_CUS_Vegetables: + Title: "Chemical Use Survey - Vegetables" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" + Primary: FALSE + CNHW: + FullName: "Commercial non-hazardous waste excluding construction activities" + Abbreviation: "CNHW" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_CNHW_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2015] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "Waste Characterization Study 2014" + DataSources: + CalRecycle_CWCS: + Title: "2014 Generator-Based Characterization of Commercial Sector" + Author: "CalRecycle" + DataYear: 2014 + URL: "https://www2.calrecycle.ca.gov/WasteCharacterization/PubExtracts/2014/GenSummary.pdf" + Primary: TRUE + CNHWC: + FullName: "Commercial non-hazardous waste from construction activities" + Abbreviation: "CNHWC" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_CNHWC_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "CDDPath" + DataSources: + USEPA_FF_2014: + Title: "Advancing Sustainable Materials Management: 2014 Fact Sheet" + Author: "USEPA" + DataYear: 2014 + URL: "https://www.epa.gov/sites/production/files/2016-11/documents/2014_smmfactsheet_508.pdf" + Primary: TRUE + CRHW: + FullName: "Commercial RCRA-defined hazardous waste" + Abbreviation: "CRHW" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/CRHW_national_2017_v0.1_864d573.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + OriginalFlowSource: "RCRAInfo" + DataSources: + USEPA_RCRAInfo_2017: + Title: "National Biennial RCRA Hazardous Waste Report" + Author: "USEPA" + DataYear: 2017 + URL: "https://rcrapublic.epa.gov/rcrainfoweb/action/modules/br/main/broverview" + Primary: TRUE + EMP: + FullName: "Employment" + Abbreviation: "EMP" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/Employment_national_2017_v0.1.1_66af8ab.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + OriginalFlowSource: "National Employment Matrix" + DataSources: + BLS_QCEW_2017: + Title: "Quarterly Census of Employment and Wages" + Author: "BLS" + DataYear: 2017 + URL: "https://www.bls.gov/cew/" + Primary: TRUE + VADD: + FullName: "Value Added" + Abbreviation: "VADD" + StaticSource: FALSE + StaticFile: null + FileLocation: None + DataYears: [2012] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2012 + SectorListLevel: "Detail" + OriginalFlowSource: "Input-Output Tables" + ScriptFunctionCall: "getValueAddedTotalsbySector" #function to call for script + ScriptFunctionParameters: ["model"] #list of parameters + DataSources: + BEA_USE: + Title: "Detail Use Before Redefinitions" + Author: "BEA" + DataYear: 2012 + URL: "https://apps.bea.gov//industry/iTables%20Static%20Files/AllTablesIO.zip" + Primary: TRUE + +Indicators: + GreenhouseGases: + Name: "Greenhouse Gases" + Code: "GHG" + Group: "Impact Potential" + Unit: "kg CO2 eq" + SimpleUnit: "Kilograms Carbon Dioxide (CO2)" + SimpleName: "Greenhouse Gases" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Global warming"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Acidification: + Name: "Acidification Potential" + Code: "ACID" + Group: "Impact Potential" + Unit: "kg SO2 eq" + SimpleUnit: "Kilograms Sulphur Dioxide (SO2)" + SimpleName: "Acid Rain" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Acidification"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Eutrophication: + Name: "Eutrophication Potential" + Code: "EUTR" + Group: "Impact Potential" + Unit: "kg N eq" + SimpleUnit: "Kilograms Nitrogen (N)" + SimpleName: "Water Eutrophication" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Eutrophication"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + FreshwaterEcotox: + Name: "Freshwater Ecotoxicity Potential" + Code: "ETOX" + Group: "Impact Potential" + Unit: "CTUe" + SimpleUnit: "Comparative Toxic Unit for Ecosystem (CTUe)" + SimpleName: "Freshwater Ecotoxicity" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Freshwater ecotoxicity"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + HumanHealthCancer: + Name: "Human Health - Cancer" + Code: "HCAN" + Group: "Impact Potential" + Unit: "CTUh" + SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" + SimpleName: "Cancer Disease" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - cancer"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + HumanHealthNonCancer: + Name: "Human Health - Noncancer" + Code: "HNCN" + Group: "Impact Potential" + Unit: "CTUh" + SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" + SimpleName: "Noncancer Disease" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - non-cancer"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + HumanHealthToxicity: + Name: "Human Health Toxicity" + Code: "HTOX" + Group: "Impact Potential" + Unit: "CTUh" + SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" + SimpleName: "Toxic to Humans" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getCombinedImpactMethods" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - cancer", "Human health - non-cancer"] + DataSources: + USEEIO_LCIA_Aggregation: + Title: "Aggregation of HNCN and HCAN" + Author: NA + DataYear: NA + URL: NA + Primary: TRUE + HumanHealthRespEffects: + Name: "Human Health - Respiratory Effects" + Code: "HRSP" + Group: "Impact Potential" + Unit: "kg PM2.5 eq" + SimpleUnit: "Kilograms Particulate Matter" + SimpleName: "Respiratory Effects" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - particulate matter"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Ozone: + Name: "Ozone Depletion" + Code: "OZON" + Group: "Impact Potential" + Unit: "kg CFC-11 eq" + SimpleUnit: "Kilograms ChloroFluoroCarbon-11" + SimpleName: "Ozone Depletion" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Ozone depletion"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Smog: + Name: "Smog Formation Potential" + Code: "SMOG" + Group: "Impact Potential" + Unit: "kg O3 eq" + SimpleUnit: "Kilograms Ozone (O3)" + SimpleName: "Smog Formation" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Smog formation"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + freshwater_withdrawal: + Name: "Freshwater withdrawals" + Code: "WATR" + Group: "Resource Use" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Water Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["freshwater_resources"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + land_use: + Name: "Land use" + Code: "LAND" + Group: "Resource Use" + Unit: "m2*yr" + SimpleUnit: "Square Meters per Year" + SimpleName: "Land Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["land_use"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + HAP: + Name: "Hazardous Air Pollutants" + Code: "HAPS" + Group: "Chemical Releases" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Hazardous Air Pollutants" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["HAP"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + Pesticides: + Name: "Pesticides" + Code: "PEST" + Group: "Chemical Releases" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Pesticides" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["USDA_CUS_pesticides"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + NonRenewableEnergy: + Name: "Nonrenewable Energy Use" + Code: "NNRG" + Group: "Resource Use" + Unit: "MJ" + SimpleUnit: "Megajoules (MJ)" + SimpleName: "Nonrenewable Energy Use" + StaticSource: TRUE + FileLocation: "DataCommons" + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["nonrenewable_energy"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + RenewableEnergy: + Name: "Renewable Energy Use" + Code: "RNRG" + Group: "Resource Use" + Unit: "MJ" + SimpleUnit: "Megajoules (MJ)" + SimpleName: "Renewable Energy Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["renewable_energy"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + Energy: + Name: "Energy Use" + Code: "ENRG" + Group: "Resource Use" + Unit: "MJ" + SimpleUnit: "Megajoules (MJ)" + SimpleName: "Energy Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["energy"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + MineralsMetals: + Name: "Minerals and Metals Use" + Code: "MNRL" + Group: "Resource Use" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Minerals and Metals Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["USGS_mineral_resources"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + ValueAdded: + Name: "Value Added" + Code: "VADD" + Group: "Economic & Social" + Unit: "$" + SimpleUnit: "US Dollars ($)" + SimpleName: "Value Added" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + ingwersen_useeiov11_2017: + Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.23719/1368541" + Primary: TRUE + Jobs: + Name: "Jobs Supported" + Code: "JOBS" + Group: "Economic & Social" + Unit: "jobs" + SimpleUnit: "Employees" + SimpleName: "Jobs Supported" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + ingwersen_useeiov11_2017: + Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.23719/1368541" + Primary: TRUE + RCRAHazWaste: + Name: "Commercial RCRA Hazardous Waste" + Code: "CRHW" + Group: "Waste Generated" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Hazardous Waste" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + meyer_analyzing_2020: + Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.1016/j.resconrec.2020.104795" + Primary: TRUE + MunicipalWaste: + Name: "Commercial Municipal Solid Waste" + Code: "CMSW" + Group: "Waste Generated" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Municipal Solid Waste" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + meyer_analyzing_2020: + Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.1016/j.resconrec.2020.104795" + Primary: TRUE + ConstructionDebris: + Name: "Commercial Construction and Demolition Debris" + Code: "CCDD" + Group: "Waste Generated" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Construction Debris" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + meyer_analyzing_2020: + Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.1016/j.resconrec.2020.104795" + Primary: TRUE + +DemandVectors: + Consumption: + Type: "Consumption" + Year: 2012 + System: "Complete" + Location: "US" + Production: + Type: "Production" + Year: 2012 + System: "Complete" + Location: "US" + HouseholdConsumption: + Type: "Consumption" + Year: 2012 + System: "Household" + Location: "US" + DomesticConsumption: + Type: "Consumption" + Year: 2012 + System: "Domestic" + Location: "US" + From eb3702ee13e45b264867c7d267ac3205c89f3fb0 Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 14 Jul 2021 11:38:50 -0400 Subject: [PATCH 002/319] added ElectricityDisaggregationDetail.yml file --- .../ElecSpecs/ElectricityDisaggregationDetail.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail.yml diff --git a/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail.yml b/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail.yml new file mode 100644 index 00000000..c8b557bc --- /dev/null +++ b/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail.yml @@ -0,0 +1,9 @@ +Disaggregation: + 562000/US: + OriginalSectorCode: "221100/US" + OrignalSectorName: "Electric power generation, transmission, and distribution" + DisaggregationType: "Userdefined" + SectorFile: ElectricityDisaggregation_Sectors.csv + MakeFile: ElectricityDisaggregationDetail_Make.csv + UseFile: ElectricityDisaggregationDetail_Use.csv + EnvFile: ElectricityDisaggregation_Env.csv From ed4909ef67d16c66620545e1b2c7f023a7622f0a Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 14 Jul 2021 11:43:03 -0400 Subject: [PATCH 003/319] Added ElectricityDisaggregation_Sectors.csv file which speficies the disaggregated electricity sector codes and names --- .../ElecSpecs/ElectricityDisaggregation_Sectors.csv | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregation_Sectors.csv diff --git a/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregation_Sectors.csv b/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregation_Sectors.csv new file mode 100644 index 00000000..5f48fa37 --- /dev/null +++ b/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregation_Sectors.csv @@ -0,0 +1,13 @@ +NAICS_2012_Code,USEEIO_Code,USEEIO_Name +221111,221111/US,Hydroelectric Power Generation +221112,22111A/US,Coal Electric Power Generation +221112,22111B/US,Natural Gas Electric Power Generation +221112,22111C/US,Petroleum Electric Power Generation +221113,221113/US,Nuclear Electric Power Generation +221114,221114/US,Solar Electric Power Generation +221115,221115/US,Wind Electric Power Generation +221116,221116/US,Geothermal Electric Power Generation +221117,221117/US,Biomass Electric Power Generation +221118,221118/US,Other Electric Power Generation +221121,221121/US,Electric Bulk Power Transmission and Control +221122,221122/US,Electric Power Distribution From 268364698f1ab83d87260ed2757375077eafbf6a Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 14 Jul 2021 12:02:02 -0400 Subject: [PATCH 004/319] Added electricityDisaggregationDetail_Make.csv file --- .../ElectricityDisaggregationDetail_Make.csv | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail_Make.csv diff --git a/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail_Make.csv b/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail_Make.csv new file mode 100644 index 00000000..115347cf --- /dev/null +++ b/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail_Make.csv @@ -0,0 +1,28 @@ +IndustryCode,CommodityCode,PercentMake,Note +221100/US,221111/US,3.85E-02,Default allocation +221100/US,22111A/US,2.17E-01,Default allocation +221100/US,22111B/US,1.73E-01,Default allocation +221100/US,22111C/US,2.97E-03,Default allocation +221100/US,221113/US,1.11E-01,Default allocation +221100/US,221114/US,6.14E-04,Default allocation +221100/US,221115/US,1.98E-02,Default allocation +221100/US,221116/US,2.21E-03,Default allocation +221100/US,221117/US,1.01E-02,Default allocation +221100/US,221118/US,6.90E-04,Default allocation +221100/US,221121/US,1.11E-01,Default allocation +221100/US,221122/US,3.13E-01,Default allocation +221100/US,221111/US,3.85E-02,Make table intersection +221100/US,22111A/US,2.17E-01,Make table intersection +221100/US,22111B/US,1.73E-01,Make table intersection +221100/US,22111C/US,2.97E-03,Make table intersection +221100/US,221113/US,1.11E-01,Make table intersection +221100/US,221114/US,6.14E-04,Make table intersection +221100/US,221115/US,1.98E-02,Make table intersection +221100/US,221116/US,2.21E-03,Make table intersection +221100/US,221117/US,1.01E-02,Make table intersection +221100/US,221118/US,6.90E-04,Make table intersection +221100/US,221121/US,1.11E-01,Make table intersection +221100/US,221122/US,3.13E-01,Make table intersection +221200/US,22111B/US,1.00E+00,Commodity disaggregation +22111B/US,221200/US,1.00E+00,Industry disaggregation +22111B/US,486000/US,1.00E+00,Industry disaggregation From 3c818d76d1cb730707f55445fec8bb0577f0e451 Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 14 Jul 2021 12:27:25 -0400 Subject: [PATCH 005/319] Added ElectricityDisaggregationDetail_Use.csv file --- .../ElectricityDisaggregationDetail_Use.csv | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail_Use.csv diff --git a/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail_Use.csv b/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail_Use.csv new file mode 100644 index 00000000..395b3dcf --- /dev/null +++ b/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail_Use.csv @@ -0,0 +1,171 @@ +IndustryCode,CommodityCode,PercentUsed,Note +221111/US,221100/US,4.18E-02,"Use column sum, industry output" +22111A/US,221100/US,1.91E-01,"Use column sum, industry output" +22111B/US,221100/US,1.48E-01,"Use column sum, industry output" +22111C/US,221100/US,3.22E-03,"Use column sum, industry output" +221113/US,221100/US,1.20E-01,"Use column sum, industry output" +221114/US,221100/US,6.66E-04,"Use column sum, industry output" +221115/US,221100/US,2.15E-02,"Use column sum, industry output" +221116/US,221100/US,2.40E-03,"Use column sum, industry output" +221117/US,221100/US,1.10E-02,"Use column sum, industry output" +221118/US,221100/US,7.48E-04,"Use column sum, industry output" +221121/US,221100/US,1.20E-01,"Use column sum, industry output" +221122/US,221100/US,3.39E-01,"Use column sum, industry output" +221100/US,221111/US,3.85E-02,"Use row sum, commodity output" +221100/US,22111A/US,2.17E-01,"Use row sum, commodity output" +221100/US,22111B/US,1.74E-01,"Use row sum, commodity output" +221100/US,22111C/US,2.97E-03,"Use row sum, commodity output" +221100/US,221113/US,1.10E-01,"Use row sum, commodity output" +221100/US,221114/US,6.14E-04,"Use row sum, commodity output" +221100/US,221115/US,1.98E-02,"Use row sum, commodity output" +221100/US,221116/US,2.21E-03,"Use row sum, commodity output" +221100/US,221117/US,1.01E-02,"Use row sum, commodity output" +221100/US,221118/US,6.90E-04,"Use row sum, commodity output" +221100/US,221121/US,1.11E-01,"Use row sum, commodity output" +221100/US,221122/US,3.13E-01,"Use row sum, commodity output" +221111/US,221111/US,1.46E-03,Use table intersection +221111/US,22111A/US,8.20E-03,Use table intersection +221111/US,22111B/US,6.56E-03,Use table intersection +221111/US,22111C/US,1.12E-04,Use table intersection +221111/US,221113/US,4.18E-03,Use table intersection +221111/US,221114/US,2.32E-05,Use table intersection +221111/US,221115/US,7.50E-04,Use table intersection +221111/US,221116/US,8.36E-05,Use table intersection +221111/US,221117/US,3.82E-04,Use table intersection +221111/US,221118/US,2.61E-05,Use table intersection +221111/US,221121/US,4.20E-03,Use table intersection +221111/US,221122/US,1.18E-02,Use table intersection +22111A/US,221111/US,8.20E-03,Use table intersection +22111A/US,22111A/US,4.62E-02,Use table intersection +22111A/US,22111B/US,3.70E-02,Use table intersection +22111A/US,22111C/US,6.33E-04,Use table intersection +22111A/US,221113/US,2.35E-02,Use table intersection +22111A/US,221114/US,1.31E-04,Use table intersection +22111A/US,221115/US,4.22E-03,Use table intersection +22111A/US,221116/US,4.71E-04,Use table intersection +22111A/US,221117/US,2.15E-03,Use table intersection +22111A/US,221118/US,1.47E-04,Use table intersection +22111A/US,221121/US,2.36E-02,Use table intersection +22111A/US,221122/US,6.66E-02,Use table intersection +22111B/US,221111/US,7.28E-03,Use table intersection +22111B/US,22111A/US,4.10E-02,Use table intersection +22111B/US,22111B/US,3.28E-02,Use table intersection +22111B/US,22111C/US,5.62E-04,Use table intersection +22111B/US,221113/US,2.09E-02,Use table intersection +22111B/US,221114/US,1.16E-04,Use table intersection +22111B/US,221115/US,3.75E-03,Use table intersection +22111B/US,221116/US,4.18E-04,Use table intersection +22111B/US,221117/US,1.91E-03,Use table intersection +22111B/US,221118/US,1.30E-04,Use table intersection +22111B/US,221121/US,2.10E-02,Use table intersection +22111B/US,221122/US,5.92E-02,Use table intersection +22111C/US,221111/US,1.12E-04,Use table intersection +22111C/US,22111A/US,6.33E-04,Use table intersection +22111C/US,22111B/US,5.06E-04,Use table intersection +22111C/US,22111C/US,8.67E-06,Use table intersection +22111C/US,221113/US,3.22E-04,Use table intersection +22111C/US,221114/US,1.79E-06,Use table intersection +22111C/US,221115/US,5.79E-05,Use table intersection +22111C/US,221116/US,6.45E-06,Use table intersection +22111C/US,221117/US,2.95E-05,Use table intersection +22111C/US,221118/US,2.01E-06,Use table intersection +22111C/US,221121/US,3.24E-04,Use table intersection +22111C/US,221122/US,9.13E-04,Use table intersection +221113/US,221111/US,4.18E-03,Use table intersection +221113/US,22111A/US,2.35E-02,Use table intersection +221113/US,22111B/US,1.88E-02,Use table intersection +221113/US,22111C/US,3.22E-04,Use table intersection +221113/US,221113/US,1.20E-02,Use table intersection +221113/US,221114/US,6.66E-05,Use table intersection +221113/US,221115/US,2.15E-03,Use table intersection +221113/US,221116/US,2.40E-04,Use table intersection +221113/US,221117/US,1.09E-03,Use table intersection +221113/US,221118/US,7.48E-05,Use table intersection +221113/US,221121/US,1.20E-02,Use table intersection +221113/US,221122/US,3.39E-02,Use table intersection +221114/US,221111/US,2.32E-05,Use table intersection +221114/US,22111A/US,1.31E-04,Use table intersection +221114/US,22111B/US,1.05E-04,Use table intersection +221114/US,22111C/US,1.79E-06,Use table intersection +221114/US,221113/US,6.66E-05,Use table intersection +221114/US,221114/US,3.70E-07,Use table intersection +221114/US,221115/US,1.20E-05,Use table intersection +221114/US,221116/US,1.33E-06,Use table intersection +221114/US,221117/US,6.08E-06,Use table intersection +221114/US,221118/US,4.16E-07,Use table intersection +221114/US,221121/US,6.69E-05,Use table intersection +221114/US,221122/US,1.89E-04,Use table intersection +221115/US,221111/US,7.50E-04,Use table intersection +221115/US,22111A/US,4.22E-03,Use table intersection +221115/US,22111B/US,3.38E-03,Use table intersection +221115/US,22111C/US,5.79E-05,Use table intersection +221115/US,221113/US,2.15E-03,Use table intersection +221115/US,221114/US,1.20E-05,Use table intersection +221115/US,221115/US,3.86E-04,Use table intersection +221115/US,221116/US,4.30E-05,Use table intersection +221115/US,221117/US,1.97E-04,Use table intersection +221115/US,221118/US,1.34E-05,Use table intersection +221115/US,221121/US,2.16E-03,Use table intersection +221115/US,221122/US,6.09E-03,Use table intersection +221116/US,221111/US,8.36E-05,Use table intersection +221116/US,22111A/US,4.71E-04,Use table intersection +221116/US,22111B/US,3.77E-04,Use table intersection +221116/US,22111C/US,6.45E-06,Use table intersection +221116/US,221113/US,2.40E-04,Use table intersection +221116/US,221114/US,1.33E-06,Use table intersection +221116/US,221115/US,4.30E-05,Use table intersection +221116/US,221116/US,4.80E-06,Use table intersection +221116/US,221117/US,2.19E-05,Use table intersection +221116/US,221118/US,1.50E-06,Use table intersection +221116/US,221121/US,2.41E-04,Use table intersection +221116/US,221122/US,6.79E-04,Use table intersection +221117/US,221111/US,3.82E-04,Use table intersection +221117/US,22111A/US,2.15E-03,Use table intersection +221117/US,22111B/US,1.72E-03,Use table intersection +221117/US,22111C/US,2.95E-05,Use table intersection +221117/US,221113/US,1.09E-03,Use table intersection +221117/US,221114/US,6.08E-06,Use table intersection +221117/US,221115/US,1.97E-04,Use table intersection +221117/US,221116/US,2.19E-05,Use table intersection +221117/US,221117/US,1.00E-04,Use table intersection +221117/US,221118/US,6.84E-06,Use table intersection +221117/US,221121/US,1.10E-03,Use table intersection +221117/US,221122/US,3.10E-03,Use table intersection +221118/US,221111/US,2.61E-05,Use table intersection +221118/US,22111A/US,1.47E-04,Use table intersection +221118/US,22111B/US,1.18E-04,Use table intersection +221118/US,22111C/US,2.01E-06,Use table intersection +221118/US,221113/US,7.48E-05,Use table intersection +221118/US,221114/US,4.16E-07,Use table intersection +221118/US,221115/US,1.34E-05,Use table intersection +221118/US,221116/US,1.50E-06,Use table intersection +221118/US,221117/US,6.84E-06,Use table intersection +221118/US,221118/US,4.67E-07,Use table intersection +221118/US,221121/US,7.52E-05,Use table intersection +221118/US,221122/US,2.12E-04,Use table intersection +221121/US,221111/US,4.20E-03,Use table intersection +221121/US,22111A/US,2.36E-02,Use table intersection +221121/US,22111B/US,1.89E-02,Use table intersection +221121/US,22111C/US,3.24E-04,Use table intersection +221121/US,221113/US,1.20E-02,Use table intersection +221121/US,221114/US,6.69E-05,Use table intersection +221121/US,221115/US,2.16E-03,Use table intersection +221121/US,221116/US,2.41E-04,Use table intersection +221121/US,221117/US,1.10E-03,Use table intersection +221121/US,221118/US,7.52E-05,Use table intersection +221121/US,221121/US,1.21E-02,Use table intersection +221121/US,221122/US,3.41E-02,Use table intersection +221122/US,221111/US,1.18E-02,Use table intersection +221122/US,22111A/US,6.66E-02,Use table intersection +221122/US,22111B/US,5.33E-02,Use table intersection +221122/US,22111C/US,9.13E-04,Use table intersection +221122/US,221113/US,3.39E-02,Use table intersection +221122/US,221114/US,1.89E-04,Use table intersection +221122/US,221115/US,6.09E-03,Use table intersection +221122/US,221116/US,6.79E-04,Use table intersection +221122/US,221117/US,3.10E-03,Use table intersection +221122/US,221118/US,2.12E-04,Use table intersection +221122/US,221121/US,3.41E-02,Use table intersection +221122/US,221122/US,9.61E-02,Use table intersection +22111B,211000,1.00E+00,Industry disaggregation +22111A,212100,1.00E+00,Industry disaggregation From f1a2d75e8abc2b540aa6f48caeb946cc178b9187 Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 14 Jul 2021 12:29:37 -0400 Subject: [PATCH 006/319] Reorganized electricity disaggregation file structure to match waste disaggregation --- .../{ElecSpecs => }/ElectricityDisaggregationDetail.yml | 0 .../{ElecSpecs => }/ElectricityDisaggregationDetail_Make.csv | 0 .../{ElecSpecs => }/ElectricityDisaggregationDetail_Use.csv | 0 .../{ElecSpecs => }/ElectricityDisaggregation_Sectors.csv | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename inst/extdata/disaggspecs/{ElecSpecs => }/ElectricityDisaggregationDetail.yml (100%) rename inst/extdata/disaggspecs/{ElecSpecs => }/ElectricityDisaggregationDetail_Make.csv (100%) rename inst/extdata/disaggspecs/{ElecSpecs => }/ElectricityDisaggregationDetail_Use.csv (100%) rename inst/extdata/disaggspecs/{ElecSpecs => }/ElectricityDisaggregation_Sectors.csv (100%) diff --git a/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail.yml b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml similarity index 100% rename from inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail.yml rename to inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml diff --git a/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail_Make.csv b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail_Make.csv similarity index 100% rename from inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail_Make.csv rename to inst/extdata/disaggspecs/ElectricityDisaggregationDetail_Make.csv diff --git a/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail_Use.csv b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail_Use.csv similarity index 100% rename from inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregationDetail_Use.csv rename to inst/extdata/disaggspecs/ElectricityDisaggregationDetail_Use.csv diff --git a/inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregation_Sectors.csv b/inst/extdata/disaggspecs/ElectricityDisaggregation_Sectors.csv similarity index 100% rename from inst/extdata/disaggspecs/ElecSpecs/ElectricityDisaggregation_Sectors.csv rename to inst/extdata/disaggspecs/ElectricityDisaggregation_Sectors.csv From aa5c4de62db3898bcc9f5f175f65902d0e3fd5c9 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 15 Jul 2021 16:14:15 -0400 Subject: [PATCH 007/319] Include potential aggregation before disaggregation in disagg specs --- R/DisaggregateFunctions.R | 11 +++++++---- .../disaggspecs/ElectricityDisaggregationDetail.yml | 5 +++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 91d58f29..7d444d5a 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -3,12 +3,15 @@ #' @return A disaggregated model. disaggregateModel <- function (model){ - for (disagg in model$specs$DisaggregationSpecs){ - disaggregationConfigFile <- disagg - logging::loginfo(paste("Reading disaggregation for", disaggregationConfigFile, sep=" ")) - model$DisaggregationSpecs <- getConfiguration(disaggregationConfigFile, "disagg") + for (configFile in model$specs$DisaggregationSpecs){ + logging::loginfo(paste("Reading disaggregation for", configFile, sep=" ")) + model$DisaggregationSpecs <- getConfiguration(configFile, "disagg") } + if(!is.null(model$DisaggregationSpecs$Aggregation)){ + # Handle sector aggregation + } + counter = 1 for (disagg in model$DisaggregationSpecs$Disaggregation){ diff --git a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml index c8b557bc..abd2063a 100644 --- a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml +++ b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml @@ -1,9 +1,10 @@ +Aggregation: ["221100/US", "S00101/US", "S00202/US"] # Aggregates to first sector listed Disaggregation: - 562000/US: + 221100/US: OriginalSectorCode: "221100/US" OrignalSectorName: "Electric power generation, transmission, and distribution" DisaggregationType: "Userdefined" SectorFile: ElectricityDisaggregation_Sectors.csv MakeFile: ElectricityDisaggregationDetail_Make.csv UseFile: ElectricityDisaggregationDetail_Use.csv - EnvFile: ElectricityDisaggregation_Env.csv + # EnvFile: ElectricityDisaggregation_Env.csv From 4af65b3acf3020e73818396e648232e01f623ca9 Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 2 Aug 2021 16:41:19 -0400 Subject: [PATCH 008/319] add if loop to handle aggregation --- R/DisaggregateFunctions.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 7d444d5a..10d5285a 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -10,6 +10,7 @@ disaggregateModel <- function (model){ if(!is.null(model$DisaggregationSpecs$Aggregation)){ # Handle sector aggregation + model <- aggregateModel(model) } counter = 1 From 6aadd88bab8634737b58da251a3cd6dbff044f10 Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 2 Aug 2021 16:41:47 -0400 Subject: [PATCH 009/319] add aggregation.r file with functionality for aggregating makeTransactions and UseTransactions --- R/AggregationFunctions.R | 143 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 R/AggregationFunctions.R diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R new file mode 100644 index 00000000..65974a14 --- /dev/null +++ b/R/AggregationFunctions.R @@ -0,0 +1,143 @@ +#' Aggregate a model based on specified source file +#' @param model Model file loaded with IO tables +#' @return An aggregated model. +aggregateModel <- function (model){ + + temp <-1 + + model$MakeTransactions <- aggregateMakeTable(model) + model$UseTransactions <- aggregateUseTable(model) + + + return(model) +} + +#TODO: rewrite this function to use matrix calculations when possible +#' Aggregate the MakeTable based on specified source file +#' @param model Model file loaded with IO tables +#' @return An aggregated MakeTable. +aggregateMakeTable <- function(model){ + + agg <- model$DisaggregationSpecs$Aggregation + logging::loginfo(paste0("Aggregating sectors to'", agg[1], "'.")) + + count <- 1 + + + for (sector in agg){ + + if(count == 1){ + count <- count + 1 + next #first sector in agg is the one we are aggregating to, so skip + } + + model$MakeTransactions <- aggregateSector(model, agg[1], agg[count], "Make") + count <- count + 1 + } + + #remove rows and cols from model + agg <- agg[2:length(agg)] + model$MakeTransactions <- model$MakeTransactions[!(rownames(model$MakeTransactions)) %in% agg,] #remove rows from model that have the same rownames as values in agg list + model$MakeTransactions <- model$MakeTransactions[,!(colnames(model$MakeTransactions)) %in% agg] #as above but with cols + + return(model$MakeTransactions) + +} + + +#TODO: rewrite this function to use matrix calculations when possible +#' Aggregate the UseTable based on specified source file +#' @param model Model file loaded with IO tables +#' @return An aggregated UseTable. +aggregateUseTable <- function(model){ + + agg <- model$DisaggregationSpecs$Aggregation + logging::loginfo(paste0("Aggregating sectors to'", agg[1], "'.")) + + count <- 1 + + + for (sector in agg){ + + if(count == 1){ + count <- count + 1 + next #first sector in agg is the one we are aggregating to, so skip + } + + model$UseTransactions <- aggregateSector(model, agg[1], agg[count], "Use") + count <- count + 1 + } + + #remove rows and cols from model + agg <- agg[2:length(agg)] + model$UseTransactions <- model$UseTransactions[!(rownames(model$UseTransactions)) %in% agg,] #remove rows from model that have the same rownames as values in agg list + model$UseTransactions <- model$UseTransactions[,!(colnames(model$UseTransactions)) %in% agg] #as above but with cols + + return(model$UseTransactions) + +} + +#' Aggregate a sector in a table by adding the values from +#' @param model Model file loaded with IO tables +#' @param mainSector Sector to aggregate to (string) +#' @param sectorToRemove Sector to be aggregated into mainSector, then removed from table (string) +#' @param tableType String to designate either Make or Use table +#' @return aggregated table +aggregateSector <- function(model, mainSector, sectorToRemove, tableType){ + #get correct indeces + if(tableType == "Use"){ + mainRowIndex <- getIndex(model$Commodities$Code_Loc, mainSector) + mainColIndex <- getIndex(model$Industries$Code_Loc, mainSector) + + removeRowIndex <- getIndex(model$Commodities$Code_Loc, sectorToRemove) + removeColIndex <- getIndex(model$Industries$Code_Loc, sectorToRemove) + + table <- model$UseTransactions + + }else if(tableType == "Make"){ + mainRowIndex <- getIndex(model$Industries$Code_Loc, mainSector) + mainColIndex <- getIndex(model$Commodities$Code_Loc, mainSector) + + removeRowIndex <- getIndex(model$Industries$Code_Loc, sectorToRemove) + removeColIndex <- getIndex(model$Commodities$Code_Loc, sectorToRemove) + + table <- model$MakeTransactions + + }else{ + #continue + } + + + if(length(removeRowIndex) != 0 && length(mainRowIndex) !=0){#if there a row to remove and merge with the main sector + table[mainRowIndex,] <- table[mainRowIndex,] + table[removeRowIndex,]#add rows together + table[removeRowIndex,] <- table[removeRowIndex,] - table[removeRowIndex,]# subtract row from itself to ensure table total is unchanged + } + + if(length(removeColIndex)!=0 && length(mainColIndex) !=0){#if there a col to remove and merge with the main sector + table[,mainColIndex] <- table[,mainColIndex] + table[,removeColIndex]#add cols together + table[,removeColIndex] <- table[,removeColIndex] - table[,removeColIndex]# subtract col from itself to ensure table total is unchanged#need to check this line to make sure sum removecol = 0 + + } + + + + + return(table) +} + +#' Return the index where a sector occurrs in a sectorList +#' @param sectorList Dataframe (of strings) to match the index of the sector param +#' @param sector String of the sector to look the index for +#' @return Index of sector in sectorList +getIndex <- function(sectorList, sector){ + + index <- which(sectorList==sector) + + if(length(index)==0){ + logging::logwarn(paste0("'", sector, "' string does not occur in current list.'")) + + } + + return(index) + +} \ No newline at end of file From 4240231cc53bf690510d970ed779d15e516527f6 Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 2 Aug 2021 16:54:05 -0400 Subject: [PATCH 010/319] commenting out if loop for aggregation in disaggregateModel for continued testing and development of aggregation functions --- R/DisaggregateFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 10d5285a..dbb9ce7a 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -10,7 +10,7 @@ disaggregateModel <- function (model){ if(!is.null(model$DisaggregationSpecs$Aggregation)){ # Handle sector aggregation - model <- aggregateModel(model) + #model <- aggregateModel(model) } counter = 1 From 5315a6fabe4d02f2145a074a447d366941aa388e Mon Sep 17 00:00:00 2001 From: jvendries Date: Tue, 3 Aug 2021 19:14:15 -0400 Subject: [PATCH 011/319] added functionality to aggregate crosswalk, industry lists --- R/AggregationFunctions.R | 106 ++++++++++++++++++++++++++++++++++----- 1 file changed, 94 insertions(+), 12 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 65974a14..2002e96e 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -3,11 +3,34 @@ #' @return An aggregated model. aggregateModel <- function (model){ - temp <-1 - + + #aggregating economic tables model$MakeTransactions <- aggregateMakeTable(model) model$UseTransactions <- aggregateUseTable(model) + model$DomesticUseTransactions <- aggregateUseTable(model, domestic = TRUE) + + + #aggregating Crosswalk + model$crosswalk <- aggregateMasterCrosswalk(model) + + #aggregating (i.e. removing) sectors from model lists + agg <- model$DisaggregationSpecs$Aggregation[2:length(model$DisaggregationSpecs$Aggregation)]#first item in Aggregation is the sector to aggregate to, not to be removed + comIndecesToRemove <- which(model$Commodities$Code_Loc %in% agg) #find row indeces containing references to the sectors to be aggregated + indIndecesToRemove <- which(model$Industries$Code_Loc %in% agg) + #aggregate Industry lists + if(length(indIndecesToRemove)!=0){ + model$Industries <- removeRowsFromList(model$Industries, indIndecesToRemove) + model$MultiYearIndustryCPI <- removeRowsFromList(model$MultiYearIndustryCPI, indIndecesToRemove) + + } + + #aggregate Commodity lists + if(length(comIndecesToRemove !=0)){ + + } + + temp <-1 return(model) } @@ -48,8 +71,9 @@ aggregateMakeTable <- function(model){ #TODO: rewrite this function to use matrix calculations when possible #' Aggregate the UseTable based on specified source file #' @param model Model file loaded with IO tables -#' @return An aggregated UseTable. -aggregateUseTable <- function(model){ +#' @param domestic Boolean to indicate whether to aggregate the UseTransactions or DomesticUseTransactions table +#' @return An aggregated UseTransactions or DomesticUseTransactions Table. +aggregateUseTable <- function(model, domestic = FALSE){ agg <- model$DisaggregationSpecs$Aggregation logging::loginfo(paste0("Aggregating sectors to'", agg[1], "'.")) @@ -57,6 +81,7 @@ aggregateUseTable <- function(model){ count <- 1 + for (sector in agg){ if(count == 1){ @@ -64,16 +89,30 @@ aggregateUseTable <- function(model){ next #first sector in agg is the one we are aggregating to, so skip } - model$UseTransactions <- aggregateSector(model, agg[1], agg[count], "Use") + if(domestic == TRUE){ + model$DomesticUseTransactions <- aggregateSector(model, agg[1], agg[count], "Use", domestic) + }else{ + model$UseTransactions <- aggregateSector(model, agg[1], agg[count], "Use", domestic = FALSE) + } + count <- count + 1 } #remove rows and cols from model agg <- agg[2:length(agg)] - model$UseTransactions <- model$UseTransactions[!(rownames(model$UseTransactions)) %in% agg,] #remove rows from model that have the same rownames as values in agg list - model$UseTransactions <- model$UseTransactions[,!(colnames(model$UseTransactions)) %in% agg] #as above but with cols - return(model$UseTransactions) + if(domestic == TRUE){ + + table <- model$DomesticUseTransactions[!(rownames(model$DomesticUseTransactions)) %in% agg,] #remove rows from model that have the same rownames as values in agg list + table <- model$DomesticUseTransactions[,!(colnames(model$DomesticUseTransactions)) %in% agg] #as above but with cols + + }else{ + table <- model$UseTransactions[!(rownames(model$UseTransactions)) %in% agg,] #remove rows from model that have the same rownames as values in agg list + table <- model$UseTransactions[,!(colnames(model$UseTransactions)) %in% agg] #as above but with cols + + } + + return(table) } @@ -81,9 +120,10 @@ aggregateUseTable <- function(model){ #' @param model Model file loaded with IO tables #' @param mainSector Sector to aggregate to (string) #' @param sectorToRemove Sector to be aggregated into mainSector, then removed from table (string) -#' @param tableType String to designate either Make or Use table +#' @param tableType String to designate either Make or Use table +#' @param domestic Boolean to indicate whether to aggregate the UseTransactions or DomesticUseTransactions table #' @return aggregated table -aggregateSector <- function(model, mainSector, sectorToRemove, tableType){ +aggregateSector <- function(model, mainSector, sectorToRemove, tableType, domestic = FALSE){ #get correct indeces if(tableType == "Use"){ mainRowIndex <- getIndex(model$Commodities$Code_Loc, mainSector) @@ -92,7 +132,12 @@ aggregateSector <- function(model, mainSector, sectorToRemove, tableType){ removeRowIndex <- getIndex(model$Commodities$Code_Loc, sectorToRemove) removeColIndex <- getIndex(model$Industries$Code_Loc, sectorToRemove) - table <- model$UseTransactions + if(domestic == TRUE){ + table <- model$DomesticUseTransactions + }else{ + table <- model$UseTransactions + } + }else if(tableType == "Make"){ mainRowIndex <- getIndex(model$Industries$Code_Loc, mainSector) @@ -140,4 +185,41 @@ getIndex <- function(sectorList, sector){ return(index) -} \ No newline at end of file +} + + +#' Disaggregate the MasterCrosswalk to include the new sectors for disaggregation +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @return crosswalk with aggregated sectors removed +aggregateMasterCrosswalk <- function (model){ + + + agg <- model$DisaggregationSpecs$Aggregation + + crosswalk <- model$crosswalk#temp variable for storing intermediate changes + new_cw <- crosswalk#variable to return with complete changes to crosswalk#temp + + #deterime which rows and columns to modify + cwColIndex <- match(paste0("BEA_", model$specs$BaseIOLevel), colnames(crosswalk)) #search for concatenation of "BEA" and model$specs$BaseIOlevel object in crosswalk column names + OriginalCodeLength <- regexpr(pattern ='/',agg[1]) - 1 #used to determine the length of the sector codes. E.g., detail would be 6, while summary would generally be 3 though variable, and sector would be variable + aggCodeLength <- regexpr(pattern ='/',agg[2]) - 1 #used to determine length of disaggregated sector codes. + + rowIndecesToRemove <- which(new_cw[,cwColIndex] %in% substr(agg[2:length(agg)],1,aggCodeLength)) #find row indeces containing references to the sectors to be aggregated + new_cw <-new_cw[-(rowIndecesToRemove),] #remove rows from model that have the same rownames as values in agg list + + + return(new_cw) + +} + +#' Remove specific rows from the specified list object in the model +#' @param sectorList Model object to be aggregated +#' @param indencesToRemove List of indeces of sectors to remove from list (i.e. aggregated sectors) +#' @return An aggregated sectorList +removeRowsFromList <- function(sectorList, indecesToRemove){ + + newList <- sectorList[-(indecesToRemove),] + + return(newList) + +} From 369b1639d349819a310d1802c8a53ea0a7d78273 Mon Sep 17 00:00:00 2001 From: jvendries Date: Tue, 24 Aug 2021 19:10:04 -0400 Subject: [PATCH 012/319] edited aggregate value added function --- R/AggregationFunctions.R | 143 ++++++++++++++++++++++++++++++++++----- 1 file changed, 127 insertions(+), 16 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 2002e96e..e92ade5a 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -2,34 +2,44 @@ #' @param model Model file loaded with IO tables #' @return An aggregated model. aggregateModel <- function (model){ - + #aggregating economic tables model$MakeTransactions <- aggregateMakeTable(model) model$UseTransactions <- aggregateUseTable(model) model$DomesticUseTransactions <- aggregateUseTable(model, domestic = TRUE) + model$UseValueAdded <- aggregateVA(model) #aggregating Crosswalk model$crosswalk <- aggregateMasterCrosswalk(model) - #aggregating (i.e. removing) sectors from model lists - agg <- model$DisaggregationSpecs$Aggregation[2:length(model$DisaggregationSpecs$Aggregation)]#first item in Aggregation is the sector to aggregate to, not to be removed - comIndecesToRemove <- which(model$Commodities$Code_Loc %in% agg) #find row indeces containing references to the sectors to be aggregated - indIndecesToRemove <- which(model$Industries$Code_Loc %in% agg) + #obtaining indeces to aggregate sectors in rest of model objects + + agg <- model$DisaggregationSpecs$Aggregation + mainComIndex <- getIndex(model$Commodities$Code_Loc, agg[1])#first item in Aggregation is the sector to aggregate to, not to be removed + mainIndIndex <- getIndex(model$Industries$Code_Loc, agg[1]) + comIndecesToAggregate <- which(model$Commodities$Code_Loc %in% agg[2:length(agg)]) #find com indeces containing references to the sectors to be aggregated + indIndecesToAggregate <- which(model$Industries$Code_Loc %in% agg[2:length(agg)]) #find ind indeces containing references to the sectors to be aggregated + #aggregating (i.e. removing) sectors from model lists #aggregate Industry lists - if(length(indIndecesToRemove)!=0){ - model$Industries <- removeRowsFromList(model$Industries, indIndecesToRemove) - model$MultiYearIndustryCPI <- removeRowsFromList(model$MultiYearIndustryCPI, indIndecesToRemove) + if(length(indIndecesToAggregate)!=0){ + model$Industries <- removeRowsFromList(model$Industries, indIndecesToAggregate) + model$MultiYearIndustryCPI <- removeRowsFromList(model$MultiYearIndustryCPI, indIndecesToAggregate) + # model$MultiYearIndustryOutput <- aggregateMultiYearLists(model$MultiYearIndustryOutput, agg) } #aggregate Commodity lists - if(length(comIndecesToRemove !=0)){ - + if(length(comIndecesToAggregate !=0)){ + model$Commodities <- removeRowsFromList(model$Commodities, comIndecesToAggregate) + model$MultiYearCommodityCPI <- removeRowsFromList(model$MultiYearCommodityCPI, comIndecesToAggregate) } + #Calculate new Outputs + model <- calculateOutputs(model) + temp <-1 return(model) @@ -116,7 +126,43 @@ aggregateUseTable <- function(model, domestic = FALSE){ } -#' Aggregate a sector in a table by adding the values from + +#TODO: rewrite this function to use matrix calculations when possible +#' Aggregate the MakeTable based on specified source file +#' @param model Model file loaded with IO tables +#' @return An aggregated MakeTable. +aggregateVA <- function(model){ + + agg <- model$DisaggregationSpecs$Aggregation + logging::loginfo(paste0("Aggregating sectors to'", agg[1], "'.")) + + count <- 1 + + + for (sector in agg){ + + if(count == 1){ + count <- count + 1 + next #first sector in agg is the one we are aggregating to, so skip + } + + model$UseValueAdded <- aggregateSector(model, agg[1], agg[count], "VA") + count <- count + 1 + } + + #remove rows and cols from model + agg <- agg[2:length(agg)] + model$UseValueAdded <- model$UseValueAdded[!(rownames(model$UseValueAdded)) %in% agg,] #remove rows from model that have the same rownames as values in agg list + model$UseValueAdded <- model$UseValueAdded[,!(colnames(model$UseValueAdded)) %in% agg] #as above but with cols + + return(model$UseValueAdded) + +} + + + + +#' Aggregate a sector in a table #' @param model Model file loaded with IO tables #' @param mainSector Sector to aggregate to (string) #' @param sectorToRemove Sector to be aggregated into mainSector, then removed from table (string) @@ -148,7 +194,17 @@ aggregateSector <- function(model, mainSector, sectorToRemove, tableType, domest table <- model$MakeTransactions - }else{ + }else if(tableType == "VA"){ + mainRowIndex <- getIndex(model$ValueAddedMeta$Code_Loc, mainSector) + mainColIndex <- getIndex(model$Industries$Code_Loc, mainSector) + + removeRowIndex <- getIndex(model$ValueAddedMeta$Code_Loc, sectorToRemove) + removeColIndex <- getIndex(model$Industries$Code_Loc, sectorToRemove) + + table <- model$UseValueAdded + + } + else{ #continue } @@ -176,7 +232,8 @@ aggregateSector <- function(model, mainSector, sectorToRemove, tableType, domest #' @return Index of sector in sectorList getIndex <- function(sectorList, sector){ - index <- which(sectorList==sector) + #index <- which(sectorList==sector) + index <- which(sectorList %in% sector) if(length(index)==0){ logging::logwarn(paste0("'", sector, "' string does not occur in current list.'")) @@ -214,12 +271,66 @@ aggregateMasterCrosswalk <- function (model){ #' Remove specific rows from the specified list object in the model #' @param sectorList Model object to be aggregated -#' @param indencesToRemove List of indeces of sectors to remove from list (i.e. aggregated sectors) +#' @param indencesToAggregate List of indeces of sectors to remove from list (i.e. aggregated sectors) #' @return An aggregated sectorList -removeRowsFromList <- function(sectorList, indecesToRemove){ +removeRowsFromList <- function(sectorList, indecesToAggregate){ - newList <- sectorList[-(indecesToRemove),] + newList <- sectorList[-(indecesToAggregate),] return(newList) } + +#' Aggregate specific rows of the MultiYear objects in the model +#' @param sectorList Model object to be aggregated +#' @param agg List of sectors to aggregate +#' @return An aggregated sectorList +aggregateMultiYearLists <- function(sectorList, agg){ + + + newList <- sectorList[-(indecesToRemove),] + + return(newList) + +} + + +#' #' Aggregate Industry Output model objects +#' #' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' #' @param indencesToAggregate List of indeces of sectors to remove from list (i.e. aggregated sectors) +#' #' @return model A complete EEIO model: a list with USEEIO model components and attributes. +#' aggregateIndustryOutput <- function(model, indecesToAggregate) +#' { +#' +#' +#' if(!is.null(model$IndustryOutput)) +#' { +#' newList <- colSums(model$UseTransactions)+colSums(model$UseValueAdded) +#' +#' } +#' +#' newList <- removeRowsFromList(newList, indecesToAggregate) +#' +#' return(newList) +#' +#' } +#' +#' #' Aggregate Commodity Output model objects +#' #' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' #' @param indencesToAggregate List of indeces of sectors to remove from list (i.e. aggregated sectors) +#' #' @return model A complete EEIO model: a list with USEEIO model components and attributes. +#' aggregateCommodityOutput <- function(model, indecesToAggregate) +#' { +#' +#' +#' if(!is.null(model$CommodityOutput)) +#' { +#' newList <- rowSums(model$UseTransactions)+rowSums(model$FinalDemand) +#' +#' } +#' +#' newList <- removeRowsFromList(newList, indecesToAggregate) +#' +#' return(newList) +#' +#' } \ No newline at end of file From 61e88fa353ecd5a0e880a091c88f7e68905dd12b Mon Sep 17 00:00:00 2001 From: jvendries Date: Tue, 24 Aug 2021 23:40:20 -0400 Subject: [PATCH 013/319] function description updates in disaggfunctions --- R/DisaggregateFunctions.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index dbb9ce7a..163a81e4 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -10,7 +10,7 @@ disaggregateModel <- function (model){ if(!is.null(model$DisaggregationSpecs$Aggregation)){ # Handle sector aggregation - #model <- aggregateModel(model) + model <- aggregateModel(model) } counter = 1 @@ -62,7 +62,7 @@ disaggregateModel <- function (model){ } #Disaggregating model$CommodityOutput and model$IndustryOutput objects - model <- disaggregateOutputs(model) + model <- calculateOutputs(model) #Disaggregating MultiyearIndustryOutput and MultiYearCommodityOutput model$MultiYearCommodityOutput <- disaggregateMultiYearOutput(model, disagg, output_type = "Commodity") @@ -85,10 +85,10 @@ disaggregateModel <- function (model){ } -#' Disaggregate Commodity and Industry Output model objects +#' Calculate updated Commodity and Industry Output model objects #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @return model A complete EEIO model: a list with USEEIO model components and attributes. -disaggregateOutputs <- function(model) +calculateOutputs <- function(model) { if(!is.null(model$CommodityOutput)) @@ -174,7 +174,7 @@ disaggregatedRatios <- function(model, disagg, output_type = "Commodity") return(disaggRatios) } -#' Disaggregate Commodity Output model object +#' Disaggregate MultiYear Output model objects #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param disagg Specifications for disaggregating the current Table #' @param output_type A string that indicates whether the Commodity or Industry output should be disaggregated From 6be1a905e531327e2b45f1489ebb594653ece95e Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 25 Aug 2021 01:20:07 -0400 Subject: [PATCH 014/319] edited aggregateMultiYearOutput fuction --- R/AggregationFunctions.R | 68 ++++++++++------------------------------ 1 file changed, 16 insertions(+), 52 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index e92ade5a..d1fb0db2 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -26,15 +26,15 @@ aggregateModel <- function (model){ #aggregate Industry lists if(length(indIndecesToAggregate)!=0){ model$Industries <- removeRowsFromList(model$Industries, indIndecesToAggregate) - model$MultiYearIndustryCPI <- removeRowsFromList(model$MultiYearIndustryCPI, indIndecesToAggregate) + # model$MultiYearIndustryCPI <- removeRowsFromList(model$MultiYearIndustryCPI, indIndecesToAggregate) - # model$MultiYearIndustryOutput <- aggregateMultiYearLists(model$MultiYearIndustryOutput, agg) + model$MultiYearIndustryOutput <- aggregateMultiYearOutput(model$MultiYearIndustryOutput, mainIndIndex, indIndecesToAggregate) } #aggregate Commodity lists if(length(comIndecesToAggregate !=0)){ model$Commodities <- removeRowsFromList(model$Commodities, comIndecesToAggregate) - model$MultiYearCommodityCPI <- removeRowsFromList(model$MultiYearCommodityCPI, comIndecesToAggregate) + # model$MultiYearCommodityCPI <- removeRowsFromList(model$MultiYearCommodityCPI, comIndecesToAggregate) } #Calculate new Outputs @@ -281,56 +281,20 @@ removeRowsFromList <- function(sectorList, indecesToAggregate){ } -#' Aggregate specific rows of the MultiYear objects in the model -#' @param sectorList Model object to be aggregated -#' @param agg List of sectors to aggregate -#' @return An aggregated sectorList -aggregateMultiYearLists <- function(sectorList, agg){ + +#' Aggregate MultiYear Output model objects +#' @param originalOutput MultiYear Output dataframe +#' @param mainIdex Index to aggregate the others to. +#' @param indecesToAggregate List of indeces to aggregate. +#' @return model A dataframe with the disaggregated GDPGrossOutputIO by year. +aggregateMultiYearOutput <- function(originalOutput, mainIndex, indecesToAggregate){ + + newOutput <- originalOutput - newList <- sectorList[-(indecesToRemove),] + newOutput[mainIndex,] <- originalOutput[mainIndex,]+colSums(originalOutput[indecesToAggregate,]) + newOutput <- newOutput[-(indecesToAggregate),] - return(newList) + return(newOutput) -} - - -#' #' Aggregate Industry Output model objects -#' #' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' #' @param indencesToAggregate List of indeces of sectors to remove from list (i.e. aggregated sectors) -#' #' @return model A complete EEIO model: a list with USEEIO model components and attributes. -#' aggregateIndustryOutput <- function(model, indecesToAggregate) -#' { -#' -#' -#' if(!is.null(model$IndustryOutput)) -#' { -#' newList <- colSums(model$UseTransactions)+colSums(model$UseValueAdded) -#' -#' } -#' -#' newList <- removeRowsFromList(newList, indecesToAggregate) -#' -#' return(newList) -#' -#' } -#' -#' #' Aggregate Commodity Output model objects -#' #' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' #' @param indencesToAggregate List of indeces of sectors to remove from list (i.e. aggregated sectors) -#' #' @return model A complete EEIO model: a list with USEEIO model components and attributes. -#' aggregateCommodityOutput <- function(model, indecesToAggregate) -#' { -#' -#' -#' if(!is.null(model$CommodityOutput)) -#' { -#' newList <- rowSums(model$UseTransactions)+rowSums(model$FinalDemand) -#' -#' } -#' -#' newList <- removeRowsFromList(newList, indecesToAggregate) -#' -#' return(newList) -#' -#' } \ No newline at end of file +} \ No newline at end of file From 85c5bca509f4de633111cb2e45de51a5cea6aca8 Mon Sep 17 00:00:00 2001 From: jvendries Date: Tue, 31 Aug 2021 19:48:50 -0400 Subject: [PATCH 015/319] edited aggregate outputs, aggregate multiyear cpi, and aggSatellitetable functions --- R/AggregationFunctions.R | 157 ++++++++++++++++++++++++++++++++++----- 1 file changed, 139 insertions(+), 18 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index d1fb0db2..1fbc0a5c 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -9,13 +9,18 @@ aggregateModel <- function (model){ model$UseTransactions <- aggregateUseTable(model) model$DomesticUseTransactions <- aggregateUseTable(model, domestic = TRUE) model$UseValueAdded <- aggregateVA(model) - + #model$FinalDemand <- aggregateFD(model) #todo + #model$DomesticFinalDemand <- aggregateFD(model) #todo + #model$MarginSectors <- aggregateMarginSectors(model) #todo + #model$Margins <- aggregateMargins(model) + + #model$ValueAddedMeta <- aggregateVAMeta(model) #todo + #model$FinalDemandMeta <- aggregateFDMeta(model) #todo #aggregating Crosswalk model$crosswalk <- aggregateMasterCrosswalk(model) - #obtaining indeces to aggregate sectors in rest of model objects - + #obtaining indeces to aggregate sectors in remaining model objects agg <- model$DisaggregationSpecs$Aggregation mainComIndex <- getIndex(model$Commodities$Code_Loc, agg[1])#first item in Aggregation is the sector to aggregate to, not to be removed mainIndIndex <- getIndex(model$Industries$Code_Loc, agg[1]) @@ -25,26 +30,140 @@ aggregateModel <- function (model){ #aggregating (i.e. removing) sectors from model lists #aggregate Industry lists if(length(indIndecesToAggregate)!=0){ - model$Industries <- removeRowsFromList(model$Industries, indIndecesToAggregate) - # model$MultiYearIndustryCPI <- removeRowsFromList(model$MultiYearIndustryCPI, indIndecesToAggregate) - model$MultiYearIndustryOutput <- aggregateMultiYearOutput(model$MultiYearIndustryOutput, mainIndIndex, indIndecesToAggregate) + model$Industries <- removeRowsFromList(model$Industries, indIndecesToAggregate) + model$MultiYearIndustryCPI <- aggregateMultiYearCPI(model, mainIndIndex, indIndecesToAggregate, "Industry") + model$MultiYearIndustryOutput <- aggregateMultiYearOutput(model$MultiYearIndustryOutput, mainIndIndex, indIndecesToAggregate) + model$IndustryOutput <- aggregateOutputs(model, indIndecesToAggregate, "Industry")#aggregate model$IndustryOutput object } #aggregate Commodity lists if(length(comIndecesToAggregate !=0)){ model$Commodities <- removeRowsFromList(model$Commodities, comIndecesToAggregate) - # model$MultiYearCommodityCPI <- removeRowsFromList(model$MultiYearCommodityCPI, comIndecesToAggregate) + model$MultiYearCommodityCPI <- aggregateMultiYearCPI(model, mainIndIndex, indIndecesToAggregate, "Commodity") + model$MultiYearIndustryOutput <- aggregateMultiYearOutput(model$MultiYearIndustryOutput, mainComIndex, comIndecesToAggregate) + model$CommodityOutput <- aggregateOutputs(model, comIndecesToAggregate, "Commodity")#aggregate model$CommoditOutput object } - #Calculate new Outputs - model <- calculateOutputs(model) - - temp <-1 return(model) } +#' Calculate updated Commodity and Industry Output model objects after aggregation +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param indecesToAggregate List of indeces to aggregate. +#' @param type String to designate either commodity or industry +#' @return An aggregated Industry or Commodity output object. +aggregateOutputs <- function(model, indecesToAggregate, type) +{ + + if(type == "Industry"){ + model$IndustryOutput <- colSums(model$UseTransactions)+colSums(model$UseValueAdded) #calculate new output total + return (model$IndustryOutput) + + }else { #assumes commodity + model$CommodityOutput <- rowSums(model$UseTransactions)+rowSums(model$FinalDemand) + return(model$CommodityOutput) + + } + + +} + + +#TODO: Complete this function +#' Aggregate satellite tables from static file based on specs +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param sattable A standardized satellite table with resource and emission names from original sources. +#' @param sat The abbreviation for the satellite table. +#' @return A standardized satellite table with aggregated sectors added. +aggSatelliteTable <- function (model, sattable, sat){ + + + #if(!is.null(ENV_AGG_FILE)) #TODO: implement option to aggregate according to specified file + #if(FLOWSA) #TODO: implement option to aggregate based on flowsa data (e.g. by NAICS sector as mapped by crosswalk) + #else #Default aggregation: sum up the relevant sectors in tbs + + #obtaining indeces to aggregate sectors in remaining model objects + newSatTable <- sattable + agg <- model$DisaggregationSpecs$Aggregation + + #variable to determine length of Code substring, i.e., code length minus geographic identifer and separator character (e.g. "/US") + codeLength <- nchar(gsub("/.*", "", agg[1])) + aggCodes <- substr(agg,1,codeLength) + + mainIndeces <- getIndex(newSatTable$Sector, aggCodes[1])#row indeces in sattable where the sector field contains the code for the sector to aggregate to + + + for (sectorCode in aggCodes[2:length(aggCodes)]){ + indecesToAggregate <- which(newSatTable$Sector %in% sectorCode) #row indeces in sattable where the Sector field contaisn the codes for the sectors to be aggregated + + if(length(indecesToAggregate) !=0){ + sattableToAgg <- newSatTable[indecesToAggregate,]#get rows corresponding to flows included in the sector to be aggregated + + for(currentRow in 1:nrow(sattableToAgg)){ + + print(paste0(currentRow))#todo remove line + + #get index in sattable that matches the flow in the main sector with the flow in the current sector to be aggregated + sattableMainRowIndex <- which(newSatTable$Sector == aggCodes[1] & newSatTable$Flowable == sattableToAgg$Flowable[currentRow]) + + #add value from sector to add to main sector + newSatTable$FlowAmount[sattableMainRowIndex] <- newSatTable$FlowAmount[sattableMainRowIndex] + sattableToAgg$FlowAmount[currentRow] + + } + + newSatTable <- removeRowsFromList(newSatTable, indecesToAggregate)#remove aggregated sectors + + }else{ + next + } + + }#end for loop + + return(newSatTable) +} + +#' Aggregate MultiYear CPI model objects +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param mainIdex Index to aggregate the others to. +#' @param indecesToAggregate List of indeces to aggregate. +#' @param type String to designate either commodity or industry +#' @return newCPI A dataframe with the aggregatded CPI values by year. +aggregateMultiYearCPI <- function(model, mainIndex, indecesToAggregate, type){ + + if(type == "Industry"){ + + originalCPI <- model$MultiYearIndustryCPI + originalOutput <- model$MultiYearIndustryOutput + + }else { + + originalCPI <- model$MultiYearCommodityCPI + originalOutput <- model$MultiYearCommodityOutput + } + + + newCPI <- originalCPI + + aggOutputs <- originalOutput[mainIndex,] + colSums(originalOutput[indecesToAggregate,])#get aggregated total for all relevant indeces (denominator for ratios) + + mainIndexOutputRatios <- originalOutput[mainIndex,] / aggOutputs #get ratio of sector to be aggregated to + + aggIndecesOutputRatios <- sweep(as.matrix(originalOutput[indecesToAggregate,]),2, as.matrix(aggOutputs), "/") #get ratios of sectors to be aggregated (removed) + + aggIndecesOutputRatios <- data.frame(aggIndecesOutputRatios)#convert back to df. + colnames(aggIndecesOutputRatios) <- colnames(mainIndexOutputRatios) + + newCPI[mainIndex,] <- newCPI[mainIndex,]*mainIndexOutputRatios + colSums(newCPI[indecesToAggregate,]*aggIndecesOutputRatios)#calculating weighted average for main CPI row + + newCPI <- removeRowsFromList(newCPI, indecesToAggregate) + + return(newCPI) + +} + + #TODO: rewrite this function to use matrix calculations when possible #' Aggregate the MakeTable based on specified source file #' @param model Model file loaded with IO tables @@ -129,7 +248,7 @@ aggregateUseTable <- function(model, domestic = FALSE){ #TODO: rewrite this function to use matrix calculations when possible #' Aggregate the MakeTable based on specified source file -#' @param model Model file loaded with IO tables +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @return An aggregated MakeTable. aggregateVA <- function(model){ @@ -232,13 +351,12 @@ aggregateSector <- function(model, mainSector, sectorToRemove, tableType, domest #' @return Index of sector in sectorList getIndex <- function(sectorList, sector){ - #index <- which(sectorList==sector) index <- which(sectorList %in% sector) - if(length(index)==0){ - logging::logwarn(paste0("'", sector, "' string does not occur in current list.'")) - - } + # if(length(index)==0){ + # logging::logwarn(paste0("'", sector, "' string does not occur in current list.'")) + # + # } return(index) @@ -297,4 +415,7 @@ aggregateMultiYearOutput <- function(originalOutput, mainIndex, indecesToAggrega return(newOutput) -} \ No newline at end of file +} + + + From 505b80ba8852ae5f6376c9516fae21303b76897c Mon Sep 17 00:00:00 2001 From: jvendries Date: Tue, 31 Aug 2021 19:49:38 -0400 Subject: [PATCH 016/319] added comments marking places where edits are needed for handling disaggregation from eLCI/flowsa for electricity disaggregation --- R/DisaggregateFunctions.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 163a81e4..00b7a0b2 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -41,6 +41,8 @@ disaggregateModel <- function (model){ header = TRUE, stringsAsFactors = FALSE, colClasses=c("Sector"="character"))} #Need to assign these DFs back to the modelspecs model$DisaggregationSpecs$Disaggregation[[counter]] <- disagg + #Assign flag to disaggregationSpecs indicating ratios or totals. If it has FlowRatio field then assign flag as TRUE, otherwise FALSE.#TODO + logging::loginfo("Initializing Disaggregation of IO tables...") @@ -262,7 +264,7 @@ disaggregateSatelliteTable <- function (model, sattable, sat){ # For each disaggregation: for (disagg in model$DisaggregationSpecs$Disaggregation){ - + #check for flag indicating ratios or totals #TODO if(disagg$OriginalSectorCode %in% sattable$Sector){ default_disaggregation <- FALSE # If satellite table data is provided for the new sector assign it here From cbb4ac3652fce64939b02b4d176d0bcc74322d2a Mon Sep 17 00:00:00 2001 From: jvendries Date: Tue, 31 Aug 2021 23:55:17 -0400 Subject: [PATCH 017/319] adding call to aggregate satellite function --- R/LoadSatellites.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index 595eb55d..ed866cdb 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -140,6 +140,10 @@ conformTbStoIOSchema <- function(tbs, sat_spec, model) { } else if ("NAICS" %in% sat_spec$SectorListSource) { tbs <- mapFlowTotalsbySectorandLocationfromNAICStoBEA(tbs, sat_spec$DataYears[1], model) } + # Check if aggregation is needed based on model metadata + if(!is.null(model$DisaggregationSpecs$Aggregation) & !is.null(sat_spec$StaticFile)){ + tbs <- aggSatelliteTable(model, tbs, sat_spec) + } # Check if disaggregation is needed based on model metadata if(!is.null(model$specs$DisaggregationSpecs) & !is.null(sat_spec$StaticFile)){ tbs <- disaggregateSatelliteTable(model, tbs, sat_spec) From c68b252f4c3f7671ef6fab671ec2263c0d1f3cb0 Mon Sep 17 00:00:00 2001 From: jvendries Date: Tue, 31 Aug 2021 23:55:43 -0400 Subject: [PATCH 018/319] edited input files for disaggregation of electricity --- .../ElectricityDisaggregationDetail_Make.csv | 54 +++++++++---------- .../ElectricityDisaggregationDetail_Use.csv | 4 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail_Make.csv b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail_Make.csv index 115347cf..e16f323b 100644 --- a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail_Make.csv +++ b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail_Make.csv @@ -1,28 +1,28 @@ IndustryCode,CommodityCode,PercentMake,Note -221100/US,221111/US,3.85E-02,Default allocation -221100/US,22111A/US,2.17E-01,Default allocation -221100/US,22111B/US,1.73E-01,Default allocation -221100/US,22111C/US,2.97E-03,Default allocation -221100/US,221113/US,1.11E-01,Default allocation -221100/US,221114/US,6.14E-04,Default allocation -221100/US,221115/US,1.98E-02,Default allocation -221100/US,221116/US,2.21E-03,Default allocation -221100/US,221117/US,1.01E-02,Default allocation -221100/US,221118/US,6.90E-04,Default allocation -221100/US,221121/US,1.11E-01,Default allocation -221100/US,221122/US,3.13E-01,Default allocation -221100/US,221111/US,3.85E-02,Make table intersection -221100/US,22111A/US,2.17E-01,Make table intersection -221100/US,22111B/US,1.73E-01,Make table intersection -221100/US,22111C/US,2.97E-03,Make table intersection -221100/US,221113/US,1.11E-01,Make table intersection -221100/US,221114/US,6.14E-04,Make table intersection -221100/US,221115/US,1.98E-02,Make table intersection -221100/US,221116/US,2.21E-03,Make table intersection -221100/US,221117/US,1.01E-02,Make table intersection -221100/US,221118/US,6.90E-04,Make table intersection -221100/US,221121/US,1.11E-01,Make table intersection -221100/US,221122/US,3.13E-01,Make table intersection -221200/US,22111B/US,1.00E+00,Commodity disaggregation -22111B/US,221200/US,1.00E+00,Industry disaggregation -22111B/US,486000/US,1.00E+00,Industry disaggregation +221100/US,221111/US,3.85304E-02,Default allocation +221100/US,22111A/US,2.17043E-01,Default allocation +221100/US,22111B/US,1.73208E-01,Default allocation +221100/US,22111C/US,2.97408E-03,Default allocation +221100/US,221113/US,1.10531E-01,Default allocation +221100/US,221114/US,6.14173E-04,Default allocation +221100/US,221115/US,1.98486E-02,Default allocation +221100/US,221116/US,2.21230E-03,Default allocation +221100/US,221117/US,1.01050E-02,Default allocation +221100/US,221118/US,6.90318E-04,Default allocation +221100/US,221121/US,1.11111E-01,Default allocation +221100/US,221122/US,3.13131E-01,Default allocation +221100/US,221111/US,3.85304E-02,Make table intersection +221100/US,22111A/US,2.17043E-01,Make table intersection +221100/US,22111B/US,1.73208E-01,Make table intersection +221100/US,22111C/US,2.97408E-03,Make table intersection +221100/US,221113/US,1.10531E-01,Make table intersection +221100/US,221114/US,6.14173E-04,Make table intersection +221100/US,221115/US,1.98486E-02,Make table intersection +221100/US,221116/US,2.21230E-03,Make table intersection +221100/US,221117/US,1.01050E-02,Make table intersection +221100/US,221118/US,6.90318E-04,Make table intersection +221100/US,221121/US,1.11111E-01,Make table intersection +221100/US,221122/US,3.13131E-01,Make table intersection +221200/US,22111B/US,1.00000E+00,Commodity disaggregation +22111B/US,221200/US,1.00000E+00,Industry disaggregation +22111B/US,486000/US,1.00000E+00,Industry disaggregation diff --git a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail_Use.csv b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail_Use.csv index 395b3dcf..0a04314c 100644 --- a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail_Use.csv +++ b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail_Use.csv @@ -167,5 +167,5 @@ IndustryCode,CommodityCode,PercentUsed,Note 221122/US,221118/US,2.12E-04,Use table intersection 221122/US,221121/US,3.41E-02,Use table intersection 221122/US,221122/US,9.61E-02,Use table intersection -22111B,211000,1.00E+00,Industry disaggregation -22111A,212100,1.00E+00,Industry disaggregation +22111B/US,211000/US,1.00E+00,Industry disaggregation +22111A/US,212100/US,1.00E+00,Industry disaggregation From b7325a9bc86087c4f5417a551e366046849b4063 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 1 Sep 2021 14:48:28 -0400 Subject: [PATCH 019/319] add env allocation factors --- .../ElectricityDisaggregation_Env.csv | 1182 +++++++++++++++++ 1 file changed, 1182 insertions(+) create mode 100644 inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv diff --git a/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv b/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv new file mode 100644 index 00000000..a48c577d --- /dev/null +++ b/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv @@ -0,0 +1,1182 @@ +"Flowable","Context","FlowUUID","Sector","FlowRatio" +"1-Butanol","emission/air","4d774f37-eb69-3045-80c4-6b3f57c6fddd","22111B",1 +"1-Butanol","emission/ground","518c3bcc-ac29-3302-9159-20a1350e0c86","22111B",1 +"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","221111",0.00530866998637146 +"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","221113",0.000705206334189522 +"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","221115",0.000166941758575884 +"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","22111A",8.81507917736903e-05 +"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","22111B",0.993731031129089 +"1,1-Dichloroethane","emission/air","ad60660d-a560-3357-b658-773a915bfb92","221117",0.954932954683608 +"1,1-Dichloroethane","emission/air","ad60660d-a560-3357-b658-773a915bfb92","22111A",0.0450670453163923 +"1,1-Dichloroethylene","emission/air","af1f4d83-5b7d-3b3f-b9a9-a95e80daf466","221117",0.649196061827387 +"1,1-Dichloroethylene","emission/air","af1f4d83-5b7d-3b3f-b9a9-a95e80daf466","22111A",0.350803938172613 +"1,1-Dichloroethylene","emission/water","7a2c7e46-dbf6-34ff-8b7d-a434506535b2","22111A",0.551781551781552 +"1,1-Dichloroethylene","emission/water","7a2c7e46-dbf6-34ff-8b7d-a434506535b2","22111B",0.448218448218448 +"1,1-Dimethylhydrazine","emission/air","d5124a15-fd4d-3dfa-a02c-a9a32d8c336c","22111B",1 +"1,1,1-Trichloroethane","emission/air","0c56aee4-7e22-3e85-8e83-34829f3e8304","221117",0.665956229790924 +"1,1,1-Trichloroethane","emission/air","0c56aee4-7e22-3e85-8e83-34829f3e8304","22111A",0.257683461923826 +"1,1,1-Trichloroethane","emission/air","0c56aee4-7e22-3e85-8e83-34829f3e8304","22111B",0.0762365414738291 +"1,1,1-Trichloroethane","emission/air","0c56aee4-7e22-3e85-8e83-34829f3e8304","22111C",0.000123766811421117 +"1,1,1-Trichloroethane","emission/water","23bc29c9-5fa5-3269-b560-1d4b7a20842d","22111B",1 +"1,1,2-Trichloroethane","emission/air","2e6af10c-ada7-3e44-9243-3fc7dd9f580d","221117",0.629025250651619 +"1,1,2-Trichloroethane","emission/air","2e6af10c-ada7-3e44-9243-3fc7dd9f580d","22111A",0.363733532881317 +"1,1,2-Trichloroethane","emission/air","2e6af10c-ada7-3e44-9243-3fc7dd9f580d","22111B",0.00724121646706408 +"1,1,2,2-Tetrachloroethane","emission/air","93c46787-fe26-3ebd-84b1-25ae486ef58d","221114",0.0129274449691907 +"1,1,2,2-Tetrachloroethane","emission/air","93c46787-fe26-3ebd-84b1-25ae486ef58d","221117",0.935338945720704 +"1,1,2,2-Tetrachloroethane","emission/air","93c46787-fe26-3ebd-84b1-25ae486ef58d","22111A",0.0508581218365174 +"1,1,2,2-Tetrachloroethane","emission/air","93c46787-fe26-3ebd-84b1-25ae486ef58d","22111B",0.000875487473587575 +"1,2-Dibromo-3-chloropropane","emission/air","707d6cd3-d2d2-383e-9852-bf063efcd75c","22111A",1 +"1,2-Dichloroethane","emission/air","c2d517e6-4c5d-3002-8a0d-54434c5a3bae","221117",0.0958901468219984 +"1,2-Dichloroethane","emission/air","c2d517e6-4c5d-3002-8a0d-54434c5a3bae","22111A",0.887215829553104 +"1,2-Dichloroethane","emission/air","c2d517e6-4c5d-3002-8a0d-54434c5a3bae","22111B",0.0159948796717226 +"1,2-Dichloroethane","emission/air","c2d517e6-4c5d-3002-8a0d-54434c5a3bae","22111C",0.000899143953175124 +"1,2-Dichloroethane","emission/water","b7503034-5946-3ef9-8fa9-ec016ce41da9","22111A",0.787783298994061 +"1,2-Dichloroethane","emission/water","b7503034-5946-3ef9-8fa9-ec016ce41da9","22111B",0.212216701005939 +"1,2-Dichloropropane","emission/air","3e75730b-5d6d-3dc1-8911-c7fdfe0e5190","221117",0.526030999557496 +"1,2-Dichloropropane","emission/air","3e75730b-5d6d-3dc1-8911-c7fdfe0e5190","22111A",0.0106016836798425 +"1,2-Dichloropropane","emission/air","3e75730b-5d6d-3dc1-8911-c7fdfe0e5190","22111B",0.463367316762661 +"1,2-Dichloropropane","emission/water","a26535d8-fd0d-3629-99de-7864c5dc78d0","22111B",1 +"1,2,3-Trichloropropane","emission/air","27280e4a-ec1a-339d-990e-bb5a8a225663","22111B",1 +"1,2,4-Trichlorobenzene","emission/air","2b548673-879c-3885-afe9-2439ce6a47f1","22111A",0.805842475150833 +"1,2,4-Trichlorobenzene","emission/air","2b548673-879c-3885-afe9-2439ce6a47f1","22111B",0.194157524849167 +"1,2,4-Trimethylbenzene","emission/air","37ea99ef-1be1-38e3-b5f4-8bbe233b6843","22111A",0.0305492286441796 +"1,2,4-Trimethylbenzene","emission/air","37ea99ef-1be1-38e3-b5f4-8bbe233b6843","22111B",0.96305269533616 +"1,2,4-Trimethylbenzene","emission/air","37ea99ef-1be1-38e3-b5f4-8bbe233b6843","22111C",0.0063980760196605 +"1,2,4-Trimethylbenzene","emission/ground","c128dfdb-e9be-3ea3-b64e-a27ba8d81d23","22111C",1 +"1,2,4-Trimethylbenzene","emission/water","a451a5f6-30e6-37d5-ac4b-ab75b81e79e3","22111C",1 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221111",0.00214463899505005 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221113",0.000161513207115927 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221114",0.000867932832742862 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221115",3.29468163420496e-05 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221117",0.00187371882040241 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","22111A",0.00046355316206781 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","22111B",0.973991867309676 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","22111C",0.0204638288566029 +"1,3-Dichloropropene","emission/air","1cb3814f-067b-3f04-af78-4f6ad4c132b7","221117",0.0184082635690203 +"1,3-Dichloropropene","emission/air","1cb3814f-067b-3f04-af78-4f6ad4c132b7","22111A",0.981560641391167 +"1,3-Dichloropropene","emission/air","1cb3814f-067b-3f04-af78-4f6ad4c132b7","22111B",3.10950398125342e-05 +"1,4-Dioxane","emission/air","f5fa456c-34ed-39a3-868a-377e30ed76c6","22111B",1 +"1,4-Dioxane","emission/water","b51f43e4-5a5f-3eb7-921f-6d3746d33fb6","22111B",1 +"2-Chloroacetophenone","emission/air","0bf913b1-486a-3ce1-991b-d1e8687b67e0","221117",0.000753963449830042 +"2-Chloroacetophenone","emission/air","0bf913b1-486a-3ce1-991b-d1e8687b67e0","22111A",0.983780690791678 +"2-Chloroacetophenone","emission/air","0bf913b1-486a-3ce1-991b-d1e8687b67e0","22111B",0.0144974612747079 +"2-Chloroacetophenone","emission/air","0bf913b1-486a-3ce1-991b-d1e8687b67e0","22111C",0.000967884483784369 +"2-Chloronaphthalene","emission/air","3471d156-1b5e-34c1-b47f-73403c7eeda9","221117",1 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221111",0.001457734537172 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221113",0.000195312087233833 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221115",4.58411569361317e-05 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221117",0.000509746183120315 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221118",8.29410393056795e-07 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","22111A",0.000180604247619911 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","22111B",0.997563893491301 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","22111C",4.60388862233757e-05 +"2-Propen-1-ol","emission/air","cf98105a-0886-3a36-a4c4-3a951da54e52","22111B",1 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","221111",0.000126113934881314 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","221113",1.17095610365998e-05 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","221115",4.05090363251701e-06 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","221117",0.00985099062574706 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","22111A",0.00245020249865305 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","22111B",0.987553972236979 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","22111C",2.96023907003241e-06 +"2,3,7,8-Tetrachlorodibenzo-p-dioxin","emission/water","c7e05642-0ebb-3835-8654-21192725df17","22111B",1 +"2,4-Dimethylphenol","emission/water","c979ddf8-5576-36eb-bc76-040e01f99cc6","22111C",1 +"2,4-Dinitrophenol","emission/air","aa1aac60-dfbe-32b9-9203-81a6c58a340b","221117",0.0135660543697092 +"2,4-Dinitrophenol","emission/air","aa1aac60-dfbe-32b9-9203-81a6c58a340b","22111A",0.986121560659601 +"2,4-Dinitrophenol","emission/air","aa1aac60-dfbe-32b9-9203-81a6c58a340b","22111B",0.000312384970690011 +"2,4-Dinitrotoluene","emission/air","7fdbc046-29ad-3377-a9c1-a45031e0cd53","221117",5.95036350704371e-05 +"2,4-Dinitrotoluene","emission/air","7fdbc046-29ad-3377-a9c1-a45031e0cd53","22111A",0.998718279781412 +"2,4-Dinitrotoluene","emission/air","7fdbc046-29ad-3377-a9c1-a45031e0cd53","22111B",0.00114583003688043 +"2,4-Dinitrotoluene","emission/air","7fdbc046-29ad-3377-a9c1-a45031e0cd53","22111C",7.6386546637354e-05 +"2,4-Toluenediamine","emission/air","e6301ab3-57fe-3b52-b315-9870d45055ab","22111A",1 +"2,4,5-Trichlorophenol","emission/air","dfe2fcba-feff-3e93-be27-4f46cca1e887","22111A",1 +"2,4,6-Trichlorophenol","emission/air","b6e5d387-9d6a-304d-9438-db81eb4da4f3","221117",0.000945012808948242 +"2,4,6-Trichlorophenol","emission/air","b6e5d387-9d6a-304d-9438-db81eb4da4f3","22111A",0.999054987191052 +"3-Methylcholanthrene","emission/air","9a75a979-3c99-3b02-9944-baa838fe12ac","221117",0.00799862172066787 +"3-Methylcholanthrene","emission/air","9a75a979-3c99-3b02-9944-baa838fe12ac","22111A",0.0236777503448967 +"3-Methylcholanthrene","emission/air","9a75a979-3c99-3b02-9944-baa838fe12ac","22111B",0.959646858018995 +"3-Methylcholanthrene","emission/air","9a75a979-3c99-3b02-9944-baa838fe12ac","22111C",0.00867676991544018 +"3,3'-Dichlorobenzidine","emission/air","62f3e781-d884-3080-9344-dded2766ff3b","22111A",1 +"5-Methylchrysene","emission/air","647cac25-44c0-35e5-88c8-8935f2660071","221117",0.00419277804834081 +"5-Methylchrysene","emission/air","647cac25-44c0-35e5-88c8-8935f2660071","22111A",0.914224247356286 +"5-Methylchrysene","emission/air","647cac25-44c0-35e5-88c8-8935f2660071","22111B",0.0761986249777486 +"5-Methylchrysene","emission/air","647cac25-44c0-35e5-88c8-8935f2660071","22111C",0.00538434961762502 +"7,12-Dimethylbenz[a]anthracene","emission/air","675d27f1-91b6-3a26-b747-2d8f5fdfa02f","221117",0.00816477107683903 +"7,12-Dimethylbenz[a]anthracene","emission/air","675d27f1-91b6-3a26-b747-2d8f5fdfa02f","22111A",0.0228879691833641 +"7,12-Dimethylbenz[a]anthracene","emission/air","675d27f1-91b6-3a26-b747-2d8f5fdfa02f","22111B",0.960103042498736 +"7,12-Dimethylbenz[a]anthracene","emission/air","675d27f1-91b6-3a26-b747-2d8f5fdfa02f","22111C",0.00884421724106069 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","221111",0.00118538806017473 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","221113",0.000552947543353144 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","221115",3.89094290831571e-05 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","221117",0.00745535033047092 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","22111A",0.908926485612338 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","22111B",0.0808723583068929 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","22111C",0.000968560717686878 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","221111",0.00467728478857293 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","221113",0.000859679458886931 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","221115",0.000154624026690903 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","221117",0.0279568161985466 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","22111A",0.0260075686406769 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","22111B",0.937826193693977 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","22111C",0.00251783319264907 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221111",0.00590881192999846 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221113",0.000116857700749712 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221114",1.45632626879984e-05 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221115",3.32620511089553e-06 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221117",0.029259065301036 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","22111A",0.379687850412972 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","22111B",0.584285557728713 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","22111C",0.000723967458731521 +"Acetaldehyde","emission/water","3f8a34ba-763d-3596-84fc-736361389987","22111B",1 +"Acetonitrile","emission/air","c8105d36-b64a-3b20-92bb-0208703c96a4","22111A",0.210473313192346 +"Acetonitrile","emission/air","c8105d36-b64a-3b20-92bb-0208703c96a4","22111B",0.789526686807654 +"Acetophenone","emission/air","8384736f-93e4-3edc-af93-47bdc7ef9fc7","221117",0.00034551812856489 +"Acetophenone","emission/air","8384736f-93e4-3edc-af93-47bdc7ef9fc7","22111A",0.985709425603557 +"Acetophenone","emission/air","8384736f-93e4-3edc-af93-47bdc7ef9fc7","22111B",0.0130713649801835 +"Acetophenone","emission/air","8384736f-93e4-3edc-af93-47bdc7ef9fc7","22111C",0.000873691287695105 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221111",0.00268784200339014 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221113",6.38647476228946e-05 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221114",0.00211413323003005 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221115",4.80526879120865e-06 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221117",0.219361126604094 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","22111A",0.537716182233147 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","22111B",0.237380702851223 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","22111C",0.000671343061701401 +"Acrylonitrile","emission/air","f5bb2d1e-1a7a-3587-8922-d711ec7e6ea4","221114",0.00717570414603722 +"Acrylonitrile","emission/air","f5bb2d1e-1a7a-3587-8922-d711ec7e6ea4","221117",0.644444521252188 +"Acrylonitrile","emission/air","f5bb2d1e-1a7a-3587-8922-d711ec7e6ea4","22111A",0.32335794689378 +"Acrylonitrile","emission/air","f5bb2d1e-1a7a-3587-8922-d711ec7e6ea4","22111B",0.025021827707995 +"Adsorbable organic halides","emission/water","22db4f89-a507-39e6-9ef5-8e2e673bdcf9","22111B",1 +"Allyl chloride","emission/air","932a90ce-237d-3fcf-a438-713df66eee60","22111A",1 +"Aluminum","emission/air","314e4cef-5385-3262-bdb6-a756c7817579","221118",1 +"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","221113",0.00219341756296497 +"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","221114",0.000891281661270903 +"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","221117",0.000104293257080058 +"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","22111A",0.603041874015321 +"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","22111B",0.393769133503363 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221111",0.00205786571437508 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221113",4.96342335176807e-05 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221114",0.000599196706303874 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221116",0.000632200677264249 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221117",0.0252549246864441 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221118",0.00495896105953707 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","22111A",0.257384713942108 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","22111B",0.701593029720258 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","22111C",0.00746947326019165 +"Ammonia","emission/ground","1633cea3-311a-3667-a428-419522a8065d","22111A",1 +"Ammonia","emission/water","2d117fdd-370d-331c-b07c-b0172c4a10ef","22111A",0.544184943460225 +"Ammonia","emission/water","2d117fdd-370d-331c-b07c-b0172c4a10ef","22111B",0.455815056539775 +"Aniline","emission/air","8cd61983-018e-388a-88f1-dd026900572a","22111A",1 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","221111",0.00844155208097653 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","221113",0.00133754750216408 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","221115",0.000279175730807095 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","221117",0.146972613119343 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","22111A",0.212875871094173 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","22111B",0.626146489022281 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","22111C",0.00394675145025531 +"Anthracene","emission/ground","a6317c2a-8158-37db-bb2c-5ae4b1219d44","22111A",0.722222222222222 +"Anthracene","emission/ground","a6317c2a-8158-37db-bb2c-5ae4b1219d44","22111B",0.277777777777778 +"Anthracene","emission/water","627ef3a5-9a70-3fb9-8bb7-2792eddec502","22111C",1 +"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","221117",0.00902630849358238 +"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","221118",0.00108215580071407 +"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","22111A",0.817148888152601 +"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","22111B",0.147405393011013 +"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","22111C",0.0253372545420892 +"Antimony","emission/water","dde20124-511b-3e0d-8834-5ddd88e15cba","221117",3.60235305701684e-06 +"Antimony","emission/water","dde20124-511b-3e0d-8834-5ddd88e15cba","22111A",0.580074424614158 +"Antimony","emission/water","dde20124-511b-3e0d-8834-5ddd88e15cba","22111B",0.419921973032785 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221111",4.68910844884048e-06 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221113",6.88249874491178e-05 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221114",2.40323406691013e-06 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221116",3.51685827005052e-05 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221117",0.00867216678082411 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221118",4.36730104395758e-05 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","22111A",0.93796544771784 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","22111B",0.0515264264616952 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","22111C",0.00168120011653568 +"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","221113",0.0611270928718908 +"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","221114",0.000386571644392111 +"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","221117",0.000137734559796674 +"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","22111A",0.82906976884918 +"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","22111B",0.109270329443928 +"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","22111C",8.50263081249218e-06 +"Asbestos","emission/air","5c8e293a-4009-30d8-a003-43add9e779f7","22111B",1 +"Atrazine","emission/water","fb555654-c1ae-3a4c-be73-4e52bd420d80","22111A",1 +"Barium","emission/air","2c5aef1c-7cf7-30ee-8a87-ba4682327767","22111A",1 +"Barium","emission/water","a1e9b66c-ac46-35e8-bba3-318f6556a90f","221111",1.78119362085015e-06 +"Barium","emission/water","a1e9b66c-ac46-35e8-bba3-318f6556a90f","221117",6.01774962949311e-05 +"Barium","emission/water","a1e9b66c-ac46-35e8-bba3-318f6556a90f","22111A",0.999810006867451 +"Barium","emission/water","a1e9b66c-ac46-35e8-bba3-318f6556a90f","22111B",0.000128034442632883 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221111",0.000148962672150322 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221113",6.81840861670877e-05 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221114",3.26219051098731e-08 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221115",2.61273085082454e-06 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221117",0.000295471807918473 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","22111A",0.18609985610727 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","22111B",0.787002063148568 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","22111C",0.02638281682517 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221111",0.00169919442190644 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221113",0.000630187373076082 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221114",0.00427220067266338 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221115",2.9509146524868e-06 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221116",0.0168902691619712 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221117",0.0974099451114942 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221118",2.52803832102564e-05 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","22111A",0.633955183870327 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","22111B",0.240716609080789 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","22111C",0.00439817900990965 +"Benzene","emission/ground","2d8e739c-9364-34bd-871d-3fcbd081a024","22111B",1 +"Benzene","emission/water","67999cea-e58a-3044-95a9-4b45269260fd","22111B",0.978762779822855 +"Benzene","emission/water","67999cea-e58a-3044-95a9-4b45269260fd","22111C",0.0212372201771449 +"Benzidine","emission/air","dba08d49-f7e0-3dc0-b270-769f70847da3","22111A",1 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","221111",0.0101316463893375 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","221113",0.00659001247146526 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","221115",0.000330967114807845 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","221117",0.0441431528123294 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","22111A",0.130115340844559 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","22111B",0.675990550732514 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","22111C",0.132698329634987 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","221111",5.95740632699292e-05 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","221113",5.42683197134088e-06 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","221115",1.96831156998317e-06 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","221117",0.00821498744802333 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","22111A",0.233983846064895 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","22111B",0.751229929777679 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","22111C",0.00650426750259054 +"Benzo[e]pyrene","emission/air","70fedc48-3895-3b66-9a00-e2e5958d51b8","221117",0.000705649385436802 +"Benzo[e]pyrene","emission/air","70fedc48-3895-3b66-9a00-e2e5958d51b8","22111A",0.000914831273912315 +"Benzo[e]pyrene","emission/air","70fedc48-3895-3b66-9a00-e2e5958d51b8","22111B",0.998379519340651 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221111",0.00121179983359312 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221113",9.44335615049588e-05 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221115",4.00675339649889e-05 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221117",0.00212735606154973 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221118",0.0179791281181664 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","22111A",0.895993015360432 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","22111B",0.0821042302964809 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","22111C",0.0004499692343084 +"Benzo[ghi]perylene","emission/ground","b0e46dc9-3a43-3b7a-a6df-d62308d7275e","22111A",0.0156888272958831 +"Benzo[ghi]perylene","emission/ground","b0e46dc9-3a43-3b7a-a6df-d62308d7275e","22111B",0.984311172704117 +"Benzo[ghi]perylene","emission/water","5f75a7a8-003b-30a7-8f41-f83791efd349","22111A",0.0816912186722786 +"Benzo[ghi]perylene","emission/water","5f75a7a8-003b-30a7-8f41-f83791efd349","22111B",0.0191314329443275 +"Benzo[ghi]perylene","emission/water","5f75a7a8-003b-30a7-8f41-f83791efd349","22111C",0.899177348383394 +"Benzo[j]fluoranthene","emission/air","2720872f-5354-349c-b2bb-3ef19cc88733","22111A",1 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","221111",0.0513089360848572 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","221113",0.00356731605141768 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","221115",0.00169743229064968 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","221117",0.0841353682253754 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","22111A",0.036060340884101 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","22111B",0.806339353155823 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","22111C",0.0168912533077763 +"Benzofluoranthene","emission/air","24cfa2d1-ba72-371f-9d3f-cc121bc063f1","221113",7.43615794993349e-05 +"Benzofluoranthene","emission/air","24cfa2d1-ba72-371f-9d3f-cc121bc063f1","22111A",0.999891481647521 +"Benzofluoranthene","emission/air","24cfa2d1-ba72-371f-9d3f-cc121bc063f1","22111B",3.41567729792325e-05 +"Benzyl chloride","emission/air","f0616d3c-8ad2-364a-aaae-42f0651f32e8","221117",0.000825527319384365 +"Benzyl chloride","emission/air","f0616d3c-8ad2-364a-aaae-42f0651f32e8","22111A",0.982241204323591 +"Benzyl chloride","emission/air","f0616d3c-8ad2-364a-aaae-42f0651f32e8","22111B",0.0158735152833816 +"Benzyl chloride","emission/air","f0616d3c-8ad2-364a-aaae-42f0651f32e8","22111C",0.00105975307364348 +"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","221113",0.000215204702832989 +"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","221116",1.83137717554675e-06 +"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","221117",0.00431766761888397 +"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","22111A",0.966897009683047 +"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","22111B",0.027748358411903 +"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","22111C",0.000819928206157186 +"Beryllium","emission/water","c00fa432-1dcc-3bf3-870f-4043c05cc887","221113",0.0951945777168532 +"Beryllium","emission/water","c00fa432-1dcc-3bf3-870f-4043c05cc887","22111A",0.852448404538877 +"Beryllium","emission/water","c00fa432-1dcc-3bf3-870f-4043c05cc887","22111B",0.0523570177442693 +"Bicarbonate","emission/water","14019299-4013-3351-af2d-287fee154b97","22111A",1 +"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","221111",0.000328045718150876 +"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","221113",0.00630554199009605 +"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","221117",0.86215122968388 +"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","22111A",0.0330368045167025 +"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","22111B",0.0844218730049369 +"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","22111C",0.0137565050862332 +"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","221114",0.455686184174478 +"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","221117",0.0132005508304943 +"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","22111A",0.385111084765863 +"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","22111B",0.145821920965572 +"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","22111C",0.000180259263592806 +"Bis(2-chloro-1-methylethyl) ether","emission/air","45bc39bd-b2b3-313a-a0b2-1374b42fdd76","22111B",1 +"Boron","emission/water","57152560-592a-383f-89b1-a77d7d432ad8","221113",0.0167355288202495 +"Boron","emission/water","57152560-592a-383f-89b1-a77d7d432ad8","221117",1.05518588072987e-05 +"Boron","emission/water","57152560-592a-383f-89b1-a77d7d432ad8","22111A",0.98324964814078 +"Boron","emission/water","57152560-592a-383f-89b1-a77d7d432ad8","22111B",4.27118016300689e-06 +"Bromide","emission/water","7d2d94b8-a7a3-3670-b74d-1fc75b7ed55e","221113",0.0214253961602676 +"Bromide","emission/water","7d2d94b8-a7a3-3670-b74d-1fc75b7ed55e","22111A",0.184641476277436 +"Bromide","emission/water","7d2d94b8-a7a3-3670-b74d-1fc75b7ed55e","22111B",0.210446299037539 +"Bromide","emission/water","7d2d94b8-a7a3-3670-b74d-1fc75b7ed55e","22111C",0.583486828524757 +"Bromine chloride","emission/water","22f3666b-f55a-32d8-931f-efab6ec3cf6b","22111B",1 +"Bromine","emission/air","b3c70893-3c45-341e-903a-3dd226382175","22111A",1 +"Butyraldehyde","emission/air","8478ff8e-de38-3935-9d16-d1bad2ae179c","22111B",1 +"Butyraldehyde","emission/ground","57a7f9c6-ddd5-309f-a649-76b6ee2ee698","22111B",1 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221111",2.70960434552523e-05 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221113",0.000279680029908436 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221114",1.99977424816819e-06 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221116",8.15794856717273e-07 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221117",0.0101834128599021 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221118",0.00874933351530136 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","22111A",0.507239845492535 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","22111B",0.456648061156291 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","22111C",0.0168697553335021 +"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","221113",0.191973059282297 +"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","221117",0.000714827654746219 +"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","22111A",0.641923883120178 +"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","22111B",0.165358012611144 +"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","22111C",3.02173316347454e-05 +"Calcium cyanamide","emission/air","f560910e-8f3f-3684-b860-f9b9d880962d","22111A",1 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221111",1.06608877822941e-05 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221113",5.25357011266205e-06 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221114",5.61219889796574e-05 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221115",3.01034810663653e-07 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221116",0.000668326663345179 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221117",0.0162539418625371 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221118",0.000294223289338801 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","22111A",0.6453392460556 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","22111B",0.335823326994212 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","22111C",0.00154859765328227 +"Carbon disulfide","emission/air","5fe16b97-3332-38eb-8030-b62db19473eb","221117",0.0224695187952311 +"Carbon disulfide","emission/air","5fe16b97-3332-38eb-8030-b62db19473eb","22111A",0.943723692145847 +"Carbon disulfide","emission/air","5fe16b97-3332-38eb-8030-b62db19473eb","22111B",0.0150295103944279 +"Carbon disulfide","emission/air","5fe16b97-3332-38eb-8030-b62db19473eb","22111C",0.0187772786644938 +"Carbon disulfide","emission/water","ea1403e6-a4ce-3fe0-9d94-7df7ae84136e","221111",1 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221111",0.000790871482826981 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221113",0.000385035070894547 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221114",6.77487332015084e-05 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221115",2.34478998171224e-05 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221117",0.0395387659761018 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221118",0.104379702705686 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","22111A",0.643523401894455 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","22111B",0.208155002291108 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","22111C",0.00313602394590931 +"Carbon tetrachloride","emission/air","f7467352-e7d9-3924-b763-f26bb26ce4cc","221117",0.14658645269949 +"Carbon tetrachloride","emission/air","f7467352-e7d9-3924-b763-f26bb26ce4cc","22111A",0.00643347790732735 +"Carbon tetrachloride","emission/air","f7467352-e7d9-3924-b763-f26bb26ce4cc","22111B",0.846980069393182 +"Carbon tetrachloride","emission/water","134672e2-bb82-3ecb-8cd8-e8adcc51c1fa","221111",0.725560538116592 +"Carbon tetrachloride","emission/water","134672e2-bb82-3ecb-8cd8-e8adcc51c1fa","22111A",0.274439461883408 +"Carbonyl sulfide","emission/air","217a8343-2afd-3588-a873-cd15e89d07a1","221117",0.57965709614457 +"Carbonyl sulfide","emission/air","217a8343-2afd-3588-a873-cd15e89d07a1","22111A",0.0651868638000563 +"Carbonyl sulfide","emission/air","217a8343-2afd-3588-a873-cd15e89d07a1","22111C",0.355156040055373 +"Catechol","emission/air","c4ca45c2-8a21-3a9e-b43f-913c1fe716f4","22111A",1 +"Catechol","emission/water","3d945f59-07c2-3209-9421-0ed57a7e33a1","22111B",1 +"CFC-113","emission/air","73a8e096-9a30-38da-9f1a-e47d7cd86630","22111B",1 +"CFC-12","emission/water","5c12bffd-a02e-30b3-baf7-7d3d9e2dfa3b","221113",1 +"Chemical Oxygen Demand","emission/water","924cc8cf-ddf6-3b1a-9fbe-489c095c1f01","221117",0.00665396188132882 +"Chemical Oxygen Demand","emission/water","924cc8cf-ddf6-3b1a-9fbe-489c095c1f01","22111A",0.270063870045 +"Chemical Oxygen Demand","emission/water","924cc8cf-ddf6-3b1a-9fbe-489c095c1f01","22111B",0.723282168073671 +"Chloride","emission/water","b415204e-1506-3fc6-8e4b-97f8e64403b8","221113",0.00351648489855944 +"Chloride","emission/water","b415204e-1506-3fc6-8e4b-97f8e64403b8","221117",3.1312889063898e-05 +"Chloride","emission/water","b415204e-1506-3fc6-8e4b-97f8e64403b8","22111A",0.511022082910833 +"Chloride","emission/water","b415204e-1506-3fc6-8e4b-97f8e64403b8","22111B",0.485430119301543 +"Chlorides and sulfates, total","emission/water","1fd6ca1f-26bf-3d26-8170-55746d2e2522","221117",1 +"Chlorinated phenols","emission/water","1c90831d-9f61-3b97-8ac9-79ef57fb40ee","22111B",1 +"Chlorine dioxide","emission/air","ffbf17ac-259f-3767-a03f-e0545b860282","22111B",1 +"Chlorine","emission/air","c4da1480-4f19-3d01-8f04-8432c38991b1","221117",0.0984069661503501 +"Chlorine","emission/air","c4da1480-4f19-3d01-8f04-8432c38991b1","221118",2.12512842512547e-05 +"Chlorine","emission/air","c4da1480-4f19-3d01-8f04-8432c38991b1","22111A",0.82424683539134 +"Chlorine","emission/air","c4da1480-4f19-3d01-8f04-8432c38991b1","22111B",0.0773249471740588 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","221111",0.000262582395718067 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","221113",0.310307263989541 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","221117",8.34172964989349e-06 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","221118",7.04693139324188e-05 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","22111A",0.401318610717546 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","22111B",0.128467751425335 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","22111C",0.159564980428278 +"Chlorobenzene","emission/air","0fe64d97-61d5-3366-9778-8c39d00edd73","221117",0.140469084190322 +"Chlorobenzene","emission/air","0fe64d97-61d5-3366-9778-8c39d00edd73","22111A",0.845376242294748 +"Chlorobenzene","emission/air","0fe64d97-61d5-3366-9778-8c39d00edd73","22111B",0.0133434876119634 +"Chlorobenzene","emission/air","0fe64d97-61d5-3366-9778-8c39d00edd73","22111C",0.000811185902966863 +"Chlorobenzene","emission/water","eec36aa7-2df6-36c3-9a07-500c4bbf62a9","221113",1 +"Chlorodibromomethane","emission/water","5b1ea5c2-bc10-35bc-a7ab-5d9b51796ddf","22111B",1 +"Chloroethane","emission/air","a48770cd-a7a2-3e86-9e1b-083d68ba4351","221117",0.127715394245553 +"Chloroethane","emission/air","a48770cd-a7a2-3e86-9e1b-083d68ba4351","22111A",0.321061637344256 +"Chloroethane","emission/air","a48770cd-a7a2-3e86-9e1b-083d68ba4351","22111B",0.550896051860757 +"Chloroethane","emission/air","a48770cd-a7a2-3e86-9e1b-083d68ba4351","22111C",0.000326916549434148 +"Chloroform","emission/air","9fc17701-9417-3281-b9a3-d7ab3ecc1c57","221117",0.00483873546808519 +"Chloroform","emission/air","9fc17701-9417-3281-b9a3-d7ab3ecc1c57","22111A",0.516964926961435 +"Chloroform","emission/air","9fc17701-9417-3281-b9a3-d7ab3ecc1c57","22111B",0.477989762233524 +"Chloroform","emission/air","9fc17701-9417-3281-b9a3-d7ab3ecc1c57","22111C",0.000206575336955199 +"Chloroform","emission/ground","3cfa00b4-c6b8-39c3-b00f-f61dca013704","22111B",1 +"Chloroform","emission/water","f54d9588-ffe1-3ebb-922d-d7ec19c625a9","221111",0.0138772536102141 +"Chloroform","emission/water","f54d9588-ffe1-3ebb-922d-d7ec19c625a9","22111A",0.13907731240982 +"Chloroform","emission/water","f54d9588-ffe1-3ebb-922d-d7ec19c625a9","22111B",0.847045433979966 +"Chloromethane","emission/air","3e771661-38c3-332b-b4cb-8e2421b045ce","221117",0.00431664441575404 +"Chloromethane","emission/air","3e771661-38c3-332b-b4cb-8e2421b045ce","22111A",0.49936917121977 +"Chloromethane","emission/air","3e771661-38c3-332b-b4cb-8e2421b045ce","22111B",0.495804483465399 +"Chloromethane","emission/air","3e771661-38c3-332b-b4cb-8e2421b045ce","22111C",0.000509700899076701 +"Chloromethane","emission/ground","0d9af69a-fe2a-30a4-bc1e-eba7dd002449","22111B",1 +"Chloromethane","emission/water","57facb29-666b-34eb-96a3-670f6d995798","22111B",1 +"Chromic(VI) acid","emission/air","4717a8b5-2466-3dd1-b856-f639e8442e75","22111A",0.576843641643228 +"Chromic(VI) acid","emission/air","4717a8b5-2466-3dd1-b856-f639e8442e75","22111B",0.423156358356772 +"Chromium","emission/air","98bd36e1-fbe4-32ee-ba78-3b6726917c9b","221111",0.0155074823602388 +"Chromium","emission/air","98bd36e1-fbe4-32ee-ba78-3b6726917c9b","22111A",0.984492517639761 +"Chromium","emission/ground","979f30f5-f17e-3091-907f-af1921e7e637","221111",1 +"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","221113",0.0137513695680843 +"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","221117",2.54635748439216e-05 +"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","22111A",0.979766872679347 +"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","22111B",0.00588519456232118 +"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","22111C",0.000571099615403631 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221111",4.79378380643129e-05 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221113",3.6542228741778e-05 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221116",6.76692108173804e-07 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221117",0.00144065619102804 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221118",0.00310044750313217 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","22111A",0.868550196872271 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","22111B",0.124124137842355 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","22111C",0.00269940483229919 +"Chromium(III)","emission/water","5905f568-b472-3e56-9f96-d41c33f34ef7","221117",0.00820564264022346 +"Chromium(III)","emission/water","5905f568-b472-3e56-9f96-d41c33f34ef7","22111A",0.00153837786528339 +"Chromium(III)","emission/water","5905f568-b472-3e56-9f96-d41c33f34ef7","22111B",0.990023739940043 +"Chromium(III)","emission/water","5905f568-b472-3e56-9f96-d41c33f34ef7","22111C",0.000232239554449623 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221111",0.000121684581799243 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221113",4.2241345553349e-05 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221114",1.33259627410858e-07 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221116",8.177609841849e-07 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221117",0.00622267325689476 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221118",0.00384126331246397 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","22111A",0.928974019867414 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","22111B",0.0596126975751581 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","22111C",0.00118446904010469 +"Chromium(VI)","emission/water","53ebe715-1465-358f-9e31-ae55956903d1","221117",0.000431137574982759 +"Chromium(VI)","emission/water","53ebe715-1465-358f-9e31-ae55956903d1","22111A",0.973796652537118 +"Chromium(VI)","emission/water","53ebe715-1465-358f-9e31-ae55956903d1","22111B",0.0252715756704762 +"Chromium(VI)","emission/water","53ebe715-1465-358f-9e31-ae55956903d1","22111C",0.000500634217422857 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221111",8.97824058389898e-05 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221113",0.000103817969328817 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221114",3.25497138505535e-07 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221115",2.89656126487624e-06 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221117",0.000209560831565214 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","22111A",0.389043243502912 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","22111B",0.604484836632653 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","22111C",0.00606553659929887 +"Chrysene","emission/water","18b5a96b-f01a-3b11-8077-16777ce57763","22111B",1 +"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","221113",8.00293022844756e-07 +"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","221117",0.00525905230305557 +"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","221118",4.7037149108416e-05 +"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","22111A",0.949552334858303 +"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","22111B",0.0420629335568934 +"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","22111C",0.0030778418396173 +"Cobalt","emission/ground","cb8f8925-a811-38ff-b19f-85377dc28de0","22111A",1 +"Cobalt","emission/water","7cbf7556-2b17-3cc2-97cf-5c9e24e50d65","221117",0.000509257105316605 +"Cobalt","emission/water","7cbf7556-2b17-3cc2-97cf-5c9e24e50d65","22111A",0.154386526000982 +"Cobalt","emission/water","7cbf7556-2b17-3cc2-97cf-5c9e24e50d65","22111C",0.845104216893701 +"Copper","emission/air","b15117ec-3b8e-35de-bef2-00aec1b9636e","221111",0.0108499095840868 +"Copper","emission/air","b15117ec-3b8e-35de-bef2-00aec1b9636e","22111A",0.989150090415913 +"Copper","emission/ground","ec1ff388-9bbb-367f-828c-f7b4f7ceaa47","221111",1 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","221111",4.27006871910041e-06 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","221113",0.101597499583333 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","221114",0.000941388947235539 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","221117",0.00015746895337093 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","22111A",0.414753939767835 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","22111B",0.411172544133085 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","22111C",0.0713728885464211 +"Creosote","emission/air","c8ac25be-c7a1-3b64-9de6-d81049847f6e","22111C",1 +"Creosote","emission/ground","8cc76385-07e7-340f-b8c8-fd56ae0193a2","22111C",1 +"Cresol","emission/air","8ec7f708-9411-37a7-80df-4096d397c513","22111A",0.00329231010425649 +"Cresol","emission/air","8ec7f708-9411-37a7-80df-4096d397c513","22111B",0.996707689895744 +"Cresol","emission/water","dce9617d-7a15-32be-adcb-f01854016ebc","22111C",1 +"Crotonaldehyde","emission/air","77f7f5d5-a234-3f37-aec1-9b63847ef396","22111B",1 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","221111",7.09131373201434e-06 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","221113",9.4128250677781e-07 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","221115",2.22999741667813e-07 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","221117",0.000323501216563846 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","22111A",0.407361686806868 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","22111B",0.050275029896869 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","22111C",0.542031526483719 +"Cumene","emission/water","ebc24f2b-e653-3fc7-be59-82175940b17b","22111C",1 +"Cyanide","emission/air","37037bee-9867-3769-999c-c4d891b9975b","221117",0.000768070796673517 +"Cyanide","emission/air","37037bee-9867-3769-999c-c4d891b9975b","22111A",0.981902254276292 +"Cyanide","emission/air","37037bee-9867-3769-999c-c4d891b9975b","22111B",0.0163435226233169 +"Cyanide","emission/air","37037bee-9867-3769-999c-c4d891b9975b","22111C",0.000986152303717198 +"Cyanide","emission/water","3b66fd84-6bf2-3a57-bd4c-f779d71fee69","221113",9.55933439672715e-07 +"Cyanide","emission/water","3b66fd84-6bf2-3a57-bd4c-f779d71fee69","221118",0.0168030536290297 +"Cyanide","emission/water","3b66fd84-6bf2-3a57-bd4c-f779d71fee69","22111A",0.982678242636664 +"Cyanide","emission/water","3b66fd84-6bf2-3a57-bd4c-f779d71fee69","22111B",0.000517747800866216 +"Cyclohexane","emission/air","12b39b80-c5cb-3410-9968-c6e41304f7d0","22111B",0.566467341306348 +"Cyclohexane","emission/air","12b39b80-c5cb-3410-9968-c6e41304f7d0","22111C",0.433532658693652 +"Cyclohexane","emission/water","76b9697a-54d4-3747-acb5-7618be47ca19","22111C",1 +"Di(2-ethylhexyl) phthalate","emission/air","3600a034-449c-3066-9960-6a13903c310d","221117",0.000403673420823186 +"Di(2-ethylhexyl) phthalate","emission/air","3600a034-449c-3066-9960-6a13903c310d","22111A",0.983918241123936 +"Di(2-ethylhexyl) phthalate","emission/air","3600a034-449c-3066-9960-6a13903c310d","22111B",0.0146949361354833 +"Di(2-ethylhexyl) phthalate","emission/air","3600a034-449c-3066-9960-6a13903c310d","22111C",0.000983149319757489 +"Di(2-ethylhexyl) phthalate","emission/water","08ae3c52-dabf-369c-aeb4-d5359def8f25","221113",0.00262403846619723 +"Di(2-ethylhexyl) phthalate","emission/water","08ae3c52-dabf-369c-aeb4-d5359def8f25","22111B",0.997346084913021 +"Di(2-ethylhexyl) phthalate","emission/water","08ae3c52-dabf-369c-aeb4-d5359def8f25","22111C",2.98766207814924e-05 +"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","221111",0.000302279269398699 +"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","221113",0.00427465501773841 +"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","221117",0.0226657360961726 +"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","22111A",0.0684559094169097 +"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","22111B",0.882063574799489 +"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","22111C",0.0222378454002918 +"Dibenzo[a,h]pyrene","emission/air","0f6267c8-58a9-31ca-8e2f-be97e07d7eaf","22111B",1 +"Dibenzofuran","emission/air","f995b27d-3062-3c33-9170-d4e0a396375d","22111A",0.952431739546249 +"Dibenzofuran","emission/air","f995b27d-3062-3c33-9170-d4e0a396375d","22111B",0.0475682604537511 +"Dibutyl phthalate","emission/air","35b3842d-4a7b-305b-afe8-b908715b39d6","221117",9.47057050525314e-08 +"Dibutyl phthalate","emission/air","35b3842d-4a7b-305b-afe8-b908715b39d6","22111A",0.833205975805153 +"Dibutyl phthalate","emission/air","35b3842d-4a7b-305b-afe8-b908715b39d6","22111B",0.166793929489142 +"Dibutyl phthalate","emission/water","34d6173b-16bf-35f7-a4c5-96ed874cb618","22111B",1 +"Dichlorobenzene","emission/water","83b8990a-c69c-3123-9668-ad74f2533b7f","22111B",1 +"Dichlorobromomethane","emission/water","f4d33a6b-347e-3057-89b1-a7b8ecf1030e","22111A",0.148649498710456 +"Dichlorobromomethane","emission/water","f4d33a6b-347e-3057-89b1-a7b8ecf1030e","22111B",0.851350501289544 +"Dicyclopentadiene","emission/air","60971e7f-03ce-37c1-b95b-b51f4d2a49e1","22111B",1 +"Dicyclopentadiene","emission/ground","39bce74f-bbd2-33d5-92a3-cd73554c481b","22111B",1 +"Dicyclopentadiene","emission/water","62ad4abc-7465-3350-9177-ea28dc083149","22111B",1 +"Diethanolamine","emission/air","f8188722-8d99-32de-97c3-dee774c3a503","22111B",1 +"Diethanolamine","emission/water","e200edf4-9f8c-32d1-857b-83015bf29b09","221118",1 +"Dimethyl phthalate","emission/air","4784dde7-fce7-3d68-9667-820dc31df78e","22111A",0.94395480857016 +"Dimethyl phthalate","emission/air","4784dde7-fce7-3d68-9667-820dc31df78e","22111B",0.0560451914298396 +"Dimethyl sulfate","emission/air","a8bac6c7-4db5-34b1-8069-f47644edba5f","221117",0.000752570171449135 +"Dimethyl sulfate","emission/air","a8bac6c7-4db5-34b1-8069-f47644edba5f","22111A",0.983826338516161 +"Dimethyl sulfate","emission/air","a8bac6c7-4db5-34b1-8069-f47644edba5f","22111B",0.0144574106211006 +"Dimethyl sulfate","emission/air","a8bac6c7-4db5-34b1-8069-f47644edba5f","22111C",0.000963680691289324 +"Dipotassium endothall","emission/water","6a051858-29f7-32c8-a472-03c419775a2b","221111",1 +"Endosulfan","emission/water","c5687d4c-d0e3-3e3c-b9e4-662e2f852e9b","22111B",1 +"Epichlorohydrin","emission/air","9c75fe3f-354c-33b4-b5d4-b88198daa2d1","22111B",1 +"Epichlorohydrin","emission/water","6b9f80f5-e697-3f89-8914-e6fe87a6169c","22111B",1 +"Ethanolamine","emission/water","d9e1be63-768f-3baf-8187-311121fd13ed","221113",1 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221111",0.010490890438746 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221113",0.00016379433248317 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221115",1.91928539184379e-06 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221116",0.00010558580733131 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221117",0.0939666654771042 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","22111A",0.145713296698367 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","22111B",0.748944120181069 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","22111C",0.000613727779507152 +"Ethylbenzene","emission/ground","2355ef0f-9d76-3aff-95c1-96c81478f8b9","22111B",1 +"Ethylbenzene","emission/water","6c82f4d1-4fa8-3b7e-816d-c4153c0eba6d","22111B",0.719294358077194 +"Ethylbenzene","emission/water","6c82f4d1-4fa8-3b7e-816d-c4153c0eba6d","22111C",0.280705641922806 +"Ethylene dibromide","emission/air","a8ead97e-1f5f-3c0c-aa72-c7b25050864e","221117",0.0513672333888786 +"Ethylene dibromide","emission/air","a8ead97e-1f5f-3c0c-aa72-c7b25050864e","22111A",0.943626572565781 +"Ethylene dibromide","emission/air","a8ead97e-1f5f-3c0c-aa72-c7b25050864e","22111B",0.00469291711336469 +"Ethylene dibromide","emission/air","a8ead97e-1f5f-3c0c-aa72-c7b25050864e","22111C",0.000313276931975782 +"Ethylene dibromide","emission/water","941c13f5-f858-3032-a780-cb76cbdf0f54","22111A",1 +"Ethylene glycol","emission/air","f6696716-3d44-38fe-8ef2-8f4284367cd1","22111A",0.0243388978746863 +"Ethylene glycol","emission/air","f6696716-3d44-38fe-8ef2-8f4284367cd1","22111B",0.974634617324899 +"Ethylene glycol","emission/air","f6696716-3d44-38fe-8ef2-8f4284367cd1","22111C",0.00102648480041453 +"Ethylene glycol","emission/ground","9c91d89c-c446-3a94-b208-12c8adc10f6f","22111B",1 +"Ethylene glycol","emission/water","41520962-0f73-3a5a-a396-c1c2d52bb55f","22111B",1 +"Ethylene oxide","emission/air","d5670f7b-8a81-3d00-92b1-8c9e12e0ef69","22111B",1 +"Ethylene oxide","emission/ground","1cd6cefc-6be4-3c59-82ca-feb83a4e0747","22111B",1 +"Ethylene oxide","emission/water","1a2c0ee2-520a-3971-a68e-81982d8236fc","22111B",1 +"Ethylene","emission/air","3378c02d-6828-36dc-a9fe-9948b59a8bd6","22111A",0.0142974266865937 +"Ethylene","emission/air","3378c02d-6828-36dc-a9fe-9948b59a8bd6","22111B",0.981413345307428 +"Ethylene","emission/air","3378c02d-6828-36dc-a9fe-9948b59a8bd6","22111C",0.00428922800597811 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221111",0.000219287513438597 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221113",0.00012090783628747 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221114",8.93246094994563e-07 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221115",6.92669718593427e-06 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221117",0.000242768184202665 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221118",4.09452567451119e-08 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","22111A",0.0871964246574737 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","22111B",0.904312603669969 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","22111C",0.00790014725009105 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221111",0.00442375244319328 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221113",0.00379143398231053 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221115",0.000143505537559896 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221117",0.0489735267801402 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221118",4.79459329380619e-07 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","22111A",0.316887402257871 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","22111B",0.619616717996498 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","22111C",0.0061631815430977 +"Fluorene","emission/water","d83e2d8e-93e4-37c2-be41-b7b7d9f93a11","22111B",1 +"Fluoride","emission/water","e8a4d121-c284-3073-ba8f-37f9253ff20a","221117",6.12508951470939e-05 +"Fluoride","emission/water","e8a4d121-c284-3073-ba8f-37f9253ff20a","22111A",0.997194689253196 +"Fluoride","emission/water","e8a4d121-c284-3073-ba8f-37f9253ff20a","22111B",0.00274405985165732 +"Fluorine","emission/air","2e40d2b0-30ad-3c0c-ba94-5172209277b9","22111A",1 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221111",0.0147641059374141 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221113",0.000597483116010992 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221114",0.00114022148060771 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221115",2.85593746358286e-05 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221117",0.145917417754448 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221118",0.00013998997206484 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","22111A",0.0222521322460114 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","22111B",0.80740112678708 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","22111C",0.0077589633317266 +"Formaldehyde","emission/water","c4629bd9-6185-3901-816a-96cee29a19c9","22111B",1 +"Formic acid","emission/air","9f9ccf8f-0135-34ae-8c01-4e41813a9311","22111A",0.448279538367227 +"Formic acid","emission/air","9f9ccf8f-0135-34ae-8c01-4e41813a9311","22111B",0.551720461632773 +"Formic acid","emission/water","8b67e596-b3af-30d7-84d5-c710373ed376","22111A",1 +"Glycidol","emission/air","7da836fc-1250-3c81-8061-4ae278a39c3b","22111B",1 +"Glycol ethers","emission/air","ea0a3ada-c97c-3f2a-a88a-6553b146c818","22111B",1 +"HCFC-22","emission/air","76cf7898-8461-3265-a3a4-14dd2682779e","22111B",1 +"HCFC-22","emission/water","da5e6f64-ea17-3366-a340-c5ed2147713c","221113",1 +"Hexachlorobenzene","emission/air","28c8bbdf-1a2b-3c96-baf8-d965df47c0c6","22111A",0.999914204798579 +"Hexachlorobenzene","emission/air","28c8bbdf-1a2b-3c96-baf8-d965df47c0c6","22111B",8.57952014212842e-05 +"Hexachlorobenzene","emission/water","949be795-cf00-3338-acea-9a0f0a3f087a","22111B",1 +"Hexachlorobutadiene","emission/air","4a90ef9a-bcb0-3e9d-80da-1a48dfd8ae6f","221117",0.00794245466806534 +"Hexachlorobutadiene","emission/air","4a90ef9a-bcb0-3e9d-80da-1a48dfd8ae6f","22111A",0.992057545331935 +"Hexachlorocyclohexane","emission/water","509cda9a-927f-38d9-b3cb-5bbb5fb2d063","22111B",1 +"Hexachlorocyclopentadiene","emission/air","37749376-d759-3afe-b5eb-ccc6b8ec1868","22111A",1 +"Hexachloroethane","emission/air","f8348707-b585-36c3-bce1-dd8d43710a95","22111A",1 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221111",4.05885065900615e-06 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221113",0.000102715703985136 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221115",1.34696338039626e-07 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221117",0.0178934192092659 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221118",0.0213791734046052 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","22111A",0.0504608131294664 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","22111B",0.904826357567997 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","22111C",0.00533332743768299 +"Hexane","emission/water","14622b86-6d9a-3b6c-bc4b-84251899a991","22111C",1 +"Hydrazine","emission/air","44e7dac5-7299-3a7a-9480-4152ba299a12","22111A",1 +"Hydrazine","emission/water","f5faeb2b-d0e0-346b-8b49-fb45c4e35bfb","221113",0.99386273118701 +"Hydrazine","emission/water","f5faeb2b-d0e0-346b-8b49-fb45c4e35bfb","22111A",0.00519246990561924 +"Hydrazine","emission/water","f5faeb2b-d0e0-346b-8b49-fb45c4e35bfb","22111B",0.000944798907370551 +"Hydrocarbons","emission/water","42983b7d-3999-3fa9-b172-a0fc678236fe","22111A",0.0220014073314 +"Hydrocarbons","emission/water","42983b7d-3999-3fa9-b172-a0fc678236fe","22111B",0.9779985926686 +"Hydrocarbons, halogenated","emission/water","4203cce1-1793-33d9-8de1-046aae0a373e","22111A",0.999506633344226 +"Hydrocarbons, halogenated","emission/water","4203cce1-1793-33d9-8de1-046aae0a373e","22111B",0.000493366655774471 +"Hydrocarbons, petroleum","emission/water","4141409a-7f36-324a-a7f8-b5f2d3cef6fc","221113",0.0662740744316262 +"Hydrocarbons, petroleum","emission/water","4141409a-7f36-324a-a7f8-b5f2d3cef6fc","221117",0.47825457353864 +"Hydrocarbons, petroleum","emission/water","4141409a-7f36-324a-a7f8-b5f2d3cef6fc","22111B",0.455471352029734 +"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","221117",0.0382356488306846 +"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","221118",0.00471017329344218 +"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","22111A",0.795075523615756 +"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","22111B",0.155973424727216 +"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","22111C",0.00600522953290143 +"Hydrofluoric acid","emission/air","1c288388-0f32-30f1-8267-19b8d72c80df","221117",0.00132331278546039 +"Hydrofluoric acid","emission/air","1c288388-0f32-30f1-8267-19b8d72c80df","22111A",0.948566450518881 +"Hydrofluoric acid","emission/air","1c288388-0f32-30f1-8267-19b8d72c80df","22111B",0.0498737153605416 +"Hydrofluoric acid","emission/air","1c288388-0f32-30f1-8267-19b8d72c80df","22111C",0.000236521335116727 +"Hydrogen cyanide","emission/air","aa7539ee-9aeb-3cb5-9d64-2a0bd94ebb0f","22111A",0.786205583155949 +"Hydrogen cyanide","emission/air","aa7539ee-9aeb-3cb5-9d64-2a0bd94ebb0f","22111B",0.00211758621832808 +"Hydrogen cyanide","emission/air","aa7539ee-9aeb-3cb5-9d64-2a0bd94ebb0f","22111C",0.211676830625723 +"Hydrogen cyanide","emission/water","db989bb6-a79a-35b1-aee9-2db77f60875a","22111C",1 +"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","221116",0.37997914535896 +"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","221117",0.146313182620089 +"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","221118",0.214625045378387 +"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","22111A",0.0811224225980879 +"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","22111B",0.114377940223001 +"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","22111C",0.0635822638214761 +"Hydrogen sulfide","emission/water","448fcd9d-49f8-3144-bb84-df0fd1f8ab08","22111B",0.98876404494382 +"Hydrogen sulfide","emission/water","448fcd9d-49f8-3144-bb84-df0fd1f8ab08","22111C",0.0112359550561798 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","221111",0.010989730447583 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","221113",0.00160866874177159 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","221115",0.000361489453603231 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","221117",0.0668399811458166 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","22111A",0.698531791553229 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","22111B",0.209702301996665 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","22111C",0.0119660366613319 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","221111",8.29078453455296e-05 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","221113",0.13879724431969 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","221114",0.000752293757149623 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","221117",0.00105956931800569 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","22111A",0.779131411777943 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","22111B",0.0801721809416747 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","22111C",4.39204019095332e-06 +"Isobutyraldehyde","emission/air","1ed39c7d-b21c-3a99-9059-6a8d14a73489","22111B",1 +"Isobutyraldehyde","emission/ground","a5009aff-1086-3c29-9b67-380ce207558e","22111B",1 +"Isophorone","emission/air","9aa7fac7-87ac-35ac-9cfb-639180846bee","221117",0.000793518775399637 +"Isophorone","emission/air","9aa7fac7-87ac-35ac-9cfb-639180846bee","22111A",0.98294129501566 +"Isophorone","emission/air","9aa7fac7-87ac-35ac-9cfb-639180846bee","22111B",0.0152472259705572 +"Isophorone","emission/air","9aa7fac7-87ac-35ac-9cfb-639180846bee","22111C",0.00101796023838345 +"Isoprene","emission/air","df9ed90d-0e23-3c52-85f7-a4f333b5dea3","22111B",1 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221111",0.00221760983320083 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221113",0.000286675937165634 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221115",4.95901348987923e-05 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221116",1.39815426373479e-07 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221117",0.0203250985888215 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221118",0.053898842472777 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","22111A",0.869703600853836 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","22111B",0.0503547111646986 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","22111C",0.00316373119917542 +"Lead","emission/ground","a58c8e84-1ff1-3a64-bf26-567e9bdeb994","221111",0.228277146718288 +"Lead","emission/ground","a58c8e84-1ff1-3a64-bf26-567e9bdeb994","221113",0.771722853281712 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","221111",7.25351258600312e-05 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","221113",0.00555017984038333 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","221117",0.000117702603337506 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","221118",0.000903390134895935 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","22111A",0.963273679952945 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","22111B",0.0300822365513369 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","22111C",2.75791241797374e-07 +"Lithium","emission/water","224e47eb-4483-3a1c-b0ec-83d8a39d6041","221113",0.121234752302713 +"Lithium","emission/water","224e47eb-4483-3a1c-b0ec-83d8a39d6041","22111A",0.878765247697287 +"m-Cresol","emission/air","2e1b0e71-eec1-3f93-bbd9-80a2f20615cf","22111A",1 +"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","221111",0.00450827614875838 +"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","221113",0.000524077583651637 +"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","221115",0.000141771603411531 +"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","221117",8.83679704060584e-05 +"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","22111A",0.144260521997483 +"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","22111B",0.85047698469629 +"m-Xylene","emission/water","a975efda-5fb3-38a9-8d3f-212606aa853f","22111B",0.996770938446014 +"m-Xylene","emission/water","a975efda-5fb3-38a9-8d3f-212606aa853f","22111C",0.00322906155398587 +"Magnesium","emission/water","1345e5a3-e4c5-3cc1-b896-988ae1796d8e","221117",0.00726990679269591 +"Magnesium","emission/water","1345e5a3-e4c5-3cc1-b896-988ae1796d8e","22111A",0.992730093207304 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","221111",8.02605506253131e-05 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","221113",0.0012866896677402 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","221117",0.119518653915219 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","221118",0.0202875553222923 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","22111A",0.617156177709701 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","22111B",0.231056899207197 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","22111C",0.0106137636272255 +"Manganese","emission/water","8f023abc-b8fc-3ef7-9571-f4cf6c2b6820","221117",1.55385245436573e-05 +"Manganese","emission/water","8f023abc-b8fc-3ef7-9571-f4cf6c2b6820","22111A",0.999934068743368 +"Manganese","emission/water","8f023abc-b8fc-3ef7-9571-f4cf6c2b6820","22111B",5.03148074798522e-05 +"Manganese","emission/water","8f023abc-b8fc-3ef7-9571-f4cf6c2b6820","22111C",7.79246087622165e-08 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221111",2.27728668398306e-05 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221113",0.000108676169305612 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221114",2.22056339968165e-06 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221116",0.00336887864820634 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221117",0.00498125459117253 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221118",0.00782107834579958 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","22111A",0.840680380289928 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","22111B",0.133723525647032 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","22111C",0.00929121287831623 +"Mercury","emission/ground","2ae8f50e-97b7-33b5-b936-e1d199425695","22111A",1 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","221113",0.00170798113977818 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","221114",4.3671725926746e-05 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","221117",2.02711189119524e-06 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","221118",3.5801556236767e-05 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","22111A",0.426110380651609 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","22111B",0.572074829817908 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","22111C",2.53079966501284e-05 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221111",3.14741312548001e-06 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221113",2.98352474728592e-06 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221114",1.48253576150256e-05 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221115",1.16767462484681e-07 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221116",5.03726415365625e-22 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221117",0.0525054435712145 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221118",7.77092196881272e-05 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","22111A",0.857777182069568 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","22111B",0.0889263299707816 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","22111C",0.000692262105797596 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","221111",3.96997220229721e-05 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","221113",5.27438374287534e-06 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","221115",1.24842982033212e-06 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","221117",0.00107228688184685 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","22111A",0.386364627459295 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","22111B",0.603736709609768 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","22111C",0.00878015351350457 +"Methanol","emission/ground","a788bade-3e5a-31d7-82d6-10d0b4d359ae","22111B",1 +"Methanol","emission/water","7306a222-cbbc-391d-bbc8-346904e41235","22111B",0.999949466875537 +"Methanol","emission/water","7306a222-cbbc-391d-bbc8-346904e41235","22111C",5.05331244630856e-05 +"Methyl acrylate","emission/air","b95121cf-ac27-306d-88e4-94a160ab28c9","22111B",1 +"Methyl bromide","emission/air","18281313-4dde-31e9-a1ac-c210254d7130","221117",0.00384380137157636 +"Methyl bromide","emission/air","18281313-4dde-31e9-a1ac-c210254d7130","22111A",0.98016266045827 +"Methyl bromide","emission/air","18281313-4dde-31e9-a1ac-c210254d7130","22111B",0.0149979213429662 +"Methyl bromide","emission/air","18281313-4dde-31e9-a1ac-c210254d7130","22111C",0.000995616827186925 +"Methyl hydrazine","emission/air","f0267c81-ff66-36f6-ba35-11b522316310","221117",0.000750201615591703 +"Methyl hydrazine","emission/air","f0267c81-ff66-36f6-ba35-11b522316310","22111A",0.98386751499954 +"Methyl hydrazine","emission/air","f0267c81-ff66-36f6-ba35-11b522316310","22111B",0.0144194546293781 +"Methyl hydrazine","emission/air","f0267c81-ff66-36f6-ba35-11b522316310","22111C",0.000962828755490067 +"Methyl iodide","emission/air","eb7eba2b-7b6f-37a2-8aa1-ae0ec89db7ca","22111A",0.982035404228886 +"Methyl iodide","emission/air","eb7eba2b-7b6f-37a2-8aa1-ae0ec89db7ca","22111B",0.0179645957711143 +"Methyl isobutyl ketone","emission/air","16e9aaa4-b307-3860-a1af-e82f5a1dbd64","221117",0.340374055370878 +"Methyl isobutyl ketone","emission/air","16e9aaa4-b307-3860-a1af-e82f5a1dbd64","22111A",0.328018170739099 +"Methyl isobutyl ketone","emission/air","16e9aaa4-b307-3860-a1af-e82f5a1dbd64","22111B",0.322536270545948 +"Methyl isobutyl ketone","emission/air","16e9aaa4-b307-3860-a1af-e82f5a1dbd64","22111C",0.00907150334407539 +"Methyl methacrylate","emission/air","02f393d6-bc1c-370e-9144-a022ddca1d0a","221117",0.000750561102164313 +"Methyl methacrylate","emission/air","02f393d6-bc1c-370e-9144-a022ddca1d0a","22111A",0.983830273531348 +"Methyl methacrylate","emission/air","02f393d6-bc1c-370e-9144-a022ddca1d0a","22111B",0.0144560339810157 +"Methyl methacrylate","emission/air","02f393d6-bc1c-370e-9144-a022ddca1d0a","22111C",0.000963131385471774 +"Methyl tert-butyl ether","emission/air","806ce2b4-1a8c-3844-8372-dd0fa3797c21","221117",0.000920968680643265 +"Methyl tert-butyl ether","emission/air","806ce2b4-1a8c-3844-8372-dd0fa3797c21","22111A",0.983655265555109 +"Methyl tert-butyl ether","emission/air","806ce2b4-1a8c-3844-8372-dd0fa3797c21","22111B",0.0144621286434776 +"Methyl tert-butyl ether","emission/air","806ce2b4-1a8c-3844-8372-dd0fa3797c21","22111C",0.000961637120769689 +"Methylchrysene","emission/air","93484dfb-d8ea-3c44-a9d6-b05a5216a6a9","22111A",1 +"Methylene chloride","emission/air","f9fd0074-f765-3f38-a150-2ca0a82c37be","221117",0.15345341016868 +"Methylene chloride","emission/air","f9fd0074-f765-3f38-a150-2ca0a82c37be","22111A",0.791469537071729 +"Methylene chloride","emission/air","f9fd0074-f765-3f38-a150-2ca0a82c37be","22111B",0.0546919701586815 +"Methylene chloride","emission/air","f9fd0074-f765-3f38-a150-2ca0a82c37be","22111C",0.000385082600909392 +"Methylene chloride","emission/water","af9a1ea0-92aa-3f85-8563-5c21c65b1252","221111",0.306882571132613 +"Methylene chloride","emission/water","af9a1ea0-92aa-3f85-8563-5c21c65b1252","221117",0.122627256907499 +"Methylene chloride","emission/water","af9a1ea0-92aa-3f85-8563-5c21c65b1252","22111B",0.570490171959888 +"Methylmercury(I)","emission/water","a70d9916-0381-3a01-ab8e-4332ed191d64","22111B",1 +"Molybdenum trioxide","emission/air","30be6ad3-0af0-32bd-a83d-b040d9790aa7","22111A",0.9675 +"Molybdenum trioxide","emission/air","30be6ad3-0af0-32bd-a83d-b040d9790aa7","22111C",0.0325 +"Molybdenum","emission/water","f95a65ae-f63c-39be-a86a-cb9b547b781b","221113",0.945221354529574 +"Molybdenum","emission/water","f95a65ae-f63c-39be-a86a-cb9b547b781b","22111A",0.0547786454704263 +"N-Methyl-2-pyrrolidone","emission/air","97579b43-89d0-3857-9911-d6dd6d28b024","22111B",1 +"N-Nitrosodimethylamine","emission/air","3a17ea66-85b2-3d3b-a1fb-5d58f274890c","22111A",0.999336864478286 +"N-Nitrosodimethylamine","emission/air","3a17ea66-85b2-3d3b-a1fb-5d58f274890c","22111B",0.000663135521714307 +"N-Nitrosodimethylamine","emission/water","ddb2a184-058b-3306-b9ea-7881c8e8c894","22111B",1 +"N-Nitrosomorpholine","emission/air","a3aa8c30-da3c-3c8d-8693-6fdeb1860fff","22111B",1 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221111",0.00147979309070483 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221113",0.000895010192541969 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221115",2.44184339966028e-05 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221117",0.0183298503911536 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221118",3.11552903250555e-05 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","22111A",0.0525679632616345 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","22111B",0.920407663895365 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","22111C",0.00626414544427853 +"Naphthalene","emission/ground","b6604aac-5823-3882-be88-720da587ffb7","22111A",0.148936170212766 +"Naphthalene","emission/ground","b6604aac-5823-3882-be88-720da587ffb7","22111B",0.851063829787234 +"Naphthalene","emission/water","6db1dc8d-facf-347f-9885-53936a44286b","22111B",0.89043589202011 +"Naphthalene","emission/water","6db1dc8d-facf-347f-9885-53936a44286b","22111C",0.10956410797989 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221111",7.78985651536027e-05 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221113",1.2220838094579e-05 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221114",3.52831467546434e-07 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221116",5.53593864035755e-08 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221117",0.00277195954607319 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221118",0.00166078159210727 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","22111A",0.504757073620865 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","22111B",0.468431741455482 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","22111C",0.0222879161913707 +"Nickel","emission/ground","ade872db-a289-3467-bca5-112f4b96e874","221111",1 +"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","221111",1.4991470467667e-05 +"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","221113",3.43064529860694e-06 +"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","221117",0.000496055445922847 +"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","22111A",0.852130717029683 +"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","22111B",0.147343538482016 +"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","22111C",1.12669266117062e-05 +"Nitric acid","emission/air","53ba40b0-e966-32ba-9a31-d50049e5f77a","22111B",1 +"Nitrobenzene","emission/air","30a189e8-c3c0-3560-9e7c-4fd3c1b98d34","22111A",1 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221111",3.35097885682699e-05 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221113",3.63500203864185e-05 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221114",7.82354813735511e-05 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221115",7.95234277365237e-06 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221116",4.56962922712412e-23 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221117",0.0988097117581696 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221118",0.00271691025166238 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","22111A",0.632249146495727 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","22111B",0.260238364083901 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","22111C",0.00582981977743792 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221111",0.0109135128292095 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221113",0.538850483164418 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221114",0.0291973636982592 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221117",0.198671724956017 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221118",0.00115326791890664 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","22111A",0.110542790129182 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","22111B",0.109452629678194 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","22111C",0.0012182276258135 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221111",2.27022474815098e-06 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221113",3.59409585932996e-06 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221114",8.94613582144042e-06 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221115",1.12328344289174e-07 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221116",3.03866109676198e-21 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221117",0.0418565393456065 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221118",4.68770299756164e-05 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","22111A",0.903240978330822 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","22111B",0.0540104266000953 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","22111C",0.000830255908727626 +"o-Cresol","emission/air","0b9668f1-074d-326e-889c-8e803fc651bd","22111A",1 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","221111",0.000300939212774127 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","221113",3.4975541939467e-05 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","221115",9.46364920818892e-06 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","221117",0.0376741212299707 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","22111A",0.00869596954329443 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","22111B",0.953143614014527 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","22111C",0.000140916808285932 +"o-Xylene","emission/water","371dd7d6-178e-37c8-a648-b69256b742e8","22111B",0.995967285246799 +"o-Xylene","emission/water","371dd7d6-178e-37c8-a648-b69256b742e8","22111C",0.00403271475320098 +"Organics, purgeables","emission/water","03b4c1b2-3cb4-36f3-9269-5fb1b9d3e5a7","221111",1 +"Oxygen","emission/water","2c6400e9-7d62-3168-959b-4628a3e14756","22111B",1 +"p-Cresol","emission/air","7ca58e58-ada7-36c9-bdc6-1eea26d32abb","22111A",1 +"p-Dichlorobenzene","emission/air","981f397a-bee2-3519-b316-02a7756bf22a","221117",0.233304155540684 +"p-Dichlorobenzene","emission/air","981f397a-bee2-3519-b316-02a7756bf22a","22111A",0.230979983117691 +"p-Dichlorobenzene","emission/air","981f397a-bee2-3519-b316-02a7756bf22a","22111B",0.535715861341624 +"p-Dichlorobenzene","emission/water","d7992b6b-6bb4-3abc-bf17-f5a66aefd8a2","221117",1 +"p-Nitrophenol","emission/air","8f9d27d7-e27c-3baa-a1e5-4ad61a38d900","221117",0.0112540901414944 +"p-Nitrophenol","emission/air","8f9d27d7-e27c-3baa-a1e5-4ad61a38d900","22111A",0.988555033911986 +"p-Nitrophenol","emission/air","8f9d27d7-e27c-3baa-a1e5-4ad61a38d900","22111B",0.00019087594651979 +"p-Xylene","emission/air","3a41e87c-065d-3ab8-bc14-73ff717163c6","22111A",1 +"PAH/POM, unspecified","emission/air","02493f33-ffee-3fb6-8508-42de1592015e","221113",2.47740378827181e-05 +"PAH/POM, unspecified","emission/air","02493f33-ffee-3fb6-8508-42de1592015e","221117",0.815346895898174 +"PAH/POM, unspecified","emission/air","02493f33-ffee-3fb6-8508-42de1592015e","22111A",0.149126318631671 +"PAH/POM, unspecified","emission/air","02493f33-ffee-3fb6-8508-42de1592015e","22111B",0.035502011432272 +"Paraldehyde","emission/air","2001d79b-2107-37cb-a6f5-98b04254fc5c","22111B",1 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221111",0.00134428425273987 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221113",0.00217821513966219 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221114",1.46402900036777e-05 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221115",3.34349459273331e-05 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221116",4.71496551988292e-05 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221117",0.0151659324182888 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221118",0.0156623942582203 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","22111A",0.732822914010874 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","22111B",0.22655235628949 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","22111C",0.00617867873959471 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221111",0.0012073140881469 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221113",0.00277392279734982 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221114",0.000246003186847743 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221115",2.09674705370301e-07 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221116",2.07164920987811e-05 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221117",0.0434545541805345 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221118",0.0290722630674484 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","22111A",0.862369116966505 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","22111B",0.0559026037155824 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","22111C",0.00495329583078128 +"Pentachlorobenzene","emission/air","74ec13f4-2492-3099-949c-26ec4e15f0e1","22111B",1 +"Pentachlorobenzene","emission/water","80d946f2-befc-3447-809d-a483a6e35d37","22111B",1 +"Pentachlorophenol","emission/air","1b92a28f-209f-3380-b8fe-1354a50fa03d","221117",0.00434227686670077 +"Pentachlorophenol","emission/air","1b92a28f-209f-3380-b8fe-1354a50fa03d","22111A",0.99555741086216 +"Pentachlorophenol","emission/air","1b92a28f-209f-3380-b8fe-1354a50fa03d","22111B",0.000100312271138801 +"Pentachlorophenol","emission/water","31d47305-ae02-3929-8998-463bf1803af6","22111A",0.994459440261401 +"Pentachlorophenol","emission/water","31d47305-ae02-3929-8998-463bf1803af6","22111B",0.00554055973859923 +"Perylene","emission/air","0a0026f6-bebf-332e-8dd3-616a6d4e9e1b","221117",1 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221111",0.00272020582663716 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221113",0.00338190869750355 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221115",8.74175088353232e-05 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221117",0.0370325670297374 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221118",1.02955851081221e-06 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","22111A",0.437600529867138 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","22111B",0.514068627398301 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","22111C",0.0051077141133372 +"Phenanthrene","emission/ground","c9949a1d-90fd-3ffc-84dc-13cb5185f0d1","22111A",0.75609756097561 +"Phenanthrene","emission/ground","c9949a1d-90fd-3ffc-84dc-13cb5185f0d1","22111B",0.24390243902439 +"Phenanthrene","emission/water","f4d494d1-6e82-3f63-a2d5-610f40dc08b4","22111C",1 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221111",0.000196234589545951 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221113",2.49941172894982e-05 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221114",0.0221340735351918 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221115",5.91950277007846e-06 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221117",0.0179824592298265 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","22111A",0.425089647994039 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","22111B",0.533306440226556 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","22111C",0.00126023080478087 +"Phenol","emission/water","82fcc18d-8502-385b-8749-17b8f19fd177","221118",0.457565565566404 +"Phenol","emission/water","82fcc18d-8502-385b-8749-17b8f19fd177","22111A",0.152414261879375 +"Phenol","emission/water","82fcc18d-8502-385b-8749-17b8f19fd177","22111B",0.0305043710377603 +"Phenol","emission/water","82fcc18d-8502-385b-8749-17b8f19fd177","22111C",0.35951580151646 +"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","221117",0.000980527568987576 +"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","221118",0.024045597506684 +"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","22111A",0.972766615609131 +"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","22111B",6.77206135774371e-05 +"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","22111C",0.00213953870162 +"Phosphorus","emission/air","95df3205-7c00-3edd-af6e-92ff90f42999","221117",0.00883360127070853 +"Phosphorus","emission/air","95df3205-7c00-3edd-af6e-92ff90f42999","22111A",0.927839215629291 +"Phosphorus","emission/air","95df3205-7c00-3edd-af6e-92ff90f42999","22111B",0.0415875418285452 +"Phosphorus","emission/air","95df3205-7c00-3edd-af6e-92ff90f42999","22111C",0.0217396412714549 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","221111",0.000217449803147052 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","221113",0.280955310345598 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","221114",0.127742951669377 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","221117",0.000793493690418363 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","22111A",0.102725646738371 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","22111B",0.48743466334307 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","22111C",0.000130484410019392 +"Phthalic anhydride","emission/air","0a4b7ff7-c3d9-37c0-8f0d-4459730d70ae","22111A",1 +"Polychlorinated biphenyls","emission/air","18819e98-6dd1-3a8f-a27a-67ca826f3381","221117",0.0651365423083301 +"Polychlorinated biphenyls","emission/air","18819e98-6dd1-3a8f-a27a-67ca826f3381","22111A",0.253039266460181 +"Polychlorinated biphenyls","emission/air","18819e98-6dd1-3a8f-a27a-67ca826f3381","22111B",0.681824191231489 +"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","221113",0.999988866624986 +"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","221117",4.26170323353036e-06 +"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","22111A",4.00040249830766e-06 +"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","22111B",8.37066527761822e-08 +"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","22111C",2.78756262952448e-06 +"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","221113",0.000888959876242495 +"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","221117",0.0191138695259425 +"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","22111A",0.17718290365446 +"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","22111B",0.795964399748295 +"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","22111C",0.00684986719505992 +"Polycyclic aromatic hydrocarbons","emission/water","3675e6f7-8453-3486-a889-a30ff2ef9bcd","22111B",1 +"Potassium","emission/water","48c481d2-a5da-3974-9695-ab588b961a2c","221117",0.99482599932908 +"Potassium","emission/water","48c481d2-a5da-3974-9695-ab588b961a2c","22111A",0.00517400067091971 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","221111",5.58149461683104e-05 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","221113",7.1156360423889e-06 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","221115",1.76027469065067e-06 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","221117",0.00605870065704816 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","22111A",0.840207307283871 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","22111B",0.152750748659672 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","22111C",0.000918552542507843 +"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","221111",0.0162506962684761 +"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","221117",6.90466630857815e-06 +"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","22111A",0.0054299862353732 +"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","22111B",0.977831366108366 +"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","22111C",0.000481046721475845 +"Propylene","emission/air","2014edbf-fd15-3674-8927-701264cb597f","22111A",0.0510051971213172 +"Propylene","emission/air","2014edbf-fd15-3674-8927-701264cb597f","22111B",0.937832701332156 +"Propylene","emission/air","2014edbf-fd15-3674-8927-701264cb597f","22111C",0.0111621015465264 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221111",0.0117878444323896 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221113",0.0033675877693842 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221115",0.000388533574433309 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221117",0.173355775155351 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221118",2.7390180641982e-06 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","22111A",0.273877986732102 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","22111B",0.525704935202816 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","22111C",0.0115145981154586 +"Pyrene","emission/water","97b592e9-1214-3b29-80e9-904c963da937","22111B",1 +"Pyridine","emission/air","67b9cc0b-261c-3b14-ae73-b88855d26a0f","22111A",1 +"Quinoline","emission/air","e0d00d88-a941-35d2-89e8-6fa28198f906","22111A",1 +"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","221113",2.90789353311929e-05 +"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","221116",3.32279542862122e-08 +"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","221117",0.000224239355491044 +"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","22111A",0.984117058906931 +"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","22111B",0.0155082552434486 +"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","22111C",0.000121334330844268 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","221113",1.12256072535743e-07 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","221114",0.00104117507276902 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","221115",0.000189151482222727 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","221117",5.58473960865321e-06 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","22111A",0.976421919747112 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","22111B",0.0223394018460994 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","22111C",2.65485611547032e-06 +"Silver","emission/water","f3c908b3-a355-388d-aa06-adbfb8ce12dc","221117",9.42422155883817e-06 +"Silver","emission/water","f3c908b3-a355-388d-aa06-adbfb8ce12dc","22111A",0.974749725595623 +"Silver","emission/water","f3c908b3-a355-388d-aa06-adbfb8ce12dc","22111B",0.0252266677437206 +"Silver","emission/water","f3c908b3-a355-388d-aa06-adbfb8ce12dc","22111C",1.41824390973514e-05 +"Sodium","emission/water","ba614600-af03-39a6-a0f5-897debdf159c","221117",4.2255034162879e-05 +"Sodium","emission/water","ba614600-af03-39a6-a0f5-897debdf159c","22111A",0.999870014472486 +"Sodium","emission/water","ba614600-af03-39a6-a0f5-897debdf159c","22111B",8.77304933514101e-05 +"Strontium","emission/water","42904b8f-ac78-3e54-8774-2d117b505a09","22111A",1 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","221111",0.000144490465730057 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","221113",1.28793580299856e-05 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","221115",4.65015895158344e-06 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","221117",0.515327452868444 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","22111A",0.215169211921494 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","22111B",0.268939688089618 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","22111C",0.000401627137732586 +"Styrene","emission/ground","0f727b42-dc04-3f8b-aeb5-751c21ab7818","22111B",1 +"Styrene","emission/water","ae949cd2-45b1-39fb-9c52-943019cdba9b","22111B",0.166666666666667 +"Styrene","emission/water","ae949cd2-45b1-39fb-9c52-943019cdba9b","22111C",0.833333333333333 +"Sulfate","emission/water","0c241f3e-aa86-3804-8bd8-6082e2ad201f","221113",0.0376752959927924 +"Sulfate","emission/water","0c241f3e-aa86-3804-8bd8-6082e2ad201f","221117",0.000217845917317343 +"Sulfate","emission/water","0c241f3e-aa86-3804-8bd8-6082e2ad201f","22111A",0.943560550156399 +"Sulfate","emission/water","0c241f3e-aa86-3804-8bd8-6082e2ad201f","22111B",0.0185463079334909 +"Sulfide","emission/water","caa29242-717c-37bd-b57b-de22a122d579","22111C",1 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221111",3.24689763595753e-06 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221113",2.35973844499764e-05 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221114",4.25133677491676e-07 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221115",3.17569032667252e-07 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221116",5.21481649786361e-23 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221117",0.00524046979008137 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221118",5.8026227826933e-06 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","22111A",0.979181349275087 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","22111B",0.0062320776531874 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","22111C",0.00931271367406588 +"Sulfuric acid","emission/air","0838fbf7-0add-3353-ba9a-b187edeb85d6","22111A",0.993511356388627 +"Sulfuric acid","emission/air","0838fbf7-0add-3353-ba9a-b187edeb85d6","22111B",0.00213520097898038 +"Sulfuric acid","emission/air","0838fbf7-0add-3353-ba9a-b187edeb85d6","22111C",0.00435344263239262 +"Surfactants","emission/water","ed34465d-dcb1-3926-a995-ee361882cb1e","221113",1 +"Tetrachloroethylene","emission/air","984f3962-1a35-3813-bbf1-e3887be06b6f","221117",0.347927218668211 +"Tetrachloroethylene","emission/air","984f3962-1a35-3813-bbf1-e3887be06b6f","22111A",0.256602061356388 +"Tetrachloroethylene","emission/air","984f3962-1a35-3813-bbf1-e3887be06b6f","22111B",0.395139302873752 +"Tetrachloroethylene","emission/air","984f3962-1a35-3813-bbf1-e3887be06b6f","22111C",0.000331417101649533 +"Tetrachloroethylene","emission/water","5bd7af62-1b05-3694-a723-336cb58e345f","22111A",0.381774628206408 +"Tetrachloroethylene","emission/water","5bd7af62-1b05-3694-a723-336cb58e345f","22111B",0.618225371793592 +"Thallium","emission/air","9afdd2c1-9b05-3de5-a6ba-eb95948a71fa","22111B",1 +"Thallium","emission/water","6051a1f6-90e3-3231-b4e6-fdd69c961129","221117",1.96194336185957e-05 +"Thallium","emission/water","6051a1f6-90e3-3231-b4e6-fdd69c961129","22111A",0.581119396278383 +"Thallium","emission/water","6051a1f6-90e3-3231-b4e6-fdd69c961129","22111B",0.418791472423726 +"Thallium","emission/water","6051a1f6-90e3-3231-b4e6-fdd69c961129","22111C",6.95118642723363e-05 +"Titanium","emission/water","0f2dc726-d62a-3a67-bf97-af90ef81af0a","22111A",1 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221111",0.00999353763615256 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221113",0.000177418950041015 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221114",0.000215737299318718 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221115",2.95365216349018e-06 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221116",0.000113784274940868 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221117",0.171992465042792 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221118",2.33168183971295e-05 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","22111A",0.099657635088593 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","22111B",0.717203932547931 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","22111C",0.000619218689670039 +"Toluene","emission/ground","123df42b-1658-3f80-ad31-fffbb8559d43","22111B",1 +"Toluene","emission/water","f7ebc6df-b3ee-30de-b6e8-c70e155854b3","221111",0.0706688359083419 +"Toluene","emission/water","f7ebc6df-b3ee-30de-b6e8-c70e155854b3","22111B",0.82385490527093 +"Toluene","emission/water","f7ebc6df-b3ee-30de-b6e8-c70e155854b3","22111C",0.105476258820729 +"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","221111",1.6980342849505e-07 +"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","221113",0.0129829742485999 +"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","221117",0.000201645014455251 +"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","22111A",0.530241861196527 +"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","22111B",0.45657334973699 +"Total metals","emission/water","1a257bae-badb-3b35-8482-59970c05b432","22111A",0.99812894782323 +"Total metals","emission/water","1a257bae-badb-3b35-8482-59970c05b432","22111B",0.00187105217677004 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221111",0.545067178446224 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221113",0.05038166872144 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221114",0.0136187862087597 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221117",1.03389949977841e-05 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221118",0.000612936554495355 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","22111A",0.382940231866133 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","22111B",0.00278610071255433 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","22111C",0.00458275849539523 +"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","221113",0.241713855459982 +"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","221117",0.00448843182676894 +"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","22111A",0.00283866792175651 +"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","22111B",0.374912372700714 +"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","22111C",0.376046672090779 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221111",0.00186267814780121 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221113",0.00597004968120264 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221114",0.00628932918040765 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221117",0.00524163541304955 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221118",0.000460383195800793 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","22111A",0.159099541615919 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","22111B",0.811535989539579 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","22111C",0.00954039322623938 +"Tribromomethane","emission/air","53effec4-058b-3ab7-b7d5-005d39dd0eb9","221117",0.000756265599582975 +"Tribromomethane","emission/air","53effec4-058b-3ab7-b7d5-005d39dd0eb9","22111A",0.983751930794746 +"Tribromomethane","emission/air","53effec4-058b-3ab7-b7d5-005d39dd0eb9","22111B",0.0145229553266273 +"Tribromomethane","emission/air","53effec4-058b-3ab7-b7d5-005d39dd0eb9","22111C",0.000968848279043279 +"Tribromomethane","emission/water","bf5315db-0443-3c49-b072-c37824b4808d","22111A",0.0519228633524006 +"Tribromomethane","emission/water","bf5315db-0443-3c49-b072-c37824b4808d","22111B",0.948077136647599 +"Tributlytin","emission/water","b93a1e2f-23b5-34ac-8b22-9ad0fd9f4dd9","22111B",1 +"Trichloroethane","emission/water","c6238bd5-a51a-3d3d-a5d3-c616b46f60da","22111A",1 +"Trichloroethylene","emission/air","2a38b77f-5e72-3a0e-b331-7ce360ac47a1","221117",0.996043589028748 +"Trichloroethylene","emission/air","2a38b77f-5e72-3a0e-b331-7ce360ac47a1","22111A",0.00220192964811788 +"Trichloroethylene","emission/air","2a38b77f-5e72-3a0e-b331-7ce360ac47a1","22111B",0.00175448132313393 +"Trichloroethylene","emission/water","8d6b93c6-3692-33f8-8747-3ae783d298f3","22111A",0.792105793112707 +"Trichloroethylene","emission/water","8d6b93c6-3692-33f8-8747-3ae783d298f3","22111B",0.207894206887293 +"Triethylene glycol monomethyl ether","emission/air","82338eb0-39be-318d-8af3-d555ec1aaacc","22111B",1 +"Uranium","emission/water","a63a9c73-2fe4-3679-93c2-28b6f7fb8915","221115",1 +"Vanadium","emission/air","7e3145d3-a1a3-36d0-ae11-d380127cde8b","22111A",1 +"Vanadium","emission/ground","58a54834-bb23-31a6-9919-7baf655fe7d9","22111A",1 +"Vanadium","emission/water","f5d6980f-0bab-38e7-a203-95da64eb6091","221117",0.0065960262224871 +"Vanadium","emission/water","f5d6980f-0bab-38e7-a203-95da64eb6091","22111A",0.265305710158688 +"Vanadium","emission/water","f5d6980f-0bab-38e7-a203-95da64eb6091","22111B",0.728098263618824 +"Vinyl acetate","emission/air","ca50de59-971c-3414-8f6b-3a1b0062aba8","221117",0.000734819342095433 +"Vinyl acetate","emission/air","ca50de59-971c-3414-8f6b-3a1b0062aba8","22111A",0.984201671905206 +"Vinyl acetate","emission/air","ca50de59-971c-3414-8f6b-3a1b0062aba8","22111B",0.0141216893693981 +"Vinyl acetate","emission/air","ca50de59-971c-3414-8f6b-3a1b0062aba8","22111C",0.000941819383300414 +"Vinyl chloride","emission/air","b5c72fb3-6445-33b7-aec4-ba41e30b8d14","221114",0.00969135170783608 +"Vinyl chloride","emission/air","b5c72fb3-6445-33b7-aec4-ba41e30b8d14","221117",0.958920840431839 +"Vinyl chloride","emission/air","b5c72fb3-6445-33b7-aec4-ba41e30b8d14","22111A",0.028744165922489 +"Vinyl chloride","emission/air","b5c72fb3-6445-33b7-aec4-ba41e30b8d14","22111B",0.00264364193783574 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221111",0.00207653044431615 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221113",0.00128290143971519 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221114",0.000188071996709162 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221115",4.09321521444535e-05 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221116",0.00262473780432478 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221117",0.0723281587449984 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221118",0.044356229231667 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","22111A",0.503284464679958 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","22111B",0.356068120325337 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","22111C",0.0177498531808297 +"Volatile organic compounds","emission/water","e6cafce7-a60f-316b-b264-3127bdc946d0","221117",1 +"Water","emission/water","96054103-8509-3049-a638-c4d13cc707cc","22111A",0.000239555280845553 +"Water","emission/water","96054103-8509-3049-a638-c4d13cc707cc","22111B",0.999760444719154 +"Water","resource/water","e2eb491c-78ff-3123-9e42-494c7d199b44","22111A",0.00271028168881853 +"Water","resource/water","e2eb491c-78ff-3123-9e42-494c7d199b44","22111B",0.997289718311181 +"Water, brackish","emission/water","f96e52c2-2c7e-35c0-8c7d-91877eb37725","221113",0.00267124506635632 +"Water, brackish","emission/water","f96e52c2-2c7e-35c0-8c7d-91877eb37725","22111A",0.0567701416375029 +"Water, brackish","emission/water","f96e52c2-2c7e-35c0-8c7d-91877eb37725","22111B",0.940558613296141 +"Water, brackish","emission/water","f96e52c2-2c7e-35c0-8c7d-91877eb37725","22111C",7.74682590936607e-29 +"Water, brackish","resource/water","a95bae36-325b-3da7-8a47-00ba98b61cfe","221113",0.00354317797954464 +"Water, brackish","resource/water","a95bae36-325b-3da7-8a47-00ba98b61cfe","22111A",0.0579198645299166 +"Water, brackish","resource/water","a95bae36-325b-3da7-8a47-00ba98b61cfe","22111B",0.938536948478006 +"Water, brackish","resource/water","a95bae36-325b-3da7-8a47-00ba98b61cfe","22111C",9.01253276731976e-09 +"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","221113",0.230821513599384 +"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","221114",1.24978990421236e-29 +"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","221117",3.73701063951962e-07 +"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","22111A",0.44704152388281 +"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","22111B",0.322136588816743 +"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","221113",0.230395931895793 +"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","221114",1.21962438262634e-29 +"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","221117",3.71440103394613e-06 +"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","22111A",0.448568094869307 +"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","22111B",0.321032258833866 +"Water, reclaimed","",NA,"221113",0.097331431443412 +"Water, reclaimed","",NA,"22111A",0.752249823965151 +"Water, reclaimed","",NA,"22111B",0.150418744591437 +"Water, saline","emission/water","55222571-f94b-36fd-b74a-4e32219dfe2f","221113",0.380918397067676 +"Water, saline","emission/water","55222571-f94b-36fd-b74a-4e32219dfe2f","22111A",0.0139607147397116 +"Water, saline","emission/water","55222571-f94b-36fd-b74a-4e32219dfe2f","22111B",0.599361703713616 +"Water, saline","emission/water","55222571-f94b-36fd-b74a-4e32219dfe2f","22111C",0.00575918447899592 +"Water, saline","resource/water","67297f72-511b-3e86-b7e4-676437a75dbf","221113",0.379748786979834 +"Water, saline","resource/water","67297f72-511b-3e86-b7e4-676437a75dbf","22111A",0.0161601149204466 +"Water, saline","resource/water","67297f72-511b-3e86-b7e4-676437a75dbf","22111B",0.598351010648577 +"Water, saline","resource/water","67297f72-511b-3e86-b7e4-676437a75dbf","22111C",0.00574008745114206 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221111",0.0111274013364794 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221113",0.000203179698634139 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221115",3.45950389064905e-06 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221116",0.000277123072026199 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221117",0.129956098672212 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","22111A",0.0930450307180925 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","22111B",0.764160296429279 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","22111C",0.0012274105693863 +"Xylene","emission/ground","c05b7f1c-b8b3-35a6-990b-d71f591b7511","22111A",0.296428571428571 +"Xylene","emission/ground","c05b7f1c-b8b3-35a6-990b-d71f591b7511","22111B",0.7 +"Xylene","emission/ground","c05b7f1c-b8b3-35a6-990b-d71f591b7511","22111C",0.00357142857142857 +"Xylene","emission/water","11b4481a-d297-349a-89fc-102009c1410c","221111",0.112025562459099 +"Xylene","emission/water","11b4481a-d297-349a-89fc-102009c1410c","22111B",0.720572555841545 +"Xylene","emission/water","11b4481a-d297-349a-89fc-102009c1410c","22111C",0.167401881699356 +"Zinc","emission/air","435bfa52-d2d3-3760-abf4-27de892972ac","22111A",1 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221111",0.0100271001251767 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221113",0.090068910663191 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221114",0.000689164936262362 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221117",0.00012478429839769 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221118",0.00342584888605783 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111A",0.808855207362032 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111B",0.0867986402620995 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111C",1.03434667825116e-05 From 23a24515f6712ec2376868fc974ad0c71cc56b8b Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 6 Sep 2021 19:15:05 -0400 Subject: [PATCH 020/319] add flag for env ratio disaggregation --- R/DisaggregateFunctions.R | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 00b7a0b2..70fcee29 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -39,11 +39,15 @@ disaggregateModel <- function (model){ if(!is.null(disagg$EnvFile)){ disagg$EnvFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$EnvFile, package = "useeior"), header = TRUE, stringsAsFactors = FALSE, colClasses=c("Sector"="character"))} + if("FlowRatio" %in% colnames(disagg$EnvFileDF)){ + disagg$EnvAllocRatio <- TRUE + } + else{ + disagg$EnvAllocRatio <- FALSE + } #Need to assign these DFs back to the modelspecs model$DisaggregationSpecs$Disaggregation[[counter]] <- disagg - #Assign flag to disaggregationSpecs indicating ratios or totals. If it has FlowRatio field then assign flag as TRUE, otherwise FALSE.#TODO - - + logging::loginfo("Initializing Disaggregation of IO tables...") #Disaggregating sector lists From 86f4bdabfb2a04defda6925e1c5a44c96ca8fdc2 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 6 Sep 2021 19:16:27 -0400 Subject: [PATCH 021/319] refac disaggregateSatelliteTable to better address allocation approaches and use new function disaggregateSatelliteSubsetByRatio --- R/DisaggregateFunctions.R | 137 ++++++++++++++++++-------------------- 1 file changed, 63 insertions(+), 74 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 70fcee29..fe995960 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -259,86 +259,75 @@ disaggregateSectorDFs <- function(model, disagg, list_type) return(newSectors) } +#' Disaggregate a portion of a satellite table based on an allocation_vector +#' @param sattable A standardized satellite table to be disaggregated. +#' @param disagg Specifications for disaggregating the current Table +#' @param allocation_vector named vector of allocation ratios +#' @return A satellite table with new sectors added. +disaggregateSatelliteSubsetByRatio <- function(sattable, disagg, allocation_vector = NULL) { + + if(is.null(allocation_vector) & !is.null(disagg$MakeFileDF)) { + GrossOutputAlloc <- subset(disagg$MakeFileDF, IndustryCode == disagg$OriginalSectorCode) + allocation_vector <- setNames(GrossOutputAlloc$PercentMake, gsub("/.*", "", GrossOutputAlloc$CommodityCode)) + } else if(is.null(allocation_vector)) { + allocation_vector <- setNames(rep(1/length(disagg$DisaggregatedSectorCodes), + times = length(disagg$DisaggregatedSectorCodes)), + gsub("/.*", "", disagg$DisaggregatedSectorCodes)) + } + sattable_subset_disaggregated <- sattable + i<-1 + for (new_sector in gsub("/.*", "", disagg$DisaggregatedSectorCodes)){ + new_sector_totals <- sattable + # Update the sector and sector name + new_sector_totals$Sector <- new_sector + new_sector_totals$SectorName <- disagg$DisaggregatedSectorNames[[i]] + new_sector_totals$FlowAmount <- new_sector_totals$FlowAmount * allocation_vector[[new_sector]] + # Modify other metadata or DQI? + + # Append to the original satellite subset + sattable_subset_disaggregated <- rbind(sattable_subset_disaggregated,new_sector_totals) + i <- i+1 + } + return(sattable_subset_disaggregated) +} + + #' Disaggregate satellite tables from static file based on specs -#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param disagg Specifications for disaggregating the current Table #' @param sattable A standardized satellite table with resource and emission names from original sources. -#' @param sat The abbreviation for the satellite table. +#' @param sat_spec, a standard specification for a single satellite table. #' @return A standardized satellite table with old sectors removed and new sectors added. -disaggregateSatelliteTable <- function (model, sattable, sat){ - - # For each disaggregation: - for (disagg in model$DisaggregationSpecs$Disaggregation){ - #check for flag indicating ratios or totals #TODO - if(disagg$OriginalSectorCode %in% sattable$Sector){ - default_disaggregation <- FALSE - # If satellite table data is provided for the new sector assign it here - if(!is.null(disagg$EnvFileDF)){ - new_sector_totals <- disagg$EnvFileDF - # Select only those rows from the disaggregation env file that apply for this satellite table - new_sector_totals <- subset(new_sector_totals, SatelliteTable==sat$Abbreviation, colnames(sattable)) - if(nrow(new_sector_totals)==0){ - logging::logwarn(paste0("No data found for disaggregation of ",sat$Abbreviation," - applying default allocation")) - default_disaggregation <- TRUE +disaggregateSatelliteTable <- function (disagg, sattable, sat_spec) { + original_code <- gsub("/.*", "", disagg$OriginalSectorCode) + if(original_code %in% sattable$Sector) { + if(!is.null(disagg$EnvFileDF) & disagg$EnvAllocRatio) { + # If satellite table data is provided as flow by sector ratios, loop through each flow + allocation_vector <- 0 + sattable <- disaggregateSatelliteSubsetByRatio(sattable, disagg, allocation_vector) + } else if(!is.null(disagg$EnvFileDF)) { + # If satellite table data is provided as new flow by sector totals file + # Select only those rows from the disaggregation env file that apply for this satellite table + new_sector_totals <- subset(disagg$EnvFileDF, SatelliteTable==sat_spec$Abbreviation, colnames(sattable)) + if(nrow(new_sector_totals)==0) { + logging::logwarn(paste0("No data found for disaggregation of ",sat_spec$Abbreviation," - applying default allocation")) + sattable <- rbind(sattable, disaggregateSatelliteSubsetByRatio(subset(sattable, Sector==original_code, colnames(sattable)), disagg)) + } else { + # Check for errors in satellite table + included_sectors <- unique(new_sector_totals[,"Sector"]) + if (!identical(sort(included_sectors),sort(unlist(gsub("/.*","",disagg$DisaggregatedSectorCodes))))) { + logging::logwarn("Satellite table does not include all disaggregated sectors") } - else{ - # Check for errors in sattelite table - included_sectors <- unique(new_sector_totals[,"Sector"]) - if (!identical(sort(included_sectors),sort(unlist(disagg$DisaggregatedSectorCodes)))){ - logging::logwarn("Satellite table does not include all disaggregated sectors") - } - - # Append to the main dataframe - sattable <- rbind(sattable,new_sector_totals) + # Append to the main dataframe + sattable <- rbind(sattable,new_sector_totals) } - } - else{ - default_disaggregation <- TRUE - } - - if(default_disaggregation){ - # Subset the totals from the original sector - old_sector_totals <- subset(sattable, Sector==disagg$OriginalSectorCode, colnames(sattable)) - - if(!nrow(old_sector_totals)==0){ - i<-0 - for (new_sector in disagg$DisaggregatedSectorCodes){ - i<-i+1 - new_sector_totals <- old_sector_totals - new_sector_totals$Sector <- disagg$DisaggregatedSectorCodes[[i]] - new_sector_totals$SectorName <- disagg$DisaggregatedSectorNames[[i]] - - # If satellite table is disaggregated proportional to gross output do that here - if(!is.null(disagg$MakeFileDF)){ - GrossOutputAlloc <- subset(disagg$MakeFileDF, - (IndustryCode == disagg$OriginalSectorCode & CommodityCode == new_sector)) - if(nrow(GrossOutputAlloc)==0){ - allocation <- 0 - } - else{ - allocation <- GrossOutputAlloc$PercentMake - } - new_sector_totals$FlowAmount <- (new_sector_totals$FlowAmount * allocation) - } - - # Else, divide equally across new sectors - else{ - new_sector_totals$FlowAmount <- (new_sector_totals$FlowAmount / length(disagg$DisaggregatedSectorCodes)) - } - # Modify other metadata or DQI? - - - # Append to the main dataframe - sattable <- rbind(sattable,new_sector_totals) - } - - }} - # Remove the old_sector_totals - sattable_disaggregated <- subset(sattable, Sector!=disagg$OriginalSectorCode) + } else { + # No satellite table data provided, use default allocation + sattable <- rbind(sattable, disaggregateSatelliteSubsetByRatio(subset(sattable, Sector==original_code, colnames(sattable)), disagg)) } - else{ # No disaggregation needed - sattable_disaggregated <- sattable - }} - + } + # Remove data for the original sector + sattable_disaggregated <- subset(sattable, Sector!=original_code) + return(sattable_disaggregated) } From 42c18ede89344b7f87d40384bd14bac41889d4b8 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 6 Sep 2021 19:19:39 -0400 Subject: [PATCH 022/319] move loop for multiple disaggregations into LoadSatellites --- R/LoadSatellites.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index ed866cdb..87494f9e 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -146,7 +146,9 @@ conformTbStoIOSchema <- function(tbs, sat_spec, model) { } # Check if disaggregation is needed based on model metadata if(!is.null(model$specs$DisaggregationSpecs) & !is.null(sat_spec$StaticFile)){ - tbs <- disaggregateSatelliteTable(model, tbs, sat_spec) + for (disagg in model$DisaggregationSpecs$Disaggregation){ + tbs <- disaggregateSatelliteTable(disagg, tbs, sat_spec) + } } for (r in model$specs$ModelRegionAcronyms) { From d5997b2b7615167174df699e612c5f554d3e8db2 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 6 Sep 2021 20:57:13 -0400 Subject: [PATCH 023/319] drop location code from waste env disaggregation df --- .../disaggspecs/WasteDisaggregation_Env.csv | 210 +++++++++--------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/inst/extdata/disaggspecs/WasteDisaggregation_Env.csv b/inst/extdata/disaggspecs/WasteDisaggregation_Env.csv index 158d9d06..d7000cdc 100644 --- a/inst/extdata/disaggspecs/WasteDisaggregation_Env.csv +++ b/inst/extdata/disaggspecs/WasteDisaggregation_Env.csv @@ -1,106 +1,106 @@ Flowable,Sector,SectorName,Year,FlowAmount,DataReliability,TechnologicalCorrelation,DataCollection,GeographicalCorrelation,TemporalCorrelation,Location,Context,Unit,MetaSources,SatelliteTable -Hexafluoroethane,562910/US,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Hexafluoroethane,562920/US,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Hexafluoroethane,562HAZ/US,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Hexafluoroethane,562OTH/US,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Hexafluoroethane,562111/US,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Hexafluoroethane,562212/US,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Hexafluoroethane,562213/US,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluoropropane,562920/US,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluoropropane,562HAZ/US,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluoropropane,562111/US,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluoropropane,562212/US,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluoropropane,562910/US,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluoropropane,562OTH/US,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluoropropane,562213/US,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluorocyclobutane,562111/US,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluorocyclobutane,562212/US,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluorocyclobutane,562213/US,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluorocyclobutane,562910/US,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluorocyclobutane,562920/US,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluorocyclobutane,562HAZ/US,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Perfluorocyclobutane,562OTH/US,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Carbon tetrafluoride,562111/US,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Carbon tetrafluoride,562212/US,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Carbon tetrafluoride,562213/US,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Carbon tetrafluoride,562HAZ/US,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Carbon tetrafluoride,562910/US,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Carbon tetrafluoride,562OTH/US,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Carbon tetrafluoride,562920/US,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Methane,562111/US,Solid waste collection,2016,72426.62017,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Methane,562212/US,Solid waste landfilling,2016,4308011322,2,1,1,1,1,US,emission/air,kg,GHG,GHG -Methane,562213/US,Solid waste combustors and incinerators,2016,4652.673673,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Methane,562910/US,Remediation services,2016,26985.5073,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Methane,562920/US,Material separation/recovery facilities,2016,7599.366999,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Methane,562HAZ/US,Hazardous waste collection treatment and disposal,2016,19696.31855,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Methane,562OTH/US,Other waste collection and treatment services,2016,84012407.13,2,1,1,1,1,US,emission/air,kg,GHG,GHG -Carbon dioxide,562111/US,Solid waste collection,2016,592744553.3,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Carbon dioxide,562212/US,Solid waste landfilling,2016,92656000.84,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Carbon dioxide,562213/US,Solid waste combustors and incinerators,2016,10738077809,2,1,1,1,1,US,emission/air,kg,GHG,GHG -Carbon dioxide,562910/US,Remediation services,2016,220851289.7,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Carbon dioxide,562920/US,Material separation/recovery facilities,2016,62193753.99,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Carbon dioxide,562HAZ/US,Hazardous waste collection treatment and disposal,2016,161196056.3,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Carbon dioxide,562OTH/US,Other waste collection and treatment services,2016,101540822.8,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-125,562111/US,Solid waste collection,2016,44805.15779,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-125,562212/US,Solid waste landfilling,2016,7003.804108,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-125,562213/US,Solid waste combustors and incinerators,2016,2878.275661,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-125,562910/US,Remediation services,2016,16693.99883,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-125,562920/US,Material separation/recovery facilities,2016,4701.18358,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-125,562HAZ/US,Hazardous waste collection treatment and disposal,2016,12184.7003,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-125,562OTH/US,Other waste collection and treatment services,2016,7675.401763,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-134a,562212/US,Solid waste landfilling,2016,19108.77573,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-134a,562910/US,Remediation services,2016,45546.9449,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-134a,562213/US,Solid waste combustors and incinerators,2016,7852.921534,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-134a,562920/US,Material separation/recovery facilities,2016,12826.43851,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-134a,562HAZ/US,Hazardous waste collection treatment and disposal,2016,33244.03449,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-134a,562111/US,Solid waste collection,2016,122243.8119,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-134a,562OTH/US,Other waste collection and treatment services,2016,20941.12409,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-143a,562212/US,Solid waste landfilling,2016,3019.849578,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-143a,562213/US,Solid waste combustors and incinerators,2016,1241.034073,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-143a,562910/US,Remediation services,2016,7197.997623,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-143a,562920/US,Material separation/recovery facilities,2016,2027.022319,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-143a,562HAZ/US,Hazardous waste collection treatment and disposal,2016,5253.710909,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-143a,562OTH/US,Other waste collection and treatment services,2016,3309.424195,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-143a,562111/US,Solid waste collection,2016,19318.76374,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-23,562111/US,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -HFC-23,562212/US,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -HFC-23,562213/US,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -HFC-23,562910/US,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -HFC-23,562920/US,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -HFC-23,562HAZ/US,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -HFC-23,562OTH/US,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -HFC-236fa,562111/US,Solid waste collection,2016,366.78081,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-236fa,562212/US,Solid waste landfilling,2016,57.33404524,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-236fa,562213/US,Solid waste combustors and incinerators,2016,23.5619364,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-236fa,562910/US,Remediation services,2016,136.6592311,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-236fa,562920/US,Material separation/recovery facilities,2016,38.48449612,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-236fa,562HAZ/US,Hazardous waste collection treatment and disposal,2016,99.74553077,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-236fa,562OTH/US,Other waste collection and treatment services,2016,62.8318304,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-32,562212/US,Solid waste landfilling,2016,3888.522357,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-32,562213/US,Solid waste combustors and incinerators,2016,1598.022887,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-32,562910/US,Remediation services,2016,9268.532742,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-32,562920/US,Material separation/recovery facilities,2016,2610.104048,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-32,562HAZ/US,Hazardous waste collection treatment and disposal,2016,6764.963553,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-32,562OTH/US,Other waste collection and treatment services,2016,4261.394364,4,5,1,1,1,US,emission/air,kg,GHG,GHG -HFC-32,562111/US,Solid waste collection,2016,24875.8896,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Nitrous oxide,562111/US,Solid waste collection,2016,2661.242494,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Nitrous oxide,562212/US,Solid waste landfilling,2016,415.9972206,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Nitrous oxide,562213/US,Solid waste combustors and incinerators,2016,1006882.367,2,1,1,1,1,US,emission/air,kg,GHG,GHG -Nitrous oxide,562910/US,Remediation services,2016,991.555019,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Nitrous oxide,562OTH/US,Other waste collection and treatment services,2016,6376294.814,4,1,1,1,1,US,emission/air,kg,GHG,GHG -Nitrous oxide,562920/US,Material separation/recovery facilities,2016,279.2310111,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Nitrous oxide,562HAZ/US,Hazardous waste collection treatment and disposal,2016,723.721192,4,5,1,1,1,US,emission/air,kg,GHG,GHG -Nitrogen trifluoride,562111/US,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Nitrogen trifluoride,562212/US,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Nitrogen trifluoride,562213/US,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Nitrogen trifluoride,562910/US,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Nitrogen trifluoride,562HAZ/US,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Nitrogen trifluoride,562920/US,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Nitrogen trifluoride,562OTH/US,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Sulfur hexafluoride,562111/US,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Sulfur hexafluoride,562212/US,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Sulfur hexafluoride,562213/US,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Sulfur hexafluoride,562910/US,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Sulfur hexafluoride,562920/US,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Sulfur hexafluoride,562HAZ/US,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG -Sulfur hexafluoride,562OTH/US,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Hexafluoroethane,562910,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Hexafluoroethane,562920,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Hexafluoroethane,562HAZ,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Hexafluoroethane,562OTH,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Hexafluoroethane,562111,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Hexafluoroethane,562212,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Hexafluoroethane,562213,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluoropropane,562920,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluoropropane,562HAZ,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluoropropane,562111,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluoropropane,562212,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluoropropane,562910,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluoropropane,562OTH,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluoropropane,562213,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluorocyclobutane,562111,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluorocyclobutane,562212,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluorocyclobutane,562213,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluorocyclobutane,562910,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluorocyclobutane,562920,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluorocyclobutane,562HAZ,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Perfluorocyclobutane,562OTH,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Carbon tetrafluoride,562111,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Carbon tetrafluoride,562212,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Carbon tetrafluoride,562213,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Carbon tetrafluoride,562HAZ,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Carbon tetrafluoride,562910,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Carbon tetrafluoride,562OTH,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Carbon tetrafluoride,562920,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Methane,562111,Solid waste collection,2016,72426.62017,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Methane,562212,Solid waste landfilling,2016,4308011322,2,1,1,1,1,US,emission/air,kg,GHG,GHG +Methane,562213,Solid waste combustors and incinerators,2016,4652.673673,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Methane,562910,Remediation services,2016,26985.5073,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Methane,562920,Material separation/recovery facilities,2016,7599.366999,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Methane,562HAZ,Hazardous waste collection treatment and disposal,2016,19696.31855,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Methane,562OTH,Other waste collection and treatment services,2016,84012407.13,2,1,1,1,1,US,emission/air,kg,GHG,GHG +Carbon dioxide,562111,Solid waste collection,2016,592744553.3,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Carbon dioxide,562212,Solid waste landfilling,2016,92656000.84,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Carbon dioxide,562213,Solid waste combustors and incinerators,2016,10738077809,2,1,1,1,1,US,emission/air,kg,GHG,GHG +Carbon dioxide,562910,Remediation services,2016,220851289.7,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Carbon dioxide,562920,Material separation/recovery facilities,2016,62193753.99,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Carbon dioxide,562HAZ,Hazardous waste collection treatment and disposal,2016,161196056.3,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Carbon dioxide,562OTH,Other waste collection and treatment services,2016,101540822.8,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-125,562111,Solid waste collection,2016,44805.15779,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-125,562212,Solid waste landfilling,2016,7003.804108,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-125,562213,Solid waste combustors and incinerators,2016,2878.275661,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-125,562910,Remediation services,2016,16693.99883,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-125,562920,Material separation/recovery facilities,2016,4701.18358,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-125,562HAZ,Hazardous waste collection treatment and disposal,2016,12184.7003,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-125,562OTH,Other waste collection and treatment services,2016,7675.401763,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-134a,562212,Solid waste landfilling,2016,19108.77573,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-134a,562910,Remediation services,2016,45546.9449,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-134a,562213,Solid waste combustors and incinerators,2016,7852.921534,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-134a,562920,Material separation/recovery facilities,2016,12826.43851,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-134a,562HAZ,Hazardous waste collection treatment and disposal,2016,33244.03449,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-134a,562111,Solid waste collection,2016,122243.8119,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-134a,562OTH,Other waste collection and treatment services,2016,20941.12409,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-143a,562212,Solid waste landfilling,2016,3019.849578,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-143a,562213,Solid waste combustors and incinerators,2016,1241.034073,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-143a,562910,Remediation services,2016,7197.997623,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-143a,562920,Material separation/recovery facilities,2016,2027.022319,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-143a,562HAZ,Hazardous waste collection treatment and disposal,2016,5253.710909,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-143a,562OTH,Other waste collection and treatment services,2016,3309.424195,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-143a,562111,Solid waste collection,2016,19318.76374,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-23,562111,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +HFC-23,562212,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +HFC-23,562213,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +HFC-23,562910,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +HFC-23,562920,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +HFC-23,562HAZ,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +HFC-23,562OTH,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +HFC-236fa,562111,Solid waste collection,2016,366.78081,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-236fa,562212,Solid waste landfilling,2016,57.33404524,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-236fa,562213,Solid waste combustors and incinerators,2016,23.5619364,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-236fa,562910,Remediation services,2016,136.6592311,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-236fa,562920,Material separation/recovery facilities,2016,38.48449612,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-236fa,562HAZ,Hazardous waste collection treatment and disposal,2016,99.74553077,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-236fa,562OTH,Other waste collection and treatment services,2016,62.8318304,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-32,562212,Solid waste landfilling,2016,3888.522357,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-32,562213,Solid waste combustors and incinerators,2016,1598.022887,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-32,562910,Remediation services,2016,9268.532742,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-32,562920,Material separation/recovery facilities,2016,2610.104048,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-32,562HAZ,Hazardous waste collection treatment and disposal,2016,6764.963553,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-32,562OTH,Other waste collection and treatment services,2016,4261.394364,4,5,1,1,1,US,emission/air,kg,GHG,GHG +HFC-32,562111,Solid waste collection,2016,24875.8896,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Nitrous oxide,562111,Solid waste collection,2016,2661.242494,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Nitrous oxide,562212,Solid waste landfilling,2016,415.9972206,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Nitrous oxide,562213,Solid waste combustors and incinerators,2016,1006882.367,2,1,1,1,1,US,emission/air,kg,GHG,GHG +Nitrous oxide,562910,Remediation services,2016,991.555019,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Nitrous oxide,562OTH,Other waste collection and treatment services,2016,6376294.814,4,1,1,1,1,US,emission/air,kg,GHG,GHG +Nitrous oxide,562920,Material separation/recovery facilities,2016,279.2310111,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Nitrous oxide,562HAZ,Hazardous waste collection treatment and disposal,2016,723.721192,4,5,1,1,1,US,emission/air,kg,GHG,GHG +Nitrogen trifluoride,562111,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Nitrogen trifluoride,562212,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Nitrogen trifluoride,562213,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Nitrogen trifluoride,562910,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Nitrogen trifluoride,562HAZ,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Nitrogen trifluoride,562920,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Nitrogen trifluoride,562OTH,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Sulfur hexafluoride,562111,Solid waste collection,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Sulfur hexafluoride,562212,Solid waste landfilling,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Sulfur hexafluoride,562213,Solid waste combustors and incinerators,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Sulfur hexafluoride,562910,Remediation services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Sulfur hexafluoride,562920,Material separation/recovery facilities,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Sulfur hexafluoride,562HAZ,Hazardous waste collection treatment and disposal,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG +Sulfur hexafluoride,562OTH,Other waste collection and treatment services,2016,0,NA,NA,1,1,1,US,emission/air,kg,GHG,GHG From f397865e6c318f7122268e13d5fd7e068da508bc Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 6 Sep 2021 21:02:08 -0400 Subject: [PATCH 024/319] apply env allocation ratios per flow --- R/DisaggregateFunctions.R | 24 +++++++++++++++---- .../ElectricityDisaggregationDetail.yml | 2 +- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index fe995960..630bf965 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -281,7 +281,11 @@ disaggregateSatelliteSubsetByRatio <- function(sattable, disagg, allocation_vect # Update the sector and sector name new_sector_totals$Sector <- new_sector new_sector_totals$SectorName <- disagg$DisaggregatedSectorNames[[i]] - new_sector_totals$FlowAmount <- new_sector_totals$FlowAmount * allocation_vector[[new_sector]] + allocation <- 0 + if (new_sector %in% names(allocation_vector)){ + allocation <- allocation_vector[[new_sector]] + } + new_sector_totals$FlowAmount <- new_sector_totals$FlowAmount * allocation # Modify other metadata or DQI? # Append to the original satellite subset @@ -301,9 +305,21 @@ disaggregateSatelliteTable <- function (disagg, sattable, sat_spec) { original_code <- gsub("/.*", "", disagg$OriginalSectorCode) if(original_code %in% sattable$Sector) { if(!is.null(disagg$EnvFileDF) & disagg$EnvAllocRatio) { - # If satellite table data is provided as flow by sector ratios, loop through each flow - allocation_vector <- 0 - sattable <- disaggregateSatelliteSubsetByRatio(sattable, disagg, allocation_vector) + # If satellite table data is provided as flow by sector ratios, loop through each flow assigned to original sector + sattable_original = subset(sattable, Sector==original_code) + for(flow in unique(sattable_original$Flowable)) { + # TODO: Temporary link based on flow name; update to UUID + allocation_df <- subset(disagg$EnvFileDF, Flowable==flow) + if(nrow(allocation_df)==0) { + allocation_vector <- NULL + } else { + allocation_vector <- setNames(allocation_df$FlowRatio, allocation_df$Sector) + } + disaggregated_flows <- disaggregateSatelliteSubsetByRatio(subset(sattable_original, Flowable==flow, colnames(sattable)), + disagg, allocation_vector) + sattable <- rbind(sattable, disaggregated_flows) + + } } else if(!is.null(disagg$EnvFileDF)) { # If satellite table data is provided as new flow by sector totals file # Select only those rows from the disaggregation env file that apply for this satellite table diff --git a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml index abd2063a..bd8cbc56 100644 --- a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml +++ b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml @@ -7,4 +7,4 @@ Disaggregation: SectorFile: ElectricityDisaggregation_Sectors.csv MakeFile: ElectricityDisaggregationDetail_Make.csv UseFile: ElectricityDisaggregationDetail_Use.csv - # EnvFile: ElectricityDisaggregation_Env.csv + EnvFile: ElectricityDisaggregation_Env.csv From 389c8a29be4e3fba359b6dfa5cb08792f31c04e0 Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 6 Sep 2021 22:07:57 -0400 Subject: [PATCH 025/319] added yml files for secuential disaggregation of waste and electricity --- .../WasteElectricityDisaggregationDetail.yml | 18 + .../USEEIOv2.0_Waste_Electricity_disagg.yml | 880 ++++++++++++++++++ 2 files changed, 898 insertions(+) create mode 100644 inst/extdata/disaggspecs/WasteElectricityDisaggregationDetail.yml create mode 100644 inst/extdata/modelspecs/USEEIOv2.0_Waste_Electricity_disagg.yml diff --git a/inst/extdata/disaggspecs/WasteElectricityDisaggregationDetail.yml b/inst/extdata/disaggspecs/WasteElectricityDisaggregationDetail.yml new file mode 100644 index 00000000..bf8600e5 --- /dev/null +++ b/inst/extdata/disaggspecs/WasteElectricityDisaggregationDetail.yml @@ -0,0 +1,18 @@ +Aggregation: ["221100/US", "S00101/US", "S00202/US"] # Aggregates to first sector listed +Disaggregation: + 562000/US: + OriginalSectorCode: "562000/US" + OrignalSectorName: "Waste Management and remediation services" + DisaggregationType: "Userdefined" + SectorFile: WasteDisaggregation_Sectors.csv + MakeFile: WasteDisaggregationDetail_Make.csv + UseFile: WasteDisaggregationDetail_Use.csv + EnvFile: WasteDisaggregation_Env.csv #Update of GHGs from NGIAM for waste sectors + 221100/US: + OriginalSectorCode: "221100/US" + OrignalSectorName: "Electric power generation, transmission, and distribution" + DisaggregationType: "Userdefined" + SectorFile: ElectricityDisaggregation_Sectors.csv + MakeFile: ElectricityDisaggregationDetail_Make.csv + UseFile: ElectricityDisaggregationDetail_Use.csv + # EnvFile: ElectricityDisaggregation_Env.csv diff --git a/inst/extdata/modelspecs/USEEIOv2.0_Waste_Electricity_disagg.yml b/inst/extdata/modelspecs/USEEIOv2.0_Waste_Electricity_disagg.yml new file mode 100644 index 00000000..8e2ecca7 --- /dev/null +++ b/inst/extdata/modelspecs/USEEIOv2.0_Waste_Electricity_disagg.yml @@ -0,0 +1,880 @@ +Model: "USEEIOv2.0_waste_electricity_disagg" +BaseIOSchema: 2012 +BaseIOLevel: "Detail" +IOYear: 2012 # Year for IO data +ModelRegionAcronyms: ["US"] +ModelType: "EEIO" +IODataSource: "BEA" +BasePriceType: "PRO" #producer +BasewithRedefinitions: FALSE +CommodityorIndustryType: "Commodity" +ScrapIncluded: FALSE +DisaggregationSpecs: "WasteElectricityDisaggregationDetail" #Name of disaggregation yml file. + +SatelliteTable: + WAT: + FullName: "Water withdrawals" + Abbreviation: "WAT" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v0.1_864d573.parquet" + FileLocation: "DataCommons" + DataYears: [2015] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + USGS_NWIS_WU_2015: + Title: "Water Use in the US" + Author: "USGS" + DataYear: 2015 + URL: "https://waterdata.usgs.gov/" + Primary: TRUE + CHAIR: + FullName: "Criteria and Hazardous Air Emissions" + Abbreviation: "CHAIR" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/CAP_HAP_national_2017_v0.1_864d573.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + EPA_NEI_2017: + Title: "National Emissions Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/air-emissions-inventories/national-emissions-inventory-nei" + Primary: TRUE + EPA_TRI_2017: + Title: "Toxic Release Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/toxics-release-inventory-tri-program" + Primary: TRUE + GRDREL: + FullName: "Point source industrial releases to ground" + Abbreviation: "GRDREL" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/GRDREL_national_2017_v0.1_864d573.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + EPA_TRI_2017: + Title: "Toxic Release Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/toxics-release-inventory-tri-program" + Primary: TRUE + WATREL: + FullName: "Point source releases to water" + Abbreviation: "WATREL" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/TRI_DMR_national_2017_v0.1_864d573.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + EPA_TRI_2017: + Title: "Toxic Release Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/toxics-release-inventory-tri-program" + Primary: TRUE + EPA_DMR_2017: + Title: "Discharge Monitoring Report" + Author: "EPA" + DataYear: 2017 + URL: "https://echo.epa.gov/tools/data-downloads/icis-npdes-dmr-and-limit-data-set" + Primary: TRUE + GHG: + FullName: "Greenhouse Gases" + Abbreviation: "GHG" + StaticSource: TRUE + StaticFile: "useeior/NGHGIAM_GHG_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2016] + Locations: ["US"] + SectorListSource: "BEA" # or, NAICS + SectorListYear: 2012 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USEPA_GHG_2018: + Title: "GHG Inventory" + Author: "USEPA" + DataYear: 2016 + URL: "https://www.epa.gov/ghgemissions/inventory-us-greenhouse-gas-emissions-and-sinks-1990-2016" + Primary: TRUE + LAND: + FullName: "Land use" + Abbreviation: "LAND" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/Land_national_2012_v0.1.1_66af8ab.parquet" + FileLocation: "DataCommons" + DataYears: [2012] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + BLM_PLS: + Title: "Public Land Statistics" + Author: "BLM" + DataYear: 2012 + URL: "https://www.blm.gov/about/data/public-land-statistics" + Primary: FALSE + EIA_CBECS_Land: + Title: "Commercial Building Energy Consumption Survey" + Author: "EIA" + DataYear: 2012 + URL: "https://www.eia.gov/consumption/commercial/data/2012/" + Primary: FALSE + EIA_MECS_Land: + Title: "Manufacturing Energy Consumption Survey" + Author: "EIA" + DataYear: 2014 + URL: "https://www.eia.gov/consumption/manufacturing/data/2014/" + Primary: FALSE + USDA_ERS_MLU: + Title: "Major Uses of Land in the United States" + Author: "USDA" + DataYear: 2012 + URL: "https://www.ers.usda.gov/data-products/major-land-uses/" + Primary: TRUE + MINE: + FullName: "Mineral extraction" + Abbreviation: "MINE" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_MINE_TotalsBySector_FEDEFL.csv" + FileLocation: "DataCommons" + DataYears: [2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USGS_MCS: + Title: "Mineral Commodity Summary" + Author: "USGS" + DataYear: 2014 + URL: "https://www.usgs.gov/centers/nmic/mineral-commodity-summaries" + Primary: TRUE + ENERGY: + FullName: "Energy extraction" + Abbreviation: "ENERGY" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_Energy_TotalsBySector_FEDEFL.csv" + FileLocation: "DataCommons" + DataYears: [2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + EIA_MER: + Title: "Monthly Energy Review" + Author: "EIA" + DataYear: 2014 + URL: "http://www.eia.gov/totalenergy/data/monthly/" + Primary: TRUE + EIA_923: + Title: "Form EIA-923 Detailed" + Author: "EIA" + DataYear: 2014 + URL: "https://www.eia.gov/electricity/data/eia923/" + Primary: TRUE + NPAG: + FullName: "Nitrogen and Phosphorus Releases from Agriculture" + Abbreviation: "NPAG" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_NPAG_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2013, 2015] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USDA_CUS_Corn_Potatoes: + Title: "Chemical Use Survey - Corn and Potatoes" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" + Primary: FALSE + USDA_CUS_Cotton: + Title: "Chemical Use Survey - Cotton" + Author: "USDA" + DataYear: 2010 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" + Primary: FALSE + USDA_CUS_Fruit: + Title: "Chemical Use Survey - Fruit" + Author: "USDA" + DataYear: 2011 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" + Primary: FALSE + USDA_CUS_Peanuts_Rice: + Title: "Chemical Use Survey - Peanuts and Rice" + Author: "USDA" + DataYear: 2013 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" + Primary: FALSE + USDA_CUS_Soybeans_Wheat: + Title: "Chemical Use Survey - Soybeans and Wheat" + Author: "USDA" + DataYear: 2012 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" + Primary: FALSE + USDA_CUS_Vegetables: + Title: "Chemical Use Survey - Vegetables" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" + Primary: FALSE + PEST: + FullName: "Pesticide releases" + Abbreviation: "PEST" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_PEST_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2004, 2005, 2010, 2011, 2012, 2013, 2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USDA_CUS_Corn_Potatoes: + Title: "Chemical Use Survey - Corn and Potatoes" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" + Primary: FALSE + USDA_CUS_Cotton: + Title: "Chemical Use Survey - Cotton" + Author: "USDA" + DataYear: 2010 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" + Primary: FALSE + USDA_CUS_Fruit: + Title: "Chemical Use Survey - Fruit" + Author: "USDA" + DataYear: 2011 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" + Primary: FALSE + USDA_CUS_Peanuts_Rice: + Title: "Chemical Use Survey - Peanuts and Rice" + Author: "USDA" + DataYear: 2013 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" + Primary: FALSE + USDA_CUS_Soybeans_Wheat: + Title: "Chemical Use Survey - Soybeans and Wheat" + Author: "USDA" + DataYear: 2012 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" + Primary: FALSE + USDA_CUS_Vegetables: + Title: "Chemical Use Survey - Vegetables" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" + Primary: FALSE + CNHW: + FullName: "Commercial non-hazardous waste excluding construction activities" + Abbreviation: "CNHW" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_CNHW_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2015] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "Waste Characterization Study 2014" + DataSources: + CalRecycle_CWCS: + Title: "2014 Generator-Based Characterization of Commercial Sector" + Author: "CalRecycle" + DataYear: 2014 + URL: "https://www2.calrecycle.ca.gov/WasteCharacterization/PubExtracts/2014/GenSummary.pdf" + Primary: TRUE + CNHWC: + FullName: "Commercial non-hazardous waste from construction activities" + Abbreviation: "CNHWC" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_CNHWC_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "CDDPath" + DataSources: + USEPA_FF_2014: + Title: "Advancing Sustainable Materials Management: 2014 Fact Sheet" + Author: "USEPA" + DataYear: 2014 + URL: "https://www.epa.gov/sites/production/files/2016-11/documents/2014_smmfactsheet_508.pdf" + Primary: TRUE + CRHW: + FullName: "Commercial RCRA-defined hazardous waste" + Abbreviation: "CRHW" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/CRHW_national_2017_v0.1_864d573.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + OriginalFlowSource: "RCRAInfo" + DataSources: + USEPA_RCRAInfo_2017: + Title: "National Biennial RCRA Hazardous Waste Report" + Author: "USEPA" + DataYear: 2017 + URL: "https://rcrapublic.epa.gov/rcrainfoweb/action/modules/br/main/broverview" + Primary: TRUE + EMP: + FullName: "Employment" + Abbreviation: "EMP" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/Employment_national_2017_v0.1.1_66af8ab.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + OriginalFlowSource: "National Employment Matrix" + DataSources: + BLS_QCEW_2017: + Title: "Quarterly Census of Employment and Wages" + Author: "BLS" + DataYear: 2017 + URL: "https://www.bls.gov/cew/" + Primary: TRUE + VADD: + FullName: "Value Added" + Abbreviation: "VADD" + StaticSource: FALSE + StaticFile: null + FileLocation: None + DataYears: [2012] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2012 + SectorListLevel: "Detail" + OriginalFlowSource: "Input-Output Tables" + ScriptFunctionCall: "getValueAddedTotalsbySector" #function to call for script + ScriptFunctionParameters: ["model"] #list of parameters + DataSources: + BEA_USE: + Title: "Detail Use Before Redefinitions" + Author: "BEA" + DataYear: 2012 + URL: "https://apps.bea.gov//industry/iTables%20Static%20Files/AllTablesIO.zip" + Primary: TRUE + +Indicators: + GreenhouseGases: + Name: "Greenhouse Gases" + Code: "GHG" + Group: "Impact Potential" + Unit: "kg CO2 eq" + SimpleUnit: "Kilograms Carbon Dioxide (CO2)" + SimpleName: "Greenhouse Gases" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Global warming"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Acidification: + Name: "Acidification Potential" + Code: "ACID" + Group: "Impact Potential" + Unit: "kg SO2 eq" + SimpleUnit: "Kilograms Sulphur Dioxide (SO2)" + SimpleName: "Acid Rain" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Acidification"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Eutrophication: + Name: "Eutrophication Potential" + Code: "EUTR" + Group: "Impact Potential" + Unit: "kg N eq" + SimpleUnit: "Kilograms Nitrogen (N)" + SimpleName: "Water Eutrophication" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Eutrophication"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + FreshwaterEcotox: + Name: "Freshwater Ecotoxicity Potential" + Code: "ETOX" + Group: "Impact Potential" + Unit: "CTUe" + SimpleUnit: "Comparative Toxic Unit for Ecosystem (CTUe)" + SimpleName: "Freshwater Ecotoxicity" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Freshwater ecotoxicity"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + HumanHealthCancer: + Name: "Human Health - Cancer" + Code: "HCAN" + Group: "Impact Potential" + Unit: "CTUh" + SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" + SimpleName: "Cancer Disease" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - cancer"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + HumanHealthNonCancer: + Name: "Human Health - Noncancer" + Code: "HNCN" + Group: "Impact Potential" + Unit: "CTUh" + SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" + SimpleName: "Noncancer Disease" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - non-cancer"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + HumanHealthToxicity: + Name: "Human Health Toxicity" + Code: "HTOX" + Group: "Impact Potential" + Unit: "CTUh" + SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" + SimpleName: "Toxic to Humans" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getCombinedImpactMethods" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - cancer", "Human health - non-cancer"] + DataSources: + USEEIO_LCIA_Aggregation: + Title: "Aggregation of HNCN and HCAN" + Author: NA + DataYear: NA + URL: NA + Primary: TRUE + HumanHealthRespEffects: + Name: "Human Health - Respiratory Effects" + Code: "HRSP" + Group: "Impact Potential" + Unit: "kg PM2.5 eq" + SimpleUnit: "Kilograms Particulate Matter" + SimpleName: "Respiratory Effects" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - particulate matter"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Ozone: + Name: "Ozone Depletion" + Code: "OZON" + Group: "Impact Potential" + Unit: "kg CFC-11 eq" + SimpleUnit: "Kilograms ChloroFluoroCarbon-11" + SimpleName: "Ozone Depletion" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Ozone depletion"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Smog: + Name: "Smog Formation Potential" + Code: "SMOG" + Group: "Impact Potential" + Unit: "kg O3 eq" + SimpleUnit: "Kilograms Ozone (O3)" + SimpleName: "Smog Formation" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Smog formation"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + freshwater_withdrawal: + Name: "Freshwater withdrawals" + Code: "WATR" + Group: "Resource Use" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Water Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["freshwater_resources"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + land_use: + Name: "Land use" + Code: "LAND" + Group: "Resource Use" + Unit: "m2*yr" + SimpleUnit: "Square Meters per Year" + SimpleName: "Land Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["land_use"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + HAP: + Name: "Hazardous Air Pollutants" + Code: "HAPS" + Group: "Chemical Releases" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Hazardous Air Pollutants" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["HAP"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + Pesticides: + Name: "Pesticides" + Code: "PEST" + Group: "Chemical Releases" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Pesticides" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["USDA_CUS_pesticides"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + NonRenewableEnergy: + Name: "Nonrenewable Energy Use" + Code: "NNRG" + Group: "Resource Use" + Unit: "MJ" + SimpleUnit: "Megajoules (MJ)" + SimpleName: "Nonrenewable Energy Use" + StaticSource: TRUE + FileLocation: "DataCommons" + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["nonrenewable_energy"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + RenewableEnergy: + Name: "Renewable Energy Use" + Code: "RNRG" + Group: "Resource Use" + Unit: "MJ" + SimpleUnit: "Megajoules (MJ)" + SimpleName: "Renewable Energy Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["renewable_energy"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + Energy: + Name: "Energy Use" + Code: "ENRG" + Group: "Resource Use" + Unit: "MJ" + SimpleUnit: "Megajoules (MJ)" + SimpleName: "Energy Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["energy"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + MineralsMetals: + Name: "Minerals and Metals Use" + Code: "MNRL" + Group: "Resource Use" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Minerals and Metals Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["USGS_mineral_resources"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + ValueAdded: + Name: "Value Added" + Code: "VADD" + Group: "Economic & Social" + Unit: "$" + SimpleUnit: "US Dollars ($)" + SimpleName: "Value Added" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + ingwersen_useeiov11_2017: + Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.23719/1368541" + Primary: TRUE + Jobs: + Name: "Jobs Supported" + Code: "JOBS" + Group: "Economic & Social" + Unit: "jobs" + SimpleUnit: "Employees" + SimpleName: "Jobs Supported" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + ingwersen_useeiov11_2017: + Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.23719/1368541" + Primary: TRUE + RCRAHazWaste: + Name: "Commercial RCRA Hazardous Waste" + Code: "CRHW" + Group: "Waste Generated" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Hazardous Waste" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + meyer_analyzing_2020: + Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.1016/j.resconrec.2020.104795" + Primary: TRUE + MunicipalWaste: + Name: "Commercial Municipal Solid Waste" + Code: "CMSW" + Group: "Waste Generated" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Municipal Solid Waste" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + meyer_analyzing_2020: + Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.1016/j.resconrec.2020.104795" + Primary: TRUE + ConstructionDebris: + Name: "Commercial Construction and Demolition Debris" + Code: "CCDD" + Group: "Waste Generated" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Construction Debris" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + meyer_analyzing_2020: + Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.1016/j.resconrec.2020.104795" + Primary: TRUE + +DemandVectors: + Consumption: + Type: "Consumption" + Year: 2012 + System: "Complete" + Location: "US" + Production: + Type: "Production" + Year: 2012 + System: "Complete" + Location: "US" + HouseholdConsumption: + Type: "Consumption" + Year: 2012 + System: "Household" + Location: "US" + DomesticConsumption: + Type: "Consumption" + Year: 2012 + System: "Domestic" + Location: "US" + From 563eafecc8545562f1cfdf75a15b319156dd7baa Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 8 Sep 2021 11:46:27 -0400 Subject: [PATCH 026/319] changed format of aggregation in yml specs file and the code in aggregation functions to handle the change. This change is to make the format more consistent with the disaggregation format. --- R/AggregationFunctions.R | 18 ++++++++++++------ .../ElectricityDisaggregationDetail.yml | 4 +++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 1fbc0a5c..f3aceb94 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -21,7 +21,8 @@ aggregateModel <- function (model){ model$crosswalk <- aggregateMasterCrosswalk(model) #obtaining indeces to aggregate sectors in remaining model objects - agg <- model$DisaggregationSpecs$Aggregation + #agg <- model$DisaggregationSpecs$Aggregation + agg <- model$DisaggregationSpecs$Aggregation$Sectors mainComIndex <- getIndex(model$Commodities$Code_Loc, agg[1])#first item in Aggregation is the sector to aggregate to, not to be removed mainIndIndex <- getIndex(model$Industries$Code_Loc, agg[1]) comIndecesToAggregate <- which(model$Commodities$Code_Loc %in% agg[2:length(agg)]) #find com indeces containing references to the sectors to be aggregated @@ -86,7 +87,8 @@ aggSatelliteTable <- function (model, sattable, sat){ #obtaining indeces to aggregate sectors in remaining model objects newSatTable <- sattable - agg <- model$DisaggregationSpecs$Aggregation + #agg <- model$DisaggregationSpecs$Aggregation + agg <- model$DisaggregationSpecs$Aggregation$Sectors #variable to determine length of Code substring, i.e., code length minus geographic identifer and separator character (e.g. "/US") codeLength <- nchar(gsub("/.*", "", agg[1])) @@ -170,7 +172,8 @@ aggregateMultiYearCPI <- function(model, mainIndex, indecesToAggregate, type){ #' @return An aggregated MakeTable. aggregateMakeTable <- function(model){ - agg <- model$DisaggregationSpecs$Aggregation + #agg <- model$DisaggregationSpecs$Aggregation + agg <- model$DisaggregationSpecs$Aggregation$Sectors logging::loginfo(paste0("Aggregating sectors to'", agg[1], "'.")) count <- 1 @@ -204,7 +207,8 @@ aggregateMakeTable <- function(model){ #' @return An aggregated UseTransactions or DomesticUseTransactions Table. aggregateUseTable <- function(model, domestic = FALSE){ - agg <- model$DisaggregationSpecs$Aggregation + #agg <- model$DisaggregationSpecs$Aggregation + agg <- model$DisaggregationSpecs$Aggregation$Sectors logging::loginfo(paste0("Aggregating sectors to'", agg[1], "'.")) count <- 1 @@ -252,7 +256,8 @@ aggregateUseTable <- function(model, domestic = FALSE){ #' @return An aggregated MakeTable. aggregateVA <- function(model){ - agg <- model$DisaggregationSpecs$Aggregation + #agg <- model$DisaggregationSpecs$Aggregation + agg <- model$DisaggregationSpecs$Aggregation$Sectors logging::loginfo(paste0("Aggregating sectors to'", agg[1], "'.")) count <- 1 @@ -369,7 +374,8 @@ getIndex <- function(sectorList, sector){ aggregateMasterCrosswalk <- function (model){ - agg <- model$DisaggregationSpecs$Aggregation + #agg <- model$DisaggregationSpecs$Aggregation + agg <- model$DisaggregationSpecs$Aggregation$Sectors crosswalk <- model$crosswalk#temp variable for storing intermediate changes new_cw <- crosswalk#variable to return with complete changes to crosswalk#temp diff --git a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml index bd8cbc56..df99f0e4 100644 --- a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml +++ b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml @@ -1,4 +1,6 @@ -Aggregation: ["221100/US", "S00101/US", "S00202/US"] # Aggregates to first sector listed +Aggregation: + Sectors: ["221100/US", "S00101/US", "S00202/US"] # Aggregates to first sector listed + AssociatedDisaggregation: 221100/US Disaggregation: 221100/US: OriginalSectorCode: "221100/US" From d363c33cf47cff628bb1653b537d13cbf4369c97 Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 8 Sep 2021 11:54:28 -0400 Subject: [PATCH 027/319] Changed DisaggregationSpecs line to point to the two individual disaggregation yml files instead of one combined disaggregation yml file. --- inst/extdata/modelspecs/USEEIOv2.0_Waste_Electricity_disagg.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/extdata/modelspecs/USEEIOv2.0_Waste_Electricity_disagg.yml b/inst/extdata/modelspecs/USEEIOv2.0_Waste_Electricity_disagg.yml index 8e2ecca7..b6bda1f2 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0_Waste_Electricity_disagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0_Waste_Electricity_disagg.yml @@ -9,7 +9,7 @@ BasePriceType: "PRO" #producer BasewithRedefinitions: FALSE CommodityorIndustryType: "Commodity" ScrapIncluded: FALSE -DisaggregationSpecs: "WasteElectricityDisaggregationDetail" #Name of disaggregation yml file. +DisaggregationSpecs: ["ElectricityDisaggregationDetail", "WasteDisaggregationDetail"] #Name of disaggregation yml file. SatelliteTable: WAT: From 1a4d4c97130f59425ce74ea3918671f5f2cef0b0 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 8 Sep 2021 12:54:07 -0400 Subject: [PATCH 028/319] append multiple disaggregations to the model from individual config files --- R/DisaggregateFunctions.R | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 630bf965..16c777d1 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -3,12 +3,20 @@ #' @return A disaggregated model. disaggregateModel <- function (model){ + model$DisaggregationSpecs$Aggregation <- vector(mode='list') + model$DisaggregationSpecs$Disaggregation <- vector(mode='list') for (configFile in model$specs$DisaggregationSpecs){ logging::loginfo(paste("Reading disaggregation for", configFile, sep=" ")) - model$DisaggregationSpecs <- getConfiguration(configFile, "disagg") + config <- getConfiguration(configFile, "disagg") + if('Aggregation' %in% names(config)){ + model$DisaggregationSpecs$Aggregation <- append(model$DisaggregationSpecs$Aggregation, config$Aggregation) + } + if('Disaggregation' %in% names(config)){ + model$DisaggregationSpecs$Disaggregation <- append(model$DisaggregationSpecs$Disaggregation, config$Disaggregation) + } } - if(!is.null(model$DisaggregationSpecs$Aggregation)){ + if(len(model$DisaggregationSpecs$Aggregation) != 0){ # Handle sector aggregation model <- aggregateModel(model) } From 38c400c83e8283a8d04bf0247c340cfb0521fe5f Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 8 Sep 2021 12:57:39 -0400 Subject: [PATCH 029/319] fix typo --- R/DisaggregateFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 16c777d1..339b1692 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -16,7 +16,7 @@ disaggregateModel <- function (model){ } } - if(len(model$DisaggregationSpecs$Aggregation) != 0){ + if(length(model$DisaggregationSpecs$Aggregation) != 0){ # Handle sector aggregation model <- aggregateModel(model) } From d2c5d3b7beb4e87496bf425dcbd19b4e3bd88cc9 Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 8 Sep 2021 13:27:43 -0400 Subject: [PATCH 030/319] change aggregation format in WasteElectricityDisaggregation yml --- .../disaggspecs/WasteElectricityDisaggregationDetail.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inst/extdata/disaggspecs/WasteElectricityDisaggregationDetail.yml b/inst/extdata/disaggspecs/WasteElectricityDisaggregationDetail.yml index bf8600e5..80229c00 100644 --- a/inst/extdata/disaggspecs/WasteElectricityDisaggregationDetail.yml +++ b/inst/extdata/disaggspecs/WasteElectricityDisaggregationDetail.yml @@ -1,4 +1,6 @@ -Aggregation: ["221100/US", "S00101/US", "S00202/US"] # Aggregates to first sector listed +Aggregation: + Sectors: ["221100/US", "S00101/US", "S00202/US"] # Aggregates to first sector listed + AssociatedDisaggregation: 221100/US Disaggregation: 562000/US: OriginalSectorCode: "562000/US" From d54ddef91d878568ffc82e859e7957f1fae395ba Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 10 Sep 2021 16:08:11 -0400 Subject: [PATCH 031/319] edited disaggfunctions to work with sequential aggregation --- R/DisaggregateFunctions.R | 49 ++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 339b1692..dd17ed2b 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -56,19 +56,26 @@ disaggregateModel <- function (model){ #Need to assign these DFs back to the modelspecs model$DisaggregationSpecs$Disaggregation[[counter]] <- disagg - logging::loginfo("Initializing Disaggregation of IO tables...") + counter <- counter + 1 + } + + logging::loginfo("Initializing Disaggregation of IO tables...") + + counter = 1 + for (disagg in model$DisaggregationSpecs$Disaggregation){ + #Disaggregating sector lists model$Commodities <- disaggregateSectorDFs(model, disagg, "Commodity") model$Industries <- disaggregateSectorDFs(model, disagg, "Industry") #Disaggregating main model components - model$UseTransactions <- disaggregateUseTable(model) - model$MakeTransactions <- disaggregateMakeTable(model) - model$FinalDemand <- disaggregateFinalDemand(model, domestic = FALSE) - model$UseValueAdded <- disaggregateVA(model) - model$DomesticFinalDemand <- disaggregateFinalDemand(model, domestic = TRUE) - model$DomesticUseTransactions <- disaggregateUseTable(model, domestic = TRUE) + model$UseTransactions <- disaggregateUseTable(model, disagg) + model$MakeTransactions <- disaggregateMakeTable(model, disagg) + model$FinalDemand <- disaggregateFinalDemand(model, disagg, domestic = FALSE) + model$UseValueAdded <- disaggregateVA(model, disagg) + model$DomesticFinalDemand <- disaggregateFinalDemand(model, disagg, domestic = TRUE) + model$DomesticUseTransactions <- disaggregateUseTable(model, disagg, domestic = TRUE) #Balancing model if(disagg$DisaggregationType == "Userdefined"){ @@ -358,9 +365,9 @@ disaggregateSatelliteTable <- function (disagg, sattable, sat_spec) { #' Disaggregate make table based on specs #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @return A standardized make table with old sectors removed and new sectors added. -disaggregateMakeTable <- function (model){ +disaggregateMakeTable <- function (model, disagg){ - for (disagg in model$DisaggregationSpecs$Disaggregation){ + # for (disagg in model$DisaggregationSpecs$Disaggregation){ #specify type of disaggregation disaggType = disagg$DisaggregationType @@ -380,7 +387,7 @@ disaggregateMakeTable <- function (model){ logging::logwarn("Disaggregation not performed, type not defined") break } - } + # } return(disaggTable) } @@ -389,9 +396,9 @@ disaggregateMakeTable <- function (model){ #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param domestic A logical value indicating whether to disaggregate domestic final demand. #' @return A standardized make table with old sectors removed and new sectors added. -disaggregateUseTable <- function (model, domestic = FALSE){ +disaggregateUseTable <- function (model, disagg, domestic = FALSE){ - for (disagg in model$DisaggregationSpecs$Disaggregation){ + # for (disagg in model$DisaggregationSpecs$Disaggregation){ #specify type of disaggregation disaggType = disagg$DisaggregationType @@ -411,7 +418,7 @@ disaggregateUseTable <- function (model, domestic = FALSE){ logging::logwarn("Disaggregation not performed, type not defined") break } - } + #} return(disaggTable) } @@ -421,7 +428,7 @@ disaggregateUseTable <- function (model, domestic = FALSE){ #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param domestic A logical value indicating whether to disaggregate domestic final demand. #' @return A standardized final demand table with old sectors removed and new sectors with manual and default allocations added. -disaggregateFinalDemand <- function(model, domestic = FALSE) +disaggregateFinalDemand <- function(model, disagg, domestic = FALSE) { if(domestic){ @@ -431,7 +438,7 @@ disaggregateFinalDemand <- function(model, domestic = FALSE) originalFD <-model$FinalDemand } - for (disagg in model$DisaggregationSpecs$Disaggregation){ + #for (disagg in model$DisaggregationSpecs$Disaggregation){ #specify type of disaggregation disaggType = disagg$DisaggregationType @@ -479,7 +486,7 @@ disaggregateFinalDemand <- function(model, domestic = FALSE) logging::logwarn("Disaggregation not performed, type not defined") break } - } + # } return(disaggTable) @@ -488,11 +495,11 @@ disaggregateFinalDemand <- function(model, domestic = FALSE) #' Disaggregate Value Added based on specs #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @return A standardized Vale Added table with old sectors removed and new sectors with manual and default allocations added. -disaggregateVA <- function(model) +disaggregateVA <- function(model, disagg) { - for (disagg in model$DisaggregationSpecs$Disaggregation){ + #for (disagg in model$DisaggregationSpecs$Disaggregation){ #specify type of disaggregation disaggType = disagg$DisaggregationType @@ -542,7 +549,7 @@ disaggregateVA <- function(model) logging::logwarn("Disaggregation not performed, type not defined") break } - } + #} return(disaggTable) @@ -640,7 +647,7 @@ uniformMakeDisagg <- function (model, disagg){ #' @return A standardized use table with old sectors removed and new, uniformly disaggregated sectors added. uniformUseDisagg <- function(model, disagg, domestic = FALSE){ - for (disagg in model$DisaggregationSpecs$Disaggregation){ + # for (disagg in model$DisaggregationSpecs$Disaggregation){ #specify type of disaggregation disaggType = disagg$DisaggregationType @@ -732,7 +739,7 @@ uniformUseDisagg <- function(model, disagg, domestic = FALSE){ logging::logwarn("Disaggregation not performed, type not defined") break } - } + # } return(disaggTable) } From 30aad78140c0c514b032b44b0e8161ff6da754e2 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 10 Sep 2021 16:58:20 -0400 Subject: [PATCH 032/319] cleanup and formatting --- R/DisaggregateFunctions.R | 718 ++++++++++++++------------------------ 1 file changed, 270 insertions(+), 448 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index dd17ed2b..0e0a0adc 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -130,15 +130,14 @@ calculateOutputs <- function(model) #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param disagg Specifications for disaggregating the current Table #' @return newMargins A dataframe which contain the margins for the disaggregated sectors -disaggregateMargins <- function(model, disagg) -{ +disaggregateMargins <- function(model, disagg) { originalMargins <- model$Margins originalIndex <- grep(disagg$OriginalSectorCode, model$Margins$Code_Loc)#get row index of the original aggregate sector in the model$Margins object originalRow <- model$Margins[originalIndex,]#copy row containing the Margins information for the original aggregate sector disaggMargins <-originalRow[rep(seq_len(nrow(originalRow)), length(disagg$DisaggregatedSectorCodes)),,drop=FALSE]#replicate the original a number of times equal to the number of disaggregate sectors disaggRatios <- unname(disaggregatedRatios(model, disagg, "Commodity"))#ratios needed to calculate the margins for the disaggregated sectors. Need to unname for compatibility with Rho matrix later in the model build process. - #variable to determine length of Code substring, i.e., code length minus geographic identifer and separator character (e.g. "/US") + #variable to determine length of Code substring, i.e., code length minus geographic identifier and separator character (e.g. "/US") codeLength <- nchar(gsub("/.*", "", disagg$DisaggregatedSectorCodes[1])) disaggMargins$Code_Loc <- unlist(disagg$DisaggregatedSectorCodes)#replace Code_Loc values from aggregate sector with Code_Loc values for disaggregated sectors. Need to unlist for compatibility with Rho matrix later in the model build process. disaggMargins$SectorCode <- substr(disagg$DisaggregatedSectorCodes,1,codeLength) #replace SectorCode values from aggregate sector with Code_Loc values for disaggregated sectors, except for the geographic identifer @@ -166,11 +165,9 @@ disaggregateMargins <- function(model, disagg) #' @param disagg Specifications for disaggregating the current Table #' @param output_type A string value indicating whether to obtain "Commodity" or "Industry" ratios #' @return disaggRatios A dataframe which contain the disaggregated ratios for the disaggregated sectors -disaggregatedRatios <- function(model, disagg, output_type = "Commodity") -{ - - if(output_type == "Industry") - { +disaggregatedRatios <- function(model, disagg, output_type = "Commodity") { + + if(output_type == "Industry") { #Get Index for Disaggregated Industries in the use table disaggUseStartIndex <- which(colnames(model$UseTransactions)==disagg$DisaggregatedSectorCodes[1]) disaggUseEndIndex <- disaggUseStartIndex+length(disagg$DisaggregatedSectorCodes)-1 @@ -178,10 +175,9 @@ disaggregatedRatios <- function(model, disagg, output_type = "Commodity") #calculate industry ratios after disaggregation from Use table disaggRatios <- colSums(model$UseTransactions[,disaggUseStartIndex:disaggUseEndIndex]) + colSums(model$UseValueAdded[,disaggUseStartIndex:disaggUseEndIndex]) disaggRatios <- disaggRatios / sum(disaggRatios) - - - }else #assume commodity if industry is not specified - { + + } else { + #assume commodity if industry is not specified #Get Index for Disaggregated Commodities in the use table disaggUseStartIndex <- which(rownames(model$UseTransactions)==disagg$DisaggregatedSectorCodes[1]) disaggUseEndIndex <- disaggUseStartIndex+length(disagg$DisaggregatedSectorCodes)-1 @@ -200,24 +196,16 @@ disaggregatedRatios <- function(model, disagg, output_type = "Commodity") #' @param disagg Specifications for disaggregating the current Table #' @param output_type A string that indicates whether the Commodity or Industry output should be disaggregated #' @return model A dataframe with the disaggregated GDPGrossOutputIO by year -disaggregateMultiYearOutput <- function(model, disagg, output_type = "Commodity") -{ +disaggregateMultiYearOutput <- function(model, disagg, output_type = "Commodity") { - if(output_type == "Industry") - { + if(output_type == "Industry") { originalOutput = model$MultiYearIndustryOutput - - disaggRatios <- disaggregatedRatios(model, disagg, output_type) - } - else #assume commodity if industry is not specified - { + } else { + #assume commodity if industry is not specified originalOutput = model$MultiYearCommodityOutput - - disaggRatios <- disaggregatedRatios(model, disagg, output_type) } - - - + + disaggRatios <- disaggregatedRatios(model, disagg, output_type) #Determine the index of the first disaggregated sector originalVectorIndex <- which(rownames(originalOutput)==disagg$OriginalSectorCode) #Obtain row with original vector in GDPGrossOutput object @@ -232,8 +220,7 @@ disaggregateMultiYearOutput <- function(model, disagg, output_type = "Commodity" #bind new values to original table newOutputTotals <- rbind(originalOutput[1:originalVectorIndex-1,], disaggOutput, originalOutput[-(1:originalVectorIndex),]) - - + return(newOutputTotals) } @@ -244,22 +231,19 @@ disaggregateMultiYearOutput <- function(model, disagg, output_type = "Commodity" #' @param disagg Specifications for disaggregating the current Table #' @param list_type string indicating whether to disaggregate model$Industry or model$Commodity dataframe. #' @return newSectors A dataframe which contain the disaggregated model$Commodity or model$Industry objects -disaggregateSectorDFs <- function(model, disagg, list_type) -{ +disaggregateSectorDFs <- function(model, disagg, list_type) { - if(list_type == "Commodity") - { + if(list_type == "Commodity") { originalList <- model$Commodities originalIndex <- grep(disagg$OriginalSectorCode, model$Commodities$Code_Loc) newSectors <- data.frame(matrix(ncol = ncol(model$Commodities), nrow = length(disagg$DisaggregatedSectorCodes))) - names(newSectors) <- names(model$Commodities)#rename colums for the df - } - else #assume industry if not specified - { + names(newSectors) <- names(model$Commodities) #rename columns for the df + } else { + #assume industry if not specified originalList <- model$Industries originalIndex <- grep(disagg$OriginalSectorCode, model$Industries$Code_Loc) newSectors <- data.frame(matrix(ncol = ncol(model$Industries), nrow = length(disagg$DisaggregatedSectorCodes))) - names(newSectors) <- names(model$Industries)#rename colums for the df + names(newSectors) <- names(model$Industries) #rename columns for the df } #variable to determine length of Code substring, i.e., code length minus geographic identifer and separator character (e.g. "/US") @@ -365,29 +349,20 @@ disaggregateSatelliteTable <- function (disagg, sattable, sat_spec) { #' Disaggregate make table based on specs #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @return A standardized make table with old sectors removed and new sectors added. -disaggregateMakeTable <- function (model, disagg){ - - # for (disagg in model$DisaggregationSpecs$Disaggregation){ - - #specify type of disaggregation - disaggType = disagg$DisaggregationType - - #disaggregation can be of types "Predefined" or "UserDefined". - if(disaggType == "Predefined"){ - - disaggTable <- uniformMakeDisagg(model, disagg) - - - } else if(disaggType == "Userdefined"){ - - disaggTable <- specifiedMakeDisagg(model, disagg) - - } else { - - logging::logwarn("Disaggregation not performed, type not defined") - break - } - # } +disaggregateMakeTable <- function (model, disagg) { + + #specify type of disaggregation + disaggType = disagg$DisaggregationType + + #disaggregation can be of types "Predefined" or "UserDefined". + if(disaggType == "Predefined") { + disaggTable <- uniformMakeDisagg(model, disagg) + } else if(disaggType == "Userdefined") { + disaggTable <- specifiedMakeDisagg(model, disagg) + } else { + logging::logwarn("Disaggregation not performed, type not defined") + break + } return(disaggTable) } @@ -396,30 +371,21 @@ disaggregateMakeTable <- function (model, disagg){ #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param domestic A logical value indicating whether to disaggregate domestic final demand. #' @return A standardized make table with old sectors removed and new sectors added. -disaggregateUseTable <- function (model, disagg, domestic = FALSE){ - - # for (disagg in model$DisaggregationSpecs$Disaggregation){ - - #specify type of disaggregation - disaggType = disagg$DisaggregationType - - #disaggregation can be of types "Predefined" or "UserDefined". - if(disaggType == "Predefined"){ - - disaggTable <- uniformUseDisagg(model, disagg, domestic) - - - } else if(disaggType == "Userdefined"){ - - disaggTable <- specifiedUseDisagg(model, disagg, domestic) - - } else { - - logging::logwarn("Disaggregation not performed, type not defined") - break - } - #} - +disaggregateUseTable <- function (model, disagg, domestic = FALSE) { + + #specify type of disaggregation + disaggType = disagg$DisaggregationType + + #disaggregation can be of types "Predefined" or "UserDefined". + if(disaggType == "Predefined") { + disaggTable <- uniformUseDisagg(model, disagg, domestic) + } else if(disaggType == "Userdefined") { + disaggTable <- specifiedUseDisagg(model, disagg, domestic) + } else { + logging::logwarn("Disaggregation not performed, type not defined") + break + } + return(disaggTable) } @@ -428,66 +394,53 @@ disaggregateUseTable <- function (model, disagg, domestic = FALSE){ #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param domestic A logical value indicating whether to disaggregate domestic final demand. #' @return A standardized final demand table with old sectors removed and new sectors with manual and default allocations added. -disaggregateFinalDemand <- function(model, disagg, domestic = FALSE) -{ +disaggregateFinalDemand <- function(model, disagg, domestic = FALSE) { - if(domestic){ + if(domestic) { originalFD <-model$DomesticFinalDemand - } - else{ + } else { originalFD <-model$FinalDemand } + #specify type of disaggregation + disaggType = disagg$DisaggregationType + + #disaggregation can be of types "Predefined" or "UserDefined". + if(disaggType == "Predefined") { + disaggTable <- disaggregateCols(originalFD, disagg, duplicate = FALSE, notUniform = FALSE) - #for (disagg in model$DisaggregationSpecs$Disaggregation){ + } else if(disaggType == "Userdefined") { + + #Column names in Final Demand + fdColNames <- colnames(model$FinalDemand) + #Allocation for FD demand sectors + FDPercentages <- subset(disagg$UseFileDF, IndustryCode %in% fdColNames) + #Assigning allocations for FD + AllocFDDF <- disaggAllocations(model, disagg, FDPercentages, "FinalDemand", domestic) - #specify type of disaggregation - disaggType = disagg$DisaggregationType + #Determine number of commodities and industries in originalFD + nCommodities <- nrow(originalFD) + nIndustries <- ncol(originalFD) - #disaggregation can be of types "Predefined" or "UserDefined". + #Deterine number of commodities and industries in DisaggSpecs + numNewSectors <- length(disagg$DisaggregatedSectorCodes) + + #Determine commodity and industry indeces corresponding to the original sector code + originalRowIndex <- which(rownames(originalFD)==disagg$OriginalSectorCode) + #originalColIndex <- which(colnames(originalFD)==disagg$OriginalSectorCode) + + #Determine end index of disaggregated sectors + endRowIndex <- originalRowIndex + numNewSectors + #endColIndex <- originalColIndex + numNewSectors - if(disaggType == "Predefined"){ - - - disaggTable <- disaggregateCols(originalFD, disagg, duplicate = FALSE, notUniform = FALSE) - - - } else if(disaggType == "Userdefined"){ - - #Column names in Final Demand - fdColNames <- colnames(model$FinalDemand) - #Allocation for FD demand sectors - FDPercentages <- subset(disagg$UseFileDF, IndustryCode %in% fdColNames) - #Assigning allocations for FD - AllocFDDF <- disaggAllocations(model, disagg, FDPercentages, "FinalDemand", domestic) - - #Determine number of commodities and industries in originalFD - nCommodities <- nrow(originalFD) - nIndustries <- ncol(originalFD) - - #Deterine number of commodities and industries in DisaggSpecs - numNewSectors <- length(disagg$DisaggregatedSectorCodes) - - #Determine commodity and industry indeces corresponding to the original sector code - originalRowIndex <- which(rownames(originalFD)==disagg$OriginalSectorCode) - #originalColIndex <- which(colnames(originalFD)==disagg$OriginalSectorCode) - - #Determine end index of disaggregated sectors - endRowIndex <- originalRowIndex + numNewSectors - #endColIndex <- originalColIndex + numNewSectors - + disaggTable <- rbind(originalFD[1:originalRowIndex-1,], #above diagg rows, all columns + AllocFDDF, #insert disaggregated rows + originalFD[-(1:originalRowIndex),]) #include all rows except from 1st row to disaggregated row + + } else { + logging::logwarn("Disaggregation not performed, type not defined") + break + } - disaggTable <- rbind(originalFD[1:originalRowIndex-1,], #above diagg rows, all columns - AllocFDDF, #insert disaggregated rows - originalFD[-(1:originalRowIndex),]) #include all rows except from 1st row to disaggregated row - - - } else { - - logging::logwarn("Disaggregation not performed, type not defined") - break - } - # } - return(disaggTable) } @@ -495,62 +448,53 @@ disaggregateFinalDemand <- function(model, disagg, domestic = FALSE) #' Disaggregate Value Added based on specs #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @return A standardized Vale Added table with old sectors removed and new sectors with manual and default allocations added. -disaggregateVA <- function(model, disagg) -{ +disaggregateVA <- function(model, disagg) { + + #specify type of disaggregation + disaggType = disagg$DisaggregationType + #disaggregation can be of types "Predefined" or "UserDefined". - #for (disagg in model$DisaggregationSpecs$Disaggregation){ - - #specify type of disaggregation - disaggType = disagg$DisaggregationType - - #disaggregation can be of types "Predefined" or "UserDefined". + if(disaggType == "Predefined") { + disaggTable <- disaggregateRows(model$UseValueAdded, disagg, duplicate = FALSE, notUniform = FALSE) + + } else if(disaggType == "Userdefined") { - if(disaggType == "Predefined"){ - - disaggTable <- disaggregateRows(model$UseValueAdded, disagg, duplicate = FALSE, notUniform = FALSE) + #Row names in value added + VARowNames <- rownames(model$UseValueAdded) + #Allocation for FD demand sectors + VAPercentages <- subset(disagg$UseFileDF, CommodityCode %in% VARowNames)#if VA codenames are in the CommodityCode Column of the csv. + #Assigning allocations for FD + AllocVADF <- disaggAllocations(model, disagg, VAPercentages, "ValueAdded", domestic)#need to edit disaggAllocations to handle value added. - - } else if(disaggType == "Userdefined"){ - - #Row names in value added - VARowNames <- rownames(model$UseValueAdded) - #Allocation for FD demand sectors - VAPercentages <- subset(disagg$UseFileDF, CommodityCode %in% VARowNames)#if VA codenames are in the CommodityCode Column of the csv. - #Assigning allocations for FD - AllocVADF <- disaggAllocations(model, disagg, VAPercentages, "ValueAdded", domestic)#need to edit disaggAllocations to handle value added. + ####assembling disaggregated VA - ####assembling disaggregated VA + #Determine number of commodities and industries in originalFD + nCommodities <- nrow(model$UseValueAdded) + nIndustries <- ncol(model$UseValueAdded) - #Determine number of commodities and industries in originalFD - nCommodities <- nrow(model$UseValueAdded) - nIndustries <- ncol(model$UseValueAdded) + #Deterine number of commodities and industries in DisaggSpecs + numNewSectors <- length(disagg$DisaggregatedSectorCodes) - #Deterine number of commodities and industries in DisaggSpecs - numNewSectors <- length(disagg$DisaggregatedSectorCodes) + #Determine commodity and industry indeces corresponding to the original sector code + #originalRowIndex <- which(rownames(model$UseValueAdded)==disagg$OriginalSectorCode) + originalColIndex <- which(colnames(model$UseValueAdded)==disagg$OriginalSectorCode) - #Determine commodity and industry indeces corresponding to the original sector code - #originalRowIndex <- which(rownames(model$UseValueAdded)==disagg$OriginalSectorCode) - originalColIndex <- which(colnames(model$UseValueAdded)==disagg$OriginalSectorCode) + #Determine end index of disaggregated sectors + #endRowIndex <- originalRowIndex + numNewSectors + endColIndex <- originalColIndex + numNewSectors - #Determine end index of disaggregated sectors - #endRowIndex <- originalRowIndex + numNewSectors - endColIndex <- originalColIndex + numNewSectors + + tablePartOne <- model$UseValueAdded[, 1:originalColIndex-1]#all rows, columns to the left of diagg col + tablePartTwo <- model$UseValueAdded[,-(1:originalColIndex)]#all rows, all columns except cols to left of disagg col + + disaggTable <- cbind(tablePartOne, AllocVADF, tablePartTwo) - - tablePartOne <- model$UseValueAdded[, 1:originalColIndex-1]#all rows, columns to the left of diagg col - tablePartTwo <- model$UseValueAdded[,-(1:originalColIndex)]#all rows, all columns except cols to left of disagg col - - disaggTable <- cbind(tablePartOne, AllocVADF, tablePartTwo) + } else { + logging::logwarn("Disaggregation not performed, type not defined") + break + } - - } else { - - logging::logwarn("Disaggregation not performed, type not defined") - break - } - #} - return(disaggTable) } @@ -559,7 +503,7 @@ disaggregateVA <- function(model, disagg) #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param disagg Specifications for disaggregating the current Table #' @return A standardized make table with old sectors removed and new, uniformly disaggregated sectors added. -uniformMakeDisagg <- function (model, disagg){ +uniformMakeDisagg <- function (model, disagg) { #Predefined disaggregation assumes 1 industry/commodity disaggregated uniformly into several, with #values along the intersections disaggregated uniformly along the diagonal. @@ -570,7 +514,7 @@ uniformMakeDisagg <- function (model, disagg){ nCommodities <- ncol(originalMake) nIndustries <- nrow(originalMake) - #Deterine number of commodities and industries in DisaggSpecs + #Determine number of commodities and industries in DisaggSpecs numNewSectors <- length(disagg$DisaggregatedSectorCodes) #Determine commodity and industry indeces corresponding to the original sector code @@ -645,102 +589,86 @@ uniformMakeDisagg <- function (model, disagg){ #' @param disagg Specifications for disaggregating the current Table #' @param domestic boolean, indicates whether use disagg is for domestic model or full model; FALSE is default #' @return A standardized use table with old sectors removed and new, uniformly disaggregated sectors added. -uniformUseDisagg <- function(model, disagg, domestic = FALSE){ - - # for (disagg in model$DisaggregationSpecs$Disaggregation){ - - #specify type of disaggregation - disaggType = disagg$DisaggregationType +uniformUseDisagg <- function(model, disagg, domestic = FALSE) { + + #Predefined disaggregation assumes 1 industry/commodity disaggregated uniformly into several, with + #values along the intersections disaggregated uniformly along the diagonal. - #disaggregation can be of types "Predefined" or "UserDefined". - if(disaggType == "Predefined"){ - - #Predefined disaggregation assumes 1 industry/commodity disaggregated uniformly into several, with - #values along the intersections disaggregated uniformly along the diagonal. - - if(domestic){ - originalUse<-model$DomesticUseTransactions - } - else{ - originalUse<-model$UseTransactions - } - - #Determine number of commodities and industries in originalUse - nCommodities <- nrow(originalUse) - nIndustries <- ncol(originalUse) - - #Deterine number of commodities and industries in DisaggSpecs - numNewSectors <- length(disagg$DisaggregatedSectorCodes) - - #Determine commodity and industry indeces corresponding to the original sector code - originalRowIndex <- which(rownames(originalUse)==disagg$OriginalSectorCode) - originalColIndex <- which(colnames(originalUse)==disagg$OriginalSectorCode) - - #Determine end index of disaggregated sectors - endRowIndex <- originalRowIndex + numNewSectors - endColIndex <- originalColIndex + numNewSectors - - - ########Row disaggregation - #Copy original row (com) for disaggregation - originalRowVector <- originalUse[originalRowIndex,] - - disaggRows <- disaggregateRow(originalRowVector,disagg) - - ########Columnn disaggregation - #Copy original Column (ind) for disaggregation - originalColVector <-originalUse[,originalColIndex, drop = FALSE]#drop = False needed to copy as dataframe - - disaggCols <- disaggregateCol(originalColVector,disagg) - - - ########Intersection Disaggregation - originalIntersection <- originalUse[originalRowIndex, originalColIndex] - - #Divide intersection by number of new sectors - originalIntersection <- originalIntersection/numNewSectors - - #Populate disaggregated intersection assuming equal values along the diagonal. Matrix variable. - disaggIntersection <- diag(originalIntersection,numNewSectors,numNewSectors) - - #Convert to data frame - disaggIntersection = as.data.frame(t(disaggIntersection)) - - #rename rows and columns - colnames(disaggIntersection) <- disagg$DisaggregatedSectorCodes - rownames(disaggIntersection) <- disagg$DisaggregatedSectorCodes - - - ########Assemble table - - #Assembling all columns above disaggregated rows, including all disaggregated columns - disaggTable <- cbind(originalUse[1:originalRowIndex-1,1:originalColIndex-1], #above diagg rows, from 1st col to col right before disaggregation - disaggCols[1:originalRowIndex-1,], #insert disaggregated cols before disaggregated rows - originalUse[1:originalRowIndex-1,-(1:originalColIndex)]) #include all cols except from 1st col to disaggregated col - - #Inserting intersection into disaggregated rows - disaggRows <- cbind(disaggRows[,1:originalColIndex-1], #from 1st col to col right before disaggregation - disaggIntersection, #insert disaggregated intersection - disaggRows[,-(1:originalColIndex)]) #include all cols except from 1s col to disaggregated col - - #Appending rest of original rows to partially assembled DMake - disaggTable <- rbind(disaggTable,disaggRows) - - #Assembling all columns below disaggregated rows, including all disaggregated columns - disaggTableBottom <- cbind(originalUse[-(1:originalRowIndex),1:originalColIndex-1], #below disagg rows, from 1st col to col right before disaggregation - disaggCols[-(1:originalRowIndex),], #insert disaggregated cols below disaggregated rows - originalUse[-(1:originalRowIndex),-(1:originalColIndex)]) #below disagg rows, all columns after disagg columns - - #Appeding bottom part of the table to top part of the table - disaggTable <- rbind(disaggTable, disaggTableBottom) - - }else { - - logging::logwarn("Disaggregation not performed, type not defined") - break - } - # } + if(domestic) { + originalUse<-model$DomesticUseTransactions + } else { + originalUse<-model$UseTransactions + } + + #Determine number of commodities and industries in originalUse + nCommodities <- nrow(originalUse) + nIndustries <- ncol(originalUse) + + #Deterine number of commodities and industries in DisaggSpecs + numNewSectors <- length(disagg$DisaggregatedSectorCodes) + + #Determine commodity and industry indeces corresponding to the original sector code + originalRowIndex <- which(rownames(originalUse)==disagg$OriginalSectorCode) + originalColIndex <- which(colnames(originalUse)==disagg$OriginalSectorCode) + + #Determine end index of disaggregated sectors + endRowIndex <- originalRowIndex + numNewSectors + endColIndex <- originalColIndex + numNewSectors + + + ########Row disaggregation + #Copy original row (com) for disaggregation + originalRowVector <- originalUse[originalRowIndex,] + + disaggRows <- disaggregateRow(originalRowVector,disagg) + + ########Columnn disaggregation + #Copy original Column (ind) for disaggregation + originalColVector <-originalUse[,originalColIndex, drop = FALSE]#drop = False needed to copy as dataframe + + disaggCols <- disaggregateCol(originalColVector,disagg) + + + ########Intersection Disaggregation + originalIntersection <- originalUse[originalRowIndex, originalColIndex] + + #Divide intersection by number of new sectors + originalIntersection <- originalIntersection/numNewSectors + + #Populate disaggregated intersection assuming equal values along the diagonal. Matrix variable. + disaggIntersection <- diag(originalIntersection,numNewSectors,numNewSectors) + + #Convert to data frame + disaggIntersection = as.data.frame(t(disaggIntersection)) + + #rename rows and columns + colnames(disaggIntersection) <- disagg$DisaggregatedSectorCodes + rownames(disaggIntersection) <- disagg$DisaggregatedSectorCodes + + + ########Assemble table + + #Assembling all columns above disaggregated rows, including all disaggregated columns + disaggTable <- cbind(originalUse[1:originalRowIndex-1,1:originalColIndex-1], #above diagg rows, from 1st col to col right before disaggregation + disaggCols[1:originalRowIndex-1,], #insert disaggregated cols before disaggregated rows + originalUse[1:originalRowIndex-1,-(1:originalColIndex)]) #include all cols except from 1st col to disaggregated col + + #Inserting intersection into disaggregated rows + disaggRows <- cbind(disaggRows[,1:originalColIndex-1], #from 1st col to col right before disaggregation + disaggIntersection, #insert disaggregated intersection + disaggRows[,-(1:originalColIndex)]) #include all cols except from 1s col to disaggregated col + + #Appending rest of original rows to partially assembled DMake + disaggTable <- rbind(disaggTable,disaggRows) + + #Assembling all columns below disaggregated rows, including all disaggregated columns + disaggTableBottom <- cbind(originalUse[-(1:originalRowIndex),1:originalColIndex-1], #below disagg rows, from 1st col to col right before disaggregation + disaggCols[-(1:originalRowIndex),], #insert disaggregated cols below disaggregated rows + originalUse[-(1:originalRowIndex),-(1:originalColIndex)]) #below disagg rows, all columns after disagg columns + #Appeding bottom part of the table to top part of the table + disaggTable <- rbind(disaggTable, disaggTableBottom) + return(disaggTable) } @@ -750,7 +678,7 @@ uniformUseDisagg <- function(model, disagg, domestic = FALSE){ #' @param duplicate A flag that indicates whether the disaggregated rows are to be duplicated or not (e.g. for CPI values) #' @param notUniform A flag that indicates whether the disaggregated rows are to be disaggregated in uniform manner or not #' @return A dataframe with disaggregated rows. -disaggregateRows <- function (RowVectors, disagg_specs, duplicate=FALSE, notUniform = FALSE){ +disaggregateRows <- function (RowVectors, disagg_specs, duplicate=FALSE, notUniform = FALSE) { originalColIndex <- which(colnames(RowVectors)==disagg_specs$OriginalSectorCode) numNewSectors <- length(disagg_specs$DisaggregatedSectorCodes) @@ -772,7 +700,7 @@ disaggregateRows <- function (RowVectors, disagg_specs, duplicate=FALSE, notUnif #' @param duplicate A flag that indicates whether the disaggregated columns are to be duplicated or not (e.g. for CPI values) #' @param notUniform A flag that indicates whether the disaggregated columns are to be disaggregated in uniform manner or not #' @return A dataframe with disaggregated columns. -disaggregateCols <- function (ColVectors, disagg_specs, duplicate=FALSE, notUniform = FALSE ){ +disaggregateCols <- function (ColVectors, disagg_specs, duplicate=FALSE, notUniform = FALSE) { originalRowIndex <- which(rownames(ColVectors)==disagg_specs$OriginalSectorCode) numNewSectors <- length(disagg_specs$DisaggregatedSectorCodes) @@ -795,27 +723,21 @@ disaggregateCols <- function (ColVectors, disagg_specs, duplicate=FALSE, notUnif #' @param duplicate A flag that indicates whether the disaggregated row is to be duplicated or not (e.g. for CPI values) #' @param notUniform A flag that indicates whether the disaggregated row is to be disaggregated in uniform manner or not #' @return A dataframe with the original row disaggregated. -disaggregateRow <- function (originalRowVector, disagg_specs, duplicate = FALSE, notUniform = FALSE){ +disaggregateRow <- function (originalRowVector, disagg_specs, duplicate = FALSE, notUniform = FALSE) { numNewSectors <- length(disagg_specs$DisaggregatedSectorCodes) - if (duplicate){ - + if (duplicate) { #For handling CPI. Just copy the CPI values of the original sector to for all the disaggregated sectors. disaggRows <-originalRowVector[rep(seq_len(nrow(originalRowVector)), numNewSectors),,drop=FALSE] - - }else if(notUniform){ - + } else if(notUniform) { percentages <- getDisaggCommodityPercentages(disagg_specs)#get default disaggregated commodity percentages disaggRows <- originalRowVector[rep(seq_len(nrow(originalRowVector)), numNewSectors),, drop=FALSE]#repeat the original vector numNewSector times disaggRows <- disaggRows * percentages[,3]#multiply the values in the repeated vector by the default percentages to get values allocated by industry totals - - }else{ - + } else { #Create new rows with the uniform values uniformRowVector <- originalRowVector/numNewSectors disaggRows <-uniformRowVector[rep(seq_len(nrow(uniformRowVector)), numNewSectors),,drop=FALSE] - } @@ -836,29 +758,22 @@ disaggregateCol <- function (originalColVector, disagg_specs, duplicate = FALSE, numNewSectors <- length(disagg_specs$DisaggregatedSectorCodes) - if (duplicate){ + if (duplicate) { #For handling CPI. Just copy the CPI values of the original sector to for all the disaggregated sectors. disaggRows <-originalRowVector[rep(seq_len(nrow(originalRowVector)), numNewSectors),,drop=FALSE] - } - - else if(notUniform){ - + } else if(notUniform) { percentages <- getDisaggIndustryPercentages(disagg_specs)#get defaul disaggregated industry percentages percentageOrder <- percentages[match(disagg_specs$DisaggregatedSectorCodes, percentages$CommodityCode),] disaggCols <- originalColVector[, rep(seq_len(ncol(originalColVector)), numNewSectors)]#repeat the original vector numNewSector times disaggCols <- data.frame(t(t(disaggCols)*percentageOrder[,3])) - - }else{ - + } else { #Create new cols with the uniform values uniformColVector <- originalColVector/numNewSectors disaggCols <- uniformColVector[, rep(seq_len(ncol(uniformColVector)), numNewSectors)] } - - - #Rename cols to use the disaggregted codes + #Rename cols to use the disaggregated codes colnames(disaggCols) <- disagg_specs$DisaggregatedSectorCodes return(disaggCols) @@ -1134,8 +1049,7 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, #These different if blocks are needed because of the different dimensions of the manual and default allocation vectors needed for disaggregating #the Make and Use rows and columns. Each block initializes the manual and default allocation values for the relevant rows or columns. - if(vectorToDisagg == "MakeRow") - { + if(vectorToDisagg == "MakeRow") { #Set up for manual allocations #Get original table originalTable <- model$MakeTransactions @@ -1165,12 +1079,9 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, defaultPercentages <- defaultPercentages[match(disagg$DisaggregatedSectorCodes, defaultPercentages$CommodityCode),] #If there are no default percentages from values from csv (i.e. number of rows in defaultRowPercentages dataframe is 0) assume uniform split, otherwise use the csv values - if(nrow(defaultPercentages)==0){ - + if(nrow(defaultPercentages)==0) { defaultPercentages <- data.frame(rep(1/numNewSectors, numNewSectors))#assigning default disaggregation percentage totals assuming uniform split - - }else{ - + } else { defaultPercentages <- defaultPercentages[, 3, drop=FALSE]#Extracting the column with the percentages } @@ -1183,9 +1094,7 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, colnames(defaultAllocVector) <- names(originalVector) rownames(defaultAllocVector) <- newSectorCodes - } - else if(vectorToDisagg == "MakeCol") - { + } else if(vectorToDisagg == "MakeCol") { #Get original table originalTable <- model$MakeTransactions @@ -1215,12 +1124,9 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, defaultPercentages <- defaultPercentages[match(disagg$DisaggregatedSectorCodes, defaultPercentages$CommodityCode),] #If there are no default percentages from values from csv (i.e. number of rows in defaultRowPercentages dataframe is 0) assume uniform split, otherwise use the csv values - if(nrow(defaultPercentages)==0){ - + if(nrow(defaultPercentages)==0) { defaultPercentages <- data.frame(rep(1/numNewSectors, numNewSectors))#assigning default disaggregation percentage totals assuming uniform split - - }else{ - + } else { defaultPercentages <- defaultPercentages[, 3, drop=FALSE]#Extracting the column with the percentages } @@ -1233,9 +1139,7 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, colnames(defaultAllocVector) <- newSectorCodes rownames(defaultAllocVector) <- rownames(originalVector) - } - else if(vectorToDisagg == "MakeIntersection") - { + } else if(vectorToDisagg == "MakeIntersection") { #Get original table originalTable <- model$MakeTransactions @@ -1266,12 +1170,9 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, defaultPercentages <- defaultPercentages[match(disagg$DisaggregatedSectorCodes, defaultPercentages$CommodityCode),] #If there are no default percentages from values from csv (i.e. number of rows in defaultRowPercentages dataframe is 0) assume uniform split, otherwise use the csv values - if(nrow(defaultPercentages)==0){ - + if(nrow(defaultPercentages)==0) { defaultPercentages <- data.frame(rep(1/numNewSectors, numNewSectors))#assigning default disaggregation percentage totals assuming uniform split - - }else{ - + } else { defaultPercentages <- defaultPercentages[, 3, drop=FALSE]#Extracting the column with the percentages } @@ -1284,39 +1185,25 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, defaultAllocVector <- diag(defaultAllocVector[,1],numNewSectors,numNewSectors) defaultAllocVector <- data.frame(defaultAllocVector) - #rename rows and columns colnames(defaultAllocVector) <- newSectorCodes rownames(defaultAllocVector) <- newSectorCodes - } - else if(vectorToDisagg == "UseRow" || vectorToDisagg == "FinalDemand" ) - { + } else if(vectorToDisagg == "UseRow" || vectorToDisagg == "FinalDemand" ) { #get original table - if(domestic == TRUE){ - - if(vectorToDisagg == "UseRow") - { + if(domestic == TRUE) { + if(vectorToDisagg == "UseRow") { originalTable <- model$DomesticUseTransactions - } - else - { + } else { originalTable <- model$DomesticFinalDemand } - - }else{ - - if(vectorToDisagg == "UseRow") - { + } else { + if(vectorToDisagg == "UseRow") { originalTable <- model$UseTransactions - } - else - { + } else { originalTable <- model$FinalDemand } - - } #Get commodity and/or industry indeces corresponding to the original sector code @@ -1346,12 +1233,9 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, defaultPercentages <- defaultPercentages[match(disagg$DisaggregatedSectorCodes, defaultPercentages$CommodityCode),] #If there are no default percentages from values from csv (i.e. number of rows in defaultRowPercentages dataframe is 0) assume uniform split, otherwise use the csv values - if(nrow(defaultPercentages)==0){ - + if(nrow(defaultPercentages)==0) { defaultPercentages <- data.frame(rep(1/numNewSectors, numNewSectors))#assigning default disaggregation percentage totals assuming uniform split - - }else{ - + } else { defaultPercentages <- defaultPercentages[, 3, drop=FALSE]#Extracting the column with the percentages } @@ -1364,35 +1248,18 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, colnames(defaultAllocVector) <- names(originalVector) rownames(defaultAllocVector) <- newSectorCodes - } - else if (vectorToDisagg == "UseCol" || vectorToDisagg == "ValueAdded") - { - + } else if (vectorToDisagg == "UseCol" || vectorToDisagg == "ValueAdded") { #get original table - - if(vectorToDisagg == "UseCol") - { - if(domestic == TRUE) - { - + if(vectorToDisagg == "UseCol") { + if(domestic == TRUE) { originalTable <- model$DomesticUseTransactions - - } - else - { - + } else { originalTable <- model$UseTransactions - } - - } - else - { + } else { originalTable <- model$UseValueAdded } - - #Get commodity and/or industry indeces corresponding to the original sector code originalVectorIndex <- which(colnames(originalTable)==disagg$OriginalSectorCode) #Get original row or column @@ -1420,12 +1287,9 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, #If there are no default percentages from values from csv (i.e. number of rows in defaultRowPercentages dataframe is 0) assume uniform split, otherwise use the csv values - if(nrow(defaultPercentages)==0){ - + if(nrow(defaultPercentages)==0) { defaultPercentages <- data.frame(rep(1/numNewSectors, numNewSectors))#assigning default disaggregation percentage totals assuming uniform split - - }else{ - + } else { defaultPercentages <- defaultPercentages[, 3, drop=FALSE]#Extracting the column with the percentages } @@ -1438,19 +1302,12 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, colnames(defaultAllocVector) <- newSectorCodes rownames(defaultAllocVector) <- rownames(originalVector) - } - else if(vectorToDisagg == "UseIntersection") - { - + } else if(vectorToDisagg == "UseIntersection") { #get original table if(domestic == TRUE){ - originalTable <- model$DomesticUseTransactions - - }else{ - + } else { originalTable <- model$UseTransactions - } #Get commodity and/or industry indeces corresponding to the original sector code @@ -1484,8 +1341,7 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, defaultPercentages <- data.frame(rep(1/numNewSectors, numNewSectors))#assigning default disaggregation percentage totals assuming uniform split - }else{ - + } else { defaultPercentages <- defaultPercentages[, 3, drop=FALSE]#Extracting the column with the percentages } @@ -1502,18 +1358,15 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, colnames(defaultAllocVector) <- newSectorCodes rownames(defaultAllocVector) <- newSectorCodes - } - else - { - #todo - #error handling + } else { + #todo error handling } - if(nrow(allocPercentages)>0)#Check that there are manual allocations to perform - { + if(nrow(allocPercentages)>0) { + #Check that there are manual allocations to perform #Loop to assign the manual allocations - for (r in 1:nrow(allocPercentages)){ + for (r in 1:nrow(allocPercentages)) { #Get data from current row of the data imported from the yml file. rowAlloc <- allocPercentages[r,allocPercentagesRowIndex] @@ -1525,94 +1378,66 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, colAllocIndex <- which(colnames(manualAllocVector)==colAlloc) #Check for indexing errors - if(length(rowAllocIndex)==0L){ + if(length(rowAllocIndex)==0L) { logging::logdebug(paste("rowAlloc not found, no allocation made for row", rowAlloc, sep=" ", "in table.")) - } - - if(length(colAllocIndex)==0L){ + + if(length(colAllocIndex)==0L) { logging::logdebug(paste("colAlloc not found, no allocation made for column", colAlloc, sep=" ", "in table.")) - } - #Calculate value based on allocation percent - if(vectorToDisagg == "MakeRow" || vectorToDisagg == "UseRow" || vectorToDisagg == "FinalDemand"){ - + if(vectorToDisagg == "MakeRow" || vectorToDisagg == "UseRow" || vectorToDisagg == "FinalDemand") { value <- originalVector[colAllocIndex]*allocationValue - - }else if(vectorToDisagg=="MakeCol" || vectorToDisagg=="UseCol" || vectorToDisagg == "ValueAdded"){ - + } else if(vectorToDisagg=="MakeCol" || vectorToDisagg=="UseCol" || vectorToDisagg == "ValueAdded") { value <- originalVector[rowAllocIndex, 1, drop = FALSE]*allocationValue #to keep value as a dataframe - - }else if(vectorToDisagg == "MakeIntersection" || vectorToDisagg=="UseIntersection"){ - + } else if(vectorToDisagg == "MakeIntersection" || vectorToDisagg=="UseIntersection") { value <- originalVector[1, 1, drop = FALSE]*allocationValue #to keep value as a dataframe. Should be a 1x1 DF - } #If either rowAlloc or column are not valid values, set value to 0 to avoid a runtime error - if(ncol(value)==0){ - + if(ncol(value)==0) { value <- 0 } - #Assign value to correct index manualAllocVector[rowAllocIndex, colAllocIndex] <- value - - } - }else - { + } else { logging::logdebug(paste("rowAlloc not found, no allocation made for", vectorToDisagg, sep=" ")) - } - #replace all NAs with 0 manualAllocVector[is.na(manualAllocVector)] <-0 #Replace values in the default allocation vector with values from the Manual allocation vector to finalize the vector disaggregation. - if(vectorToDisagg == "MakeRow"|| vectorToDisagg == "MakeIntersection" || vectorToDisagg=="UseRow" || vectorToDisagg =="UseIntersection" || vectorToDisagg == "FinalDemand") - { - + if(vectorToDisagg == "MakeRow"|| vectorToDisagg == "MakeIntersection" || vectorToDisagg=="UseRow" || vectorToDisagg =="UseIntersection" || vectorToDisagg == "FinalDemand") { #assumption is that all columns where there was a manual allocation sum up to the value in the original row/column index. manualIndeces <- data.frame(which(colSums(manualAllocVector) !=0 )) - if(nrow(manualIndeces) > 0){ - - for (i in 1:nrow(manualIndeces)){ - + if(nrow(manualIndeces) > 0) { + for (i in 1:nrow(manualIndeces)) { #replace values from manual allocation into default allocation tempVector <- manualAllocVector[, manualIndeces[i,1], drop=FALSE] defaultAllocVector[, manualIndeces[i,1]] <- tempVector } - } - }else if(vectorToDisagg == "MakeCol" || vectorToDisagg == "UseCol" || vectorToDisagg == "ValueAdded"){ - + } else if (vectorToDisagg == "MakeCol" || vectorToDisagg == "UseCol" || vectorToDisagg == "ValueAdded") { #assumption is that all rows where there was a manual allocation sum up to the value in the original row/column index. manualIndeces <- data.frame(which(rowSums(manualAllocVector) !=0 )) - if(nrow(manualIndeces) > 0){ - - for (i in 1:nrow(manualIndeces)){ - + if(nrow(manualIndeces) > 0) { + for (i in 1:nrow(manualIndeces)) { #replace values from manual allocation into default allocation tempVector <- manualAllocVector[manualIndeces[i,1], , drop=FALSE] defaultAllocVector[manualIndeces[i,1],] <- tempVector } - } - } - else{ - + } else { manualIndeces <- NA;#temporary values } - return(defaultAllocVector) @@ -1621,8 +1446,8 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, #' Obtain default disaggregation percentages for industries from the disaggregation input files. #' @param disagg Specifications for disaggregating the current Model -#' @return A dataframe with the default disaggregation percentges for the Industries of the current model -getDisaggIndustryPercentages <-function(disagg){ +#' @return A dataframe with the default disaggregation percentages for the Industries of the current model +getDisaggIndustryPercentages <-function(disagg) { defaultPercentages <- subset(disagg$MakeFileDF, IndustryCode %in% disagg$OriginalSectorCode)#get all rows in MakefileDF that have the OriginalSectorCode in the IndustryCode column @@ -1632,12 +1457,12 @@ getDisaggIndustryPercentages <-function(disagg){ #' Obtain default disaggregation percentages for commodities from the disaggregation input files. #' @param disagg Specifications for disaggregating the current Model -#' @return A dataframe with the default disaggregation percentges for the Commodities of the current model -getDisaggCommodityPercentages <- function(disagg){ +#' @return A dataframe with the default disaggregation percentages for the Commodities of the current model +getDisaggCommodityPercentages <- function(disagg) { defaultPercentages <- subset(disagg$UseFileDF, CommodityCode %in% disagg$OriginalSectorCode) #get all rows in UseAllocations that have the OriginalSectorCode in the CommodityCode column - return(defaultPercentages) + return(defaultPercentages) } @@ -1691,9 +1516,7 @@ balanceDisagg <- function(model, disagg){ balancedDisaggFulluse <- applyRAS(data.matrix(disaggFullUse), targetComTotals[,1], targetIndTotals[,1], relative_diff = NULL, absolute_diff = 1E8, max_itr = 1E5) - } - else - { + } else { #no change in fulluse balancedDisaggFullUse <- disaggFullUse } @@ -1720,7 +1543,7 @@ balanceDisagg <- function(model, disagg){ #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param disagg Specifications for disaggregating the current Table #' @return dataframe representing a use table that includes the Use transactions, Use value added, and final demand sectors -buildDisaggFullUse <- function(model, disagg){ +buildDisaggFullUse <- function(model, disagg) { disaggFullUse <- rbind(model$UseTransactions, model$UseValueAdded) @@ -1741,8 +1564,7 @@ buildDisaggFullUse <- function(model, disagg){ #' @param disagg Specifications for disaggregating the current Table #' @param balancedFullUse A fullUse table (including UseTransactions, UseValueAdded, and FinalDemand), created to determine whether RAS balancing is needed #' @return list containing balanced domesticFinalDemand and domesticUseTransactions dataframes. -calculateBalancedDomesticTables <- function(model, disagg, balancedFullUse) -{ +calculateBalancedDomesticTables <- function(model, disagg, balancedFullUse) { #Calculate domestic use transactions and domestic final demand based on balancedfullUse #Idea is to obtain the DomesticUse/UseTransaction ratio before balancing, and apply that to the balanced Use Transactions. #Same for Domestic Final Demand From 5f4488b449b922729ca8e8fcc923897894bce650 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 13 Sep 2021 09:24:50 -0400 Subject: [PATCH 033/319] add category, subcategory and temporary description fields for elec disagg --- .../ElectricityDisaggregation_Sectors.csv | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/inst/extdata/disaggspecs/ElectricityDisaggregation_Sectors.csv b/inst/extdata/disaggspecs/ElectricityDisaggregation_Sectors.csv index 5f48fa37..d6c561f6 100644 --- a/inst/extdata/disaggspecs/ElectricityDisaggregation_Sectors.csv +++ b/inst/extdata/disaggspecs/ElectricityDisaggregation_Sectors.csv @@ -1,13 +1,13 @@ -NAICS_2012_Code,USEEIO_Code,USEEIO_Name -221111,221111/US,Hydroelectric Power Generation -221112,22111A/US,Coal Electric Power Generation -221112,22111B/US,Natural Gas Electric Power Generation -221112,22111C/US,Petroleum Electric Power Generation -221113,221113/US,Nuclear Electric Power Generation -221114,221114/US,Solar Electric Power Generation -221115,221115/US,Wind Electric Power Generation -221116,221116/US,Geothermal Electric Power Generation -221117,221117/US,Biomass Electric Power Generation -221118,221118/US,Other Electric Power Generation -221121,221121/US,Electric Bulk Power Transmission and Control -221122,221122/US,Electric Power Distribution +NAICS_2012_Code,USEEIO_Code,USEEIO_Name,Category,Subcategory,Description +221111,221111/US,Hydroelectric Power Generation,22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","This sector is disaggregated from BEA '221100:Electric power generation, transmission, and distribution'." +221112,22111A/US,Coal Electric Power Generation,22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","This sector is disaggregated from BEA '221100:Electric power generation, transmission, and distribution'." +221112,22111B/US,Natural Gas Electric Power Generation,22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","This sector is disaggregated from BEA '221100:Electric power generation, transmission, and distribution'." +221112,22111C/US,Petroleum Electric Power Generation,22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","This sector is disaggregated from BEA '221100:Electric power generation, transmission, and distribution'." +221113,221113/US,Nuclear Electric Power Generation,22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","This sector is disaggregated from BEA '221100:Electric power generation, transmission, and distribution'." +221114,221114/US,Solar Electric Power Generation,22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","This sector is disaggregated from BEA '221100:Electric power generation, transmission, and distribution'." +221115,221115/US,Wind Electric Power Generation,22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","This sector is disaggregated from BEA '221100:Electric power generation, transmission, and distribution'." +221116,221116/US,Geothermal Electric Power Generation,22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","This sector is disaggregated from BEA '221100:Electric power generation, transmission, and distribution'." +221117,221117/US,Biomass Electric Power Generation,22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","This sector is disaggregated from BEA '221100:Electric power generation, transmission, and distribution'." +221118,221118/US,Other Electric Power Generation,22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","This sector is disaggregated from BEA '221100:Electric power generation, transmission, and distribution'." +221121,221121/US,Electric Bulk Power Transmission and Control,22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","This sector is disaggregated from BEA '221100:Electric power generation, transmission, and distribution'." +221122,221122/US,Electric Power Distribution,22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","This sector is disaggregated from BEA '221100:Electric power generation, transmission, and distribution'." From 18e356bd472dcb31330083c7c00a1610686ec98a Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 13 Sep 2021 09:31:03 -0400 Subject: [PATCH 034/319] cleanup logging messages --- R/AggregationFunctions.R | 12 ++++-------- R/DisaggregateFunctions.R | 7 ++++--- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index f3aceb94..53127690 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -3,7 +3,7 @@ #' @return An aggregated model. aggregateModel <- function (model){ - + logging::loginfo(paste0("Aggregating sectors to ",model$DisaggregationSpecs$Aggregation$Sectors[1], "...")) #aggregating economic tables model$MakeTransactions <- aggregateMakeTable(model) model$UseTransactions <- aggregateUseTable(model) @@ -105,8 +105,6 @@ aggSatelliteTable <- function (model, sattable, sat){ for(currentRow in 1:nrow(sattableToAgg)){ - print(paste0(currentRow))#todo remove line - #get index in sattable that matches the flow in the main sector with the flow in the current sector to be aggregated sattableMainRowIndex <- which(newSatTable$Sector == aggCodes[1] & newSatTable$Flowable == sattableToAgg$Flowable[currentRow]) @@ -174,8 +172,7 @@ aggregateMakeTable <- function(model){ #agg <- model$DisaggregationSpecs$Aggregation agg <- model$DisaggregationSpecs$Aggregation$Sectors - logging::loginfo(paste0("Aggregating sectors to'", agg[1], "'.")) - + count <- 1 @@ -209,7 +206,7 @@ aggregateUseTable <- function(model, domestic = FALSE){ #agg <- model$DisaggregationSpecs$Aggregation agg <- model$DisaggregationSpecs$Aggregation$Sectors - logging::loginfo(paste0("Aggregating sectors to'", agg[1], "'.")) + count <- 1 @@ -258,8 +255,7 @@ aggregateVA <- function(model){ #agg <- model$DisaggregationSpecs$Aggregation agg <- model$DisaggregationSpecs$Aggregation$Sectors - logging::loginfo(paste0("Aggregating sectors to'", agg[1], "'.")) - + count <- 1 diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index df2600d8..3f1def8c 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -6,7 +6,7 @@ disaggregateModel <- function (model){ model$DisaggregationSpecs$Aggregation <- vector(mode='list') model$DisaggregationSpecs$Disaggregation <- vector(mode='list') for (configFile in model$specs$DisaggregationSpecs){ - logging::loginfo(paste("Reading disaggregation for", configFile, sep=" ")) + logging::loginfo(paste0("Loading disaggregation spes for ", configFile, "...")) config <- getConfiguration(configFile, "disagg") if('Aggregation' %in% names(config)){ model$DisaggregationSpecs$Aggregation <- append(model$DisaggregationSpecs$Aggregation, config$Aggregation) @@ -39,7 +39,7 @@ disaggregateModel <- function (model){ disagg$Subcategory <- lapply(newNames[, 'Subcategory'], as.character) disagg$Description <- lapply(newNames[, 'Description'], as.character) - #reordering disaggSectorNames and DIsaggSectorCodes to match the mapping in newNames + #reordering disaggSectorNames and DisaggSectorCodes to match the mapping in newNames disagg$DisaggregatedSectorNames <- as.list(disagg$DisaggregatedSectorNames[match(newNames$SectorName,disagg$DisaggregatedSectorNames)]) disagg$DisaggregatedSectorCodes <- as.list(disagg$DisaggregatedSectorCodes[match(newNames$SectorCode,disagg$DisaggregatedSectorCodes)]) @@ -331,7 +331,8 @@ disaggregateSatelliteTable <- function (disagg, sattable, sat_spec) { # Select only those rows from the disaggregation env file that apply for this satellite table new_sector_totals <- subset(disagg$EnvFileDF, SatelliteTable==sat_spec$Abbreviation, colnames(sattable)) if(nrow(new_sector_totals)==0) { - logging::logwarn(paste0("No data found for disaggregation of ",sat_spec$Abbreviation," - applying default allocation")) + logging::logwarn(paste0("No data found for disaggregation of ",sat_spec$Abbreviation, " for ", + disagg$OriginalSectorCode, " - applying default allocation")) sattable <- rbind(sattable, disaggregateSatelliteSubsetByRatio(subset(sattable, Sector==original_code, colnames(sattable)), disagg)) } else { # Check for errors in satellite table From 8275aa7926c96a4a07f63cd46a1e9bf12a9785ce Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 15 Sep 2021 16:31:29 -0400 Subject: [PATCH 035/319] Deleted electricity yml and sequential electricity & waste yml files that relied on old flowsa files (2.0) --- .../USEEIOv2.0_Waste_Electricity_disagg.yml | 880 ------------------ .../USEEIOv2.0_electricitydisagg.yml | 880 ------------------ 2 files changed, 1760 deletions(-) delete mode 100644 inst/extdata/modelspecs/USEEIOv2.0_Waste_Electricity_disagg.yml delete mode 100644 inst/extdata/modelspecs/USEEIOv2.0_electricitydisagg.yml diff --git a/inst/extdata/modelspecs/USEEIOv2.0_Waste_Electricity_disagg.yml b/inst/extdata/modelspecs/USEEIOv2.0_Waste_Electricity_disagg.yml deleted file mode 100644 index b6bda1f2..00000000 --- a/inst/extdata/modelspecs/USEEIOv2.0_Waste_Electricity_disagg.yml +++ /dev/null @@ -1,880 +0,0 @@ -Model: "USEEIOv2.0_waste_electricity_disagg" -BaseIOSchema: 2012 -BaseIOLevel: "Detail" -IOYear: 2012 # Year for IO data -ModelRegionAcronyms: ["US"] -ModelType: "EEIO" -IODataSource: "BEA" -BasePriceType: "PRO" #producer -BasewithRedefinitions: FALSE -CommodityorIndustryType: "Commodity" -ScrapIncluded: FALSE -DisaggregationSpecs: ["ElectricityDisaggregationDetail", "WasteDisaggregationDetail"] #Name of disaggregation yml file. - -SatelliteTable: - WAT: - FullName: "Water withdrawals" - Abbreviation: "WAT" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v0.1_864d573.parquet" - FileLocation: "DataCommons" - DataYears: [2015] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - USGS_NWIS_WU_2015: - Title: "Water Use in the US" - Author: "USGS" - DataYear: 2015 - URL: "https://waterdata.usgs.gov/" - Primary: TRUE - CHAIR: - FullName: "Criteria and Hazardous Air Emissions" - Abbreviation: "CHAIR" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/CAP_HAP_national_2017_v0.1_864d573.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - EPA_NEI_2017: - Title: "National Emissions Inventory" - Author: "EPA" - DataYear: 2017 - URL: "https://www.epa.gov/air-emissions-inventories/national-emissions-inventory-nei" - Primary: TRUE - EPA_TRI_2017: - Title: "Toxic Release Inventory" - Author: "EPA" - DataYear: 2017 - URL: "https://www.epa.gov/toxics-release-inventory-tri-program" - Primary: TRUE - GRDREL: - FullName: "Point source industrial releases to ground" - Abbreviation: "GRDREL" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/GRDREL_national_2017_v0.1_864d573.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - EPA_TRI_2017: - Title: "Toxic Release Inventory" - Author: "EPA" - DataYear: 2017 - URL: "https://www.epa.gov/toxics-release-inventory-tri-program" - Primary: TRUE - WATREL: - FullName: "Point source releases to water" - Abbreviation: "WATREL" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/TRI_DMR_national_2017_v0.1_864d573.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - EPA_TRI_2017: - Title: "Toxic Release Inventory" - Author: "EPA" - DataYear: 2017 - URL: "https://www.epa.gov/toxics-release-inventory-tri-program" - Primary: TRUE - EPA_DMR_2017: - Title: "Discharge Monitoring Report" - Author: "EPA" - DataYear: 2017 - URL: "https://echo.epa.gov/tools/data-downloads/icis-npdes-dmr-and-limit-data-set" - Primary: TRUE - GHG: - FullName: "Greenhouse Gases" - Abbreviation: "GHG" - StaticSource: TRUE - StaticFile: "useeior/NGHGIAM_GHG_TotalsBySector.csv" - FileLocation: "DataCommons" - DataYears: [2016] - Locations: ["US"] - SectorListSource: "BEA" # or, NAICS - SectorListYear: 2012 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - USEPA_GHG_2018: - Title: "GHG Inventory" - Author: "USEPA" - DataYear: 2016 - URL: "https://www.epa.gov/ghgemissions/inventory-us-greenhouse-gas-emissions-and-sinks-1990-2016" - Primary: TRUE - LAND: - FullName: "Land use" - Abbreviation: "LAND" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Land_national_2012_v0.1.1_66af8ab.parquet" - FileLocation: "DataCommons" - DataYears: [2012] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - BLM_PLS: - Title: "Public Land Statistics" - Author: "BLM" - DataYear: 2012 - URL: "https://www.blm.gov/about/data/public-land-statistics" - Primary: FALSE - EIA_CBECS_Land: - Title: "Commercial Building Energy Consumption Survey" - Author: "EIA" - DataYear: 2012 - URL: "https://www.eia.gov/consumption/commercial/data/2012/" - Primary: FALSE - EIA_MECS_Land: - Title: "Manufacturing Energy Consumption Survey" - Author: "EIA" - DataYear: 2014 - URL: "https://www.eia.gov/consumption/manufacturing/data/2014/" - Primary: FALSE - USDA_ERS_MLU: - Title: "Major Uses of Land in the United States" - Author: "USDA" - DataYear: 2012 - URL: "https://www.ers.usda.gov/data-products/major-land-uses/" - Primary: TRUE - MINE: - FullName: "Mineral extraction" - Abbreviation: "MINE" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_MINE_TotalsBySector_FEDEFL.csv" - FileLocation: "DataCommons" - DataYears: [2014] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - USGS_MCS: - Title: "Mineral Commodity Summary" - Author: "USGS" - DataYear: 2014 - URL: "https://www.usgs.gov/centers/nmic/mineral-commodity-summaries" - Primary: TRUE - ENERGY: - FullName: "Energy extraction" - Abbreviation: "ENERGY" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_Energy_TotalsBySector_FEDEFL.csv" - FileLocation: "DataCommons" - DataYears: [2014] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - EIA_MER: - Title: "Monthly Energy Review" - Author: "EIA" - DataYear: 2014 - URL: "http://www.eia.gov/totalenergy/data/monthly/" - Primary: TRUE - EIA_923: - Title: "Form EIA-923 Detailed" - Author: "EIA" - DataYear: 2014 - URL: "https://www.eia.gov/electricity/data/eia923/" - Primary: TRUE - NPAG: - FullName: "Nitrogen and Phosphorus Releases from Agriculture" - Abbreviation: "NPAG" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_NPAG_TotalsBySector.csv" - FileLocation: "DataCommons" - DataYears: [2013, 2015] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - USDA_CUS_Corn_Potatoes: - Title: "Chemical Use Survey - Corn and Potatoes" - Author: "USDA" - DataYear: 2014 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" - Primary: FALSE - USDA_CUS_Cotton: - Title: "Chemical Use Survey - Cotton" - Author: "USDA" - DataYear: 2010 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" - Primary: FALSE - USDA_CUS_Fruit: - Title: "Chemical Use Survey - Fruit" - Author: "USDA" - DataYear: 2011 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" - Primary: FALSE - USDA_CUS_Peanuts_Rice: - Title: "Chemical Use Survey - Peanuts and Rice" - Author: "USDA" - DataYear: 2013 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" - Primary: FALSE - USDA_CUS_Soybeans_Wheat: - Title: "Chemical Use Survey - Soybeans and Wheat" - Author: "USDA" - DataYear: 2012 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" - Primary: FALSE - USDA_CUS_Vegetables: - Title: "Chemical Use Survey - Vegetables" - Author: "USDA" - DataYear: 2014 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" - Primary: FALSE - PEST: - FullName: "Pesticide releases" - Abbreviation: "PEST" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_PEST_TotalsBySector.csv" - FileLocation: "DataCommons" - DataYears: [2004, 2005, 2010, 2011, 2012, 2013, 2014] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - USDA_CUS_Corn_Potatoes: - Title: "Chemical Use Survey - Corn and Potatoes" - Author: "USDA" - DataYear: 2014 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" - Primary: FALSE - USDA_CUS_Cotton: - Title: "Chemical Use Survey - Cotton" - Author: "USDA" - DataYear: 2010 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" - Primary: FALSE - USDA_CUS_Fruit: - Title: "Chemical Use Survey - Fruit" - Author: "USDA" - DataYear: 2011 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" - Primary: FALSE - USDA_CUS_Peanuts_Rice: - Title: "Chemical Use Survey - Peanuts and Rice" - Author: "USDA" - DataYear: 2013 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" - Primary: FALSE - USDA_CUS_Soybeans_Wheat: - Title: "Chemical Use Survey - Soybeans and Wheat" - Author: "USDA" - DataYear: 2012 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" - Primary: FALSE - USDA_CUS_Vegetables: - Title: "Chemical Use Survey - Vegetables" - Author: "USDA" - DataYear: 2014 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" - Primary: FALSE - CNHW: - FullName: "Commercial non-hazardous waste excluding construction activities" - Abbreviation: "CNHW" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_CNHW_TotalsBySector.csv" - FileLocation: "DataCommons" - DataYears: [2015] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "Waste Characterization Study 2014" - DataSources: - CalRecycle_CWCS: - Title: "2014 Generator-Based Characterization of Commercial Sector" - Author: "CalRecycle" - DataYear: 2014 - URL: "https://www2.calrecycle.ca.gov/WasteCharacterization/PubExtracts/2014/GenSummary.pdf" - Primary: TRUE - CNHWC: - FullName: "Commercial non-hazardous waste from construction activities" - Abbreviation: "CNHWC" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_CNHWC_TotalsBySector.csv" - FileLocation: "DataCommons" - DataYears: [2014] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "CDDPath" - DataSources: - USEPA_FF_2014: - Title: "Advancing Sustainable Materials Management: 2014 Fact Sheet" - Author: "USEPA" - DataYear: 2014 - URL: "https://www.epa.gov/sites/production/files/2016-11/documents/2014_smmfactsheet_508.pdf" - Primary: TRUE - CRHW: - FullName: "Commercial RCRA-defined hazardous waste" - Abbreviation: "CRHW" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/CRHW_national_2017_v0.1_864d573.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - OriginalFlowSource: "RCRAInfo" - DataSources: - USEPA_RCRAInfo_2017: - Title: "National Biennial RCRA Hazardous Waste Report" - Author: "USEPA" - DataYear: 2017 - URL: "https://rcrapublic.epa.gov/rcrainfoweb/action/modules/br/main/broverview" - Primary: TRUE - EMP: - FullName: "Employment" - Abbreviation: "EMP" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Employment_national_2017_v0.1.1_66af8ab.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - OriginalFlowSource: "National Employment Matrix" - DataSources: - BLS_QCEW_2017: - Title: "Quarterly Census of Employment and Wages" - Author: "BLS" - DataYear: 2017 - URL: "https://www.bls.gov/cew/" - Primary: TRUE - VADD: - FullName: "Value Added" - Abbreviation: "VADD" - StaticSource: FALSE - StaticFile: null - FileLocation: None - DataYears: [2012] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2012 - SectorListLevel: "Detail" - OriginalFlowSource: "Input-Output Tables" - ScriptFunctionCall: "getValueAddedTotalsbySector" #function to call for script - ScriptFunctionParameters: ["model"] #list of parameters - DataSources: - BEA_USE: - Title: "Detail Use Before Redefinitions" - Author: "BEA" - DataYear: 2012 - URL: "https://apps.bea.gov//industry/iTables%20Static%20Files/AllTablesIO.zip" - Primary: TRUE - -Indicators: - GreenhouseGases: - Name: "Greenhouse Gases" - Code: "GHG" - Group: "Impact Potential" - Unit: "kg CO2 eq" - SimpleUnit: "Kilograms Carbon Dioxide (CO2)" - SimpleName: "Greenhouse Gases" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Global warming"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - Acidification: - Name: "Acidification Potential" - Code: "ACID" - Group: "Impact Potential" - Unit: "kg SO2 eq" - SimpleUnit: "Kilograms Sulphur Dioxide (SO2)" - SimpleName: "Acid Rain" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Acidification"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - Eutrophication: - Name: "Eutrophication Potential" - Code: "EUTR" - Group: "Impact Potential" - Unit: "kg N eq" - SimpleUnit: "Kilograms Nitrogen (N)" - SimpleName: "Water Eutrophication" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Eutrophication"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - FreshwaterEcotox: - Name: "Freshwater Ecotoxicity Potential" - Code: "ETOX" - Group: "Impact Potential" - Unit: "CTUe" - SimpleUnit: "Comparative Toxic Unit for Ecosystem (CTUe)" - SimpleName: "Freshwater Ecotoxicity" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Freshwater ecotoxicity"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - HumanHealthCancer: - Name: "Human Health - Cancer" - Code: "HCAN" - Group: "Impact Potential" - Unit: "CTUh" - SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" - SimpleName: "Cancer Disease" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Human health - cancer"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - HumanHealthNonCancer: - Name: "Human Health - Noncancer" - Code: "HNCN" - Group: "Impact Potential" - Unit: "CTUh" - SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" - SimpleName: "Noncancer Disease" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Human health - non-cancer"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - HumanHealthToxicity: - Name: "Human Health Toxicity" - Code: "HTOX" - Group: "Impact Potential" - Unit: "CTUh" - SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" - SimpleName: "Toxic to Humans" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getCombinedImpactMethods" #function to call for script - ScriptFunctionParameters: - indicators: ["Human health - cancer", "Human health - non-cancer"] - DataSources: - USEEIO_LCIA_Aggregation: - Title: "Aggregation of HNCN and HCAN" - Author: NA - DataYear: NA - URL: NA - Primary: TRUE - HumanHealthRespEffects: - Name: "Human Health - Respiratory Effects" - Code: "HRSP" - Group: "Impact Potential" - Unit: "kg PM2.5 eq" - SimpleUnit: "Kilograms Particulate Matter" - SimpleName: "Respiratory Effects" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Human health - particulate matter"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - Ozone: - Name: "Ozone Depletion" - Code: "OZON" - Group: "Impact Potential" - Unit: "kg CFC-11 eq" - SimpleUnit: "Kilograms ChloroFluoroCarbon-11" - SimpleName: "Ozone Depletion" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Ozone depletion"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - Smog: - Name: "Smog Formation Potential" - Code: "SMOG" - Group: "Impact Potential" - Unit: "kg O3 eq" - SimpleUnit: "Kilograms Ozone (O3)" - SimpleName: "Smog Formation" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Smog formation"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - freshwater_withdrawal: - Name: "Freshwater withdrawals" - Code: "WATR" - Group: "Resource Use" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Water Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["freshwater_resources"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - land_use: - Name: "Land use" - Code: "LAND" - Group: "Resource Use" - Unit: "m2*yr" - SimpleUnit: "Square Meters per Year" - SimpleName: "Land Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["land_use"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - HAP: - Name: "Hazardous Air Pollutants" - Code: "HAPS" - Group: "Chemical Releases" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Hazardous Air Pollutants" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["HAP"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - Pesticides: - Name: "Pesticides" - Code: "PEST" - Group: "Chemical Releases" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Pesticides" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["USDA_CUS_pesticides"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - NonRenewableEnergy: - Name: "Nonrenewable Energy Use" - Code: "NNRG" - Group: "Resource Use" - Unit: "MJ" - SimpleUnit: "Megajoules (MJ)" - SimpleName: "Nonrenewable Energy Use" - StaticSource: TRUE - FileLocation: "DataCommons" - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["nonrenewable_energy"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - RenewableEnergy: - Name: "Renewable Energy Use" - Code: "RNRG" - Group: "Resource Use" - Unit: "MJ" - SimpleUnit: "Megajoules (MJ)" - SimpleName: "Renewable Energy Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["renewable_energy"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - Energy: - Name: "Energy Use" - Code: "ENRG" - Group: "Resource Use" - Unit: "MJ" - SimpleUnit: "Megajoules (MJ)" - SimpleName: "Energy Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["energy"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - MineralsMetals: - Name: "Minerals and Metals Use" - Code: "MNRL" - Group: "Resource Use" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Minerals and Metals Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["USGS_mineral_resources"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - ValueAdded: - Name: "Value Added" - Code: "VADD" - Group: "Economic & Social" - Unit: "$" - SimpleUnit: "US Dollars ($)" - SimpleName: "Value Added" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - ingwersen_useeiov11_2017: - Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.23719/1368541" - Primary: TRUE - Jobs: - Name: "Jobs Supported" - Code: "JOBS" - Group: "Economic & Social" - Unit: "jobs" - SimpleUnit: "Employees" - SimpleName: "Jobs Supported" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - ingwersen_useeiov11_2017: - Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.23719/1368541" - Primary: TRUE - RCRAHazWaste: - Name: "Commercial RCRA Hazardous Waste" - Code: "CRHW" - Group: "Waste Generated" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Hazardous Waste" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - meyer_analyzing_2020: - Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.1016/j.resconrec.2020.104795" - Primary: TRUE - MunicipalWaste: - Name: "Commercial Municipal Solid Waste" - Code: "CMSW" - Group: "Waste Generated" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Municipal Solid Waste" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - meyer_analyzing_2020: - Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.1016/j.resconrec.2020.104795" - Primary: TRUE - ConstructionDebris: - Name: "Commercial Construction and Demolition Debris" - Code: "CCDD" - Group: "Waste Generated" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Construction Debris" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - meyer_analyzing_2020: - Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.1016/j.resconrec.2020.104795" - Primary: TRUE - -DemandVectors: - Consumption: - Type: "Consumption" - Year: 2012 - System: "Complete" - Location: "US" - Production: - Type: "Production" - Year: 2012 - System: "Complete" - Location: "US" - HouseholdConsumption: - Type: "Consumption" - Year: 2012 - System: "Household" - Location: "US" - DomesticConsumption: - Type: "Consumption" - Year: 2012 - System: "Domestic" - Location: "US" - diff --git a/inst/extdata/modelspecs/USEEIOv2.0_electricitydisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0_electricitydisagg.yml deleted file mode 100644 index f25526bb..00000000 --- a/inst/extdata/modelspecs/USEEIOv2.0_electricitydisagg.yml +++ /dev/null @@ -1,880 +0,0 @@ -Model: "USEEIOv2.0_electricitydisagg" -BaseIOSchema: 2012 -BaseIOLevel: "Detail" -IOYear: 2012 # Year for IO data -ModelRegionAcronyms: ["US"] -ModelType: "EEIO" -IODataSource: "BEA" -BasePriceType: "PRO" #producer -BasewithRedefinitions: FALSE -CommodityorIndustryType: "Commodity" -ScrapIncluded: FALSE -DisaggregationSpecs: "ElectricityDisaggregationDetail" #Name of disaggregation yml file. - -SatelliteTable: - WAT: - FullName: "Water withdrawals" - Abbreviation: "WAT" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v0.1_864d573.parquet" - FileLocation: "DataCommons" - DataYears: [2015] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - USGS_NWIS_WU_2015: - Title: "Water Use in the US" - Author: "USGS" - DataYear: 2015 - URL: "https://waterdata.usgs.gov/" - Primary: TRUE - CHAIR: - FullName: "Criteria and Hazardous Air Emissions" - Abbreviation: "CHAIR" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/CAP_HAP_national_2017_v0.1_864d573.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - EPA_NEI_2017: - Title: "National Emissions Inventory" - Author: "EPA" - DataYear: 2017 - URL: "https://www.epa.gov/air-emissions-inventories/national-emissions-inventory-nei" - Primary: TRUE - EPA_TRI_2017: - Title: "Toxic Release Inventory" - Author: "EPA" - DataYear: 2017 - URL: "https://www.epa.gov/toxics-release-inventory-tri-program" - Primary: TRUE - GRDREL: - FullName: "Point source industrial releases to ground" - Abbreviation: "GRDREL" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/GRDREL_national_2017_v0.1_864d573.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - EPA_TRI_2017: - Title: "Toxic Release Inventory" - Author: "EPA" - DataYear: 2017 - URL: "https://www.epa.gov/toxics-release-inventory-tri-program" - Primary: TRUE - WATREL: - FullName: "Point source releases to water" - Abbreviation: "WATREL" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/TRI_DMR_national_2017_v0.1_864d573.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - EPA_TRI_2017: - Title: "Toxic Release Inventory" - Author: "EPA" - DataYear: 2017 - URL: "https://www.epa.gov/toxics-release-inventory-tri-program" - Primary: TRUE - EPA_DMR_2017: - Title: "Discharge Monitoring Report" - Author: "EPA" - DataYear: 2017 - URL: "https://echo.epa.gov/tools/data-downloads/icis-npdes-dmr-and-limit-data-set" - Primary: TRUE - GHG: - FullName: "Greenhouse Gases" - Abbreviation: "GHG" - StaticSource: TRUE - StaticFile: "useeior/NGHGIAM_GHG_TotalsBySector.csv" - FileLocation: "DataCommons" - DataYears: [2016] - Locations: ["US"] - SectorListSource: "BEA" # or, NAICS - SectorListYear: 2012 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - USEPA_GHG_2018: - Title: "GHG Inventory" - Author: "USEPA" - DataYear: 2016 - URL: "https://www.epa.gov/ghgemissions/inventory-us-greenhouse-gas-emissions-and-sinks-1990-2016" - Primary: TRUE - LAND: - FullName: "Land use" - Abbreviation: "LAND" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Land_national_2012_v0.1.1_66af8ab.parquet" - FileLocation: "DataCommons" - DataYears: [2012] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - BLM_PLS: - Title: "Public Land Statistics" - Author: "BLM" - DataYear: 2012 - URL: "https://www.blm.gov/about/data/public-land-statistics" - Primary: FALSE - EIA_CBECS_Land: - Title: "Commercial Building Energy Consumption Survey" - Author: "EIA" - DataYear: 2012 - URL: "https://www.eia.gov/consumption/commercial/data/2012/" - Primary: FALSE - EIA_MECS_Land: - Title: "Manufacturing Energy Consumption Survey" - Author: "EIA" - DataYear: 2014 - URL: "https://www.eia.gov/consumption/manufacturing/data/2014/" - Primary: FALSE - USDA_ERS_MLU: - Title: "Major Uses of Land in the United States" - Author: "USDA" - DataYear: 2012 - URL: "https://www.ers.usda.gov/data-products/major-land-uses/" - Primary: TRUE - MINE: - FullName: "Mineral extraction" - Abbreviation: "MINE" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_MINE_TotalsBySector_FEDEFL.csv" - FileLocation: "DataCommons" - DataYears: [2014] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - USGS_MCS: - Title: "Mineral Commodity Summary" - Author: "USGS" - DataYear: 2014 - URL: "https://www.usgs.gov/centers/nmic/mineral-commodity-summaries" - Primary: TRUE - ENERGY: - FullName: "Energy extraction" - Abbreviation: "ENERGY" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_Energy_TotalsBySector_FEDEFL.csv" - FileLocation: "DataCommons" - DataYears: [2014] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - EIA_MER: - Title: "Monthly Energy Review" - Author: "EIA" - DataYear: 2014 - URL: "http://www.eia.gov/totalenergy/data/monthly/" - Primary: TRUE - EIA_923: - Title: "Form EIA-923 Detailed" - Author: "EIA" - DataYear: 2014 - URL: "https://www.eia.gov/electricity/data/eia923/" - Primary: TRUE - NPAG: - FullName: "Nitrogen and Phosphorus Releases from Agriculture" - Abbreviation: "NPAG" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_NPAG_TotalsBySector.csv" - FileLocation: "DataCommons" - DataYears: [2013, 2015] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - USDA_CUS_Corn_Potatoes: - Title: "Chemical Use Survey - Corn and Potatoes" - Author: "USDA" - DataYear: 2014 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" - Primary: FALSE - USDA_CUS_Cotton: - Title: "Chemical Use Survey - Cotton" - Author: "USDA" - DataYear: 2010 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" - Primary: FALSE - USDA_CUS_Fruit: - Title: "Chemical Use Survey - Fruit" - Author: "USDA" - DataYear: 2011 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" - Primary: FALSE - USDA_CUS_Peanuts_Rice: - Title: "Chemical Use Survey - Peanuts and Rice" - Author: "USDA" - DataYear: 2013 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" - Primary: FALSE - USDA_CUS_Soybeans_Wheat: - Title: "Chemical Use Survey - Soybeans and Wheat" - Author: "USDA" - DataYear: 2012 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" - Primary: FALSE - USDA_CUS_Vegetables: - Title: "Chemical Use Survey - Vegetables" - Author: "USDA" - DataYear: 2014 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" - Primary: FALSE - PEST: - FullName: "Pesticide releases" - Abbreviation: "PEST" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_PEST_TotalsBySector.csv" - FileLocation: "DataCommons" - DataYears: [2004, 2005, 2010, 2011, 2012, 2013, 2014] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - USDA_CUS_Corn_Potatoes: - Title: "Chemical Use Survey - Corn and Potatoes" - Author: "USDA" - DataYear: 2014 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" - Primary: FALSE - USDA_CUS_Cotton: - Title: "Chemical Use Survey - Cotton" - Author: "USDA" - DataYear: 2010 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" - Primary: FALSE - USDA_CUS_Fruit: - Title: "Chemical Use Survey - Fruit" - Author: "USDA" - DataYear: 2011 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" - Primary: FALSE - USDA_CUS_Peanuts_Rice: - Title: "Chemical Use Survey - Peanuts and Rice" - Author: "USDA" - DataYear: 2013 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" - Primary: FALSE - USDA_CUS_Soybeans_Wheat: - Title: "Chemical Use Survey - Soybeans and Wheat" - Author: "USDA" - DataYear: 2012 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" - Primary: FALSE - USDA_CUS_Vegetables: - Title: "Chemical Use Survey - Vegetables" - Author: "USDA" - DataYear: 2014 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" - Primary: FALSE - CNHW: - FullName: "Commercial non-hazardous waste excluding construction activities" - Abbreviation: "CNHW" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_CNHW_TotalsBySector.csv" - FileLocation: "DataCommons" - DataYears: [2015] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "Waste Characterization Study 2014" - DataSources: - CalRecycle_CWCS: - Title: "2014 Generator-Based Characterization of Commercial Sector" - Author: "CalRecycle" - DataYear: 2014 - URL: "https://www2.calrecycle.ca.gov/WasteCharacterization/PubExtracts/2014/GenSummary.pdf" - Primary: TRUE - CNHWC: - FullName: "Commercial non-hazardous waste from construction activities" - Abbreviation: "CNHWC" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_CNHWC_TotalsBySector.csv" - FileLocation: "DataCommons" - DataYears: [2014] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "CDDPath" - DataSources: - USEPA_FF_2014: - Title: "Advancing Sustainable Materials Management: 2014 Fact Sheet" - Author: "USEPA" - DataYear: 2014 - URL: "https://www.epa.gov/sites/production/files/2016-11/documents/2014_smmfactsheet_508.pdf" - Primary: TRUE - CRHW: - FullName: "Commercial RCRA-defined hazardous waste" - Abbreviation: "CRHW" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/CRHW_national_2017_v0.1_864d573.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - OriginalFlowSource: "RCRAInfo" - DataSources: - USEPA_RCRAInfo_2017: - Title: "National Biennial RCRA Hazardous Waste Report" - Author: "USEPA" - DataYear: 2017 - URL: "https://rcrapublic.epa.gov/rcrainfoweb/action/modules/br/main/broverview" - Primary: TRUE - EMP: - FullName: "Employment" - Abbreviation: "EMP" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Employment_national_2017_v0.1.1_66af8ab.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - OriginalFlowSource: "National Employment Matrix" - DataSources: - BLS_QCEW_2017: - Title: "Quarterly Census of Employment and Wages" - Author: "BLS" - DataYear: 2017 - URL: "https://www.bls.gov/cew/" - Primary: TRUE - VADD: - FullName: "Value Added" - Abbreviation: "VADD" - StaticSource: FALSE - StaticFile: null - FileLocation: None - DataYears: [2012] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2012 - SectorListLevel: "Detail" - OriginalFlowSource: "Input-Output Tables" - ScriptFunctionCall: "getValueAddedTotalsbySector" #function to call for script - ScriptFunctionParameters: ["model"] #list of parameters - DataSources: - BEA_USE: - Title: "Detail Use Before Redefinitions" - Author: "BEA" - DataYear: 2012 - URL: "https://apps.bea.gov//industry/iTables%20Static%20Files/AllTablesIO.zip" - Primary: TRUE - -Indicators: - GreenhouseGases: - Name: "Greenhouse Gases" - Code: "GHG" - Group: "Impact Potential" - Unit: "kg CO2 eq" - SimpleUnit: "Kilograms Carbon Dioxide (CO2)" - SimpleName: "Greenhouse Gases" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Global warming"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - Acidification: - Name: "Acidification Potential" - Code: "ACID" - Group: "Impact Potential" - Unit: "kg SO2 eq" - SimpleUnit: "Kilograms Sulphur Dioxide (SO2)" - SimpleName: "Acid Rain" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Acidification"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - Eutrophication: - Name: "Eutrophication Potential" - Code: "EUTR" - Group: "Impact Potential" - Unit: "kg N eq" - SimpleUnit: "Kilograms Nitrogen (N)" - SimpleName: "Water Eutrophication" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Eutrophication"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - FreshwaterEcotox: - Name: "Freshwater Ecotoxicity Potential" - Code: "ETOX" - Group: "Impact Potential" - Unit: "CTUe" - SimpleUnit: "Comparative Toxic Unit for Ecosystem (CTUe)" - SimpleName: "Freshwater Ecotoxicity" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Freshwater ecotoxicity"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - HumanHealthCancer: - Name: "Human Health - Cancer" - Code: "HCAN" - Group: "Impact Potential" - Unit: "CTUh" - SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" - SimpleName: "Cancer Disease" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Human health - cancer"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - HumanHealthNonCancer: - Name: "Human Health - Noncancer" - Code: "HNCN" - Group: "Impact Potential" - Unit: "CTUh" - SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" - SimpleName: "Noncancer Disease" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Human health - non-cancer"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - HumanHealthToxicity: - Name: "Human Health Toxicity" - Code: "HTOX" - Group: "Impact Potential" - Unit: "CTUh" - SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" - SimpleName: "Toxic to Humans" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getCombinedImpactMethods" #function to call for script - ScriptFunctionParameters: - indicators: ["Human health - cancer", "Human health - non-cancer"] - DataSources: - USEEIO_LCIA_Aggregation: - Title: "Aggregation of HNCN and HCAN" - Author: NA - DataYear: NA - URL: NA - Primary: TRUE - HumanHealthRespEffects: - Name: "Human Health - Respiratory Effects" - Code: "HRSP" - Group: "Impact Potential" - Unit: "kg PM2.5 eq" - SimpleUnit: "Kilograms Particulate Matter" - SimpleName: "Respiratory Effects" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Human health - particulate matter"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - Ozone: - Name: "Ozone Depletion" - Code: "OZON" - Group: "Impact Potential" - Unit: "kg CFC-11 eq" - SimpleUnit: "Kilograms ChloroFluoroCarbon-11" - SimpleName: "Ozone Depletion" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Ozone depletion"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - Smog: - Name: "Smog Formation Potential" - Code: "SMOG" - Group: "Impact Potential" - Unit: "kg O3 eq" - SimpleUnit: "Kilograms Ozone (O3)" - SimpleName: "Smog Formation" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Smog formation"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - freshwater_withdrawal: - Name: "Freshwater withdrawals" - Code: "WATR" - Group: "Resource Use" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Water Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["freshwater_resources"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - land_use: - Name: "Land use" - Code: "LAND" - Group: "Resource Use" - Unit: "m2*yr" - SimpleUnit: "Square Meters per Year" - SimpleName: "Land Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["land_use"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - HAP: - Name: "Hazardous Air Pollutants" - Code: "HAPS" - Group: "Chemical Releases" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Hazardous Air Pollutants" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["HAP"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - Pesticides: - Name: "Pesticides" - Code: "PEST" - Group: "Chemical Releases" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Pesticides" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["USDA_CUS_pesticides"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - NonRenewableEnergy: - Name: "Nonrenewable Energy Use" - Code: "NNRG" - Group: "Resource Use" - Unit: "MJ" - SimpleUnit: "Megajoules (MJ)" - SimpleName: "Nonrenewable Energy Use" - StaticSource: TRUE - FileLocation: "DataCommons" - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["nonrenewable_energy"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - RenewableEnergy: - Name: "Renewable Energy Use" - Code: "RNRG" - Group: "Resource Use" - Unit: "MJ" - SimpleUnit: "Megajoules (MJ)" - SimpleName: "Renewable Energy Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["renewable_energy"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - Energy: - Name: "Energy Use" - Code: "ENRG" - Group: "Resource Use" - Unit: "MJ" - SimpleUnit: "Megajoules (MJ)" - SimpleName: "Energy Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["energy"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - MineralsMetals: - Name: "Minerals and Metals Use" - Code: "MNRL" - Group: "Resource Use" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Minerals and Metals Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["USGS_mineral_resources"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - ValueAdded: - Name: "Value Added" - Code: "VADD" - Group: "Economic & Social" - Unit: "$" - SimpleUnit: "US Dollars ($)" - SimpleName: "Value Added" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - ingwersen_useeiov11_2017: - Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.23719/1368541" - Primary: TRUE - Jobs: - Name: "Jobs Supported" - Code: "JOBS" - Group: "Economic & Social" - Unit: "jobs" - SimpleUnit: "Employees" - SimpleName: "Jobs Supported" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - ingwersen_useeiov11_2017: - Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.23719/1368541" - Primary: TRUE - RCRAHazWaste: - Name: "Commercial RCRA Hazardous Waste" - Code: "CRHW" - Group: "Waste Generated" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Hazardous Waste" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - meyer_analyzing_2020: - Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.1016/j.resconrec.2020.104795" - Primary: TRUE - MunicipalWaste: - Name: "Commercial Municipal Solid Waste" - Code: "CMSW" - Group: "Waste Generated" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Municipal Solid Waste" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - meyer_analyzing_2020: - Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.1016/j.resconrec.2020.104795" - Primary: TRUE - ConstructionDebris: - Name: "Commercial Construction and Demolition Debris" - Code: "CCDD" - Group: "Waste Generated" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Construction Debris" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - meyer_analyzing_2020: - Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.1016/j.resconrec.2020.104795" - Primary: TRUE - -DemandVectors: - Consumption: - Type: "Consumption" - Year: 2012 - System: "Complete" - Location: "US" - Production: - Type: "Production" - Year: 2012 - System: "Complete" - Location: "US" - HouseholdConsumption: - Type: "Consumption" - Year: 2012 - System: "Household" - Location: "US" - DomesticConsumption: - Type: "Consumption" - Year: 2012 - System: "Domestic" - Location: "US" - From 7b80ca75dfa81161e1aaed5d052b353f2a9fde9f Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 15 Sep 2021 16:32:05 -0400 Subject: [PATCH 036/319] Added electricity disaggregation yml and electricity and waste disaggregation yml with pointers to updated flowsa files. --- .../USEEIOv2.0.1_electricitydisagg.yml | 880 ++++++++++++++++++ .../USEEIOv2.1_Waste_Electricity_disagg.yml | 880 ++++++++++++++++++ 2 files changed, 1760 insertions(+) create mode 100644 inst/extdata/modelspecs/USEEIOv2.0.1_electricitydisagg.yml create mode 100644 inst/extdata/modelspecs/USEEIOv2.1_Waste_Electricity_disagg.yml diff --git a/inst/extdata/modelspecs/USEEIOv2.0.1_electricitydisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0.1_electricitydisagg.yml new file mode 100644 index 00000000..ebe13f21 --- /dev/null +++ b/inst/extdata/modelspecs/USEEIOv2.0.1_electricitydisagg.yml @@ -0,0 +1,880 @@ +Model: "USEEIOv2.0.1_electricitydisagg" +BaseIOSchema: 2012 +BaseIOLevel: "Detail" +IOYear: 2012 # Year for IO data +ModelRegionAcronyms: ["US"] +ModelType: "EEIO" +IODataSource: "BEA" +BasePriceType: "PRO" #producer +BasewithRedefinitions: FALSE +CommodityorIndustryType: "Commodity" +ScrapIncluded: FALSE +DisaggregationSpecs: "ElectricityDisaggregationDetail" #Name of disaggregation yml file. + +SatelliteTable: + WAT: + FullName: "Water withdrawals" + Abbreviation: "WAT" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2015] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + USGS_NWIS_WU_2015: + Title: "Water Use in the US" + Author: "USGS" + DataYear: 2015 + URL: "https://waterdata.usgs.gov/" + Primary: TRUE + CHAIR: + FullName: "Criteria and Hazardous Air Emissions" + Abbreviation: "CHAIR" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/CAP_HAP_national_2017_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + EPA_NEI_2017: + Title: "National Emissions Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/air-emissions-inventories/national-emissions-inventory-nei" + Primary: TRUE + EPA_TRI_2017: + Title: "Toxic Release Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/toxics-release-inventory-tri-program" + Primary: TRUE + GRDREL: + FullName: "Point source industrial releases to ground" + Abbreviation: "GRDREL" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/GRDREL_national_2017_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + EPA_TRI_2017: + Title: "Toxic Release Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/toxics-release-inventory-tri-program" + Primary: TRUE + WATREL: + FullName: "Point source releases to water" + Abbreviation: "WATREL" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/TRI_DMR_national_2017_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + EPA_TRI_2017: + Title: "Toxic Release Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/toxics-release-inventory-tri-program" + Primary: TRUE + EPA_DMR_2017: + Title: "Discharge Monitoring Report" + Author: "EPA" + DataYear: 2017 + URL: "https://echo.epa.gov/tools/data-downloads/icis-npdes-dmr-and-limit-data-set" + Primary: TRUE + GHG: + FullName: "Greenhouse Gases" + Abbreviation: "GHG" + StaticSource: TRUE + StaticFile: "useeior/NGHGIAM_GHG_TotalsBySector_wUUIDs.csv" + FileLocation: "DataCommons" + DataYears: [2016] + Locations: ["US"] + SectorListSource: "BEA" # or, NAICS + SectorListYear: 2012 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USEPA_GHG_2018: + Title: "GHG Inventory" + Author: "USEPA" + DataYear: 2016 + URL: "https://www.epa.gov/ghgemissions/inventory-us-greenhouse-gas-emissions-and-sinks-1990-2016" + Primary: TRUE + LAND: + FullName: "Land use" + Abbreviation: "LAND" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/Land_national_2012_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2012] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + BLM_PLS: + Title: "Public Land Statistics" + Author: "BLM" + DataYear: 2012 + URL: "https://www.blm.gov/about/data/public-land-statistics" + Primary: FALSE + EIA_CBECS_Land: + Title: "Commercial Building Energy Consumption Survey" + Author: "EIA" + DataYear: 2012 + URL: "https://www.eia.gov/consumption/commercial/data/2012/" + Primary: FALSE + EIA_MECS_Land: + Title: "Manufacturing Energy Consumption Survey" + Author: "EIA" + DataYear: 2014 + URL: "https://www.eia.gov/consumption/manufacturing/data/2014/" + Primary: FALSE + USDA_ERS_MLU: + Title: "Major Uses of Land in the United States" + Author: "USDA" + DataYear: 2012 + URL: "https://www.ers.usda.gov/data-products/major-land-uses/" + Primary: TRUE + MINE: + FullName: "Mineral extraction" + Abbreviation: "MINE" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_MINE_TotalsBySector_FEDEFL_wUUIDs.csv" + FileLocation: "DataCommons" + DataYears: [2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USGS_MCS: + Title: "Mineral Commodity Summary" + Author: "USGS" + DataYear: 2014 + URL: "https://www.usgs.gov/centers/nmic/mineral-commodity-summaries" + Primary: TRUE + ENERGY: + FullName: "Energy extraction" + Abbreviation: "ENERGY" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_Energy_TotalsBySector_FEDEFL_wUUIDs.csv" + FileLocation: "DataCommons" + DataYears: [2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + EIA_MER: + Title: "Monthly Energy Review" + Author: "EIA" + DataYear: 2014 + URL: "http://www.eia.gov/totalenergy/data/monthly/" + Primary: TRUE + EIA_923: + Title: "Form EIA-923 Detailed" + Author: "EIA" + DataYear: 2014 + URL: "https://www.eia.gov/electricity/data/eia923/" + Primary: TRUE + NPAG: + FullName: "Nitrogen and Phosphorus Releases from Agriculture" + Abbreviation: "NPAG" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_NPAG_TotalsBySector_wUUIDs.csv" + FileLocation: "DataCommons" + DataYears: [2013, 2015] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USDA_CUS_Corn_Potatoes: + Title: "Chemical Use Survey - Corn and Potatoes" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" + Primary: FALSE + USDA_CUS_Cotton: + Title: "Chemical Use Survey - Cotton" + Author: "USDA" + DataYear: 2010 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" + Primary: FALSE + USDA_CUS_Fruit: + Title: "Chemical Use Survey - Fruit" + Author: "USDA" + DataYear: 2011 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" + Primary: FALSE + USDA_CUS_Peanuts_Rice: + Title: "Chemical Use Survey - Peanuts and Rice" + Author: "USDA" + DataYear: 2013 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" + Primary: FALSE + USDA_CUS_Soybeans_Wheat: + Title: "Chemical Use Survey - Soybeans and Wheat" + Author: "USDA" + DataYear: 2012 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" + Primary: FALSE + USDA_CUS_Vegetables: + Title: "Chemical Use Survey - Vegetables" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" + Primary: FALSE + PEST: + FullName: "Pesticide releases" + Abbreviation: "PEST" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_PEST_TotalsBySector_wUUIDs.csv" + FileLocation: "DataCommons" + DataYears: [2004, 2005, 2010, 2011, 2012, 2013, 2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USDA_CUS_Corn_Potatoes: + Title: "Chemical Use Survey - Corn and Potatoes" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" + Primary: FALSE + USDA_CUS_Cotton: + Title: "Chemical Use Survey - Cotton" + Author: "USDA" + DataYear: 2010 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" + Primary: FALSE + USDA_CUS_Fruit: + Title: "Chemical Use Survey - Fruit" + Author: "USDA" + DataYear: 2011 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" + Primary: FALSE + USDA_CUS_Peanuts_Rice: + Title: "Chemical Use Survey - Peanuts and Rice" + Author: "USDA" + DataYear: 2013 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" + Primary: FALSE + USDA_CUS_Soybeans_Wheat: + Title: "Chemical Use Survey - Soybeans and Wheat" + Author: "USDA" + DataYear: 2012 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" + Primary: FALSE + USDA_CUS_Vegetables: + Title: "Chemical Use Survey - Vegetables" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" + Primary: FALSE + CNHW: + FullName: "Commercial non-hazardous waste excluding construction activities" + Abbreviation: "CNHW" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_CNHW_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2015] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "Waste Characterization Study 2014" + DataSources: + CalRecycle_CWCS: + Title: "2014 Generator-Based Characterization of Commercial Sector" + Author: "CalRecycle" + DataYear: 2014 + URL: "https://www2.calrecycle.ca.gov/WasteCharacterization/PubExtracts/2014/GenSummary.pdf" + Primary: TRUE + CNHWC: + FullName: "Commercial non-hazardous waste from construction activities" + Abbreviation: "CNHWC" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_CNHWC_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "CDDPath" + DataSources: + USEPA_FF_2014: + Title: "Advancing Sustainable Materials Management: 2014 Fact Sheet" + Author: "USEPA" + DataYear: 2014 + URL: "https://www.epa.gov/sites/production/files/2016-11/documents/2014_smmfactsheet_508.pdf" + Primary: TRUE + CRHW: + FullName: "Commercial RCRA-defined hazardous waste" + Abbreviation: "CRHW" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/CRHW_national_2017_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + OriginalFlowSource: "RCRAInfo" + DataSources: + USEPA_RCRAInfo_2017: + Title: "National Biennial RCRA Hazardous Waste Report" + Author: "USEPA" + DataYear: 2017 + URL: "https://rcrapublic.epa.gov/rcrainfoweb/action/modules/br/main/broverview" + Primary: TRUE + EMP: + FullName: "Employment" + Abbreviation: "EMP" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/Employment_national_2017_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + OriginalFlowSource: "National Employment Matrix" + DataSources: + BLS_QCEW_2017: + Title: "Quarterly Census of Employment and Wages" + Author: "BLS" + DataYear: 2017 + URL: "https://www.bls.gov/cew/" + Primary: TRUE + VADD: + FullName: "Value Added" + Abbreviation: "VADD" + StaticSource: FALSE + StaticFile: null + FileLocation: None + DataYears: [2012] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2012 + SectorListLevel: "Detail" + OriginalFlowSource: "Input-Output Tables" + ScriptFunctionCall: "getValueAddedTotalsbySector" #function to call for script + ScriptFunctionParameters: ["model"] #list of parameters + DataSources: + BEA_USE: + Title: "Detail Use Before Redefinitions" + Author: "BEA" + DataYear: 2012 + URL: "https://apps.bea.gov//industry/iTables%20Static%20Files/AllTablesIO.zip" + Primary: TRUE + +Indicators: + GreenhouseGases: + Name: "Greenhouse Gases" + Code: "GHG" + Group: "Impact Potential" + Unit: "kg CO2 eq" + SimpleUnit: "Kilograms Carbon Dioxide (CO2)" + SimpleName: "Greenhouse Gases" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Global warming"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Acidification: + Name: "Acidification Potential" + Code: "ACID" + Group: "Impact Potential" + Unit: "kg SO2 eq" + SimpleUnit: "Kilograms Sulphur Dioxide (SO2)" + SimpleName: "Acid Rain" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Acidification"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Eutrophication: + Name: "Eutrophication Potential" + Code: "EUTR" + Group: "Impact Potential" + Unit: "kg N eq" + SimpleUnit: "Kilograms Nitrogen (N)" + SimpleName: "Water Eutrophication" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Eutrophication"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + FreshwaterEcotox: + Name: "Freshwater Ecotoxicity Potential" + Code: "ETOX" + Group: "Impact Potential" + Unit: "CTUe" + SimpleUnit: "Comparative Toxic Unit for Ecosystem (CTUe)" + SimpleName: "Freshwater Ecotoxicity" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Freshwater ecotoxicity"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + HumanHealthCancer: + Name: "Human Health - Cancer" + Code: "HCAN" + Group: "Impact Potential" + Unit: "CTUh" + SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" + SimpleName: "Cancer Disease" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - cancer"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + HumanHealthNonCancer: + Name: "Human Health - Noncancer" + Code: "HNCN" + Group: "Impact Potential" + Unit: "CTUh" + SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" + SimpleName: "Noncancer Disease" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - non-cancer"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + HumanHealthToxicity: + Name: "Human Health Toxicity" + Code: "HTOX" + Group: "Impact Potential" + Unit: "CTUh" + SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" + SimpleName: "Toxic to Humans" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getCombinedImpactMethods" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - cancer", "Human health - non-cancer"] + DataSources: + USEEIO_LCIA_Aggregation: + Title: "Aggregation of HNCN and HCAN" + Author: NA + DataYear: NA + URL: NA + Primary: TRUE + HumanHealthRespEffects: + Name: "Human Health - Respiratory Effects" + Code: "HRSP" + Group: "Impact Potential" + Unit: "kg PM2.5 eq" + SimpleUnit: "Kilograms Particulate Matter" + SimpleName: "Respiratory Effects" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - particulate matter"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Ozone: + Name: "Ozone Depletion" + Code: "OZON" + Group: "Impact Potential" + Unit: "kg CFC-11 eq" + SimpleUnit: "Kilograms ChloroFluoroCarbon-11" + SimpleName: "Ozone Depletion" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Ozone depletion"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Smog: + Name: "Smog Formation Potential" + Code: "SMOG" + Group: "Impact Potential" + Unit: "kg O3 eq" + SimpleUnit: "Kilograms Ozone (O3)" + SimpleName: "Smog Formation" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Smog formation"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + freshwater_withdrawal: + Name: "Freshwater withdrawals" + Code: "WATR" + Group: "Resource Use" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Water Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["freshwater_resources"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + land_use: + Name: "Land use" + Code: "LAND" + Group: "Resource Use" + Unit: "m2*yr" + SimpleUnit: "Square Meters per Year" + SimpleName: "Land Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["land_use"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + HAP: + Name: "Hazardous Air Pollutants" + Code: "HAPS" + Group: "Chemical Releases" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Hazardous Air Pollutants" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["HAP"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + Pesticides: + Name: "Pesticides" + Code: "PEST" + Group: "Chemical Releases" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Pesticides" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["USDA_CUS_pesticides"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + NonRenewableEnergy: + Name: "Nonrenewable Energy Use" + Code: "NNRG" + Group: "Resource Use" + Unit: "MJ" + SimpleUnit: "Megajoules (MJ)" + SimpleName: "Nonrenewable Energy Use" + StaticSource: TRUE + FileLocation: "DataCommons" + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["nonrenewable_energy"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + RenewableEnergy: + Name: "Renewable Energy Use" + Code: "RNRG" + Group: "Resource Use" + Unit: "MJ" + SimpleUnit: "Megajoules (MJ)" + SimpleName: "Renewable Energy Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["renewable_energy"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + Energy: + Name: "Energy Use" + Code: "ENRG" + Group: "Resource Use" + Unit: "MJ" + SimpleUnit: "Megajoules (MJ)" + SimpleName: "Energy Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["energy"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + MineralsMetals: + Name: "Minerals and Metals Use" + Code: "MNRL" + Group: "Resource Use" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Minerals and Metals Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["USGS_mineral_resources"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + ValueAdded: + Name: "Value Added" + Code: "VADD" + Group: "Economic & Social" + Unit: "$" + SimpleUnit: "US Dollars ($)" + SimpleName: "Value Added" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + ingwersen_useeiov11_2017: + Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.23719/1368541" + Primary: TRUE + Jobs: + Name: "Jobs Supported" + Code: "JOBS" + Group: "Economic & Social" + Unit: "jobs" + SimpleUnit: "Employees" + SimpleName: "Jobs Supported" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + ingwersen_useeiov11_2017: + Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.23719/1368541" + Primary: TRUE + RCRAHazWaste: + Name: "Commercial RCRA Hazardous Waste" + Code: "CRHW" + Group: "Waste Generated" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Hazardous Waste" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + meyer_analyzing_2020: + Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.1016/j.resconrec.2020.104795" + Primary: TRUE + MunicipalWaste: + Name: "Commercial Municipal Solid Waste" + Code: "CMSW" + Group: "Waste Generated" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Municipal Solid Waste" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + meyer_analyzing_2020: + Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.1016/j.resconrec.2020.104795" + Primary: TRUE + ConstructionDebris: + Name: "Commercial Construction and Demolition Debris" + Code: "CCDD" + Group: "Waste Generated" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Construction Debris" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + meyer_analyzing_2020: + Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.1016/j.resconrec.2020.104795" + Primary: TRUE + +DemandVectors: + Consumption: + Type: "Consumption" + Year: 2012 + System: "Complete" + Location: "US" + Production: + Type: "Production" + Year: 2012 + System: "Complete" + Location: "US" + HouseholdConsumption: + Type: "Consumption" + Year: 2012 + System: "Household" + Location: "US" + DomesticConsumption: + Type: "Consumption" + Year: 2012 + System: "Domestic" + Location: "US" + diff --git a/inst/extdata/modelspecs/USEEIOv2.1_Waste_Electricity_disagg.yml b/inst/extdata/modelspecs/USEEIOv2.1_Waste_Electricity_disagg.yml new file mode 100644 index 00000000..ee6f31c4 --- /dev/null +++ b/inst/extdata/modelspecs/USEEIOv2.1_Waste_Electricity_disagg.yml @@ -0,0 +1,880 @@ +Model: "USEEIOv2.0.1" +BaseIOSchema: 2012 +BaseIOLevel: "Detail" +IOYear: 2012 # Year for IO data +ModelRegionAcronyms: ["US"] +ModelType: "EEIO" +IODataSource: "BEA" +BasePriceType: "PRO" #producer +BasewithRedefinitions: FALSE +CommodityorIndustryType: "Commodity" +ScrapIncluded: FALSE +DisaggregationSpecs: ["ElectricityDisaggregationDetail", "WasteDisaggregationDetail"] #Name of disaggregation yml file. + +SatelliteTable: + WAT: + FullName: "Water withdrawals" + Abbreviation: "WAT" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2015] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + USGS_NWIS_WU_2015: + Title: "Water Use in the US" + Author: "USGS" + DataYear: 2015 + URL: "https://waterdata.usgs.gov/" + Primary: TRUE + CHAIR: + FullName: "Criteria and Hazardous Air Emissions" + Abbreviation: "CHAIR" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/CAP_HAP_national_2017_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + EPA_NEI_2017: + Title: "National Emissions Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/air-emissions-inventories/national-emissions-inventory-nei" + Primary: TRUE + EPA_TRI_2017: + Title: "Toxic Release Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/toxics-release-inventory-tri-program" + Primary: TRUE + GRDREL: + FullName: "Point source industrial releases to ground" + Abbreviation: "GRDREL" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/GRDREL_national_2017_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + EPA_TRI_2017: + Title: "Toxic Release Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/toxics-release-inventory-tri-program" + Primary: TRUE + WATREL: + FullName: "Point source releases to water" + Abbreviation: "WATREL" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/TRI_DMR_national_2017_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + EPA_TRI_2017: + Title: "Toxic Release Inventory" + Author: "EPA" + DataYear: 2017 + URL: "https://www.epa.gov/toxics-release-inventory-tri-program" + Primary: TRUE + EPA_DMR_2017: + Title: "Discharge Monitoring Report" + Author: "EPA" + DataYear: 2017 + URL: "https://echo.epa.gov/tools/data-downloads/icis-npdes-dmr-and-limit-data-set" + Primary: TRUE + GHG: + FullName: "Greenhouse Gases" + Abbreviation: "GHG" + StaticSource: TRUE + StaticFile: "useeior/NGHGIAM_GHG_TotalsBySector_wUUIDs.csv" + FileLocation: "DataCommons" + DataYears: [2016] + Locations: ["US"] + SectorListSource: "BEA" # or, NAICS + SectorListYear: 2012 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USEPA_GHG_2018: + Title: "GHG Inventory" + Author: "USEPA" + DataYear: 2016 + URL: "https://www.epa.gov/ghgemissions/inventory-us-greenhouse-gas-emissions-and-sinks-1990-2016" + Primary: TRUE + LAND: + FullName: "Land use" + Abbreviation: "LAND" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/Land_national_2012_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2012] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + OriginalFlowSource: "FEDEFLv1.0.6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + DataSources: + BLM_PLS: + Title: "Public Land Statistics" + Author: "BLM" + DataYear: 2012 + URL: "https://www.blm.gov/about/data/public-land-statistics" + Primary: FALSE + EIA_CBECS_Land: + Title: "Commercial Building Energy Consumption Survey" + Author: "EIA" + DataYear: 2012 + URL: "https://www.eia.gov/consumption/commercial/data/2012/" + Primary: FALSE + EIA_MECS_Land: + Title: "Manufacturing Energy Consumption Survey" + Author: "EIA" + DataYear: 2014 + URL: "https://www.eia.gov/consumption/manufacturing/data/2014/" + Primary: FALSE + USDA_ERS_MLU: + Title: "Major Uses of Land in the United States" + Author: "USDA" + DataYear: 2012 + URL: "https://www.ers.usda.gov/data-products/major-land-uses/" + Primary: TRUE + MINE: + FullName: "Mineral extraction" + Abbreviation: "MINE" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_MINE_TotalsBySector_FEDEFL_wUUIDs.csv" + FileLocation: "DataCommons" + DataYears: [2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USGS_MCS: + Title: "Mineral Commodity Summary" + Author: "USGS" + DataYear: 2014 + URL: "https://www.usgs.gov/centers/nmic/mineral-commodity-summaries" + Primary: TRUE + ENERGY: + FullName: "Energy extraction" + Abbreviation: "ENERGY" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_Energy_TotalsBySector_FEDEFL_wUUIDs.csv" + FileLocation: "DataCommons" + DataYears: [2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + EIA_MER: + Title: "Monthly Energy Review" + Author: "EIA" + DataYear: 2014 + URL: "http://www.eia.gov/totalenergy/data/monthly/" + Primary: TRUE + EIA_923: + Title: "Form EIA-923 Detailed" + Author: "EIA" + DataYear: 2014 + URL: "https://www.eia.gov/electricity/data/eia923/" + Primary: TRUE + NPAG: + FullName: "Nitrogen and Phosphorus Releases from Agriculture" + Abbreviation: "NPAG" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_NPAG_TotalsBySector_wUUIDs.csv" + FileLocation: "DataCommons" + DataYears: [2013, 2015] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USDA_CUS_Corn_Potatoes: + Title: "Chemical Use Survey - Corn and Potatoes" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" + Primary: FALSE + USDA_CUS_Cotton: + Title: "Chemical Use Survey - Cotton" + Author: "USDA" + DataYear: 2010 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" + Primary: FALSE + USDA_CUS_Fruit: + Title: "Chemical Use Survey - Fruit" + Author: "USDA" + DataYear: 2011 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" + Primary: FALSE + USDA_CUS_Peanuts_Rice: + Title: "Chemical Use Survey - Peanuts and Rice" + Author: "USDA" + DataYear: 2013 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" + Primary: FALSE + USDA_CUS_Soybeans_Wheat: + Title: "Chemical Use Survey - Soybeans and Wheat" + Author: "USDA" + DataYear: 2012 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" + Primary: FALSE + USDA_CUS_Vegetables: + Title: "Chemical Use Survey - Vegetables" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" + Primary: FALSE + PEST: + FullName: "Pesticide releases" + Abbreviation: "PEST" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_PEST_TotalsBySector_wUUIDs.csv" + FileLocation: "DataCommons" + DataYears: [2004, 2005, 2010, 2011, 2012, 2013, 2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "FEDEFLv1.0.6" + DataSources: + USDA_CUS_Corn_Potatoes: + Title: "Chemical Use Survey - Corn and Potatoes" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" + Primary: FALSE + USDA_CUS_Cotton: + Title: "Chemical Use Survey - Cotton" + Author: "USDA" + DataYear: 2010 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" + Primary: FALSE + USDA_CUS_Fruit: + Title: "Chemical Use Survey - Fruit" + Author: "USDA" + DataYear: 2011 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" + Primary: FALSE + USDA_CUS_Peanuts_Rice: + Title: "Chemical Use Survey - Peanuts and Rice" + Author: "USDA" + DataYear: 2013 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" + Primary: FALSE + USDA_CUS_Soybeans_Wheat: + Title: "Chemical Use Survey - Soybeans and Wheat" + Author: "USDA" + DataYear: 2012 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" + Primary: FALSE + USDA_CUS_Vegetables: + Title: "Chemical Use Survey - Vegetables" + Author: "USDA" + DataYear: 2014 + URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" + Primary: FALSE + CNHW: + FullName: "Commercial non-hazardous waste excluding construction activities" + Abbreviation: "CNHW" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_CNHW_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2015] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "Waste Characterization Study 2014" + DataSources: + CalRecycle_CWCS: + Title: "2014 Generator-Based Characterization of Commercial Sector" + Author: "CalRecycle" + DataYear: 2014 + URL: "https://www2.calrecycle.ca.gov/WasteCharacterization/PubExtracts/2014/GenSummary.pdf" + Primary: TRUE + CNHWC: + FullName: "Commercial non-hazardous waste from construction activities" + Abbreviation: "CNHWC" + StaticSource: TRUE + StaticFile: "useeior/USEEIOv1.1_CNHWC_TotalsBySector.csv" + FileLocation: "DataCommons" + DataYears: [2014] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2007 + SectorListLevel: "Detail" + OriginalFlowSource: "CDDPath" + DataSources: + USEPA_FF_2014: + Title: "Advancing Sustainable Materials Management: 2014 Fact Sheet" + Author: "USEPA" + DataYear: 2014 + URL: "https://www.epa.gov/sites/production/files/2016-11/documents/2014_smmfactsheet_508.pdf" + Primary: TRUE + CRHW: + FullName: "Commercial RCRA-defined hazardous waste" + Abbreviation: "CRHW" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/CRHW_national_2017_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + OriginalFlowSource: "RCRAInfo" + DataSources: + USEPA_RCRAInfo_2017: + Title: "National Biennial RCRA Hazardous Waste Report" + Author: "USEPA" + DataYear: 2017 + URL: "https://rcrapublic.epa.gov/rcrainfoweb/action/modules/br/main/broverview" + Primary: TRUE + EMP: + FullName: "Employment" + Abbreviation: "EMP" + StaticSource: TRUE + StaticFile: "flowsa/FlowBySector/Employment_national_2017_v0.3.1_f3cdf5b.parquet" + FileLocation: "DataCommons" + DataYears: [2017] + Locations: ["US"] + SectorListSource: "NAICS" + SectorListYear: 2012 + SectorListLevel: "6" + ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script + ScriptFunctionParameters: null + OriginalFlowSource: "National Employment Matrix" + DataSources: + BLS_QCEW_2017: + Title: "Quarterly Census of Employment and Wages" + Author: "BLS" + DataYear: 2017 + URL: "https://www.bls.gov/cew/" + Primary: TRUE + VADD: + FullName: "Value Added" + Abbreviation: "VADD" + StaticSource: FALSE + StaticFile: null + FileLocation: None + DataYears: [2012] + Locations: ["US"] + SectorListSource: "BEA" + SectorListYear: 2012 + SectorListLevel: "Detail" + OriginalFlowSource: "Input-Output Tables" + ScriptFunctionCall: "getValueAddedTotalsbySector" #function to call for script + ScriptFunctionParameters: ["model"] #list of parameters + DataSources: + BEA_USE: + Title: "Detail Use Before Redefinitions" + Author: "BEA" + DataYear: 2012 + URL: "https://apps.bea.gov//industry/iTables%20Static%20Files/AllTablesIO.zip" + Primary: TRUE + +Indicators: + GreenhouseGases: + Name: "Greenhouse Gases" + Code: "GHG" + Group: "Impact Potential" + Unit: "kg CO2 eq" + SimpleUnit: "Kilograms Carbon Dioxide (CO2)" + SimpleName: "Greenhouse Gases" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Global warming"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Acidification: + Name: "Acidification Potential" + Code: "ACID" + Group: "Impact Potential" + Unit: "kg SO2 eq" + SimpleUnit: "Kilograms Sulphur Dioxide (SO2)" + SimpleName: "Acid Rain" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Acidification"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Eutrophication: + Name: "Eutrophication Potential" + Code: "EUTR" + Group: "Impact Potential" + Unit: "kg N eq" + SimpleUnit: "Kilograms Nitrogen (N)" + SimpleName: "Water Eutrophication" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Eutrophication"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + FreshwaterEcotox: + Name: "Freshwater Ecotoxicity Potential" + Code: "ETOX" + Group: "Impact Potential" + Unit: "CTUe" + SimpleUnit: "Comparative Toxic Unit for Ecosystem (CTUe)" + SimpleName: "Freshwater Ecotoxicity" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Freshwater ecotoxicity"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + HumanHealthCancer: + Name: "Human Health - Cancer" + Code: "HCAN" + Group: "Impact Potential" + Unit: "CTUh" + SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" + SimpleName: "Cancer Disease" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - cancer"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + HumanHealthNonCancer: + Name: "Human Health - Noncancer" + Code: "HNCN" + Group: "Impact Potential" + Unit: "CTUh" + SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" + SimpleName: "Noncancer Disease" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - non-cancer"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + HumanHealthToxicity: + Name: "Human Health Toxicity" + Code: "HTOX" + Group: "Impact Potential" + Unit: "CTUh" + SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" + SimpleName: "Toxic to Humans" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getCombinedImpactMethods" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - cancer", "Human health - non-cancer"] + DataSources: + USEEIO_LCIA_Aggregation: + Title: "Aggregation of HNCN and HCAN" + Author: NA + DataYear: NA + URL: NA + Primary: TRUE + HumanHealthRespEffects: + Name: "Human Health - Respiratory Effects" + Code: "HRSP" + Group: "Impact Potential" + Unit: "kg PM2.5 eq" + SimpleUnit: "Kilograms Particulate Matter" + SimpleName: "Respiratory Effects" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Human health - particulate matter"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Ozone: + Name: "Ozone Depletion" + Code: "OZON" + Group: "Impact Potential" + Unit: "kg CFC-11 eq" + SimpleUnit: "Kilograms ChloroFluoroCarbon-11" + SimpleName: "Ozone Depletion" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Ozone depletion"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + Smog: + Name: "Smog Formation Potential" + Code: "SMOG" + Group: "Impact Potential" + Unit: "kg O3 eq" + SimpleUnit: "Kilograms Ozone (O3)" + SimpleName: "Smog Formation" + StaticSource: TRUE + StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["Smog formation"] + DataSources: + USEPA_TRACI_2.1: + Title: "TRACI 2.1" + Author: "USEPA" + DataYear: NA + URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" + Primary: TRUE + freshwater_withdrawal: + Name: "Freshwater withdrawals" + Code: "WATR" + Group: "Resource Use" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Water Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["freshwater_resources"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + land_use: + Name: "Land use" + Code: "LAND" + Group: "Resource Use" + Unit: "m2*yr" + SimpleUnit: "Square Meters per Year" + SimpleName: "Land Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["land_use"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + HAP: + Name: "Hazardous Air Pollutants" + Code: "HAPS" + Group: "Chemical Releases" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Hazardous Air Pollutants" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["HAP"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + Pesticides: + Name: "Pesticides" + Code: "PEST" + Group: "Chemical Releases" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Pesticides" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["USDA_CUS_pesticides"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + NonRenewableEnergy: + Name: "Nonrenewable Energy Use" + Code: "NNRG" + Group: "Resource Use" + Unit: "MJ" + SimpleUnit: "Megajoules (MJ)" + SimpleName: "Nonrenewable Energy Use" + StaticSource: TRUE + FileLocation: "DataCommons" + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["nonrenewable_energy"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + RenewableEnergy: + Name: "Renewable Energy Use" + Code: "RNRG" + Group: "Resource Use" + Unit: "MJ" + SimpleUnit: "Megajoules (MJ)" + SimpleName: "Renewable Energy Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["renewable_energy"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + Energy: + Name: "Energy Use" + Code: "ENRG" + Group: "Resource Use" + Unit: "MJ" + SimpleUnit: "Megajoules (MJ)" + SimpleName: "Energy Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["energy"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + MineralsMetals: + Name: "Minerals and Metals Use" + Code: "MNRL" + Group: "Resource Use" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Minerals and Metals Use" + StaticSource: TRUE + StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" + FileLocation: "DataCommons" + ScriptFunctionCall: "getImpactMethod" #function to call for script + ScriptFunctionParameters: + indicators: ["USGS_mineral_resources"] + DataSources: + LCIAformatter: + Title: "LCIAformatter FEDEFL Inventory Methods" + Author: "USEPA" + DataYear: 2020 + URL: "https://github.com/USEPA/LCIAformatter" + Primary: TRUE + ValueAdded: + Name: "Value Added" + Code: "VADD" + Group: "Economic & Social" + Unit: "$" + SimpleUnit: "US Dollars ($)" + SimpleName: "Value Added" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + ingwersen_useeiov11_2017: + Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.23719/1368541" + Primary: TRUE + Jobs: + Name: "Jobs Supported" + Code: "JOBS" + Group: "Economic & Social" + Unit: "jobs" + SimpleUnit: "Employees" + SimpleName: "Jobs Supported" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + ingwersen_useeiov11_2017: + Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.23719/1368541" + Primary: TRUE + RCRAHazWaste: + Name: "Commercial RCRA Hazardous Waste" + Code: "CRHW" + Group: "Waste Generated" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Hazardous Waste" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + meyer_analyzing_2020: + Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.1016/j.resconrec.2020.104795" + Primary: TRUE + MunicipalWaste: + Name: "Commercial Municipal Solid Waste" + Code: "CMSW" + Group: "Waste Generated" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Municipal Solid Waste" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + meyer_analyzing_2020: + Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.1016/j.resconrec.2020.104795" + Primary: TRUE + ConstructionDebris: + Name: "Commercial Construction and Demolition Debris" + Code: "CCDD" + Group: "Waste Generated" + Unit: "kg" + SimpleUnit: "Kilograms" + SimpleName: "Construction Debris" + StaticSource: TRUE + StaticFile: "USEEIO_LCIA_Factors.csv" + FileLocation: "useeior" + DataSources: + meyer_analyzing_2020: + Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" + Author: "USEPA" + DataYear: 2020 + URL: "http://doi.org/10.1016/j.resconrec.2020.104795" + Primary: TRUE + +DemandVectors: + Consumption: + Type: "Consumption" + Year: 2012 + System: "Complete" + Location: "US" + Production: + Type: "Production" + Year: 2012 + System: "Complete" + Location: "US" + HouseholdConsumption: + Type: "Consumption" + Year: 2012 + System: "Household" + Location: "US" + DomesticConsumption: + Type: "Consumption" + Year: 2012 + System: "Domestic" + Location: "US" + From 5d684a9431b81d94e09c54507ec43bc353af1be7 Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 15 Sep 2021 17:54:47 -0400 Subject: [PATCH 037/319] Moved disaggregation setup steps to their own function. --- R/DisaggregateFunctions.R | 143 ++++++++++++++++++++++++++------------ 1 file changed, 98 insertions(+), 45 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 3f1def8c..14958225 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -2,7 +2,8 @@ #' @param model Model file loaded with IO tables #' @return A disaggregated model. disaggregateModel <- function (model){ - + #TODO: Move lines 6-22 to new functions, one for disagg and one for agg, than can be called from load IO tables individually. + #Also, remove block comment as it was successfully replaced by new disaggregateSetup function. model$DisaggregationSpecs$Aggregation <- vector(mode='list') model$DisaggregationSpecs$Disaggregation <- vector(mode='list') for (configFile in model$specs$DisaggregationSpecs){ @@ -20,50 +21,50 @@ disaggregateModel <- function (model){ # Handle sector aggregation model <- aggregateModel(model) } - - counter = 1 - for (disagg in model$DisaggregationSpecs$Disaggregation){ - - disagg$NAICSSectorCW <- utils::read.csv(system.file("extdata/disaggspecs", disagg$SectorFile, package = "useeior"), - header = TRUE, stringsAsFactors = FALSE, colClasses=c("NAICS_2012_Code"="character", - "USEEIO_Code"="character")) - newNames <- unique(data.frame("SectorCode" = disagg$NAICSSectorCW$USEEIO_Code, - "SectorName" = disagg$NAICSSectorCW$USEEIO_Name, - "Category" = disagg$NAICSSectorCW$Category, - "Subcategory" = disagg$NAICSSectorCW$Subcategory, - "Description" = disagg$NAICSSectorCW$Description, - stringsAsFactors = TRUE)) - disagg$DisaggregatedSectorNames <- as.list(levels(newNames[, 'SectorName'])) - disagg$DisaggregatedSectorCodes <- as.list(levels(newNames[, 'SectorCode'])) - disagg$Category <- lapply(newNames[, 'Category'], as.character) - disagg$Subcategory <- lapply(newNames[, 'Subcategory'], as.character) - disagg$Description <- lapply(newNames[, 'Description'], as.character) - - #reordering disaggSectorNames and DisaggSectorCodes to match the mapping in newNames - disagg$DisaggregatedSectorNames <- as.list(disagg$DisaggregatedSectorNames[match(newNames$SectorName,disagg$DisaggregatedSectorNames)]) - disagg$DisaggregatedSectorCodes <- as.list(disagg$DisaggregatedSectorCodes[match(newNames$SectorCode,disagg$DisaggregatedSectorCodes)]) - - if(!is.null(disagg$MakeFile)){ - disagg$MakeFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$MakeFile, package = "useeior"), - header = TRUE, stringsAsFactors = FALSE, colClasses=c("IndustryCode"="character", - "CommodityCode"="character"))} - if(!is.null(disagg$UseFile)){ - disagg$UseFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$UseFile, package = "useeior"), - header = TRUE, stringsAsFactors = FALSE)} - if(!is.null(disagg$EnvFile)){ - disagg$EnvFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$EnvFile, package = "useeior"), - header = TRUE, stringsAsFactors = FALSE, colClasses=c("Sector"="character"))} - if("FlowRatio" %in% colnames(disagg$EnvFileDF)){ - disagg$EnvAllocRatio <- TRUE - } - else{ - disagg$EnvAllocRatio <- FALSE - } - #Need to assign these DFs back to the modelspecs - model$DisaggregationSpecs$Disaggregation[[counter]] <- disagg - - counter <- counter + 1 - } + model <- disaggregateSetup(model) + # counter = 1 + # for (disagg in model$DisaggregationSpecs$Disaggregation){ + # + # disagg$NAICSSectorCW <- utils::read.csv(system.file("extdata/disaggspecs", disagg$SectorFile, package = "useeior"), + # header = TRUE, stringsAsFactors = FALSE, colClasses=c("NAICS_2012_Code"="character", + # "USEEIO_Code"="character")) + # newNames <- unique(data.frame("SectorCode" = disagg$NAICSSectorCW$USEEIO_Code, + # "SectorName" = disagg$NAICSSectorCW$USEEIO_Name, + # "Category" = disagg$NAICSSectorCW$Category, + # "Subcategory" = disagg$NAICSSectorCW$Subcategory, + # "Description" = disagg$NAICSSectorCW$Description, + # stringsAsFactors = TRUE)) + # disagg$DisaggregatedSectorNames <- as.list(levels(newNames[, 'SectorName'])) + # disagg$DisaggregatedSectorCodes <- as.list(levels(newNames[, 'SectorCode'])) + # disagg$Category <- lapply(newNames[, 'Category'], as.character) + # disagg$Subcategory <- lapply(newNames[, 'Subcategory'], as.character) + # disagg$Description <- lapply(newNames[, 'Description'], as.character) + # + # #reordering disaggSectorNames and DisaggSectorCodes to match the mapping in newNames + # disagg$DisaggregatedSectorNames <- as.list(disagg$DisaggregatedSectorNames[match(newNames$SectorName,disagg$DisaggregatedSectorNames)]) + # disagg$DisaggregatedSectorCodes <- as.list(disagg$DisaggregatedSectorCodes[match(newNames$SectorCode,disagg$DisaggregatedSectorCodes)]) + # + # if(!is.null(disagg$MakeFile)){ + # disagg$MakeFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$MakeFile, package = "useeior"), + # header = TRUE, stringsAsFactors = FALSE, colClasses=c("IndustryCode"="character", + # "CommodityCode"="character"))} + # if(!is.null(disagg$UseFile)){ + # disagg$UseFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$UseFile, package = "useeior"), + # header = TRUE, stringsAsFactors = FALSE)} + # if(!is.null(disagg$EnvFile)){ + # disagg$EnvFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$EnvFile, package = "useeior"), + # header = TRUE, stringsAsFactors = FALSE, colClasses=c("Sector"="character"))} + # if("FlowRatio" %in% colnames(disagg$EnvFileDF)){ + # disagg$EnvAllocRatio <- TRUE + # } + # else{ + # disagg$EnvAllocRatio <- FALSE + # } + # #Need to assign these DFs back to the modelspecs + # model$DisaggregationSpecs$Disaggregation[[counter]] <- disagg + # + # counter <- counter + 1 + # } logging::loginfo("Initializing Disaggregation of IO tables...") @@ -112,6 +113,58 @@ disaggregateModel <- function (model){ } +#' Setup the configuration specs based on the input files +#' @param model Model file loaded with IO tables +#' @return A model object with the correct disaggregation specs. +disaggregateSetup <- function (model){ + + counter = 1 + for (disagg in model$DisaggregationSpecs$Disaggregation){ + + disagg$NAICSSectorCW <- utils::read.csv(system.file("extdata/disaggspecs", disagg$SectorFile, package = "useeior"), + header = TRUE, stringsAsFactors = FALSE, colClasses=c("NAICS_2012_Code"="character", + "USEEIO_Code"="character")) + newNames <- unique(data.frame("SectorCode" = disagg$NAICSSectorCW$USEEIO_Code, + "SectorName" = disagg$NAICSSectorCW$USEEIO_Name, + "Category" = disagg$NAICSSectorCW$Category, + "Subcategory" = disagg$NAICSSectorCW$Subcategory, + "Description" = disagg$NAICSSectorCW$Description, + stringsAsFactors = TRUE)) + disagg$DisaggregatedSectorNames <- as.list(levels(newNames[, 'SectorName'])) + disagg$DisaggregatedSectorCodes <- as.list(levels(newNames[, 'SectorCode'])) + disagg$Category <- lapply(newNames[, 'Category'], as.character) + disagg$Subcategory <- lapply(newNames[, 'Subcategory'], as.character) + disagg$Description <- lapply(newNames[, 'Description'], as.character) + + #reordering disaggSectorNames and DisaggSectorCodes to match the mapping in newNames + disagg$DisaggregatedSectorNames <- as.list(disagg$DisaggregatedSectorNames[match(newNames$SectorName,disagg$DisaggregatedSectorNames)]) + disagg$DisaggregatedSectorCodes <- as.list(disagg$DisaggregatedSectorCodes[match(newNames$SectorCode,disagg$DisaggregatedSectorCodes)]) + + if(!is.null(disagg$MakeFile)){ + disagg$MakeFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$MakeFile, package = "useeior"), + header = TRUE, stringsAsFactors = FALSE, colClasses=c("IndustryCode"="character", + "CommodityCode"="character"))} + if(!is.null(disagg$UseFile)){ + disagg$UseFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$UseFile, package = "useeior"), + header = TRUE, stringsAsFactors = FALSE)} + if(!is.null(disagg$EnvFile)){ + disagg$EnvFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$EnvFile, package = "useeior"), + header = TRUE, stringsAsFactors = FALSE, colClasses=c("Sector"="character"))} + if("FlowRatio" %in% colnames(disagg$EnvFileDF)){ + disagg$EnvAllocRatio <- TRUE + } + else{ + disagg$EnvAllocRatio <- FALSE + } + #Need to assign these DFs back to the modelspecs + model$DisaggregationSpecs$Disaggregation[[counter]] <- disagg + + counter <- counter + 1 + } + + return(model) +} + #' Calculate updated Commodity and Industry Output model objects #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @return model A complete EEIO model: a list with USEEIO model components and attributes. From a2243a6fd36087ac44807850db517ef6c0e7cb95 Mon Sep 17 00:00:00 2001 From: jvendries Date: Thu, 16 Sep 2021 16:59:04 -0400 Subject: [PATCH 038/319] Changed sequential disaggregation yml file from USEEIOv2.1_Waste_Electricity_disagg.yml to USEEIOv2.1.yml --- .../{USEEIOv2.1_Waste_Electricity_disagg.yml => USEEIOv2.1.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename inst/extdata/modelspecs/{USEEIOv2.1_Waste_Electricity_disagg.yml => USEEIOv2.1.yml} (100%) diff --git a/inst/extdata/modelspecs/USEEIOv2.1_Waste_Electricity_disagg.yml b/inst/extdata/modelspecs/USEEIOv2.1.yml similarity index 100% rename from inst/extdata/modelspecs/USEEIOv2.1_Waste_Electricity_disagg.yml rename to inst/extdata/modelspecs/USEEIOv2.1.yml From 62ede200fb63f2b5d8bd352ff1de1e6f18527551 Mon Sep 17 00:00:00 2001 From: jvendries Date: Thu, 16 Sep 2021 17:09:27 -0400 Subject: [PATCH 039/319] Removed commented section referring to moved function --- R/DisaggregateFunctions.R | 43 --------------------------------------- 1 file changed, 43 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 14958225..63cff0cf 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -22,49 +22,6 @@ disaggregateModel <- function (model){ model <- aggregateModel(model) } model <- disaggregateSetup(model) - # counter = 1 - # for (disagg in model$DisaggregationSpecs$Disaggregation){ - # - # disagg$NAICSSectorCW <- utils::read.csv(system.file("extdata/disaggspecs", disagg$SectorFile, package = "useeior"), - # header = TRUE, stringsAsFactors = FALSE, colClasses=c("NAICS_2012_Code"="character", - # "USEEIO_Code"="character")) - # newNames <- unique(data.frame("SectorCode" = disagg$NAICSSectorCW$USEEIO_Code, - # "SectorName" = disagg$NAICSSectorCW$USEEIO_Name, - # "Category" = disagg$NAICSSectorCW$Category, - # "Subcategory" = disagg$NAICSSectorCW$Subcategory, - # "Description" = disagg$NAICSSectorCW$Description, - # stringsAsFactors = TRUE)) - # disagg$DisaggregatedSectorNames <- as.list(levels(newNames[, 'SectorName'])) - # disagg$DisaggregatedSectorCodes <- as.list(levels(newNames[, 'SectorCode'])) - # disagg$Category <- lapply(newNames[, 'Category'], as.character) - # disagg$Subcategory <- lapply(newNames[, 'Subcategory'], as.character) - # disagg$Description <- lapply(newNames[, 'Description'], as.character) - # - # #reordering disaggSectorNames and DisaggSectorCodes to match the mapping in newNames - # disagg$DisaggregatedSectorNames <- as.list(disagg$DisaggregatedSectorNames[match(newNames$SectorName,disagg$DisaggregatedSectorNames)]) - # disagg$DisaggregatedSectorCodes <- as.list(disagg$DisaggregatedSectorCodes[match(newNames$SectorCode,disagg$DisaggregatedSectorCodes)]) - # - # if(!is.null(disagg$MakeFile)){ - # disagg$MakeFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$MakeFile, package = "useeior"), - # header = TRUE, stringsAsFactors = FALSE, colClasses=c("IndustryCode"="character", - # "CommodityCode"="character"))} - # if(!is.null(disagg$UseFile)){ - # disagg$UseFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$UseFile, package = "useeior"), - # header = TRUE, stringsAsFactors = FALSE)} - # if(!is.null(disagg$EnvFile)){ - # disagg$EnvFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$EnvFile, package = "useeior"), - # header = TRUE, stringsAsFactors = FALSE, colClasses=c("Sector"="character"))} - # if("FlowRatio" %in% colnames(disagg$EnvFileDF)){ - # disagg$EnvAllocRatio <- TRUE - # } - # else{ - # disagg$EnvAllocRatio <- FALSE - # } - # #Need to assign these DFs back to the modelspecs - # model$DisaggregationSpecs$Disaggregation[[counter]] <- disagg - # - # counter <- counter + 1 - # } logging::loginfo("Initializing Disaggregation of IO tables...") From 9bffe941561435b43388522696fa876900826164 Mon Sep 17 00:00:00 2001 From: jvendries Date: Thu, 16 Sep 2021 18:17:34 -0400 Subject: [PATCH 040/319] Created functions to get disaggregation and aggregation specs that can be called separately from LoadIOTables.R. --- R/AggregationFunctions.R | 19 +++++++++++++++++++ R/DisaggregateFunctions.R | 38 +++++++++++++++++++------------------- R/LoadIOTables.R | 9 ++++++++- 3 files changed, 46 insertions(+), 20 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 53127690..b94491fc 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -50,6 +50,25 @@ aggregateModel <- function (model){ return(model) } + +#' Obtain aggregation specs from aggregation input files +#' @param model Model file loaded with IO tables +#' @return A model with the specified aggregation specs. +getAggregationSpecs <- function (model){ + model$DisaggregationSpecs$Aggregation <- vector(mode='list') + for (configFile in model$specs$DisaggregationSpecs){ + logging::loginfo(paste0("Loading aggregation specs for ", configFile, "...")) + config <- getConfiguration(configFile, "disagg") + if('Aggregation' %in% names(config)){ + model$DisaggregationSpecs$Aggregation <- append(model$DisaggregationSpecs$Aggregation, config$Aggregation) + } + } + + return(model) + +} + + #' Calculate updated Commodity and Industry Output model objects after aggregation #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param indecesToAggregate List of indeces to aggregate. diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 63cff0cf..1664f2cc 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -2,25 +2,7 @@ #' @param model Model file loaded with IO tables #' @return A disaggregated model. disaggregateModel <- function (model){ - #TODO: Move lines 6-22 to new functions, one for disagg and one for agg, than can be called from load IO tables individually. - #Also, remove block comment as it was successfully replaced by new disaggregateSetup function. - model$DisaggregationSpecs$Aggregation <- vector(mode='list') - model$DisaggregationSpecs$Disaggregation <- vector(mode='list') - for (configFile in model$specs$DisaggregationSpecs){ - logging::loginfo(paste0("Loading disaggregation spes for ", configFile, "...")) - config <- getConfiguration(configFile, "disagg") - if('Aggregation' %in% names(config)){ - model$DisaggregationSpecs$Aggregation <- append(model$DisaggregationSpecs$Aggregation, config$Aggregation) - } - if('Disaggregation' %in% names(config)){ - model$DisaggregationSpecs$Disaggregation <- append(model$DisaggregationSpecs$Disaggregation, config$Disaggregation) - } - } - - if(length(model$DisaggregationSpecs$Aggregation) != 0){ - # Handle sector aggregation - model <- aggregateModel(model) - } + model <- disaggregateSetup(model) logging::loginfo("Initializing Disaggregation of IO tables...") @@ -70,6 +52,24 @@ disaggregateModel <- function (model){ } +#' Obtain disaggregation specs from aggregation input files +#' @param model Model file loaded with IO tables +#' @return A model with the specified disaggregation specs. +getDisaggregationSpecs <- function (model){ + model$DisaggregationSpecs$Disaggregation <- vector(mode='list') + for (configFile in model$specs$DisaggregationSpecs){ + logging::loginfo(paste0("Loading disaggregation spes for ", configFile, "...")) + config <- getConfiguration(configFile, "disagg") + if('Disaggregation' %in% names(config)){ + model$DisaggregationSpecs$Disaggregation <- append(model$DisaggregationSpecs$Disaggregation, config$Disaggregation) + } + } + + return(model) + +} + + #' Setup the configuration specs based on the input files #' @param model Model file loaded with IO tables #' @return A model object with the correct disaggregation specs. diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index a05ce2ff..4a1115d3 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -21,8 +21,15 @@ loadIOData <- function(model) { model$MultiYearCommodityCPI[, year_col] <- transformIndustryCPItoCommodityCPIforYear(as.numeric(year_col), model) } + model <- getAggregationSpecs(model) + model <- getDisaggregationSpecs(model) + + # Check for aggregation + if(!is.null(model$DisaggregationSpecs$Aggregation)){ + model <- aggregateModel(model) + } # Check for disaggregation - if(!is.null(model$specs$DisaggregationSpecs)){ + if(!is.null(model$DisaggregationSpecs$Disaggregation)){ model <- disaggregateModel(model) } From 7aa271c432dcd88f223e0928eaa36ece8877d756 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 16 Sep 2021 22:58:12 -0400 Subject: [PATCH 041/319] consolidate specifiedUse and specifiedMake disagg by moving some steps into assembleTable --- R/DisaggregateFunctions.R | 126 +++++++++++++------------------------- 1 file changed, 41 insertions(+), 85 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 1664f2cc..89fc81b8 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -867,67 +867,41 @@ specifiedMakeDisagg <- function (model, disagg){ #Local variable for Make table allocations makeAllocations <- disagg$MakeFileDF - ##Extract data from Disaggregation csv - #Industry allocation totals (i.e. disaggregated row percentages) of new sectors (e.g. 100% of 562000 split into to 50% 562HAZ and 50% 562OTH; not actual splits). - defaultPercentages <- getDisaggIndustryPercentages(disagg) - - ###Disaggregate Make Rows, Columns, and Intersection while using the allocation data extracted from the Disaggregationcsv. + ###Disaggregate Make Rows, Columns, and Intersection while using the allocation data extracted from the Disaggregation csv. #Allocations for column (commodity) disaggregation. #Get rows of the DF which do not contain the original sector code or the new sector codes in the industry column (e.g., get only non 562 sector codes when doing waste disaggregation), #and where only the new sector codes are present in the commodity column. colPercentages <- subset(makeAllocations, !(IndustryCode %in% originalSectorCode) & !(IndustryCode %in% newSectorCodes) & CommodityCode %in% newSectorCodes) - #Assignning allocation for disaggregated columns - AllocColDF <- disaggAllocations(model,disagg,colPercentages,"MakeCol") + #Applying allocation to disaggregate columns + disaggregatedColumns <- applyAllocation(model,disagg,colPercentages,"MakeCol") #Allocations for make intersection. Get rows of DF where only new sector codes are present in both the industryCode and commodityCode columns. intersectionPercentages <-subset(makeAllocations, IndustryCode %in% newSectorCodes & CommodityCode %in% newSectorCodes) #Assigning allocations for disaggregated intersection - AllocIntersectionDF <- disaggAllocations(model,disagg,intersectionPercentages,"MakeIntersection") + disaggregatedIntersection <- applyAllocation(model,disagg,intersectionPercentages,"MakeIntersection") #Allocations for the row (industry) disaggregation. Get all rows of the DF where new sector codes are in the industryCode column, and neither the original nor new sector codes are in the commodityColumn. rowsPercentages <- subset(makeAllocations, IndustryCode %in% newSectorCodes & !(CommodityCode %in% originalSectorCode) & !(CommodityCode %in% newSectorCodes)) #Assigning allocations for disaggregated rows - allocRowDF <- disaggAllocations(model,disagg,rowsPercentages,"MakeRow") + disaggregatedRows <- applyAllocation(model,disagg,rowsPercentages,"MakeRow") + DisaggMake <- assembleTable(model$MakeTransactions, disagg, disaggregatedColumns, disaggregatedRows, disaggregatedIntersection) - #----------------------- code shared with uniformMakeDisagg - originalMake<-model$MakeTransactions - #Determine number of commodities and industries in originalMake - nCommodities <- ncol(originalMake) - nIndustries <- nrow(originalMake) - - #Deterine number of commodities and industries in DisaggSpecs - numNewSectors <- length(disagg$DisaggregatedSectorCodes) - - #Determine commodity and industry indeces corresponding to the original sector code - originalRowIndex <- which(rownames(originalMake)==disagg$OriginalSectorCode) - originalColIndex <- which(colnames(originalMake)==disagg$OriginalSectorCode) - - #Determine end index of disaggregated sectors - endRowIndex <- originalRowIndex + numNewSectors - endColIndex <- originalColIndex + numNewSectors - - #-----------------------end of code shared with uniformMakeDisagg - - DisaggMake <- assembleTable(originalMake, originalRowIndex, originalColIndex, AllocColDF, allocRowDF, AllocIntersectionDF) - - }else{ - + } else { #No csv was read in, terminate execution DisaggMake <- NULL; } - #End of if(!is.null(disagg$MakeFileDF)) loop - + return(DisaggMake) -}#End of specifiedMakeDisagg Function +} -#' Disaggregate use table based on the allocations specified in the files referenced in the diaggregation specs. +#' Disaggregate use table based on the allocations specified in the files referenced in the disaggregation specs. #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param disagg Specifications for disaggregating the current Table -#' @param domestic Flag that indicates where to use the Domestic Use or UseTrasanctions table +#' @param domestic Flag that indicates where to use the Domestic Use or UseTransactions table #' @return A standardized make table with old sectors removed and new disaggregated sectors added based on the allocations in the disaggregation specs. specifiedUseDisagg <- function (model, disagg, domestic = FALSE){ @@ -937,45 +911,35 @@ specifiedUseDisagg <- function (model, disagg, domestic = FALSE){ originalSectorCode <- disagg$OriginalSectorCode #Local variable for new sector codes newSectorCodes <- disagg$DisaggregatedSectorCodes - #Local variable for Make table allocations + #Local variable for Use table allocations UseAllocations <- disagg$UseFileDF #Column names in Final Demand fdColNames <- colnames(model$FinalDemand) VARowNames <- rownames(model$UseValueAdded) - ###Disaggregate Make Rows, Columns, and Intersection while using the allocation data extracted from the Disaggregation.csv - - ##Extract data from Disaggregation csv - #Commodity allocation totals (i.e. disaggregated row percentages) of new sectors (e.g. 100% of 562000 split into to 50% 562HAZ and 50% 562OTH; not actual splits). - defaultPercentages <- getDisaggCommodityPercentages(disagg) - - #Allocations for intersection. Get rows of DF where only new sector codes are present in both the industryCode and commodityCode columns. + ###Disaggregate Use Rows, Columns, and Intersection while using the allocation data extracted from the Disaggregation.csv + + #Extracting intersection allocation. Get rows of DF where only new sector codes are present in both the industryCode and commodityCode columns. intersectionPercentages <-subset(UseAllocations, IndustryCode %in% newSectorCodes & CommodityCode %in% newSectorCodes) - #Assigning allocations for disaggregated intersection - AllocIntersectionDF <- disaggAllocations(model,disagg,intersectionPercentages,"UseIntersection", domestic) - - + #Applying allocations for disaggregated intersection + disaggregatedIntersection <- applyAllocation(model,disagg,intersectionPercentages,"UseIntersection", domestic) + #Allocations for column (industry) disaggregation. - #Get rows of the DF which do not contain the original sector code or the new sector codes in the commodity column (e.g., get only non 562 sector codes when doing waste disaggregation), + #Get rows of the DF which do not contain the original sector code or the new sector codes in the commodity column, #where no VA row names are present in the commodity Column, and only the new sector codes are present in the industry column colPercentages <- subset(UseAllocations, !(CommodityCode %in% originalSectorCode) & !(CommodityCode %in% newSectorCodes) & !(CommodityCode %in% VARowNames) & IndustryCode %in% newSectorCodes) - #Assignning allocation for disaggregated columns - AllocColDF <- disaggAllocations(model,disagg,colPercentages,"UseCol", domestic) - - + #Applying allocation to disaggregat columns + disaggregatedColumns <- applyAllocation(model,disagg,colPercentages,"UseCol", domestic) + #Allocations for the row (commodity) disaggregation. Get all rows of the DF where: #new sector codes are in the CommodityCode column; the FD column codes are not in the IndustryCode; #and neither the original nor new sector codes are in the IndustryCode column. - #rowsPercentages <- subset(UseAllocations, CommodityCode %in% newSectorCodes & !(IndustryCode %in% originalSectorCode) & !(IndustryCode %in% newSectorCodes)) rowsPercentages <- subset(UseAllocations, CommodityCode %in% newSectorCodes & !(IndustryCode %in% fdColNames) & !(IndustryCode %in% originalSectorCode) & !(IndustryCode %in% newSectorCodes)) - #Assigning allocations for disaggregated rows - allocRowDF <- disaggAllocations(model,disagg,rowsPercentages,"UseRow", domestic) - - #-----------------------Assembling table (code shared with uniformUseDisagg) + disaggregatedRows <- applyAllocation(model,disagg,rowsPercentages,"UseRow", domestic) if(domestic){ originalUse<-model$DomesticUseTransactions @@ -983,46 +947,38 @@ specifiedUseDisagg <- function (model, disagg, domestic = FALSE){ else{ originalUse<-model$UseTransactions } - - #Determine number of commodities and industries in originalUse - nCommodities <- nrow(originalUse) - nIndustries <- ncol(originalUse) - - #Deterine number of commodities and industries in DisaggSpecs - numNewSectors <- length(disagg$DisaggregatedSectorCodes) - - #Determine commodity and industry indeces corresponding to the original sector code - originalRowIndex <- which(rownames(originalUse)==disagg$OriginalSectorCode) - originalColIndex <- which(colnames(originalUse)==disagg$OriginalSectorCode) - - #Determine end index of disaggregated sectors - endRowIndex <- originalRowIndex + numNewSectors - endColIndex <- originalColIndex + numNewSectors - - DisaggUse <- assembleTable(originalUse, originalRowIndex, originalColIndex, AllocColDF, allocRowDF, AllocIntersectionDF) - }else{ - + DisaggUse <- assembleTable(originalUse, disagg, disaggregatedColumns, disaggregatedRows, disaggregatedIntersection) + + } else { #No csv was read in, terminate execution DisaggUse <- NULL } - #End of if(!is.null(disagg$MakeFileDF)) loop - + return(DisaggUse) -}#End of specifiedUseDisagg Function +} #' Assemble Table from the various disaggregated components. #' @param originalTable Dataframe. The original table before disaggregation -#' @param originalRowIndex Integer. The row index, in the original table, of the sector to be disaggregated -#' @param originalColIndex Integer. The column index, in the original table, of the sector to be disaggregated +#' @param disagg Specifications for disaggregating the current Table #' @param disaggCols Dataframe. Previously disaggregated columns of the table. #' @param disaggRows Dataframe. Previously disaggregated rows of the table. #' @param disaggIntersection Dataframe. Previously disaggregated intersection of the table. #' @return The Disaggregated table as a dataframe with the disaggregated rows, columns, and intersection included -assembleTable <- function (originalTable, originalRowIndex, originalColIndex, disaggCols, disaggRows, disaggIntersection){ +assembleTable <- function (originalTable, disagg, disaggCols, disaggRows, disaggIntersection){ + + #Determine number of new sectors + numNewSectors <- length(disagg$DisaggregatedSectorCodes) + #Determine commodity and industry indeces corresponding to the original sector code + originalRowIndex <- which(rownames(originalTable)==disagg$OriginalSectorCode) + originalColIndex <- which(colnames(originalTable)==disagg$OriginalSectorCode) + + #Determine end index of disaggregated sectors + endRowIndex <- originalRowIndex + numNewSectors + endColIndex <- originalColIndex + numNewSectors #Assembling all columns above disaggregated rows, including all disaggregated columns disaggTable <- cbind(originalTable[1:originalRowIndex-1,1:originalColIndex-1], #above diagg rows, from 1st col to col right before disaggregation @@ -1042,7 +998,7 @@ assembleTable <- function (originalTable, originalRowIndex, originalColIndex, di disaggCols[-(1:originalRowIndex),], #insert disaggregated cols below disaggregated rows originalTable[-(1:originalRowIndex),-(1:originalColIndex)]) #below disagg rows, all columns after disagg columns - #Appeding bottom part of the table to top part of the table + #Appending bottom part of the table to top part of the table disaggTable <- rbind(disaggTable, disaggTableBottom) return(disaggTable) From d862b1ac970eac525854ac534167b1146f46a29b Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 16 Sep 2021 23:00:25 -0400 Subject: [PATCH 042/319] rename disaggAllocations to applyAllocation, consolidate generation of default allocation percentages to separate function --- R/DisaggregateFunctions.R | 123 ++++++++++++-------------------------- 1 file changed, 38 insertions(+), 85 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 89fc81b8..69b03474 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -1012,7 +1012,7 @@ assembleTable <- function (originalTable, disagg, disaggCols, disaggRows, disagg #' @param vectorToDisagg String. A parameter to indicate what table and what part of that table is being disaggregated (e.g. "MakeCol" or "Intersection") #' @param domestic Boolean. Flag to indicate where to use the DomesticUse or UseTransactions table #' @return A dataframe with the values specified in the disaggSpecs assigned to the correct Make or Use table indeces. -disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, domestic = FALSE){ +applyAllocation <- function (model, disagg, allocPercentages, vectorToDisagg, domestic = FALSE){ #Local variable for new sector codes newSectorCodes <- disagg$DisaggregatedSectorCodes @@ -1045,20 +1045,9 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, allocPercentagesRowIndex <- 1 allocPercentagesColIndex <- 2 - #Set up for default allocations - #Get default percentages (i.e. for non-manual allocation) - #Industry allocation totals (i.e. disaggregated row percentages) of new sectors (e.g. 100% of 562000 split into to 50% 562HAZ and 50% 562OTH; not actual splits). - defaultPercentages <- subset(disagg$MakeFileDF, IndustryCode %in% originalSectorCode) #get all rows from the MakeFileDF that have the OriginalSectorCode in the IndustryCode column - #Make the default Percentages match the disaggregated sector order - defaultPercentages <- defaultPercentages[match(disagg$DisaggregatedSectorCodes, defaultPercentages$CommodityCode),] - - #If there are no default percentages from values from csv (i.e. number of rows in defaultRowPercentages dataframe is 0) assume uniform split, otherwise use the csv values - if(nrow(defaultPercentages)==0) { - defaultPercentages <- data.frame(rep(1/numNewSectors, numNewSectors))#assigning default disaggregation percentage totals assuming uniform split - } else { - defaultPercentages <- defaultPercentages[, 3, drop=FALSE]#Extracting the column with the percentages - } - + defaultPercentages <- getDefaultAllocationPercentages(disagg$MakeFileDF, disagg, + numNewSectors, output='Commodity') + #Create new rows to store default allocation values by copying the original row a number of times equal to the number of new sectors defaultAllocVector <- rbind(originalVector, originalVector[rep(1,numNewSectors-1),]) #multiply all elements in row by default percentages to obtain default allocation values @@ -1090,19 +1079,8 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, allocPercentagesRowIndex <- 1 allocPercentagesColIndex <- 2 - #Set up for default allocations - #Get default percentages (i.e. for non-manual allocation) - #Industry allocation totals (i.e. disaggregated row percentages) of new sectors (e.g. 100% of 562000 split into to 50% 562HAZ and 50% 562OTH; not actual splits). - defaultPercentages <- subset(disagg$MakeFileDF, IndustryCode %in% originalSectorCode) #get all rows from the MakeFileDF that have the OriginalSectorCode in the IndustryCode column - #Make the default Percentages match the disaggregated sector order - defaultPercentages <- defaultPercentages[match(disagg$DisaggregatedSectorCodes, defaultPercentages$CommodityCode),] - - #If there are no default percentages from values from csv (i.e. number of rows in defaultRowPercentages dataframe is 0) assume uniform split, otherwise use the csv values - if(nrow(defaultPercentages)==0) { - defaultPercentages <- data.frame(rep(1/numNewSectors, numNewSectors))#assigning default disaggregation percentage totals assuming uniform split - } else { - defaultPercentages <- defaultPercentages[, 3, drop=FALSE]#Extracting the column with the percentages - } + defaultPercentages <- getDefaultAllocationPercentages(disagg$MakeFileDF, disagg, + numNewSectors, output='Commodity') #Create new columns to store default allocation values by copying the original column a number of times equal to the number of new sectors defaultAllocVector <- cbind(originalVector, originalVector[,rep(1,numNewSectors-1)]) @@ -1136,19 +1114,8 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, allocPercentagesRowIndex <- 1 allocPercentagesColIndex <- 2 - #Set up for default allocations - #Get default percentages (i.e. for non-manual allocation) - #Industry allocation totals (i.e. disaggregated row percentages) of new sectors (e.g. 100% of 562000 split into to 50% 562HAZ and 50% 562OTH; not actual splits). - defaultPercentages <- subset(disagg$MakeFileDF, IndustryCode %in% originalSectorCode) #get all rows from the MakeFileDF that have the OriginalSectorCode in the IndustryCode column - #Make the default Percentages match the disaggregated sector order - defaultPercentages <- defaultPercentages[match(disagg$DisaggregatedSectorCodes, defaultPercentages$CommodityCode),] - - #If there are no default percentages from values from csv (i.e. number of rows in defaultRowPercentages dataframe is 0) assume uniform split, otherwise use the csv values - if(nrow(defaultPercentages)==0) { - defaultPercentages <- data.frame(rep(1/numNewSectors, numNewSectors))#assigning default disaggregation percentage totals assuming uniform split - } else { - defaultPercentages <- defaultPercentages[, 3, drop=FALSE]#Extracting the column with the percentages - } + defaultPercentages <- getDefaultAllocationPercentages(disagg$MakeFileDF, disagg, + numNewSectors, output='Commodity') #Create a dataframe to store values for the intersection. This dataframe is of dimensions [numNewSectors, 1] defaultAllocVector <- data.frame(originalVector[rep(1,numNewSectors),]) @@ -1198,20 +1165,8 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, allocPercentagesRowIndex <- 2 allocPercentagesColIndex <- 1 - #Set up for default allocations - #Get default percentages (i.e. for non-manual allocation) - #Commodity allocation totals (i.e. disaggregated row percentages) of new sectors (e.g. 100% of 562000 split into to 50% 562HAZ and 50% 562OTH; not actual splits). - defaultPercentages <- subset(disagg$UseFileDF, IndustryCode %in% originalSectorCode) - - #Make the default Percentages match the disaggregated sector order - defaultPercentages <- defaultPercentages[match(disagg$DisaggregatedSectorCodes, defaultPercentages$CommodityCode),] - - #If there are no default percentages from values from csv (i.e. number of rows in defaultRowPercentages dataframe is 0) assume uniform split, otherwise use the csv values - if(nrow(defaultPercentages)==0) { - defaultPercentages <- data.frame(rep(1/numNewSectors, numNewSectors))#assigning default disaggregation percentage totals assuming uniform split - } else { - defaultPercentages <- defaultPercentages[, 3, drop=FALSE]#Extracting the column with the percentages - } + defaultPercentages <- getDefaultAllocationPercentages(disagg$UseFileDF, disagg, + numNewSectors, output='Commodity') #Create new rows to store default allocation values by copying the original row a number of times equal to the number of new sectors defaultAllocVector <- rbind(originalVector, originalVector[rep(1,numNewSectors-1),]) @@ -1252,20 +1207,8 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, allocPercentagesRowIndex <- 2 allocPercentagesColIndex <- 1 - #Set up for default allocations - #Get default percentages (i.e. for non-manual allocation) - #Commodity allocation totals (i.e. disaggregated row percentages) of new sectors (e.g. 100% of 562000 split into to 50% 562HAZ and 50% 562OTH; not actual splits). - defaultPercentages <- subset(disagg$UseFileDF, CommodityCode %in% originalSectorCode) #get all rows in UseAllocations that have the OriginalSectorCode in the CommodityCode column - #Make the default Percentages match the disaggregated sector order - defaultPercentages <- defaultPercentages[match(disagg$DisaggregatedSectorCodes, defaultPercentages$IndustryCode),] - - - #If there are no default percentages from values from csv (i.e. number of rows in defaultRowPercentages dataframe is 0) assume uniform split, otherwise use the csv values - if(nrow(defaultPercentages)==0) { - defaultPercentages <- data.frame(rep(1/numNewSectors, numNewSectors))#assigning default disaggregation percentage totals assuming uniform split - } else { - defaultPercentages <- defaultPercentages[, 3, drop=FALSE]#Extracting the column with the percentages - } + defaultPercentages <- getDefaultAllocationPercentages(disagg$UseFileDF, disagg, + numNewSectors, output='Industry') #Create new columns to store default allocation values by copying the original column a number of times equal to the number of new sectors defaultAllocVector <- cbind(originalVector, originalVector[,rep(1,numNewSectors-1)]) @@ -1303,21 +1246,8 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, allocPercentagesRowIndex <- 1 allocPercentagesColIndex <- 2 - #Set up for default allocations - #Get default percentages (i.e. for non-manual allocation) - #Industry allocation totals (i.e. disaggregated row percentages) of new sectors (e.g. 100% of 562000 split into to 50% 562HAZ and 50% 562OTH; not actual splits). - defaultPercentages <- subset(disagg$UseFileDF, CommodityCode %in% originalSectorCode) #get all rows in UseAllocations that have the OriginalSectorCode in the CommodityCode column - #Make the default Percentages match the disaggregated sector order - defaultPercentages <- defaultPercentages[match(disagg$DisaggregatedSectorCodes, defaultPercentages$IndustryCode),] - - #If there are no default percentages from values from csv (i.e. number of rows in defaultRowPercentages dataframe is 0) assume uniform split, otherwise use the csv values - if(nrow(defaultPercentages)==0){ - - defaultPercentages <- data.frame(rep(1/numNewSectors, numNewSectors))#assigning default disaggregation percentage totals assuming uniform split - - } else { - defaultPercentages <- defaultPercentages[, 3, drop=FALSE]#Extracting the column with the percentages - } + defaultPercentages <- getDefaultAllocationPercentages(disagg$UseFileDF, disagg, + numNewSectors, output='Industry') #Create a dataframe to store values for the intersection. This dataframe is of dimensions [numNewSectors, 1] defaultAllocVector <- data.frame(originalVector[rep(1,numNewSectors),]) @@ -1415,7 +1345,30 @@ disaggAllocations <- function (model, disagg, allocPercentages, vectorToDisagg, return(defaultAllocVector) -}#end of disaggAllocations function +}#end of applyAllocation function + + +getDefaultAllocationPercentages <- function(FileDF, disagg, numNewSectors, output) { + #Set up for default allocations + #Get default allocation percentages based on commodity or industry output + if(output == 'Industry') { + defaultPercentages <- subset(FileDF, CommodityCode == disagg$OriginalSectorCode) + defaultPercentages <- defaultPercentages[match(disagg$DisaggregatedSectorCodes, defaultPercentages$IndustryCode),] + } else { + defaultPercentages <- subset(FileDF, IndustryCode %in% disagg$OriginalSectorCode) + defaultPercentages <- defaultPercentages[match(disagg$DisaggregatedSectorCodes, defaultPercentages$CommodityCode),] + } + + #If there are no default percentages from values from csv (i.e. number of rows in defaultRowPercentages dataframe is 0) assume uniform split, otherwise use the csv values + if(nrow(defaultPercentages)==0) { + #Uniform split + defaultPercentages <- data.frame(rep(1/numNewSectors, numNewSectors)) + } else { + defaultPercentages <- defaultPercentages[, 3, drop=FALSE] #Extracting the column with the percentages + } + + return(defaultPercentages) +} #' Obtain default disaggregation percentages for industries from the disaggregation input files. From 1f1aa7581a67eff01636eb11250af127ab121133 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 16 Sep 2021 23:01:52 -0400 Subject: [PATCH 043/319] fix typos and remove unneeded variables --- R/DisaggregateFunctions.R | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 69b03474..06734ccf 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -42,7 +42,7 @@ disaggregateModel <- function (model){ #Disaggregating Crosswalk model$crosswalk <- disaggregateMasterCrosswalk(model, disagg) - #Disaggreate Margins + #Disaggregate Margins model$Margins <- disaggregateMargins(model, disagg) counter <- counter + 1 @@ -107,10 +107,9 @@ disaggregateSetup <- function (model){ if(!is.null(disagg$EnvFile)){ disagg$EnvFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$EnvFile, package = "useeior"), header = TRUE, stringsAsFactors = FALSE, colClasses=c("Sector"="character"))} - if("FlowRatio" %in% colnames(disagg$EnvFileDF)){ + if("FlowRatio" %in% colnames(disagg$EnvFileDF)) { disagg$EnvAllocRatio <- TRUE - } - else{ + } else { disagg$EnvAllocRatio <- FALSE } #Need to assign these DFs back to the modelspecs @@ -265,7 +264,7 @@ disaggregateSectorDFs <- function(model, disagg, list_type) { names(newSectors) <- names(model$Industries) #rename columns for the df } - #variable to determine length of Code substring, i.e., code length minus geographic identifer and separator character (e.g. "/US") + #variable to determine length of Code substring, i.e., code length minus geographic identifier and separator character (e.g. "/US") codeLength <- nchar(gsub("/.*", "", disagg$DisaggregatedSectorCodes[1])) newSectors$Code <- substr(disagg$DisaggregatedSectorCodes,1,codeLength) newSectors$Code_Loc <- sapply(disagg$DisaggregatedSectorCodes, paste0, collapse = "")#sapply needed to convert DisaggregatedSectorCodes from list to char vector @@ -433,7 +432,7 @@ disaggregateFinalDemand <- function(model, disagg, domestic = FALSE) { #Allocation for FD demand sectors FDPercentages <- subset(disagg$UseFileDF, IndustryCode %in% fdColNames) #Assigning allocations for FD - AllocFDDF <- disaggAllocations(model, disagg, FDPercentages, "FinalDemand", domestic) + AllocFDDF <- applyAllocation(model, disagg, FDPercentages, "FinalDemand", domestic) #Determine number of commodities and industries in originalFD nCommodities <- nrow(originalFD) @@ -483,7 +482,7 @@ disaggregateVA <- function(model, disagg) { #Allocation for FD demand sectors VAPercentages <- subset(disagg$UseFileDF, CommodityCode %in% VARowNames)#if VA codenames are in the CommodityCode Column of the csv. #Assigning allocations for FD - AllocVADF <- disaggAllocations(model, disagg, VAPercentages, "ValueAdded", domestic)#need to edit disaggAllocations to handle value added. + AllocVADF <- applyAllocation(model, disagg, VAPercentages, "ValueAdded", domestic)#need to edit applyAllocation to handle value added. ####assembling disaggregated VA @@ -1151,9 +1150,7 @@ applyAllocation <- function (model, disagg, allocPercentages, vectorToDisagg, do originalVectorIndex <- which(rownames(originalTable)==disagg$OriginalSectorCode) #Get original row or column originalVector <- originalTable[originalVectorIndex,] - #Get original row or column sum - originalVectorSum <- data.frame(rowSums(originalVector)) - + #Create new rows to store manual allocation values (all other values initiated to NA) manualAllocVector <- data.frame(matrix(ncol = ncol(originalTable), nrow = length(newSectorCodes))) @@ -1193,9 +1190,7 @@ applyAllocation <- function (model, disagg, allocPercentages, vectorToDisagg, do originalVectorIndex <- which(colnames(originalTable)==disagg$OriginalSectorCode) #Get original row or column originalVector <- originalTable[,originalVectorIndex, drop = FALSE] - #Get original row or column sum - originalVectorSum <- data.frame(colSums(originalVector)) - + #Create new cols to store allocation values (all other values initiated to NA) manualAllocVector <- data.frame(matrix(ncol = length(newSectorCodes), nrow = nrow(originalTable))) @@ -1232,9 +1227,7 @@ applyAllocation <- function (model, disagg, allocPercentages, vectorToDisagg, do originalColIndex <- which(colnames(originalTable)==disagg$OriginalSectorCode) #Get original row or column originalVector <- originalTable[originalRowIndex,originalColIndex, drop=FALSE] - #Get original row or column sum - originalVectorSum <- data.frame(colSums(originalVector)) - + #Create new intersection to store allocation values (all other values initiated to NA) manualAllocVector <- data.frame(matrix(ncol = length(newSectorCodes), nrow = length(newSectorCodes))) From 6bbc97e16b6ebd93b67fa5e33be58db06c4139b2 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 16 Sep 2021 23:06:11 -0400 Subject: [PATCH 044/319] move error handling to disaggregateUseTable --- R/DisaggregateFunctions.R | 80 ++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 44 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 06734ccf..f9f3669d 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -394,7 +394,7 @@ disaggregateUseTable <- function (model, disagg, domestic = FALSE) { disaggType = disagg$DisaggregationType #disaggregation can be of types "Predefined" or "UserDefined". - if(disaggType == "Predefined") { + if(disaggType == "Predefined" | is.null(disagg$UseFileDF)) { disaggTable <- uniformUseDisagg(model, disagg, domestic) } else if(disaggType == "Userdefined") { disaggTable <- specifiedUseDisagg(model, disagg, domestic) @@ -904,57 +904,49 @@ specifiedMakeDisagg <- function (model, disagg){ #' @return A standardized make table with old sectors removed and new disaggregated sectors added based on the allocations in the disaggregation specs. specifiedUseDisagg <- function (model, disagg, domestic = FALSE){ - if(!is.null(disagg$UseFileDF)){ - - #Local variable for original sector code - originalSectorCode <- disagg$OriginalSectorCode - #Local variable for new sector codes - newSectorCodes <- disagg$DisaggregatedSectorCodes - #Local variable for Use table allocations - UseAllocations <- disagg$UseFileDF - #Column names in Final Demand - fdColNames <- colnames(model$FinalDemand) - VARowNames <- rownames(model$UseValueAdded) - - ###Disaggregate Use Rows, Columns, and Intersection while using the allocation data extracted from the Disaggregation.csv - - #Extracting intersection allocation. Get rows of DF where only new sector codes are present in both the industryCode and commodityCode columns. - intersectionPercentages <-subset(UseAllocations, IndustryCode %in% newSectorCodes & CommodityCode %in% newSectorCodes) - - #Applying allocations for disaggregated intersection - disaggregatedIntersection <- applyAllocation(model,disagg,intersectionPercentages,"UseIntersection", domestic) + #Local variable for original sector code + originalSectorCode <- disagg$OriginalSectorCode + #Local variable for new sector codes + newSectorCodes <- disagg$DisaggregatedSectorCodes + #Local variable for Use table allocations + UseAllocations <- disagg$UseFileDF + #Column names in Final Demand + fdColNames <- colnames(model$FinalDemand) + VARowNames <- rownames(model$UseValueAdded) - #Allocations for column (industry) disaggregation. - #Get rows of the DF which do not contain the original sector code or the new sector codes in the commodity column, - #where no VA row names are present in the commodity Column, and only the new sector codes are present in the industry column - colPercentages <- subset(UseAllocations, !(CommodityCode %in% originalSectorCode) & !(CommodityCode %in% newSectorCodes) & !(CommodityCode %in% VARowNames) & IndustryCode %in% newSectorCodes) - - #Applying allocation to disaggregat columns - disaggregatedColumns <- applyAllocation(model,disagg,colPercentages,"UseCol", domestic) + ###Disaggregate Use Rows, Columns, and Intersection while using the allocation data extracted from the Disaggregation.csv - #Allocations for the row (commodity) disaggregation. Get all rows of the DF where: - #new sector codes are in the CommodityCode column; the FD column codes are not in the IndustryCode; - #and neither the original nor new sector codes are in the IndustryCode column. - rowsPercentages <- subset(UseAllocations, CommodityCode %in% newSectorCodes & !(IndustryCode %in% fdColNames) & !(IndustryCode %in% originalSectorCode) & !(IndustryCode %in% newSectorCodes)) + #Extracting intersection allocation. Get rows of DF where only new sector codes are present in both the industryCode and commodityCode columns. + intersectionPercentages <-subset(UseAllocations, IndustryCode %in% newSectorCodes & CommodityCode %in% newSectorCodes) + + #Applying allocations for disaggregated intersection + disaggregatedIntersection <- applyAllocation(model,disagg,intersectionPercentages,"UseIntersection", domestic) - #Assigning allocations for disaggregated rows - disaggregatedRows <- applyAllocation(model,disagg,rowsPercentages,"UseRow", domestic) - - if(domestic){ - originalUse<-model$DomesticUseTransactions - } - else{ - originalUse<-model$UseTransactions - } + #Allocations for column (industry) disaggregation. + #Get rows of the DF which do not contain the original sector code or the new sector codes in the commodity column, + #where no VA row names are present in the commodity Column, and only the new sector codes are present in the industry column + colPercentages <- subset(UseAllocations, !(CommodityCode %in% originalSectorCode) & !(CommodityCode %in% newSectorCodes) & !(CommodityCode %in% VARowNames) & IndustryCode %in% newSectorCodes) + + #Applying allocation to disaggregat columns + disaggregatedColumns <- applyAllocation(model,disagg,colPercentages,"UseCol", domestic) - DisaggUse <- assembleTable(originalUse, disagg, disaggregatedColumns, disaggregatedRows, disaggregatedIntersection) + #Allocations for the row (commodity) disaggregation. Get all rows of the DF where: + #new sector codes are in the CommodityCode column; the FD column codes are not in the IndustryCode; + #and neither the original nor new sector codes are in the IndustryCode column. + rowsPercentages <- subset(UseAllocations, CommodityCode %in% newSectorCodes & !(IndustryCode %in% fdColNames) & !(IndustryCode %in% originalSectorCode) & !(IndustryCode %in% newSectorCodes)) + #Assigning allocations for disaggregated rows + disaggregatedRows <- applyAllocation(model,disagg,rowsPercentages,"UseRow", domestic) + + if(domestic) { + originalUse<-model$DomesticUseTransactions } else { - #No csv was read in, terminate execution - DisaggUse <- NULL + originalUse<-model$UseTransactions } - return(DisaggUse) + DisaggUse <- assembleTable(originalUse, disagg, disaggregatedColumns, disaggregatedRows, disaggregatedIntersection) + +return(DisaggUse) } From 5ec80cf0f4e4805efd7cf52537d7b60cf550abea Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 16 Sep 2021 23:08:01 -0400 Subject: [PATCH 045/319] move error handling to disaggregateMake --- R/DisaggregateFunctions.R | 65 +++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 36 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index f9f3669d..692241e0 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -372,7 +372,7 @@ disaggregateMakeTable <- function (model, disagg) { disaggType = disagg$DisaggregationType #disaggregation can be of types "Predefined" or "UserDefined". - if(disaggType == "Predefined") { + if(disaggType == "Predefined" | is.null(disagg$MakeFileDF)) { disaggTable <- uniformMakeDisagg(model, disagg) } else if(disaggType == "Userdefined") { disaggTable <- specifiedMakeDisagg(model, disagg) @@ -857,41 +857,34 @@ disaggregateMasterCrosswalk <- function (model, disagg){ #' @return A standardized make table with old sectors removed and new disaggregated sectors added based on the allocations in the disaggregation specs. specifiedMakeDisagg <- function (model, disagg){ - if(!is.null(disagg$MakeFileDF)){ - - #Local variable for original sector code - originalSectorCode <- disagg$OriginalSectorCode - #Local variable for new sector codes - newSectorCodes <- disagg$DisaggregatedSectorCodes - #Local variable for Make table allocations - makeAllocations <- disagg$MakeFileDF - - ###Disaggregate Make Rows, Columns, and Intersection while using the allocation data extracted from the Disaggregation csv. - - #Allocations for column (commodity) disaggregation. - #Get rows of the DF which do not contain the original sector code or the new sector codes in the industry column (e.g., get only non 562 sector codes when doing waste disaggregation), - #and where only the new sector codes are present in the commodity column. - colPercentages <- subset(makeAllocations, !(IndustryCode %in% originalSectorCode) & !(IndustryCode %in% newSectorCodes) & CommodityCode %in% newSectorCodes) - #Applying allocation to disaggregate columns - disaggregatedColumns <- applyAllocation(model,disagg,colPercentages,"MakeCol") - - #Allocations for make intersection. Get rows of DF where only new sector codes are present in both the industryCode and commodityCode columns. - intersectionPercentages <-subset(makeAllocations, IndustryCode %in% newSectorCodes & CommodityCode %in% newSectorCodes) - #Assigning allocations for disaggregated intersection - disaggregatedIntersection <- applyAllocation(model,disagg,intersectionPercentages,"MakeIntersection") - - #Allocations for the row (industry) disaggregation. Get all rows of the DF where new sector codes are in the industryCode column, and neither the original nor new sector codes are in the commodityColumn. - rowsPercentages <- subset(makeAllocations, IndustryCode %in% newSectorCodes & !(CommodityCode %in% originalSectorCode) & !(CommodityCode %in% newSectorCodes)) - #Assigning allocations for disaggregated rows - disaggregatedRows <- applyAllocation(model,disagg,rowsPercentages,"MakeRow") - - DisaggMake <- assembleTable(model$MakeTransactions, disagg, disaggregatedColumns, disaggregatedRows, disaggregatedIntersection) - - } else { - #No csv was read in, terminate execution - DisaggMake <- NULL; - } + #Local variable for original sector code + originalSectorCode <- disagg$OriginalSectorCode + #Local variable for new sector codes + newSectorCodes <- disagg$DisaggregatedSectorCodes + #Local variable for Make table allocations + makeAllocations <- disagg$MakeFileDF + + ###Disaggregate Make Rows, Columns, and Intersection while using the allocation data extracted from the Disaggregation csv. + + #Allocations for column (commodity) disaggregation. + #Get rows of the DF which do not contain the original sector code or the new sector codes in the industry column (e.g., get only non 562 sector codes when doing waste disaggregation), + #and where only the new sector codes are present in the commodity column. + colPercentages <- subset(makeAllocations, !(IndustryCode %in% originalSectorCode) & !(IndustryCode %in% newSectorCodes) & CommodityCode %in% newSectorCodes) + #Applying allocation to disaggregate columns + disaggregatedColumns <- applyAllocation(model,disagg,colPercentages,"MakeCol") + + #Allocations for make intersection. Get rows of DF where only new sector codes are present in both the industryCode and commodityCode columns. + intersectionPercentages <-subset(makeAllocations, IndustryCode %in% newSectorCodes & CommodityCode %in% newSectorCodes) + #Assigning allocations for disaggregated intersection + disaggregatedIntersection <- applyAllocation(model,disagg,intersectionPercentages,"MakeIntersection") + + #Allocations for the row (industry) disaggregation. Get all rows of the DF where new sector codes are in the industryCode column, and neither the original nor new sector codes are in the commodityColumn. + rowsPercentages <- subset(makeAllocations, IndustryCode %in% newSectorCodes & !(CommodityCode %in% originalSectorCode) & !(CommodityCode %in% newSectorCodes)) + #Assigning allocations for disaggregated rows + disaggregatedRows <- applyAllocation(model,disagg,rowsPercentages,"MakeRow") + DisaggMake <- assembleTable(model$MakeTransactions, disagg, disaggregatedColumns, disaggregatedRows, disaggregatedIntersection) + return(DisaggMake) } @@ -946,7 +939,7 @@ specifiedUseDisagg <- function (model, disagg, domestic = FALSE){ DisaggUse <- assembleTable(originalUse, disagg, disaggregatedColumns, disaggregatedRows, disaggregatedIntersection) -return(DisaggUse) + return(DisaggUse) } From 7e1a3e8b949557408ab68c6709e1838c62197620 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 16 Sep 2021 23:31:25 -0400 Subject: [PATCH 046/319] refactor applyAllocation to pass the original table as a parameter to reduce the number of if statements --- R/DisaggregateFunctions.R | 88 ++++++++++----------------------------- 1 file changed, 22 insertions(+), 66 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 692241e0..d98e88f7 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -432,8 +432,8 @@ disaggregateFinalDemand <- function(model, disagg, domestic = FALSE) { #Allocation for FD demand sectors FDPercentages <- subset(disagg$UseFileDF, IndustryCode %in% fdColNames) #Assigning allocations for FD - AllocFDDF <- applyAllocation(model, disagg, FDPercentages, "FinalDemand", domestic) - + AllocFDDF <- applyAllocation(disagg, FDPercentages, "FinalDemand", originalFD) + #Determine number of commodities and industries in originalFD nCommodities <- nrow(originalFD) nIndustries <- ncol(originalFD) @@ -482,7 +482,7 @@ disaggregateVA <- function(model, disagg) { #Allocation for FD demand sectors VAPercentages <- subset(disagg$UseFileDF, CommodityCode %in% VARowNames)#if VA codenames are in the CommodityCode Column of the csv. #Assigning allocations for FD - AllocVADF <- applyAllocation(model, disagg, VAPercentages, "ValueAdded", domestic)#need to edit applyAllocation to handle value added. + AllocVADF <- applyAllocation(disagg, VAPercentages, "ValueAdded", model$UseValueAdded)#need to edit applyAllocation to handle value added. ####assembling disaggregated VA @@ -871,17 +871,17 @@ specifiedMakeDisagg <- function (model, disagg){ #and where only the new sector codes are present in the commodity column. colPercentages <- subset(makeAllocations, !(IndustryCode %in% originalSectorCode) & !(IndustryCode %in% newSectorCodes) & CommodityCode %in% newSectorCodes) #Applying allocation to disaggregate columns - disaggregatedColumns <- applyAllocation(model,disagg,colPercentages,"MakeCol") + disaggregatedColumns <- applyAllocation(disagg,colPercentages,"MakeCol", model$MakeTransactions) #Allocations for make intersection. Get rows of DF where only new sector codes are present in both the industryCode and commodityCode columns. intersectionPercentages <-subset(makeAllocations, IndustryCode %in% newSectorCodes & CommodityCode %in% newSectorCodes) #Assigning allocations for disaggregated intersection - disaggregatedIntersection <- applyAllocation(model,disagg,intersectionPercentages,"MakeIntersection") + disaggregatedIntersection <- applyAllocation(disagg,intersectionPercentages,"MakeIntersection", model$MakeTransactions) #Allocations for the row (industry) disaggregation. Get all rows of the DF where new sector codes are in the industryCode column, and neither the original nor new sector codes are in the commodityColumn. rowsPercentages <- subset(makeAllocations, IndustryCode %in% newSectorCodes & !(CommodityCode %in% originalSectorCode) & !(CommodityCode %in% newSectorCodes)) #Assigning allocations for disaggregated rows - disaggregatedRows <- applyAllocation(model,disagg,rowsPercentages,"MakeRow") + disaggregatedRows <- applyAllocation(disagg,rowsPercentages,"MakeRow", model$MakeTransactions) DisaggMake <- assembleTable(model$MakeTransactions, disagg, disaggregatedColumns, disaggregatedRows, disaggregatedIntersection) @@ -907,13 +907,19 @@ specifiedUseDisagg <- function (model, disagg, domestic = FALSE){ fdColNames <- colnames(model$FinalDemand) VARowNames <- rownames(model$UseValueAdded) + if(domestic) { + originalUse<-model$DomesticUseTransactions + } else { + originalUse<-model$UseTransactions + } + ###Disaggregate Use Rows, Columns, and Intersection while using the allocation data extracted from the Disaggregation.csv #Extracting intersection allocation. Get rows of DF where only new sector codes are present in both the industryCode and commodityCode columns. intersectionPercentages <-subset(UseAllocations, IndustryCode %in% newSectorCodes & CommodityCode %in% newSectorCodes) #Applying allocations for disaggregated intersection - disaggregatedIntersection <- applyAllocation(model,disagg,intersectionPercentages,"UseIntersection", domestic) + disaggregatedIntersection <- applyAllocation(disagg,intersectionPercentages,"UseIntersection", originalUse) #Allocations for column (industry) disaggregation. #Get rows of the DF which do not contain the original sector code or the new sector codes in the commodity column, @@ -921,7 +927,7 @@ specifiedUseDisagg <- function (model, disagg, domestic = FALSE){ colPercentages <- subset(UseAllocations, !(CommodityCode %in% originalSectorCode) & !(CommodityCode %in% newSectorCodes) & !(CommodityCode %in% VARowNames) & IndustryCode %in% newSectorCodes) #Applying allocation to disaggregat columns - disaggregatedColumns <- applyAllocation(model,disagg,colPercentages,"UseCol", domestic) + disaggregatedColumns <- applyAllocation(disagg,colPercentages,"UseCol", originalUse) #Allocations for the row (commodity) disaggregation. Get all rows of the DF where: #new sector codes are in the CommodityCode column; the FD column codes are not in the IndustryCode; @@ -929,13 +935,7 @@ specifiedUseDisagg <- function (model, disagg, domestic = FALSE){ rowsPercentages <- subset(UseAllocations, CommodityCode %in% newSectorCodes & !(IndustryCode %in% fdColNames) & !(IndustryCode %in% originalSectorCode) & !(IndustryCode %in% newSectorCodes)) #Assigning allocations for disaggregated rows - disaggregatedRows <- applyAllocation(model,disagg,rowsPercentages,"UseRow", domestic) - - if(domestic) { - originalUse<-model$DomesticUseTransactions - } else { - originalUse<-model$UseTransactions - } + disaggregatedRows <- applyAllocation(disagg,rowsPercentages,"UseRow", originalUse) DisaggUse <- assembleTable(originalUse, disagg, disaggregatedColumns, disaggregatedRows, disaggregatedIntersection) @@ -990,13 +990,12 @@ assembleTable <- function (originalTable, disagg, disaggCols, disaggRows, disagg } #' Allocate values specified by the .yml disaggregation specs to the correct places in a disaggregated row/column of the Use/Make tables. -#' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param disagg Specifications for disaggregating the current Table #' @param allocPercentages Dataframe. A subset of the dataframe that contains the percentages to allocate to specific industry and commodity combinations in the disaggregated vector. Parameter use coordinated with @param vectorToDisagg #' @param vectorToDisagg String. A parameter to indicate what table and what part of that table is being disaggregated (e.g. "MakeCol" or "Intersection") -#' @param domestic Boolean. Flag to indicate where to use the DomesticUse or UseTransactions table +#' @param originalTable Dataframe. The original dataframe upon which allocation is performed (e.g., Make or Use) #' @return A dataframe with the values specified in the disaggSpecs assigned to the correct Make or Use table indeces. -applyAllocation <- function (model, disagg, allocPercentages, vectorToDisagg, domestic = FALSE){ +applyAllocation <- function (disagg, allocPercentages, vectorToDisagg, originalTable){ #Local variable for new sector codes newSectorCodes <- disagg$DisaggregatedSectorCodes @@ -1009,15 +1008,11 @@ applyAllocation <- function (model, disagg, allocPercentages, vectorToDisagg, do #the Make and Use rows and columns. Each block initializes the manual and default allocation values for the relevant rows or columns. if(vectorToDisagg == "MakeRow") { #Set up for manual allocations - #Get original table - originalTable <- model$MakeTransactions #Get commodity and/or industry indeces corresponding to the original sector code originalVectorIndex <- which(rownames(originalTable)==disagg$OriginalSectorCode) #Get original row or column originalVector <- originalTable[originalVectorIndex,] - #Get original row or column sum - originalVectorSum <- data.frame(rowSums(originalVector)) - + #Create new rows to store manual allocation values (all other values initiated to NA) manualAllocVector <- data.frame(matrix(ncol = ncol(originalTable), nrow = length(newSectorCodes))) @@ -1043,15 +1038,11 @@ applyAllocation <- function (model, disagg, allocPercentages, vectorToDisagg, do } else if(vectorToDisagg == "MakeCol") { - #Get original table - originalTable <- model$MakeTransactions #Get commodity and/or industry indeces corresponding to the original sector code originalVectorIndex <- which(colnames(originalTable)==disagg$OriginalSectorCode) #Get original row or column originalVector <- originalTable[,originalVectorIndex, drop = FALSE] - #Get original row or column sum - originalVectorSum <- data.frame(colSums(originalVector)) - + #Create new cols to store allocation values (all other values initiated to NA) manualAllocVector <- data.frame(matrix(ncol = length(newSectorCodes), nrow = nrow(originalTable))) @@ -1077,16 +1068,12 @@ applyAllocation <- function (model, disagg, allocPercentages, vectorToDisagg, do } else if(vectorToDisagg == "MakeIntersection") { - #Get original table - originalTable <- model$MakeTransactions #Get commodity and/or industry indeces corresponding to the original sector code originalRowIndex <- which(rownames(originalTable)==disagg$OriginalSectorCode) originalColIndex <- which(colnames(originalTable)==disagg$OriginalSectorCode) #Get original row or column originalVector <- originalTable[originalRowIndex,originalColIndex, drop=FALSE] - #Get original row or column sum - originalVectorSum <- data.frame(colSums(originalVector)) - + #Create new intersection to store allocation values (all other values initiated to NA) manualAllocVector <- data.frame(matrix(ncol = length(newSectorCodes), nrow = length(newSectorCodes))) @@ -1116,21 +1103,6 @@ applyAllocation <- function (model, disagg, allocPercentages, vectorToDisagg, do } else if(vectorToDisagg == "UseRow" || vectorToDisagg == "FinalDemand" ) { - #get original table - if(domestic == TRUE) { - if(vectorToDisagg == "UseRow") { - originalTable <- model$DomesticUseTransactions - } else { - originalTable <- model$DomesticFinalDemand - } - } else { - if(vectorToDisagg == "UseRow") { - originalTable <- model$UseTransactions - } else { - originalTable <- model$FinalDemand - } - } - #Get commodity and/or industry indeces corresponding to the original sector code originalVectorIndex <- which(rownames(originalTable)==disagg$OriginalSectorCode) #Get original row or column @@ -1160,16 +1132,6 @@ applyAllocation <- function (model, disagg, allocPercentages, vectorToDisagg, do rownames(defaultAllocVector) <- newSectorCodes } else if (vectorToDisagg == "UseCol" || vectorToDisagg == "ValueAdded") { - #get original table - if(vectorToDisagg == "UseCol") { - if(domestic == TRUE) { - originalTable <- model$DomesticUseTransactions - } else { - originalTable <- model$UseTransactions - } - } else { - originalTable <- model$UseValueAdded - } #Get commodity and/or industry indeces corresponding to the original sector code originalVectorIndex <- which(colnames(originalTable)==disagg$OriginalSectorCode) @@ -1200,13 +1162,7 @@ applyAllocation <- function (model, disagg, allocPercentages, vectorToDisagg, do rownames(defaultAllocVector) <- rownames(originalVector) } else if(vectorToDisagg == "UseIntersection") { - #get original table - if(domestic == TRUE){ - originalTable <- model$DomesticUseTransactions - } else { - originalTable <- model$UseTransactions - } - + #Get commodity and/or industry indeces corresponding to the original sector code originalRowIndex <- which(rownames(originalTable)==disagg$OriginalSectorCode) originalColIndex <- which(colnames(originalTable)==disagg$OriginalSectorCode) @@ -1323,7 +1279,7 @@ applyAllocation <- function (model, disagg, allocPercentages, vectorToDisagg, do return(defaultAllocVector) -}#end of applyAllocation function +} getDefaultAllocationPercentages <- function(FileDF, disagg, numNewSectors, output) { From cea4734c14d26f35bfdec92badcb053d7374e43f Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 17 Sep 2021 00:10:46 -0400 Subject: [PATCH 047/319] write new helper functions to consolidate duplicate code --- R/DisaggregateFunctions.R | 102 ++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 55 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index d98e88f7..8ce190f1 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -1068,39 +1068,20 @@ applyAllocation <- function (disagg, allocPercentages, vectorToDisagg, originalT } else if(vectorToDisagg == "MakeIntersection") { - #Get commodity and/or industry indeces corresponding to the original sector code - originalRowIndex <- which(rownames(originalTable)==disagg$OriginalSectorCode) - originalColIndex <- which(colnames(originalTable)==disagg$OriginalSectorCode) - #Get original row or column - originalVector <- originalTable[originalRowIndex,originalColIndex, drop=FALSE] + intersection <- originalTable[which(rownames(originalTable)==disagg$OriginalSectorCode), + which(colnames(originalTable)==disagg$OriginalSectorCode), drop=FALSE] - #Create new intersection to store allocation values (all other values initiated to NA) - manualAllocVector <- data.frame(matrix(ncol = length(newSectorCodes), nrow = length(newSectorCodes))) - - #Assign correct column and row names to new rows dataframe - colnames(manualAllocVector) <- newSectorCodes - rownames(manualAllocVector) <- newSectorCodes - - #Assign lookup index for allocPercentages vector - allocPercentagesRowIndex <- 1 - allocPercentagesColIndex <- 2 - defaultPercentages <- getDefaultAllocationPercentages(disagg$MakeFileDF, disagg, numNewSectors, output='Commodity') - #Create a dataframe to store values for the intersection. This dataframe is of dimensions [numNewSectors, 1] - defaultAllocVector <- data.frame(originalVector[rep(1,numNewSectors),]) - #multiply all elements in row by default percentages to obtain default allocation values - defaultAllocVector <- defaultAllocVector*defaultPercentages[,1] - - #Diagonalize the populated column vector - defaultAllocVector <- diag(defaultAllocVector[,1],numNewSectors,numNewSectors) - defaultAllocVector <- data.frame(defaultAllocVector) + defaultAllocVector <- calculateDefaultIntersection(intersection, defaultPercentages, newSectorCodes) - #rename rows and columns - colnames(defaultAllocVector) <- newSectorCodes - rownames(defaultAllocVector) <- newSectorCodes + manualAllocVector <- createBlankIntersection(newSectorCodes) + #Assign lookup index for allocPercentages vector + allocPercentagesRowIndex <- 1 + allocPercentagesColIndex <- 2 + } else if(vectorToDisagg == "UseRow" || vectorToDisagg == "FinalDemand" ) { #Get commodity and/or industry indeces corresponding to the original sector code @@ -1163,38 +1144,19 @@ applyAllocation <- function (disagg, allocPercentages, vectorToDisagg, originalT } else if(vectorToDisagg == "UseIntersection") { - #Get commodity and/or industry indeces corresponding to the original sector code - originalRowIndex <- which(rownames(originalTable)==disagg$OriginalSectorCode) - originalColIndex <- which(colnames(originalTable)==disagg$OriginalSectorCode) - #Get original row or column - originalVector <- originalTable[originalRowIndex,originalColIndex, drop=FALSE] - - #Create new intersection to store allocation values (all other values initiated to NA) - manualAllocVector <- data.frame(matrix(ncol = length(newSectorCodes), nrow = length(newSectorCodes))) - - #Assign correct column and row names to new rows dataframe - colnames(manualAllocVector) <- newSectorCodes - rownames(manualAllocVector) <- newSectorCodes - - #Assign lookup index for allocPercentages vector - allocPercentagesRowIndex <- 1 - allocPercentagesColIndex <- 2 + intersection <- originalTable[which(rownames(originalTable)==disagg$OriginalSectorCode), + which(colnames(originalTable)==disagg$OriginalSectorCode), drop=FALSE] defaultPercentages <- getDefaultAllocationPercentages(disagg$UseFileDF, disagg, numNewSectors, output='Industry') - #Create a dataframe to store values for the intersection. This dataframe is of dimensions [numNewSectors, 1] - defaultAllocVector <- data.frame(originalVector[rep(1,numNewSectors),]) - #multiply all elements in row by default percentages to obtain default allocation values - defaultAllocVector <- defaultAllocVector*defaultPercentages[,1] - - #Diagonalize the populated column vector - defaultAllocVector <- diag(defaultAllocVector[,1],numNewSectors,numNewSectors) - defaultAllocVector <- data.frame(defaultAllocVector) + defaultAllocVector <- calculateDefaultIntersection(intersection, defaultPercentages, newSectorCodes) + + manualAllocVector <- createBlankIntersection(newSectorCodes) - #rename rows and columns - colnames(defaultAllocVector) <- newSectorCodes - rownames(defaultAllocVector) <- newSectorCodes + #Assign lookup index for allocPercentages vector + allocPercentagesRowIndex <- 1 + allocPercentagesColIndex <- 2 } else { #todo error handling @@ -1230,7 +1192,7 @@ applyAllocation <- function (disagg, allocPercentages, vectorToDisagg, originalT } else if(vectorToDisagg=="MakeCol" || vectorToDisagg=="UseCol" || vectorToDisagg == "ValueAdded") { value <- originalVector[rowAllocIndex, 1, drop = FALSE]*allocationValue #to keep value as a dataframe } else if(vectorToDisagg == "MakeIntersection" || vectorToDisagg=="UseIntersection") { - value <- originalVector[1, 1, drop = FALSE]*allocationValue #to keep value as a dataframe. Should be a 1x1 DF + value <- intersection[1, 1, drop = FALSE]*allocationValue #to keep value as a dataframe. Should be a 1x1 DF } #If either rowAlloc or column are not valid values, set value to 0 to avoid a runtime error @@ -1304,6 +1266,36 @@ getDefaultAllocationPercentages <- function(FileDF, disagg, numNewSectors, outpu return(defaultPercentages) } +createBlankIntersection <- function (newSectorCodes) { + #Create new intersection to store allocation values (all other values initiated to NA) + intersection <- data.frame(matrix(ncol = length(newSectorCodes), nrow = length(newSectorCodes))) + + #Assign correct column and row names to new rows dataframe + colnames(intersection) <- newSectorCodes + rownames(intersection) <- newSectorCodes + + return(intersection) +} + + +calculateDefaultIntersection <- function(originalIntersection, defaultPercentages, newSectorCodes) { + numNewSectors <- length(newSectorCodes) + #Create a dataframe to store values for the intersection. This dataframe is of dimensions [numNewSectors, 1] + intersection <- data.frame(originalIntersection[rep(1,numNewSectors),]) + #multiply all elements in row by default percentages to obtain default allocation values + intersection <- intersection*defaultPercentages[,1] + + #Diagonalize the populated column vector + intersection <- diag(intersection[,1],numNewSectors,numNewSectors) + intersection <- data.frame(intersection) + + #rename rows and columns + colnames(intersection) <- newSectorCodes + rownames(intersection) <- newSectorCodes + + return(intersection) +} + #' Obtain default disaggregation percentages for industries from the disaggregation input files. #' @param disagg Specifications for disaggregating the current Model From 7e23bd48c50c54ee7102b69428756b725f4342aa Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 17 Sep 2021 00:18:10 -0400 Subject: [PATCH 048/319] consolidate uniformUse and uniformMake disagg with assembleTable --- R/DisaggregateFunctions.R | 76 ++++----------------------------------- 1 file changed, 7 insertions(+), 69 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 8ce190f1..b16762cc 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -526,30 +526,21 @@ uniformMakeDisagg <- function (model, disagg) { #values along the intersections disaggregated uniformly along the diagonal. originalMake<-model$MakeTransactions - - #Determine number of commodities and industries in originalMake - nCommodities <- ncol(originalMake) - nIndustries <- nrow(originalMake) - + #Determine number of commodities and industries in DisaggSpecs numNewSectors <- length(disagg$DisaggregatedSectorCodes) #Determine commodity and industry indeces corresponding to the original sector code originalRowIndex <- which(rownames(originalMake)==disagg$OriginalSectorCode) originalColIndex <- which(colnames(originalMake)==disagg$OriginalSectorCode) - - #Determine end index of disaggregated sectors - endRowIndex <- originalRowIndex + numNewSectors - endColIndex <- originalColIndex + numNewSectors - - + ########Row disaggregation #Copy original row (ind) for disaggregation originalRowVector <- originalMake[originalRowIndex,] disaggRows <- disaggregateRow(originalRowVector,disagg) - ########Columnn disaggregation + ########Column disaggregation #Copy original Column (Com) for disaggregation originalColVector <-originalMake[,originalColIndex, drop = FALSE]#drop = False needed to copy as dataframe @@ -573,28 +564,7 @@ uniformMakeDisagg <- function (model, disagg) { rownames(disaggIntersection) <- disagg$DisaggregatedSectorCodes - ########Assemble table - - #Assembling all columns above disaggregated rows, including all disaggregated columns - disaggTable <- cbind(originalMake[1:originalRowIndex-1,1:originalColIndex-1], #above diagg rows, from 1st col to col right before disaggregation - disaggCols[1:originalRowIndex-1,], #insert disaggregated cols before disaggregated rows - originalMake[1:originalRowIndex-1,-(1:originalColIndex)]) #include all cols except from 1st col to disaggregated col - - #Inserting intersection into disaggregated rows - disaggRows <- cbind(disaggRows[,1:originalColIndex-1], #from 1st col to col right before disaggregation - disaggIntersection, #insert disaggregated intersection - disaggRows[,-(1:originalColIndex)]) #include all cols except from 1s col to disaggregated col - - #Appending rest of original rows to partially assembled DMake - disaggTable <- rbind(disaggTable,disaggRows) - - #Assembling all columns below disaggregated rows, including all disaggregated columns - disaggTableBottom <- cbind(originalMake[-(1:originalRowIndex),1:originalColIndex-1], #below disagg rows, from 1st col to col right before disaggregation - disaggCols[-(1:originalRowIndex),], #insert disaggregated cols below disaggregated rows - originalMake[-(1:originalRowIndex),-(1:originalColIndex)]) #below disagg rows, all columns after disagg columns - - #Appeding bottom part of the table to top part of the table - disaggTable <- rbind(disaggTable, disaggTableBottom) + disaggTable <- assembleTable(originalMake, disagg, disaggCols, disaggRows, disaggIntersection) return(disaggTable) @@ -617,22 +587,13 @@ uniformUseDisagg <- function(model, disagg, domestic = FALSE) { originalUse<-model$UseTransactions } - #Determine number of commodities and industries in originalUse - nCommodities <- nrow(originalUse) - nIndustries <- ncol(originalUse) - - #Deterine number of commodities and industries in DisaggSpecs + #Determine number of commodities and industries in DisaggSpecs numNewSectors <- length(disagg$DisaggregatedSectorCodes) #Determine commodity and industry indeces corresponding to the original sector code originalRowIndex <- which(rownames(originalUse)==disagg$OriginalSectorCode) originalColIndex <- which(colnames(originalUse)==disagg$OriginalSectorCode) - #Determine end index of disaggregated sectors - endRowIndex <- originalRowIndex + numNewSectors - endColIndex <- originalColIndex + numNewSectors - - ########Row disaggregation #Copy original row (com) for disaggregation originalRowVector <- originalUse[originalRowIndex,] @@ -644,8 +605,7 @@ uniformUseDisagg <- function(model, disagg, domestic = FALSE) { originalColVector <-originalUse[,originalColIndex, drop = FALSE]#drop = False needed to copy as dataframe disaggCols <- disaggregateCol(originalColVector,disagg) - - + ########Intersection Disaggregation originalIntersection <- originalUse[originalRowIndex, originalColIndex] @@ -662,30 +622,8 @@ uniformUseDisagg <- function(model, disagg, domestic = FALSE) { colnames(disaggIntersection) <- disagg$DisaggregatedSectorCodes rownames(disaggIntersection) <- disagg$DisaggregatedSectorCodes + disaggTable <- assembleTable(originalUse, disagg, disaggCols, disaggRows, disaggIntersection) - ########Assemble table - - #Assembling all columns above disaggregated rows, including all disaggregated columns - disaggTable <- cbind(originalUse[1:originalRowIndex-1,1:originalColIndex-1], #above diagg rows, from 1st col to col right before disaggregation - disaggCols[1:originalRowIndex-1,], #insert disaggregated cols before disaggregated rows - originalUse[1:originalRowIndex-1,-(1:originalColIndex)]) #include all cols except from 1st col to disaggregated col - - #Inserting intersection into disaggregated rows - disaggRows <- cbind(disaggRows[,1:originalColIndex-1], #from 1st col to col right before disaggregation - disaggIntersection, #insert disaggregated intersection - disaggRows[,-(1:originalColIndex)]) #include all cols except from 1s col to disaggregated col - - #Appending rest of original rows to partially assembled DMake - disaggTable <- rbind(disaggTable,disaggRows) - - #Assembling all columns below disaggregated rows, including all disaggregated columns - disaggTableBottom <- cbind(originalUse[-(1:originalRowIndex),1:originalColIndex-1], #below disagg rows, from 1st col to col right before disaggregation - disaggCols[-(1:originalRowIndex),], #insert disaggregated cols below disaggregated rows - originalUse[-(1:originalRowIndex),-(1:originalColIndex)]) #below disagg rows, all columns after disagg columns - - #Appeding bottom part of the table to top part of the table - disaggTable <- rbind(disaggTable, disaggTableBottom) - return(disaggTable) } From ccb9394e590fdec4f939f97f9e72790376b35627 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 17 Sep 2021 00:28:24 -0400 Subject: [PATCH 049/319] consolidate uniformMake and uniformUse disagg into single function --- R/DisaggregateFunctions.R | 84 ++++++++------------------------------- 1 file changed, 16 insertions(+), 68 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index b16762cc..95591de0 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -373,7 +373,7 @@ disaggregateMakeTable <- function (model, disagg) { #disaggregation can be of types "Predefined" or "UserDefined". if(disaggType == "Predefined" | is.null(disagg$MakeFileDF)) { - disaggTable <- uniformMakeDisagg(model, disagg) + disaggTable <- uniformDisagg(model, disagg, model$MakeTransactions) } else if(disaggType == "Userdefined") { disaggTable <- specifiedMakeDisagg(model, disagg) } else { @@ -395,7 +395,12 @@ disaggregateUseTable <- function (model, disagg, domestic = FALSE) { #disaggregation can be of types "Predefined" or "UserDefined". if(disaggType == "Predefined" | is.null(disagg$UseFileDF)) { - disaggTable <- uniformUseDisagg(model, disagg, domestic) + if(domestic) { + table <- model$DomesticUseTransactions + } else { + table <- model$UseTransactions + } + disaggTable <- uniformDisagg(model, disagg, table) } else if(disaggType == "Userdefined") { disaggTable <- specifiedUseDisagg(model, disagg, domestic) } else { @@ -516,39 +521,38 @@ disaggregateVA <- function(model, disagg) { } -#' Disaggregate make table uniformly based on the number of new sectors +#' Disaggregate make or use table uniformly based on the number of new sectors #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param disagg Specifications for disaggregating the current Table +#' @param table DataFrame of make or use table #' @return A standardized make table with old sectors removed and new, uniformly disaggregated sectors added. -uniformMakeDisagg <- function (model, disagg) { +uniformDisagg <- function (model, disagg, table) { #Predefined disaggregation assumes 1 industry/commodity disaggregated uniformly into several, with #values along the intersections disaggregated uniformly along the diagonal. - - originalMake<-model$MakeTransactions #Determine number of commodities and industries in DisaggSpecs numNewSectors <- length(disagg$DisaggregatedSectorCodes) #Determine commodity and industry indeces corresponding to the original sector code - originalRowIndex <- which(rownames(originalMake)==disagg$OriginalSectorCode) - originalColIndex <- which(colnames(originalMake)==disagg$OriginalSectorCode) + originalRowIndex <- which(rownames(table)==disagg$OriginalSectorCode) + originalColIndex <- which(colnames(table)==disagg$OriginalSectorCode) ########Row disaggregation #Copy original row (ind) for disaggregation - originalRowVector <- originalMake[originalRowIndex,] + originalRowVector <- table[originalRowIndex,] disaggRows <- disaggregateRow(originalRowVector,disagg) ########Column disaggregation #Copy original Column (Com) for disaggregation - originalColVector <-originalMake[,originalColIndex, drop = FALSE]#drop = False needed to copy as dataframe + originalColVector <-table[,originalColIndex, drop = FALSE]#drop = False needed to copy as dataframe disaggCols <- disaggregateCol(originalColVector,disagg) ########Intersection Disaggregation - originalIntersection <- originalMake[originalRowIndex, originalColIndex] + originalIntersection <- table[originalRowIndex, originalColIndex] #Divide intersection by number of new sectors originalIntersection <- originalIntersection/numNewSectors @@ -564,69 +568,13 @@ uniformMakeDisagg <- function (model, disagg) { rownames(disaggIntersection) <- disagg$DisaggregatedSectorCodes - disaggTable <- assembleTable(originalMake, disagg, disaggCols, disaggRows, disaggIntersection) + disaggTable <- assembleTable(table, disagg, disaggCols, disaggRows, disaggIntersection) return(disaggTable) } -#' Disaggregate use table uniformly based on the number of new sectors -#' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @param disagg Specifications for disaggregating the current Table -#' @param domestic boolean, indicates whether use disagg is for domestic model or full model; FALSE is default -#' @return A standardized use table with old sectors removed and new, uniformly disaggregated sectors added. -uniformUseDisagg <- function(model, disagg, domestic = FALSE) { - - #Predefined disaggregation assumes 1 industry/commodity disaggregated uniformly into several, with - #values along the intersections disaggregated uniformly along the diagonal. - - if(domestic) { - originalUse<-model$DomesticUseTransactions - } else { - originalUse<-model$UseTransactions - } - - #Determine number of commodities and industries in DisaggSpecs - numNewSectors <- length(disagg$DisaggregatedSectorCodes) - - #Determine commodity and industry indeces corresponding to the original sector code - originalRowIndex <- which(rownames(originalUse)==disagg$OriginalSectorCode) - originalColIndex <- which(colnames(originalUse)==disagg$OriginalSectorCode) - - ########Row disaggregation - #Copy original row (com) for disaggregation - originalRowVector <- originalUse[originalRowIndex,] - - disaggRows <- disaggregateRow(originalRowVector,disagg) - - ########Columnn disaggregation - #Copy original Column (ind) for disaggregation - originalColVector <-originalUse[,originalColIndex, drop = FALSE]#drop = False needed to copy as dataframe - - disaggCols <- disaggregateCol(originalColVector,disagg) - - ########Intersection Disaggregation - originalIntersection <- originalUse[originalRowIndex, originalColIndex] - - #Divide intersection by number of new sectors - originalIntersection <- originalIntersection/numNewSectors - - #Populate disaggregated intersection assuming equal values along the diagonal. Matrix variable. - disaggIntersection <- diag(originalIntersection,numNewSectors,numNewSectors) - - #Convert to data frame - disaggIntersection = as.data.frame(t(disaggIntersection)) - - #rename rows and columns - colnames(disaggIntersection) <- disagg$DisaggregatedSectorCodes - rownames(disaggIntersection) <- disagg$DisaggregatedSectorCodes - - disaggTable <- assembleTable(originalUse, disagg, disaggCols, disaggRows, disaggIntersection) - - return(disaggTable) -} - #' Disaggregate multiple rows from a table. #' @param RowVectors A dataframe containing the rows to disaggregate #' @param disagg_specs Specifications for disaggregating the current Table From 1d72efc8955141e2fab9494387971eba8316aa34 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 17 Sep 2021 00:30:06 -0400 Subject: [PATCH 050/319] removing unneeded variables --- R/DisaggregateFunctions.R | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 95591de0..ebb36698 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -439,10 +439,6 @@ disaggregateFinalDemand <- function(model, disagg, domestic = FALSE) { #Assigning allocations for FD AllocFDDF <- applyAllocation(disagg, FDPercentages, "FinalDemand", originalFD) - #Determine number of commodities and industries in originalFD - nCommodities <- nrow(originalFD) - nIndustries <- ncol(originalFD) - #Deterine number of commodities and industries in DisaggSpecs numNewSectors <- length(disagg$DisaggregatedSectorCodes) @@ -491,11 +487,7 @@ disaggregateVA <- function(model, disagg) { ####assembling disaggregated VA - #Determine number of commodities and industries in originalFD - nCommodities <- nrow(model$UseValueAdded) - nIndustries <- ncol(model$UseValueAdded) - - #Deterine number of commodities and industries in DisaggSpecs + #Determine number of commodities and industries in DisaggSpecs numNewSectors <- length(disagg$DisaggregatedSectorCodes) #Determine commodity and industry indeces corresponding to the original sector code @@ -506,7 +498,6 @@ disaggregateVA <- function(model, disagg) { #endRowIndex <- originalRowIndex + numNewSectors endColIndex <- originalColIndex + numNewSectors - tablePartOne <- model$UseValueAdded[, 1:originalColIndex-1]#all rows, columns to the left of diagg col tablePartTwo <- model$UseValueAdded[,-(1:originalColIndex)]#all rows, all columns except cols to left of disagg col From ab68c507d58f06cf7ae2de0b0b4fe25120091b1f Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 17 Sep 2021 09:40:52 -0400 Subject: [PATCH 051/319] create new function to calculateIndustryCommodityOutput --- R/DisaggregateFunctions.R | 23 ++--------------------- R/LoadIOTables.R | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index ebb36698..ea86eab7 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -28,8 +28,8 @@ disaggregateModel <- function (model){ model <- balanceDisagg(model, disagg) } - #Disaggregating model$CommodityOutput and model$IndustryOutput objects - model <- calculateOutputs(model) + #Recalculate model$CommodityOutput and model$IndustryOutput objects + model <- calculateIndustryCommodityOutput(model) #Disaggregating MultiyearIndustryOutput and MultiYearCommodityOutput model$MultiYearCommodityOutput <- disaggregateMultiYearOutput(model, disagg, output_type = "Commodity") @@ -121,25 +121,6 @@ disaggregateSetup <- function (model){ return(model) } -#' Calculate updated Commodity and Industry Output model objects -#' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @return model A complete EEIO model: a list with USEEIO model components and attributes. -calculateOutputs <- function(model) -{ - - if(!is.null(model$CommodityOutput)) - { - model$CommodityOutput <- rowSums(model$UseTransactions)+rowSums(model$FinalDemand) - - } - if(!is.null(model$IndustryOutput)) - { - model$IndustryOutput <- colSums(model$UseTransactions)+colSums(model$UseValueAdded) - } - - return(model) - -} #' Disaggregate model$Margins dataframe in the main model object #' @param model A complete EEIO model: a list with USEEIO model components and attributes. diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index 4a1115d3..73571893 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -102,9 +102,8 @@ loadNationalIOData <- function(model) { model$specs$ModelRegionAcronyms), 1, FUN = joinStringswithSlashes) - model$IndustryOutput <- colSums(model$UseTransactions) + colSums(model$UseValueAdded) - model$CommodityOutput <- rowSums(model$UseTransactions) + rowSums(model$FinalDemand) - + model <- calculateIndustryCommodityOutput(model) + model$MultiYearIndustryOutput <- loadNationalGrossOutputTable(model$specs)[model$Industries$Code, ] rownames(model$MultiYearIndustryOutput) <- model$Industries$Code_Loc model$MultiYearIndustryOutput[, as.character(model$specs$IOYear)] <- model$IndustryOutput @@ -202,3 +201,13 @@ loadBEAMakeorUseTable <- function (iolevel, makeoruse, year, redef){ return(BEA_Table) } +#' Calculate industry and commodity output vectors from model components. +#' @param model An EEIO model with IO tables +#' @return An EEIO model with industry and commodity output added +calculateIndustryCommodityOutput <- function(model) { + model$IndustryOutput <- colSums(model$UseTransactions) + colSums(model$UseValueAdded) + model$CommodityOutput <- rowSums(model$UseTransactions) + rowSums(model$FinalDemand) + + return(model) +} + From 38ab23b51cdb8ab5bcc22e715b96ffe5fdd87bca Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 17 Sep 2021 10:14:19 -0400 Subject: [PATCH 052/319] revise to use new calculateIndustryCommodityOutput function --- R/AggregationFunctions.R | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index b94491fc..9d8b9c5c 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -35,7 +35,6 @@ aggregateModel <- function (model){ model$Industries <- removeRowsFromList(model$Industries, indIndecesToAggregate) model$MultiYearIndustryCPI <- aggregateMultiYearCPI(model, mainIndIndex, indIndecesToAggregate, "Industry") model$MultiYearIndustryOutput <- aggregateMultiYearOutput(model$MultiYearIndustryOutput, mainIndIndex, indIndecesToAggregate) - model$IndustryOutput <- aggregateOutputs(model, indIndecesToAggregate, "Industry")#aggregate model$IndustryOutput object } #aggregate Commodity lists @@ -43,9 +42,9 @@ aggregateModel <- function (model){ model$Commodities <- removeRowsFromList(model$Commodities, comIndecesToAggregate) model$MultiYearCommodityCPI <- aggregateMultiYearCPI(model, mainIndIndex, indIndecesToAggregate, "Commodity") model$MultiYearIndustryOutput <- aggregateMultiYearOutput(model$MultiYearIndustryOutput, mainComIndex, comIndecesToAggregate) - model$CommodityOutput <- aggregateOutputs(model, comIndecesToAggregate, "Commodity")#aggregate model$CommoditOutput object } - + + model <- calculateIndustryCommodityOutput(model) return(model) } @@ -69,28 +68,6 @@ getAggregationSpecs <- function (model){ } -#' Calculate updated Commodity and Industry Output model objects after aggregation -#' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @param indecesToAggregate List of indeces to aggregate. -#' @param type String to designate either commodity or industry -#' @return An aggregated Industry or Commodity output object. -aggregateOutputs <- function(model, indecesToAggregate, type) -{ - - if(type == "Industry"){ - model$IndustryOutput <- colSums(model$UseTransactions)+colSums(model$UseValueAdded) #calculate new output total - return (model$IndustryOutput) - - }else { #assumes commodity - model$CommodityOutput <- rowSums(model$UseTransactions)+rowSums(model$FinalDemand) - return(model$CommodityOutput) - - } - - -} - - #TODO: Complete this function #' Aggregate satellite tables from static file based on specs #' @param model A complete EEIO model: a list with USEEIO model components and attributes. From cbb9f63f807a53262566c5d5d42659ae055f2085 Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 17 Sep 2021 11:04:57 -0400 Subject: [PATCH 053/319] Changed check for aggregation and check for disaggregation from check not null to check length != 0 to avoid errors with running 2.0 models. --- R/LoadIOTables.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index 4a1115d3..fd17998e 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -25,11 +25,11 @@ loadIOData <- function(model) { model <- getDisaggregationSpecs(model) # Check for aggregation - if(!is.null(model$DisaggregationSpecs$Aggregation)){ + if(length(model$DisaggregationSpecs$Aggregation)!=0){ model <- aggregateModel(model) } # Check for disaggregation - if(!is.null(model$DisaggregationSpecs$Disaggregation)){ + if(length(model$DisaggregationSpecs$Disaggregation)!=0){ model <- disaggregateModel(model) } From 8f946d6bc3c9eae99d35a12e0638d7dccb5944c1 Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 17 Sep 2021 11:27:19 -0400 Subject: [PATCH 054/319] Merged getAggregationSpecs and getDisaggregationSpecs into one function. Moved call of disaggregatedSetup function to getDisaggregationSpecs (from disaggregateModel function) --- R/AggregationFunctions.R | 19 ------------------- R/DisaggregateFunctions.R | 14 ++++++++------ R/LoadIOTables.R | 1 - 3 files changed, 8 insertions(+), 26 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index b94491fc..53127690 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -50,25 +50,6 @@ aggregateModel <- function (model){ return(model) } - -#' Obtain aggregation specs from aggregation input files -#' @param model Model file loaded with IO tables -#' @return A model with the specified aggregation specs. -getAggregationSpecs <- function (model){ - model$DisaggregationSpecs$Aggregation <- vector(mode='list') - for (configFile in model$specs$DisaggregationSpecs){ - logging::loginfo(paste0("Loading aggregation specs for ", configFile, "...")) - config <- getConfiguration(configFile, "disagg") - if('Aggregation' %in% names(config)){ - model$DisaggregationSpecs$Aggregation <- append(model$DisaggregationSpecs$Aggregation, config$Aggregation) - } - } - - return(model) - -} - - #' Calculate updated Commodity and Industry Output model objects after aggregation #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param indecesToAggregate List of indeces to aggregate. diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 1664f2cc..757d92fa 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -3,8 +3,6 @@ #' @return A disaggregated model. disaggregateModel <- function (model){ - model <- disaggregateSetup(model) - logging::loginfo("Initializing Disaggregation of IO tables...") counter = 1 @@ -52,24 +50,28 @@ disaggregateModel <- function (model){ } -#' Obtain disaggregation specs from aggregation input files +#' Obtain aggregation and disaggregation specs from input files #' @param model Model file loaded with IO tables -#' @return A model with the specified disaggregation specs. +#' @return A model with the specified aggregation and disaggregation specs. getDisaggregationSpecs <- function (model){ + model$DisaggregationSpecs$Aggregation <- vector(mode='list') model$DisaggregationSpecs$Disaggregation <- vector(mode='list') for (configFile in model$specs$DisaggregationSpecs){ logging::loginfo(paste0("Loading disaggregation spes for ", configFile, "...")) config <- getConfiguration(configFile, "disagg") + if('Aggregation' %in% names(config)){ + model$DisaggregationSpecs$Aggregation <- append(model$DisaggregationSpecs$Aggregation, config$Aggregation) + } if('Disaggregation' %in% names(config)){ model$DisaggregationSpecs$Disaggregation <- append(model$DisaggregationSpecs$Disaggregation, config$Disaggregation) } } - return(model) + model <- disaggregateSetup(model) + return(model) } - #' Setup the configuration specs based on the input files #' @param model Model file loaded with IO tables #' @return A model object with the correct disaggregation specs. diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index fd17998e..d9ae9208 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -21,7 +21,6 @@ loadIOData <- function(model) { model$MultiYearCommodityCPI[, year_col] <- transformIndustryCPItoCommodityCPIforYear(as.numeric(year_col), model) } - model <- getAggregationSpecs(model) model <- getDisaggregationSpecs(model) # Check for aggregation From e50cb500cf384e0202fccc40503fc59e17d6658b Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 17 Sep 2021 13:13:08 -0400 Subject: [PATCH 055/319] update env disagg by ratio to use UUID instead of flow name --- R/DisaggregateFunctions.R | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 6141d93e..4956f4c3 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -306,15 +306,14 @@ disaggregateSatelliteTable <- function (disagg, sattable, sat_spec) { if(!is.null(disagg$EnvFileDF) & disagg$EnvAllocRatio) { # If satellite table data is provided as flow by sector ratios, loop through each flow assigned to original sector sattable_original = subset(sattable, Sector==original_code) - for(flow in unique(sattable_original$Flowable)) { - # TODO: Temporary link based on flow name; update to UUID - allocation_df <- subset(disagg$EnvFileDF, Flowable==flow) + for(flow in unique(sattable_original$FlowUUID)) { + allocation_df <- subset(disagg$EnvFileDF, FlowUUID==flow) if(nrow(allocation_df)==0) { allocation_vector <- NULL } else { allocation_vector <- setNames(allocation_df$FlowRatio, allocation_df$Sector) } - disaggregated_flows <- disaggregateSatelliteSubsetByRatio(subset(sattable_original, Flowable==flow, colnames(sattable)), + disaggregated_flows <- disaggregateSatelliteSubsetByRatio(subset(sattable_original, FlowUUID==flow, colnames(sattable)), disagg, allocation_vector) sattable <- rbind(sattable, disaggregated_flows) } From 4e30d101f84c525e26e2a50954c9c16ae9a55d00 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Sat, 18 Sep 2021 12:57:39 -0700 Subject: [PATCH 056/319] Correct code comment, fixes #157 --- R/LoadIndicators.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/LoadIndicators.R b/R/LoadIndicators.R index 5c768b08..76db40cc 100644 --- a/R/LoadIndicators.R +++ b/R/LoadIndicators.R @@ -4,7 +4,7 @@ #' @param model A model object with IO data loaded #' @return A model object with Indicators added loadandbuildIndicators <- function(model) { - # Generate C matrix: LCIA indicators + # Load model indicators indicators <- loadIndicators(model) # Add to model object model$Indicators <- indicators From 5facd51c304812a3f0895820722f14f44a037e48 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Sat, 18 Sep 2021 13:03:07 -0700 Subject: [PATCH 057/319] Modify log message --- R/SatelliteFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/SatelliteFunctions.R b/R/SatelliteFunctions.R index 269de8ec..6c36fabc 100644 --- a/R/SatelliteFunctions.R +++ b/R/SatelliteFunctions.R @@ -223,7 +223,7 @@ checkDuplicateFlowsBySector <- function(sattable_ls) { rownames(duplicates) <- NULL if (nrow(duplicates) > 0){ - logging::logwarn("Duplicate flows exist across satellite tables.") + logging::logwarn("Duplicate flows exist across satellite tables and should be reviewed.") logging::logdebug(duplicates) } else { logging::loginfo("No duplicate flows exist across satellite tables.") From 521ed72cc605d3d79bca2106a6df81b302de6dc6 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 21 Sep 2021 21:05:17 -0400 Subject: [PATCH 058/319] fix typo in model spec --- inst/extdata/modelspecs/USEEIOv2.1.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/extdata/modelspecs/USEEIOv2.1.yml b/inst/extdata/modelspecs/USEEIOv2.1.yml index ee6f31c4..a8e5810d 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0.1" +Model: "USEEIOv2.1" BaseIOSchema: 2012 BaseIOLevel: "Detail" IOYear: 2012 # Year for IO data From b8b8372db1184c497e67d37f428e219fa107b555 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 21 Sep 2021 21:05:34 -0400 Subject: [PATCH 059/319] delete combined disagg specs --- .../WasteElectricityDisaggregationDetail.yml | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 inst/extdata/disaggspecs/WasteElectricityDisaggregationDetail.yml diff --git a/inst/extdata/disaggspecs/WasteElectricityDisaggregationDetail.yml b/inst/extdata/disaggspecs/WasteElectricityDisaggregationDetail.yml deleted file mode 100644 index 80229c00..00000000 --- a/inst/extdata/disaggspecs/WasteElectricityDisaggregationDetail.yml +++ /dev/null @@ -1,20 +0,0 @@ -Aggregation: - Sectors: ["221100/US", "S00101/US", "S00202/US"] # Aggregates to first sector listed - AssociatedDisaggregation: 221100/US -Disaggregation: - 562000/US: - OriginalSectorCode: "562000/US" - OrignalSectorName: "Waste Management and remediation services" - DisaggregationType: "Userdefined" - SectorFile: WasteDisaggregation_Sectors.csv - MakeFile: WasteDisaggregationDetail_Make.csv - UseFile: WasteDisaggregationDetail_Use.csv - EnvFile: WasteDisaggregation_Env.csv #Update of GHGs from NGIAM for waste sectors - 221100/US: - OriginalSectorCode: "221100/US" - OrignalSectorName: "Electric power generation, transmission, and distribution" - DisaggregationType: "Userdefined" - SectorFile: ElectricityDisaggregation_Sectors.csv - MakeFile: ElectricityDisaggregationDetail_Make.csv - UseFile: ElectricityDisaggregationDetail_Use.csv - # EnvFile: ElectricityDisaggregation_Env.csv From 43f069458b126b5b3da2aa9f1e320bc7dd36c681 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 21 Sep 2021 21:07:24 -0400 Subject: [PATCH 060/319] delete testing model spec --- .../USEEIOv2.0.1_electricitydisagg.yml | 880 ------------------ 1 file changed, 880 deletions(-) delete mode 100644 inst/extdata/modelspecs/USEEIOv2.0.1_electricitydisagg.yml diff --git a/inst/extdata/modelspecs/USEEIOv2.0.1_electricitydisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0.1_electricitydisagg.yml deleted file mode 100644 index ebe13f21..00000000 --- a/inst/extdata/modelspecs/USEEIOv2.0.1_electricitydisagg.yml +++ /dev/null @@ -1,880 +0,0 @@ -Model: "USEEIOv2.0.1_electricitydisagg" -BaseIOSchema: 2012 -BaseIOLevel: "Detail" -IOYear: 2012 # Year for IO data -ModelRegionAcronyms: ["US"] -ModelType: "EEIO" -IODataSource: "BEA" -BasePriceType: "PRO" #producer -BasewithRedefinitions: FALSE -CommodityorIndustryType: "Commodity" -ScrapIncluded: FALSE -DisaggregationSpecs: "ElectricityDisaggregationDetail" #Name of disaggregation yml file. - -SatelliteTable: - WAT: - FullName: "Water withdrawals" - Abbreviation: "WAT" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v0.3.1_f3cdf5b.parquet" - FileLocation: "DataCommons" - DataYears: [2015] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - USGS_NWIS_WU_2015: - Title: "Water Use in the US" - Author: "USGS" - DataYear: 2015 - URL: "https://waterdata.usgs.gov/" - Primary: TRUE - CHAIR: - FullName: "Criteria and Hazardous Air Emissions" - Abbreviation: "CHAIR" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/CAP_HAP_national_2017_v0.3.1_f3cdf5b.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - EPA_NEI_2017: - Title: "National Emissions Inventory" - Author: "EPA" - DataYear: 2017 - URL: "https://www.epa.gov/air-emissions-inventories/national-emissions-inventory-nei" - Primary: TRUE - EPA_TRI_2017: - Title: "Toxic Release Inventory" - Author: "EPA" - DataYear: 2017 - URL: "https://www.epa.gov/toxics-release-inventory-tri-program" - Primary: TRUE - GRDREL: - FullName: "Point source industrial releases to ground" - Abbreviation: "GRDREL" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/GRDREL_national_2017_v0.3.1_f3cdf5b.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - EPA_TRI_2017: - Title: "Toxic Release Inventory" - Author: "EPA" - DataYear: 2017 - URL: "https://www.epa.gov/toxics-release-inventory-tri-program" - Primary: TRUE - WATREL: - FullName: "Point source releases to water" - Abbreviation: "WATREL" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/TRI_DMR_national_2017_v0.3.1_f3cdf5b.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - EPA_TRI_2017: - Title: "Toxic Release Inventory" - Author: "EPA" - DataYear: 2017 - URL: "https://www.epa.gov/toxics-release-inventory-tri-program" - Primary: TRUE - EPA_DMR_2017: - Title: "Discharge Monitoring Report" - Author: "EPA" - DataYear: 2017 - URL: "https://echo.epa.gov/tools/data-downloads/icis-npdes-dmr-and-limit-data-set" - Primary: TRUE - GHG: - FullName: "Greenhouse Gases" - Abbreviation: "GHG" - StaticSource: TRUE - StaticFile: "useeior/NGHGIAM_GHG_TotalsBySector_wUUIDs.csv" - FileLocation: "DataCommons" - DataYears: [2016] - Locations: ["US"] - SectorListSource: "BEA" # or, NAICS - SectorListYear: 2012 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - USEPA_GHG_2018: - Title: "GHG Inventory" - Author: "USEPA" - DataYear: 2016 - URL: "https://www.epa.gov/ghgemissions/inventory-us-greenhouse-gas-emissions-and-sinks-1990-2016" - Primary: TRUE - LAND: - FullName: "Land use" - Abbreviation: "LAND" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Land_national_2012_v0.3.1_f3cdf5b.parquet" - FileLocation: "DataCommons" - DataYears: [2012] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - OriginalFlowSource: "FEDEFLv1.0.6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - DataSources: - BLM_PLS: - Title: "Public Land Statistics" - Author: "BLM" - DataYear: 2012 - URL: "https://www.blm.gov/about/data/public-land-statistics" - Primary: FALSE - EIA_CBECS_Land: - Title: "Commercial Building Energy Consumption Survey" - Author: "EIA" - DataYear: 2012 - URL: "https://www.eia.gov/consumption/commercial/data/2012/" - Primary: FALSE - EIA_MECS_Land: - Title: "Manufacturing Energy Consumption Survey" - Author: "EIA" - DataYear: 2014 - URL: "https://www.eia.gov/consumption/manufacturing/data/2014/" - Primary: FALSE - USDA_ERS_MLU: - Title: "Major Uses of Land in the United States" - Author: "USDA" - DataYear: 2012 - URL: "https://www.ers.usda.gov/data-products/major-land-uses/" - Primary: TRUE - MINE: - FullName: "Mineral extraction" - Abbreviation: "MINE" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_MINE_TotalsBySector_FEDEFL_wUUIDs.csv" - FileLocation: "DataCommons" - DataYears: [2014] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - USGS_MCS: - Title: "Mineral Commodity Summary" - Author: "USGS" - DataYear: 2014 - URL: "https://www.usgs.gov/centers/nmic/mineral-commodity-summaries" - Primary: TRUE - ENERGY: - FullName: "Energy extraction" - Abbreviation: "ENERGY" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_Energy_TotalsBySector_FEDEFL_wUUIDs.csv" - FileLocation: "DataCommons" - DataYears: [2014] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - EIA_MER: - Title: "Monthly Energy Review" - Author: "EIA" - DataYear: 2014 - URL: "http://www.eia.gov/totalenergy/data/monthly/" - Primary: TRUE - EIA_923: - Title: "Form EIA-923 Detailed" - Author: "EIA" - DataYear: 2014 - URL: "https://www.eia.gov/electricity/data/eia923/" - Primary: TRUE - NPAG: - FullName: "Nitrogen and Phosphorus Releases from Agriculture" - Abbreviation: "NPAG" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_NPAG_TotalsBySector_wUUIDs.csv" - FileLocation: "DataCommons" - DataYears: [2013, 2015] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - USDA_CUS_Corn_Potatoes: - Title: "Chemical Use Survey - Corn and Potatoes" - Author: "USDA" - DataYear: 2014 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" - Primary: FALSE - USDA_CUS_Cotton: - Title: "Chemical Use Survey - Cotton" - Author: "USDA" - DataYear: 2010 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" - Primary: FALSE - USDA_CUS_Fruit: - Title: "Chemical Use Survey - Fruit" - Author: "USDA" - DataYear: 2011 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" - Primary: FALSE - USDA_CUS_Peanuts_Rice: - Title: "Chemical Use Survey - Peanuts and Rice" - Author: "USDA" - DataYear: 2013 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" - Primary: FALSE - USDA_CUS_Soybeans_Wheat: - Title: "Chemical Use Survey - Soybeans and Wheat" - Author: "USDA" - DataYear: 2012 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" - Primary: FALSE - USDA_CUS_Vegetables: - Title: "Chemical Use Survey - Vegetables" - Author: "USDA" - DataYear: 2014 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" - Primary: FALSE - PEST: - FullName: "Pesticide releases" - Abbreviation: "PEST" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_PEST_TotalsBySector_wUUIDs.csv" - FileLocation: "DataCommons" - DataYears: [2004, 2005, 2010, 2011, 2012, 2013, 2014] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "FEDEFLv1.0.6" - DataSources: - USDA_CUS_Corn_Potatoes: - Title: "Chemical Use Survey - Corn and Potatoes" - Author: "USDA" - DataYear: 2014 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Corn_and_Potatoes/" - Primary: FALSE - USDA_CUS_Cotton: - Title: "Chemical Use Survey - Cotton" - Author: "USDA" - DataYear: 2010 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2010_Corn_Upland_Cotton_Fall_Potatoes/" - Primary: FALSE - USDA_CUS_Fruit: - Title: "Chemical Use Survey - Fruit" - Author: "USDA" - DataYear: 2011 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2011_Fruit_Chem_Usage/" - Primary: FALSE - USDA_CUS_Peanuts_Rice: - Title: "Chemical Use Survey - Peanuts and Rice" - Author: "USDA" - DataYear: 2013 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2013_Peanuts_and_Rice/" - Primary: FALSE - USDA_CUS_Soybeans_Wheat: - Title: "Chemical Use Survey - Soybeans and Wheat" - Author: "USDA" - DataYear: 2012 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2012_Soybeans_and_Wheat/" - Primary: FALSE - USDA_CUS_Vegetables: - Title: "Chemical Use Survey - Vegetables" - Author: "USDA" - DataYear: 2014 - URL: "https://www.nass.usda.gov/Data_and_Statistics/Pre-Defined_Queries/2014_Vegetables/" - Primary: FALSE - CNHW: - FullName: "Commercial non-hazardous waste excluding construction activities" - Abbreviation: "CNHW" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_CNHW_TotalsBySector.csv" - FileLocation: "DataCommons" - DataYears: [2015] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "Waste Characterization Study 2014" - DataSources: - CalRecycle_CWCS: - Title: "2014 Generator-Based Characterization of Commercial Sector" - Author: "CalRecycle" - DataYear: 2014 - URL: "https://www2.calrecycle.ca.gov/WasteCharacterization/PubExtracts/2014/GenSummary.pdf" - Primary: TRUE - CNHWC: - FullName: "Commercial non-hazardous waste from construction activities" - Abbreviation: "CNHWC" - StaticSource: TRUE - StaticFile: "useeior/USEEIOv1.1_CNHWC_TotalsBySector.csv" - FileLocation: "DataCommons" - DataYears: [2014] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2007 - SectorListLevel: "Detail" - OriginalFlowSource: "CDDPath" - DataSources: - USEPA_FF_2014: - Title: "Advancing Sustainable Materials Management: 2014 Fact Sheet" - Author: "USEPA" - DataYear: 2014 - URL: "https://www.epa.gov/sites/production/files/2016-11/documents/2014_smmfactsheet_508.pdf" - Primary: TRUE - CRHW: - FullName: "Commercial RCRA-defined hazardous waste" - Abbreviation: "CRHW" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/CRHW_national_2017_v0.3.1_f3cdf5b.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - OriginalFlowSource: "RCRAInfo" - DataSources: - USEPA_RCRAInfo_2017: - Title: "National Biennial RCRA Hazardous Waste Report" - Author: "USEPA" - DataYear: 2017 - URL: "https://rcrapublic.epa.gov/rcrainfoweb/action/modules/br/main/broverview" - Primary: TRUE - EMP: - FullName: "Employment" - Abbreviation: "EMP" - StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Employment_national_2017_v0.3.1_f3cdf5b.parquet" - FileLocation: "DataCommons" - DataYears: [2017] - Locations: ["US"] - SectorListSource: "NAICS" - SectorListYear: 2012 - SectorListLevel: "6" - ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script - ScriptFunctionParameters: null - OriginalFlowSource: "National Employment Matrix" - DataSources: - BLS_QCEW_2017: - Title: "Quarterly Census of Employment and Wages" - Author: "BLS" - DataYear: 2017 - URL: "https://www.bls.gov/cew/" - Primary: TRUE - VADD: - FullName: "Value Added" - Abbreviation: "VADD" - StaticSource: FALSE - StaticFile: null - FileLocation: None - DataYears: [2012] - Locations: ["US"] - SectorListSource: "BEA" - SectorListYear: 2012 - SectorListLevel: "Detail" - OriginalFlowSource: "Input-Output Tables" - ScriptFunctionCall: "getValueAddedTotalsbySector" #function to call for script - ScriptFunctionParameters: ["model"] #list of parameters - DataSources: - BEA_USE: - Title: "Detail Use Before Redefinitions" - Author: "BEA" - DataYear: 2012 - URL: "https://apps.bea.gov//industry/iTables%20Static%20Files/AllTablesIO.zip" - Primary: TRUE - -Indicators: - GreenhouseGases: - Name: "Greenhouse Gases" - Code: "GHG" - Group: "Impact Potential" - Unit: "kg CO2 eq" - SimpleUnit: "Kilograms Carbon Dioxide (CO2)" - SimpleName: "Greenhouse Gases" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Global warming"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - Acidification: - Name: "Acidification Potential" - Code: "ACID" - Group: "Impact Potential" - Unit: "kg SO2 eq" - SimpleUnit: "Kilograms Sulphur Dioxide (SO2)" - SimpleName: "Acid Rain" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Acidification"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - Eutrophication: - Name: "Eutrophication Potential" - Code: "EUTR" - Group: "Impact Potential" - Unit: "kg N eq" - SimpleUnit: "Kilograms Nitrogen (N)" - SimpleName: "Water Eutrophication" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Eutrophication"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - FreshwaterEcotox: - Name: "Freshwater Ecotoxicity Potential" - Code: "ETOX" - Group: "Impact Potential" - Unit: "CTUe" - SimpleUnit: "Comparative Toxic Unit for Ecosystem (CTUe)" - SimpleName: "Freshwater Ecotoxicity" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Freshwater ecotoxicity"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - HumanHealthCancer: - Name: "Human Health - Cancer" - Code: "HCAN" - Group: "Impact Potential" - Unit: "CTUh" - SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" - SimpleName: "Cancer Disease" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Human health - cancer"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - HumanHealthNonCancer: - Name: "Human Health - Noncancer" - Code: "HNCN" - Group: "Impact Potential" - Unit: "CTUh" - SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" - SimpleName: "Noncancer Disease" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Human health - non-cancer"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - HumanHealthToxicity: - Name: "Human Health Toxicity" - Code: "HTOX" - Group: "Impact Potential" - Unit: "CTUh" - SimpleUnit: "Comparative Toxic Unit for Humans (CTUh)" - SimpleName: "Toxic to Humans" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getCombinedImpactMethods" #function to call for script - ScriptFunctionParameters: - indicators: ["Human health - cancer", "Human health - non-cancer"] - DataSources: - USEEIO_LCIA_Aggregation: - Title: "Aggregation of HNCN and HCAN" - Author: NA - DataYear: NA - URL: NA - Primary: TRUE - HumanHealthRespEffects: - Name: "Human Health - Respiratory Effects" - Code: "HRSP" - Group: "Impact Potential" - Unit: "kg PM2.5 eq" - SimpleUnit: "Kilograms Particulate Matter" - SimpleName: "Respiratory Effects" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Human health - particulate matter"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - Ozone: - Name: "Ozone Depletion" - Code: "OZON" - Group: "Impact Potential" - Unit: "kg CFC-11 eq" - SimpleUnit: "Kilograms ChloroFluoroCarbon-11" - SimpleName: "Ozone Depletion" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Ozone depletion"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - Smog: - Name: "Smog Formation Potential" - Code: "SMOG" - Group: "Impact Potential" - Unit: "kg O3 eq" - SimpleUnit: "Kilograms Ozone (O3)" - SimpleName: "Smog Formation" - StaticSource: TRUE - StaticFile: "lciafmt/traci/TRACI_2.1_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["Smog formation"] - DataSources: - USEPA_TRACI_2.1: - Title: "TRACI 2.1" - Author: "USEPA" - DataYear: NA - URL: "https://www.epa.gov/chemical-research/tool-reduction-and-assessment-chemicals-and-other-environmental-impacts-traci" - Primary: TRUE - freshwater_withdrawal: - Name: "Freshwater withdrawals" - Code: "WATR" - Group: "Resource Use" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Water Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["freshwater_resources"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - land_use: - Name: "Land use" - Code: "LAND" - Group: "Resource Use" - Unit: "m2*yr" - SimpleUnit: "Square Meters per Year" - SimpleName: "Land Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["land_use"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - HAP: - Name: "Hazardous Air Pollutants" - Code: "HAPS" - Group: "Chemical Releases" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Hazardous Air Pollutants" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["HAP"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - Pesticides: - Name: "Pesticides" - Code: "PEST" - Group: "Chemical Releases" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Pesticides" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["USDA_CUS_pesticides"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - NonRenewableEnergy: - Name: "Nonrenewable Energy Use" - Code: "NNRG" - Group: "Resource Use" - Unit: "MJ" - SimpleUnit: "Megajoules (MJ)" - SimpleName: "Nonrenewable Energy Use" - StaticSource: TRUE - FileLocation: "DataCommons" - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["nonrenewable_energy"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - RenewableEnergy: - Name: "Renewable Energy Use" - Code: "RNRG" - Group: "Resource Use" - Unit: "MJ" - SimpleUnit: "Megajoules (MJ)" - SimpleName: "Renewable Energy Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["renewable_energy"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - Energy: - Name: "Energy Use" - Code: "ENRG" - Group: "Resource Use" - Unit: "MJ" - SimpleUnit: "Megajoules (MJ)" - SimpleName: "Energy Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["energy"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - MineralsMetals: - Name: "Minerals and Metals Use" - Code: "MNRL" - Group: "Resource Use" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Minerals and Metals Use" - StaticSource: TRUE - StaticFile: "lciafmt/fedefl/FEDEFL_Inventory_v1.0.0_5555779.parquet" - FileLocation: "DataCommons" - ScriptFunctionCall: "getImpactMethod" #function to call for script - ScriptFunctionParameters: - indicators: ["USGS_mineral_resources"] - DataSources: - LCIAformatter: - Title: "LCIAformatter FEDEFL Inventory Methods" - Author: "USEPA" - DataYear: 2020 - URL: "https://github.com/USEPA/LCIAformatter" - Primary: TRUE - ValueAdded: - Name: "Value Added" - Code: "VADD" - Group: "Economic & Social" - Unit: "$" - SimpleUnit: "US Dollars ($)" - SimpleName: "Value Added" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - ingwersen_useeiov11_2017: - Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.23719/1368541" - Primary: TRUE - Jobs: - Name: "Jobs Supported" - Code: "JOBS" - Group: "Economic & Social" - Unit: "jobs" - SimpleUnit: "Employees" - SimpleName: "Jobs Supported" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - ingwersen_useeiov11_2017: - Title: "USEEIOv1.1 - Elementary Flows and Life Cycle Impact Assessment (LCIA) Characterization Factors" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.23719/1368541" - Primary: TRUE - RCRAHazWaste: - Name: "Commercial RCRA Hazardous Waste" - Code: "CRHW" - Group: "Waste Generated" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Hazardous Waste" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - meyer_analyzing_2020: - Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.1016/j.resconrec.2020.104795" - Primary: TRUE - MunicipalWaste: - Name: "Commercial Municipal Solid Waste" - Code: "CMSW" - Group: "Waste Generated" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Municipal Solid Waste" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - meyer_analyzing_2020: - Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.1016/j.resconrec.2020.104795" - Primary: TRUE - ConstructionDebris: - Name: "Commercial Construction and Demolition Debris" - Code: "CCDD" - Group: "Waste Generated" - Unit: "kg" - SimpleUnit: "Kilograms" - SimpleName: "Construction Debris" - StaticSource: TRUE - StaticFile: "USEEIO_LCIA_Factors.csv" - FileLocation: "useeior" - DataSources: - meyer_analyzing_2020: - Title: "Analyzing economy-scale solid waste generation using the United States environmentally-extended input-output model" - Author: "USEPA" - DataYear: 2020 - URL: "http://doi.org/10.1016/j.resconrec.2020.104795" - Primary: TRUE - -DemandVectors: - Consumption: - Type: "Consumption" - Year: 2012 - System: "Complete" - Location: "US" - Production: - Type: "Production" - Year: 2012 - System: "Complete" - Location: "US" - HouseholdConsumption: - Type: "Consumption" - Year: 2012 - System: "Household" - Location: "US" - DomesticConsumption: - Type: "Consumption" - Year: 2012 - System: "Domestic" - Location: "US" - From 503dc05a2f95f5cbbafed041c2ae53906a676c85 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 23 Sep 2021 10:21:52 -0700 Subject: [PATCH 061/319] Change log message about duplicate flows from WARN to DEBUG --- R/SatelliteFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/SatelliteFunctions.R b/R/SatelliteFunctions.R index 6c36fabc..c534c7dc 100644 --- a/R/SatelliteFunctions.R +++ b/R/SatelliteFunctions.R @@ -223,7 +223,7 @@ checkDuplicateFlowsBySector <- function(sattable_ls) { rownames(duplicates) <- NULL if (nrow(duplicates) > 0){ - logging::logwarn("Duplicate flows exist across satellite tables and should be reviewed.") + logging::logdebug("Duplicate flows exist across satellite tables and should be reviewed.") logging::logdebug(duplicates) } else { logging::loginfo("No duplicate flows exist across satellite tables.") From a9f46f7c9714b3a16fbe65220907bb19ce94179a Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 23 Sep 2021 10:24:57 -0700 Subject: [PATCH 062/319] Remove unused parameter in heatmapSectorRanking function --- R/VisualizationFunctions.R | 5 ++--- man/heatmapSectorRanking.Rd | 11 +---------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/R/VisualizationFunctions.R b/R/VisualizationFunctions.R index 64cb087e..1dd81cff 100644 --- a/R/VisualizationFunctions.R +++ b/R/VisualizationFunctions.R @@ -220,10 +220,9 @@ heatmapSatelliteTableCoverage <- function(model, form="Commodity") { #' @param matrix A matrix from model result #' @param indicators A vector of indicators to plot #' @param sector_to_remove Code of one or more BEA sectors that will be removed from the plot. Can be "". -#' @param y_title The title of y axis, excluding unit. #' @param N_sector A numeric value indicating number of sectors to show in the ranking #' @export -heatmapSectorRanking <- function(model, matrix, indicators, sector_to_remove, y_title, N_sector) { +heatmapSectorRanking <- function(model, matrix, indicators, sector_to_remove, N_sector) { # Generate BEA sector color mapping mapping <- getBEASectorColorMapping(model) mapping$GroupName <- mapping$SectorName @@ -268,7 +267,7 @@ heatmapSectorRanking <- function(model, matrix, indicators, sector_to_remove, y_ scale_fill_gradient(low = "white", high = "black") + scale_x_discrete(expand = c(0, 0), position = "top") + scale_y_discrete(expand = c(0, 0), labels = function(x) stringr::str_wrap(x, 30)) + - labs(x = model$specs$Model, y = "", fill = y_title) + theme_bw() + + labs(x = paste(model$specs$Model, "Indicators"), y = "") + theme_bw() + theme(axis.text = element_text(color = "black", size = 15), axis.title.x = element_text(size = 20), axis.text.x = element_text(angle = 45, hjust = 0, vjust = 1), diff --git a/man/heatmapSectorRanking.Rd b/man/heatmapSectorRanking.Rd index 392f42d7..083b5b17 100644 --- a/man/heatmapSectorRanking.Rd +++ b/man/heatmapSectorRanking.Rd @@ -4,14 +4,7 @@ \alias{heatmapSectorRanking} \title{SMM tool like heatmap showing ranking of sectors} \usage{ -heatmapSectorRanking( - model, - matrix, - indicators, - sector_to_remove, - y_title, - N_sector -) +heatmapSectorRanking(model, matrix, indicators, sector_to_remove, N_sector) } \arguments{ \item{model}{A complete EEIO model} @@ -22,8 +15,6 @@ heatmapSectorRanking( \item{sector_to_remove}{Code of one or more BEA sectors that will be removed from the plot. Can be "".} -\item{y_title}{The title of y axis, excluding unit.} - \item{N_sector}{A numeric value indicating number of sectors to show in the ranking} } \description{ From 96656c11b6c5f138c564fb7c020e4b56709d8d09 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 27 Sep 2021 12:17:54 -0400 Subject: [PATCH 063/319] update function docstrings --- R/DisaggregateFunctions.R | 63 ++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 4956f4c3..ad6d8c13 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -347,6 +347,7 @@ disaggregateSatelliteTable <- function (disagg, sattable, sat_spec) { #' Disaggregate make table based on specs #' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param disagg Specifications for disaggregating the current Table #' @return A standardized make table with old sectors removed and new sectors added. disaggregateMakeTable <- function (model, disagg) { @@ -368,6 +369,7 @@ disaggregateMakeTable <- function (model, disagg) { #' Disaggregate Use table based on specs #' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param disagg Specifications for disaggregating the current Table #' @param domestic A logical value indicating whether to disaggregate domestic final demand. #' @return A standardized make table with old sectors removed and new sectors added. disaggregateUseTable <- function (model, disagg, domestic = FALSE) { @@ -396,6 +398,7 @@ disaggregateUseTable <- function (model, disagg, domestic = FALSE) { #' Disaggregate Final Demand based on specs #' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param disagg Specifications for disaggregating the current Table #' @param domestic A logical value indicating whether to disaggregate domestic final demand. #' @return A standardized final demand table with old sectors removed and new sectors with manual and default allocations added. disaggregateFinalDemand <- function(model, disagg, domestic = FALSE) { @@ -447,6 +450,7 @@ disaggregateFinalDemand <- function(model, disagg, domestic = FALSE) { #' Disaggregate Value Added based on specs #' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param disagg Specifications for disaggregating the current Table #' @return A standardized Vale Added table with old sectors removed and new sectors with manual and default allocations added. disaggregateVA <- function(model, disagg) { @@ -660,26 +664,21 @@ disaggregateCol <- function (originalColVector, disagg_specs, duplicate = FALSE, #' @param disagg Specifications for disaggregating the current Table #' @return crosswalk with new sectors added. disaggregateMasterCrosswalk <- function (model, disagg){ - - crosswalk <- model$crosswalk#temp variable for storing intermediate changes new_cw <- crosswalk#variable to return with complete changes to crosswalk#temp - - #model$specs$BaseIOlevel # contains string describing model level - - #deterime which rows and columns to modify + + #determine which rows and columns to modify cwColIndex <- match(paste0("BEA_", model$specs$BaseIOLevel), colnames(crosswalk)) #search for concatenation of "BEA" and model$specs$BaseIOlevel object in crosswalk column names OriginalCodeLength <- regexpr(pattern ='/',disagg$OriginalSectorCode) - 1 #used to determine the length of the sector codes. E.g., detail would be 6, while summary would generally be 3 though variable, and sector would be variable DisaggCodeLength <- regexpr(pattern ='/',disagg$DisaggregatedSectorCodes[[1]]) - 1 #used to determine length of disaggregated sector codes. #Update original sector codes with disaggregated sector codes in the relevant column (i.e. cwColIndex) where rows have an exact match for the disaggregated codes in the NAICS column - - disaggNAICSIndex <- which(new_cw[,cwColIndex] == substr(disagg$OriginalSectorCode,1,OriginalCodeLength))#Get the indeces of the BEA_Detail column that are mapped to the originalSector - disaggNAICSRows <- new_cw[disaggNAICSIndex,]#create a dataframe with only the relevant rows - codeMatches <- match(disagg$NAICSSectorCW$NAICS_2012_Code,disaggNAICSRows$NAICS)#find matches between the crosswalk included in the disagg specs and NAICS column of the master crosswalk + disaggNAICSIndex <- which(new_cw[,cwColIndex] == substr(disagg$OriginalSectorCode,1,OriginalCodeLength)) #Get the indeces of the BEA_Detail column that are mapped to the originalSector + disaggNAICSRows <- new_cw[disaggNAICSIndex,] #create a dataframe with only the relevant rows + codeMatches <- match(disagg$NAICSSectorCW$NAICS_2012_Code,disaggNAICSRows$NAICS) #find matches between the crosswalk included in the disagg specs and NAICS column of the master crosswalk disaggNAICSRows[codeMatches,cwColIndex] <- substr(disagg$NAICSSectorCW$USEEIO_Code,1,DisaggCodeLength)#in the new crosswalk, replace codes in the new column (i.e. USEEIOv2.0) with the disaggregated codes for the rows where there is a match in between the NAICS crosswalk and the disaggregated Crosswalk - new_cw[disaggNAICSIndex,] <- disaggNAICSRows#replace the rows that have a match for 6-digit naics for the disaggregated sectors in the crosswalk - crosswalk <- new_cw #update crosswalk with the new sectors as a static index refernce for the rows still containing the originalSectorCode in the last column. + new_cw[disaggNAICSIndex,] <- disaggNAICSRows #replace the rows that have a match for 6-digit naics for the disaggregated sectors in the crosswalk + crosswalk <- new_cw #update crosswalk with the new sectors as a static index reference for the rows still containing the originalSectorCode in the last column. #Update remaining rows where the original sector is present in cwColIndex but there is no exact match in the NAICS column for the disaggregated sector codes (e.g. 2-5 level NAICS codes) #get the indeces of the remaining rows that have 56200 in the new column @@ -690,17 +689,16 @@ disaggregateMasterCrosswalk <- function (model, disagg){ disaggNAICSIndex <- which(new_cw[,cwColIndex] == substr(disagg$OriginalSectorCode,1,OriginalCodeLength)) crosswalkRow <- new_cw[disaggNAICSIndex[1],] #extract current row where code in last column needs to be updated - rowComparisons <- grepl(crosswalkRow$NAICS[1], disagg$NAICSSectorCW$NAICS_2012_Code)#compare the value in the first column (NAICS) to the NAICS values in the disaggCrosswalk. Result is a string with TRUE where first column is a substring of values in disaggCrosswalk - - rowReplacements <- disagg$NAICSSectorCW$NAICS_2012_Code[rowComparisons]#Get the NAICS sector codes in the disagg crosswalk that are a match for the NAICS substring in the master crosswalk - rowReplacements <- substr(disagg$NAICSSectorCW$USEEIO_Code[rowComparisons],1,DisaggCodeLength)#Get the disaggregated sector codes that are mapped to the matches of the NAICS substring - rowReplacements <- unique(rowReplacements)#reduce the list to the unique number of disaggregated sectors that the row comparisons map to - - crosswalkRow <- crosswalkRow[rep(seq_len(nrow(crosswalkRow)), length(rowReplacements)),, drop=FALSE]#replicate the crosswalk row as many times as there were matches in the substring search - crosswalkRow[,cwColIndex] <- rowReplacements#replace the values in the last column (e.g. originalSectorCode) with the newSectorCodes that matched the substring search - new_cw <- rbind(new_cw[1:disaggNAICSIndex[1]-1,],crosswalkRow, new_cw[-(1:disaggNAICSIndex[1]),])#include the expanded rows in the crosswalk + rowComparisons <- grepl(crosswalkRow$NAICS[1], disagg$NAICSSectorCW$NAICS_2012_Code) #compare the value in the first column (NAICS) to the NAICS values in the disaggCrosswalk. Result is a string with TRUE where first column is a substring of values in disaggCrosswalk + rowReplacements <- disagg$NAICSSectorCW$NAICS_2012_Code[rowComparisons] #Get the NAICS sector codes in the disagg crosswalk that are a match for the NAICS substring in the master crosswalk + rowReplacements <- substr(disagg$NAICSSectorCW$USEEIO_Code[rowComparisons],1,DisaggCodeLength) #Get the disaggregated sector codes that are mapped to the matches of the NAICS substring + rowReplacements <- unique(rowReplacements) #reduce the list to the unique number of disaggregated sectors that the row comparisons map to + crosswalkRow <- crosswalkRow[rep(seq_len(nrow(crosswalkRow)), length(rowReplacements)),, drop=FALSE] #replicate the crosswalk row as many times as there were matches in the substring search + crosswalkRow[,cwColIndex] <- rowReplacements #replace the values in the last column (e.g. originalSectorCode) with the newSectorCodes that matched the substring search + new_cw <- rbind(new_cw[1:disaggNAICSIndex[1]-1,],crosswalkRow, new_cw[-(1:disaggNAICSIndex[1]),]) #include the expanded rows in the crosswalk + } #renaming rows of crosswalk @@ -861,7 +859,6 @@ applyAllocation <- function (disagg, allocPercentages, vectorToDisagg, originalT numNewSectors <- length(newSectorCodes) #Local variable for original sector code originalSectorCode <- disagg$OriginalSectorCode - #These different if blocks are needed because of the different dimensions of the manual and default allocation vectors needed for disaggregating #the Make and Use rows and columns. Each block initializes the manual and default allocation values for the relevant rows or columns. @@ -1021,7 +1018,6 @@ applyAllocation <- function (disagg, allocPercentages, vectorToDisagg, originalT #todo error handling } - if(nrow(allocPercentages)>0) { #Check that there are manual allocations to perform #Loop to assign the manual allocations @@ -1095,7 +1091,7 @@ applyAllocation <- function (disagg, allocPercentages, vectorToDisagg, originalT } } else { - manualIndeces <- NA;#temporary values + manualIndeces <- NA #temporary values } return(defaultAllocVector) @@ -1103,6 +1099,12 @@ applyAllocation <- function (disagg, allocPercentages, vectorToDisagg, originalT } +#' Obtain a vector of allocation percentages from the specified source file based on disaggregations specifications. +#' @param FileDF dataframe of Make or Use disaggregation data +#' @param disagg Specifications for disaggregating the current Table +#' @param numNewSectors Int. Number of new sectors in the disaggregation +#' @param output String indicating whether allocation values should reference "Commodity" or "Industry" outputs by default +#' @return vector of allocation percentages getDefaultAllocationPercentages <- function(FileDF, disagg, numNewSectors, output) { #Set up for default allocations #Get default allocation percentages based on commodity or industry output @@ -1125,6 +1127,10 @@ getDefaultAllocationPercentages <- function(FileDF, disagg, numNewSectors, outpu return(defaultPercentages) } + +#' Creates an empty dataframe matrix of disaggregated sectors. +#' @param newSectorCodes vector of named disaggregated sectors +#' @return square dataframe matrix with new sectors as row and column names createBlankIntersection <- function (newSectorCodes) { #Create new intersection to store allocation values (all other values initiated to NA) intersection <- data.frame(matrix(ncol = length(newSectorCodes), nrow = length(newSectorCodes))) @@ -1137,6 +1143,11 @@ createBlankIntersection <- function (newSectorCodes) { } +#' Creates a square dataframe matrix with values assigned based on default percentages +#' @param originalIntersection int value of the original intersection to be disaggregated +#' @param defaultPercentages vector of allocation percentages +#' @param newSectorCode vector of named disaggregated sectors +#' @return square dataframe matrix with new sectors as row and column names with default values calculateDefaultIntersection <- function(originalIntersection, defaultPercentages, newSectorCodes) { numNewSectors <- length(newSectorCodes) #Create a dataframe to store values for the intersection. This dataframe is of dimensions [numNewSectors, 1] @@ -1234,19 +1245,15 @@ balanceDisagg <- function(model, disagg){ } #break balancedDisaggFullUse back into model components - domesticTables <- calculateBalancedDomesticTables(model, disagg, balancedDisaggFullUse) model$DomesticUseTransactions <- domesticTables$DomesticUseTransactions model$DomesticFinalDemand <- domesticTables$DomesticFinalDemand - model$UseTransactions <- balancedDisaggFullUse[1:nrow(model$UseTransactions), 1:ncol(model$UseTransactions)] model$FinalDemand <- balancedDisaggFullUse[1:nrow(model$UseTransactions),-(1:ncol(model$UseTransactions))] model$UseValueAdded <- balancedDisaggFullUse[-(1:nrow(model$UseTransactions)),1:ncol(model$UseTransactions)] - - return(model) } From cb73aaf0fd6b40055b93ac9e11e3ebef2c18bdde Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 27 Sep 2021 12:21:04 -0400 Subject: [PATCH 064/319] update documentation files and add new files for aggregate functions --- man/aggSatelliteTable.Rd | 21 ++++++++++++++++ man/aggregateMakeTable.Rd | 17 +++++++++++++ man/aggregateMasterCrosswalk.Rd | 17 +++++++++++++ man/aggregateModel.Rd | 17 +++++++++++++ man/aggregateMultiYearCPI.Rd | 23 +++++++++++++++++ man/aggregateMultiYearOutput.Rd | 21 ++++++++++++++++ man/aggregateSector.Rd | 25 +++++++++++++++++++ man/aggregateUseTable.Rd | 19 ++++++++++++++ man/aggregateVA.Rd | 17 +++++++++++++ ...isaggAllocations.Rd => applyAllocation.Rd} | 16 +++--------- man/assembleTable.Rd | 7 ++---- man/calculateDefaultIntersection.Rd | 25 +++++++++++++++++++ man/calculateIndustryCommodityOutput.Rd | 17 +++++++++++++ man/createBlankIntersection.Rd | 17 +++++++++++++ man/disaggregateFinalDemand.Rd | 4 ++- man/disaggregateMakeTable.Rd | 4 ++- man/disaggregateMultiYearOutput.Rd | 4 +-- man/disaggregateOutputs.Rd | 17 ------------- man/disaggregateSatelliteSubsetByRatio.Rd | 21 ++++++++++++++++ man/disaggregateSatelliteTable.Rd | 6 ++--- man/disaggregateSetup.Rd | 17 +++++++++++++ man/disaggregateUseTable.Rd | 4 ++- man/disaggregateVA.Rd | 4 ++- man/getDefaultAllocationPercentages.Rd | 23 +++++++++++++++++ man/getDisaggCommodityPercentages.Rd | 2 +- man/getDisaggIndustryPercentages.Rd | 2 +- man/getDisaggregationSpecs.Rd | 17 +++++++++++++ man/getIndex.Rd | 19 ++++++++++++++ man/removeRowsFromList.Rd | 19 ++++++++++++++ man/specifiedUseDisagg.Rd | 6 ++--- ...{uniformMakeDisagg.Rd => uniformDisagg.Rd} | 12 +++++---- man/uniformUseDisagg.Rd | 21 ---------------- 32 files changed, 387 insertions(+), 74 deletions(-) create mode 100644 man/aggSatelliteTable.Rd create mode 100644 man/aggregateMakeTable.Rd create mode 100644 man/aggregateMasterCrosswalk.Rd create mode 100644 man/aggregateModel.Rd create mode 100644 man/aggregateMultiYearCPI.Rd create mode 100644 man/aggregateMultiYearOutput.Rd create mode 100644 man/aggregateSector.Rd create mode 100644 man/aggregateUseTable.Rd create mode 100644 man/aggregateVA.Rd rename man/{disaggAllocations.Rd => applyAllocation.Rd} (74%) create mode 100644 man/calculateDefaultIntersection.Rd create mode 100644 man/calculateIndustryCommodityOutput.Rd create mode 100644 man/createBlankIntersection.Rd delete mode 100644 man/disaggregateOutputs.Rd create mode 100644 man/disaggregateSatelliteSubsetByRatio.Rd create mode 100644 man/disaggregateSetup.Rd create mode 100644 man/getDefaultAllocationPercentages.Rd create mode 100644 man/getDisaggregationSpecs.Rd create mode 100644 man/getIndex.Rd create mode 100644 man/removeRowsFromList.Rd rename man/{uniformMakeDisagg.Rd => uniformDisagg.Rd} (58%) delete mode 100644 man/uniformUseDisagg.Rd diff --git a/man/aggSatelliteTable.Rd b/man/aggSatelliteTable.Rd new file mode 100644 index 00000000..97f82809 --- /dev/null +++ b/man/aggSatelliteTable.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AggregationFunctions.R +\name{aggSatelliteTable} +\alias{aggSatelliteTable} +\title{Aggregate satellite tables from static file based on specs} +\usage{ +aggSatelliteTable(model, sattable, sat) +} +\arguments{ +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} + +\item{sattable}{A standardized satellite table with resource and emission names from original sources.} + +\item{sat}{The abbreviation for the satellite table.} +} +\value{ +A standardized satellite table with aggregated sectors added. +} +\description{ +Aggregate satellite tables from static file based on specs +} diff --git a/man/aggregateMakeTable.Rd b/man/aggregateMakeTable.Rd new file mode 100644 index 00000000..9fc307a9 --- /dev/null +++ b/man/aggregateMakeTable.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AggregationFunctions.R +\name{aggregateMakeTable} +\alias{aggregateMakeTable} +\title{Aggregate the MakeTable based on specified source file} +\usage{ +aggregateMakeTable(model) +} +\arguments{ +\item{model}{Model file loaded with IO tables} +} +\value{ +An aggregated MakeTable. +} +\description{ +Aggregate the MakeTable based on specified source file +} diff --git a/man/aggregateMasterCrosswalk.Rd b/man/aggregateMasterCrosswalk.Rd new file mode 100644 index 00000000..98153ee4 --- /dev/null +++ b/man/aggregateMasterCrosswalk.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AggregationFunctions.R +\name{aggregateMasterCrosswalk} +\alias{aggregateMasterCrosswalk} +\title{Disaggregate the MasterCrosswalk to include the new sectors for disaggregation} +\usage{ +aggregateMasterCrosswalk(model) +} +\arguments{ +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} +} +\value{ +crosswalk with aggregated sectors removed +} +\description{ +Disaggregate the MasterCrosswalk to include the new sectors for disaggregation +} diff --git a/man/aggregateModel.Rd b/man/aggregateModel.Rd new file mode 100644 index 00000000..461f92bb --- /dev/null +++ b/man/aggregateModel.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AggregationFunctions.R +\name{aggregateModel} +\alias{aggregateModel} +\title{Aggregate a model based on specified source file} +\usage{ +aggregateModel(model) +} +\arguments{ +\item{model}{Model file loaded with IO tables} +} +\value{ +An aggregated model. +} +\description{ +Aggregate a model based on specified source file +} diff --git a/man/aggregateMultiYearCPI.Rd b/man/aggregateMultiYearCPI.Rd new file mode 100644 index 00000000..ab9e5d02 --- /dev/null +++ b/man/aggregateMultiYearCPI.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AggregationFunctions.R +\name{aggregateMultiYearCPI} +\alias{aggregateMultiYearCPI} +\title{Aggregate MultiYear CPI model objects} +\usage{ +aggregateMultiYearCPI(model, mainIndex, indecesToAggregate, type) +} +\arguments{ +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} + +\item{indecesToAggregate}{List of indeces to aggregate.} + +\item{type}{String to designate either commodity or industry} + +\item{mainIdex}{Index to aggregate the others to.} +} +\value{ +newCPI A dataframe with the aggregatded CPI values by year. +} +\description{ +Aggregate MultiYear CPI model objects +} diff --git a/man/aggregateMultiYearOutput.Rd b/man/aggregateMultiYearOutput.Rd new file mode 100644 index 00000000..81c2b041 --- /dev/null +++ b/man/aggregateMultiYearOutput.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AggregationFunctions.R +\name{aggregateMultiYearOutput} +\alias{aggregateMultiYearOutput} +\title{Aggregate MultiYear Output model objects} +\usage{ +aggregateMultiYearOutput(originalOutput, mainIndex, indecesToAggregate) +} +\arguments{ +\item{originalOutput}{MultiYear Output dataframe} + +\item{indecesToAggregate}{List of indeces to aggregate.} + +\item{mainIdex}{Index to aggregate the others to.} +} +\value{ +model A dataframe with the disaggregated GDPGrossOutputIO by year. +} +\description{ +Aggregate MultiYear Output model objects +} diff --git a/man/aggregateSector.Rd b/man/aggregateSector.Rd new file mode 100644 index 00000000..70e5edc0 --- /dev/null +++ b/man/aggregateSector.Rd @@ -0,0 +1,25 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AggregationFunctions.R +\name{aggregateSector} +\alias{aggregateSector} +\title{Aggregate a sector in a table} +\usage{ +aggregateSector(model, mainSector, sectorToRemove, tableType, domestic = FALSE) +} +\arguments{ +\item{model}{Model file loaded with IO tables} + +\item{mainSector}{Sector to aggregate to (string)} + +\item{sectorToRemove}{Sector to be aggregated into mainSector, then removed from table (string)} + +\item{tableType}{String to designate either Make or Use table} + +\item{domestic}{Boolean to indicate whether to aggregate the UseTransactions or DomesticUseTransactions table} +} +\value{ +aggregated table +} +\description{ +Aggregate a sector in a table +} diff --git a/man/aggregateUseTable.Rd b/man/aggregateUseTable.Rd new file mode 100644 index 00000000..0d384743 --- /dev/null +++ b/man/aggregateUseTable.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AggregationFunctions.R +\name{aggregateUseTable} +\alias{aggregateUseTable} +\title{Aggregate the UseTable based on specified source file} +\usage{ +aggregateUseTable(model, domestic = FALSE) +} +\arguments{ +\item{model}{Model file loaded with IO tables} + +\item{domestic}{Boolean to indicate whether to aggregate the UseTransactions or DomesticUseTransactions table} +} +\value{ +An aggregated UseTransactions or DomesticUseTransactions Table. +} +\description{ +Aggregate the UseTable based on specified source file +} diff --git a/man/aggregateVA.Rd b/man/aggregateVA.Rd new file mode 100644 index 00000000..5515c830 --- /dev/null +++ b/man/aggregateVA.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AggregationFunctions.R +\name{aggregateVA} +\alias{aggregateVA} +\title{Aggregate the MakeTable based on specified source file} +\usage{ +aggregateVA(model) +} +\arguments{ +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} +} +\value{ +An aggregated MakeTable. +} +\description{ +Aggregate the MakeTable based on specified source file +} diff --git a/man/disaggAllocations.Rd b/man/applyAllocation.Rd similarity index 74% rename from man/disaggAllocations.Rd rename to man/applyAllocation.Rd index 8edca252..2e4d91bc 100644 --- a/man/disaggAllocations.Rd +++ b/man/applyAllocation.Rd @@ -1,27 +1,19 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/DisaggregateFunctions.R -\name{disaggAllocations} -\alias{disaggAllocations} +\name{applyAllocation} +\alias{applyAllocation} \title{Allocate values specified by the .yml disaggregation specs to the correct places in a disaggregated row/column of the Use/Make tables.} \usage{ -disaggAllocations( - model, - disagg, - allocPercentages, - vectorToDisagg, - domestic = FALSE -) +applyAllocation(disagg, allocPercentages, vectorToDisagg, originalTable) } \arguments{ -\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} - \item{disagg}{Specifications for disaggregating the current Table} \item{allocPercentages}{Dataframe. A subset of the dataframe that contains the percentages to allocate to specific industry and commodity combinations in the disaggregated vector. Parameter use coordinated with @param vectorToDisagg} \item{vectorToDisagg}{String. A parameter to indicate what table and what part of that table is being disaggregated (e.g. "MakeCol" or "Intersection")} -\item{domestic}{Boolean. Flag to indicate where to use the DomesticUse or UseTransactions table} +\item{originalTable}{Dataframe. The original dataframe upon which allocation is performed (e.g., Make or Use)} } \value{ A dataframe with the values specified in the disaggSpecs assigned to the correct Make or Use table indeces. diff --git a/man/assembleTable.Rd b/man/assembleTable.Rd index 119cb2de..e28e1460 100644 --- a/man/assembleTable.Rd +++ b/man/assembleTable.Rd @@ -6,8 +6,7 @@ \usage{ assembleTable( originalTable, - originalRowIndex, - originalColIndex, + disagg, disaggCols, disaggRows, disaggIntersection @@ -16,9 +15,7 @@ assembleTable( \arguments{ \item{originalTable}{Dataframe. The original table before disaggregation} -\item{originalRowIndex}{Integer. The row index, in the original table, of the sector to be disaggregated} - -\item{originalColIndex}{Integer. The column index, in the original table, of the sector to be disaggregated} +\item{disagg}{Specifications for disaggregating the current Table} \item{disaggCols}{Dataframe. Previously disaggregated columns of the table.} diff --git a/man/calculateDefaultIntersection.Rd b/man/calculateDefaultIntersection.Rd new file mode 100644 index 00000000..9b48b240 --- /dev/null +++ b/man/calculateDefaultIntersection.Rd @@ -0,0 +1,25 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/DisaggregateFunctions.R +\name{calculateDefaultIntersection} +\alias{calculateDefaultIntersection} +\title{Creates a square dataframe matrix with values assigned based on default percentages} +\usage{ +calculateDefaultIntersection( + originalIntersection, + defaultPercentages, + newSectorCodes +) +} +\arguments{ +\item{originalIntersection}{int value of the original intersection to be disaggregated} + +\item{defaultPercentages}{vector of allocation percentages} + +\item{newSectorCode}{vector of named disaggregated sectors} +} +\value{ +square dataframe matrix with new sectors as row and column names with default values +} +\description{ +Creates a square dataframe matrix with values assigned based on default percentages +} diff --git a/man/calculateIndustryCommodityOutput.Rd b/man/calculateIndustryCommodityOutput.Rd new file mode 100644 index 00000000..c5b64711 --- /dev/null +++ b/man/calculateIndustryCommodityOutput.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/LoadIOTables.R +\name{calculateIndustryCommodityOutput} +\alias{calculateIndustryCommodityOutput} +\title{Calculate industry and commodity output vectors from model components.} +\usage{ +calculateIndustryCommodityOutput(model) +} +\arguments{ +\item{model}{An EEIO model with IO tables} +} +\value{ +An EEIO model with industry and commodity output added +} +\description{ +Calculate industry and commodity output vectors from model components. +} diff --git a/man/createBlankIntersection.Rd b/man/createBlankIntersection.Rd new file mode 100644 index 00000000..42260701 --- /dev/null +++ b/man/createBlankIntersection.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/DisaggregateFunctions.R +\name{createBlankIntersection} +\alias{createBlankIntersection} +\title{Creates an empty dataframe matrix of disaggregated sectors.} +\usage{ +createBlankIntersection(newSectorCodes) +} +\arguments{ +\item{newSectorCodes}{vector of named disaggregated sectors} +} +\value{ +square dataframe matrix with new sectors as row and column names +} +\description{ +Creates an empty dataframe matrix of disaggregated sectors. +} diff --git a/man/disaggregateFinalDemand.Rd b/man/disaggregateFinalDemand.Rd index 1e7ae962..86e720d6 100644 --- a/man/disaggregateFinalDemand.Rd +++ b/man/disaggregateFinalDemand.Rd @@ -4,11 +4,13 @@ \alias{disaggregateFinalDemand} \title{Disaggregate Final Demand based on specs} \usage{ -disaggregateFinalDemand(model, domestic = FALSE) +disaggregateFinalDemand(model, disagg, domestic = FALSE) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} +\item{disagg}{Specifications for disaggregating the current Table} + \item{domestic}{A logical value indicating whether to disaggregate domestic final demand.} } \value{ diff --git a/man/disaggregateMakeTable.Rd b/man/disaggregateMakeTable.Rd index 57e408b8..a87519aa 100644 --- a/man/disaggregateMakeTable.Rd +++ b/man/disaggregateMakeTable.Rd @@ -4,10 +4,12 @@ \alias{disaggregateMakeTable} \title{Disaggregate make table based on specs} \usage{ -disaggregateMakeTable(model) +disaggregateMakeTable(model, disagg) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} + +\item{disagg}{Specifications for disaggregating the current Table} } \value{ A standardized make table with old sectors removed and new sectors added. diff --git a/man/disaggregateMultiYearOutput.Rd b/man/disaggregateMultiYearOutput.Rd index 4b052a86..3d12c739 100644 --- a/man/disaggregateMultiYearOutput.Rd +++ b/man/disaggregateMultiYearOutput.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/DisaggregateFunctions.R \name{disaggregateMultiYearOutput} \alias{disaggregateMultiYearOutput} -\title{Disaggregate Commodity Output model object} +\title{Disaggregate MultiYear Output model objects} \usage{ disaggregateMultiYearOutput(model, disagg, output_type = "Commodity") } @@ -17,5 +17,5 @@ disaggregateMultiYearOutput(model, disagg, output_type = "Commodity") model A dataframe with the disaggregated GDPGrossOutputIO by year } \description{ -Disaggregate Commodity Output model object +Disaggregate MultiYear Output model objects } diff --git a/man/disaggregateOutputs.Rd b/man/disaggregateOutputs.Rd deleted file mode 100644 index 9a2eaa6d..00000000 --- a/man/disaggregateOutputs.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/DisaggregateFunctions.R -\name{disaggregateOutputs} -\alias{disaggregateOutputs} -\title{Disaggregate Commodity and Industry Output model objects} -\usage{ -disaggregateOutputs(model) -} -\arguments{ -\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} -} -\value{ -model A complete EEIO model: a list with USEEIO model components and attributes. -} -\description{ -Disaggregate Commodity and Industry Output model objects -} diff --git a/man/disaggregateSatelliteSubsetByRatio.Rd b/man/disaggregateSatelliteSubsetByRatio.Rd new file mode 100644 index 00000000..40f822de --- /dev/null +++ b/man/disaggregateSatelliteSubsetByRatio.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/DisaggregateFunctions.R +\name{disaggregateSatelliteSubsetByRatio} +\alias{disaggregateSatelliteSubsetByRatio} +\title{Disaggregate a portion of a satellite table based on an allocation_vector} +\usage{ +disaggregateSatelliteSubsetByRatio(sattable, disagg, allocation_vector = NULL) +} +\arguments{ +\item{sattable}{A standardized satellite table to be disaggregated.} + +\item{disagg}{Specifications for disaggregating the current Table} + +\item{allocation_vector}{named vector of allocation ratios} +} +\value{ +A satellite table with new sectors added. +} +\description{ +Disaggregate a portion of a satellite table based on an allocation_vector +} diff --git a/man/disaggregateSatelliteTable.Rd b/man/disaggregateSatelliteTable.Rd index c9a0d1a5..284d5c48 100644 --- a/man/disaggregateSatelliteTable.Rd +++ b/man/disaggregateSatelliteTable.Rd @@ -4,14 +4,14 @@ \alias{disaggregateSatelliteTable} \title{Disaggregate satellite tables from static file based on specs} \usage{ -disaggregateSatelliteTable(model, sattable, sat) +disaggregateSatelliteTable(disagg, sattable, sat_spec) } \arguments{ -\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} +\item{disagg}{Specifications for disaggregating the current Table} \item{sattable}{A standardized satellite table with resource and emission names from original sources.} -\item{sat}{The abbreviation for the satellite table.} +\item{sat_spec, }{a standard specification for a single satellite table.} } \value{ A standardized satellite table with old sectors removed and new sectors added. diff --git a/man/disaggregateSetup.Rd b/man/disaggregateSetup.Rd new file mode 100644 index 00000000..e1ea4f71 --- /dev/null +++ b/man/disaggregateSetup.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/DisaggregateFunctions.R +\name{disaggregateSetup} +\alias{disaggregateSetup} +\title{Setup the configuration specs based on the input files} +\usage{ +disaggregateSetup(model) +} +\arguments{ +\item{model}{Model file loaded with IO tables} +} +\value{ +A model object with the correct disaggregation specs. +} +\description{ +Setup the configuration specs based on the input files +} diff --git a/man/disaggregateUseTable.Rd b/man/disaggregateUseTable.Rd index 0a3f14b7..83211991 100644 --- a/man/disaggregateUseTable.Rd +++ b/man/disaggregateUseTable.Rd @@ -4,11 +4,13 @@ \alias{disaggregateUseTable} \title{Disaggregate Use table based on specs} \usage{ -disaggregateUseTable(model, domestic = FALSE) +disaggregateUseTable(model, disagg, domestic = FALSE) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} +\item{disagg}{Specifications for disaggregating the current Table} + \item{domestic}{A logical value indicating whether to disaggregate domestic final demand.} } \value{ diff --git a/man/disaggregateVA.Rd b/man/disaggregateVA.Rd index a410fecf..29772b7e 100644 --- a/man/disaggregateVA.Rd +++ b/man/disaggregateVA.Rd @@ -4,10 +4,12 @@ \alias{disaggregateVA} \title{Disaggregate Value Added based on specs} \usage{ -disaggregateVA(model) +disaggregateVA(model, disagg) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} + +\item{disagg}{Specifications for disaggregating the current Table} } \value{ A standardized Vale Added table with old sectors removed and new sectors with manual and default allocations added. diff --git a/man/getDefaultAllocationPercentages.Rd b/man/getDefaultAllocationPercentages.Rd new file mode 100644 index 00000000..ae4a87d2 --- /dev/null +++ b/man/getDefaultAllocationPercentages.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/DisaggregateFunctions.R +\name{getDefaultAllocationPercentages} +\alias{getDefaultAllocationPercentages} +\title{Obtain a vector of allocation percentages from the specified source file based on disaggregations specifications.} +\usage{ +getDefaultAllocationPercentages(FileDF, disagg, numNewSectors, output) +} +\arguments{ +\item{FileDF}{dataframe of Make or Use disaggregation data} + +\item{disagg}{Specifications for disaggregating the current Table} + +\item{numNewSectors}{Int. Number of new sectors in the disaggregation} + +\item{output}{String indicating whether allocation values should reference "Commodity" or "Industry" outputs by default} +} +\value{ +vector of allocation percentages +} +\description{ +Obtain a vector of allocation percentages from the specified source file based on disaggregations specifications. +} diff --git a/man/getDisaggCommodityPercentages.Rd b/man/getDisaggCommodityPercentages.Rd index 1d58ff6e..a1b7b7ea 100644 --- a/man/getDisaggCommodityPercentages.Rd +++ b/man/getDisaggCommodityPercentages.Rd @@ -10,7 +10,7 @@ getDisaggCommodityPercentages(disagg) \item{disagg}{Specifications for disaggregating the current Model} } \value{ -A dataframe with the default disaggregation percentges for the Commodities of the current model +A dataframe with the default disaggregation percentages for the Commodities of the current model } \description{ Obtain default disaggregation percentages for commodities from the disaggregation input files. diff --git a/man/getDisaggIndustryPercentages.Rd b/man/getDisaggIndustryPercentages.Rd index a88d0e47..32a44bfe 100644 --- a/man/getDisaggIndustryPercentages.Rd +++ b/man/getDisaggIndustryPercentages.Rd @@ -10,7 +10,7 @@ getDisaggIndustryPercentages(disagg) \item{disagg}{Specifications for disaggregating the current Model} } \value{ -A dataframe with the default disaggregation percentges for the Industries of the current model +A dataframe with the default disaggregation percentages for the Industries of the current model } \description{ Obtain default disaggregation percentages for industries from the disaggregation input files. diff --git a/man/getDisaggregationSpecs.Rd b/man/getDisaggregationSpecs.Rd new file mode 100644 index 00000000..194bfa0e --- /dev/null +++ b/man/getDisaggregationSpecs.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/DisaggregateFunctions.R +\name{getDisaggregationSpecs} +\alias{getDisaggregationSpecs} +\title{Obtain aggregation and disaggregation specs from input files} +\usage{ +getDisaggregationSpecs(model) +} +\arguments{ +\item{model}{Model file loaded with IO tables} +} +\value{ +A model with the specified aggregation and disaggregation specs. +} +\description{ +Obtain aggregation and disaggregation specs from input files +} diff --git a/man/getIndex.Rd b/man/getIndex.Rd new file mode 100644 index 00000000..0c523cf5 --- /dev/null +++ b/man/getIndex.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AggregationFunctions.R +\name{getIndex} +\alias{getIndex} +\title{Return the index where a sector occurrs in a sectorList} +\usage{ +getIndex(sectorList, sector) +} +\arguments{ +\item{sectorList}{Dataframe (of strings) to match the index of the sector param} + +\item{sector}{String of the sector to look the index for} +} +\value{ +Index of sector in sectorList +} +\description{ +Return the index where a sector occurrs in a sectorList +} diff --git a/man/removeRowsFromList.Rd b/man/removeRowsFromList.Rd new file mode 100644 index 00000000..fbc07813 --- /dev/null +++ b/man/removeRowsFromList.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AggregationFunctions.R +\name{removeRowsFromList} +\alias{removeRowsFromList} +\title{Remove specific rows from the specified list object in the model} +\usage{ +removeRowsFromList(sectorList, indecesToAggregate) +} +\arguments{ +\item{sectorList}{Model object to be aggregated} + +\item{indencesToAggregate}{List of indeces of sectors to remove from list (i.e. aggregated sectors)} +} +\value{ +An aggregated sectorList +} +\description{ +Remove specific rows from the specified list object in the model +} diff --git a/man/specifiedUseDisagg.Rd b/man/specifiedUseDisagg.Rd index c6d25af8..76c2606d 100644 --- a/man/specifiedUseDisagg.Rd +++ b/man/specifiedUseDisagg.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/DisaggregateFunctions.R \name{specifiedUseDisagg} \alias{specifiedUseDisagg} -\title{Disaggregate use table based on the allocations specified in the files referenced in the diaggregation specs.} +\title{Disaggregate use table based on the allocations specified in the files referenced in the disaggregation specs.} \usage{ specifiedUseDisagg(model, disagg, domestic = FALSE) } @@ -11,11 +11,11 @@ specifiedUseDisagg(model, disagg, domestic = FALSE) \item{disagg}{Specifications for disaggregating the current Table} -\item{domestic}{Flag that indicates where to use the Domestic Use or UseTrasanctions table} +\item{domestic}{Flag that indicates where to use the Domestic Use or UseTransactions table} } \value{ A standardized make table with old sectors removed and new disaggregated sectors added based on the allocations in the disaggregation specs. } \description{ -Disaggregate use table based on the allocations specified in the files referenced in the diaggregation specs. +Disaggregate use table based on the allocations specified in the files referenced in the disaggregation specs. } diff --git a/man/uniformMakeDisagg.Rd b/man/uniformDisagg.Rd similarity index 58% rename from man/uniformMakeDisagg.Rd rename to man/uniformDisagg.Rd index 92694f50..c64104ec 100644 --- a/man/uniformMakeDisagg.Rd +++ b/man/uniformDisagg.Rd @@ -1,19 +1,21 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/DisaggregateFunctions.R -\name{uniformMakeDisagg} -\alias{uniformMakeDisagg} -\title{Disaggregate make table uniformly based on the number of new sectors} +\name{uniformDisagg} +\alias{uniformDisagg} +\title{Disaggregate make or use table uniformly based on the number of new sectors} \usage{ -uniformMakeDisagg(model, disagg) +uniformDisagg(model, disagg, table) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} \item{disagg}{Specifications for disaggregating the current Table} + +\item{table}{DataFrame of make or use table} } \value{ A standardized make table with old sectors removed and new, uniformly disaggregated sectors added. } \description{ -Disaggregate make table uniformly based on the number of new sectors +Disaggregate make or use table uniformly based on the number of new sectors } diff --git a/man/uniformUseDisagg.Rd b/man/uniformUseDisagg.Rd deleted file mode 100644 index 66642749..00000000 --- a/man/uniformUseDisagg.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/DisaggregateFunctions.R -\name{uniformUseDisagg} -\alias{uniformUseDisagg} -\title{Disaggregate use table uniformly based on the number of new sectors} -\usage{ -uniformUseDisagg(model, disagg, domestic = FALSE) -} -\arguments{ -\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} - -\item{disagg}{Specifications for disaggregating the current Table} - -\item{domestic}{boolean, indicates whether use disagg is for domestic model or full model; FALSE is default} -} -\value{ -A standardized use table with old sectors removed and new, uniformly disaggregated sectors added. -} -\description{ -Disaggregate use table uniformly based on the number of new sectors -} From 91ce06449decb0f089ced193a78e9f9dd34d1295 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 28 Sep 2021 15:08:20 -0700 Subject: [PATCH 065/319] Fix typo in logging message --- R/DisaggregateFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index ad6d8c13..8f90a1e4 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -57,7 +57,7 @@ getDisaggregationSpecs <- function (model){ model$DisaggregationSpecs$Aggregation <- vector(mode='list') model$DisaggregationSpecs$Disaggregation <- vector(mode='list') for (configFile in model$specs$DisaggregationSpecs){ - logging::loginfo(paste0("Loading disaggregation spes for ", configFile, "...")) + logging::loginfo(paste0("Loading disaggregation specs for ", configFile, "...")) config <- getConfiguration(configFile, "disagg") if('Aggregation' %in% names(config)){ model$DisaggregationSpecs$Aggregation <- append(model$DisaggregationSpecs$Aggregation, config$Aggregation) From 978b443b4d747a82f9a7252de46d1a442171884b Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 28 Sep 2021 15:11:01 -0700 Subject: [PATCH 066/319] Make geom_line optional in plotMatrixCoefficient --- R/VisualizationFunctions.R | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/R/VisualizationFunctions.R b/R/VisualizationFunctions.R index 1dd81cff..a7424198 100644 --- a/R/VisualizationFunctions.R +++ b/R/VisualizationFunctions.R @@ -73,9 +73,11 @@ plotMatrixCoefficient <- function(model_list, matrix_name, coefficient_name, sec # plot p <- ggplot(df, aes(x = factor(x, levels = rev(unique(x))), - y = Value, shape = as.character(modelname))) + - geom_line(aes(group = x)) + - geom_point(aes(color = GroupName), size = 3) + + y = Value, shape = as.character(modelname))) + if (length(model_list)>1) { + p <- p + geom_line(aes(group = x)) + } + p <- p + geom_point(aes(color = GroupName), size = 3) + scale_shape_manual(values = c(0:(length(unique(df$modelname))-1))) + scale_color_manual(values = unique(df$color)) + labs(x = "", y = Y_title) + From 7afc578ec914e8d4499887b77ac1bd9f37d84821 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 29 Sep 2021 12:46:40 -0400 Subject: [PATCH 067/319] update generateModelSectorSchema to handle multiple disaggregations --- R/WriteModel.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/WriteModel.R b/R/WriteModel.R index 589a5f55..c925fd6f 100644 --- a/R/WriteModel.R +++ b/R/WriteModel.R @@ -309,12 +309,12 @@ writeSessionInfotoFile <- function(path) { #'@param model, any model object #'@return char string generateModelSectorSchema <- function(model) { - SectorSchema <- paste0(paste(model$specs$IODataSource, + SectorSchema <- paste(model$specs$IODataSource, model$specs$BaseIOSchema, model$specs$BaseIOLevel, - gsub("Disaggregation.*", "", - model$specs$DisaggregationSpecs), - "Disagg",sep = "_")) + paste(gsub("Disaggregation.*", "", + model$specs$DisaggregationSpecs), collapse = "_"), + "Disagg",sep = "_") return(SectorSchema) } From 5f6070783cc85c66d90f67c71c7b4807cc0af1d9 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 29 Sep 2021 12:49:01 -0400 Subject: [PATCH 068/319] move generateModelSectorSchema to utility functions --- R/UtilityFunctions.R | 13 +++++++++++++ R/WriteModel.R | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/R/UtilityFunctions.R b/R/UtilityFunctions.R index 8c7bfe70..7fd157ad 100644 --- a/R/UtilityFunctions.R +++ b/R/UtilityFunctions.R @@ -327,6 +327,19 @@ writeDatatoRDA <- function(data, data_name) { list(as.name(data_name), overwrite = TRUE)) } +#'Create sector schema for a model +#'@param model, any model object +#'@return char string +generateModelSectorSchema <- function(model) { + SectorSchema <- paste(model$specs$IODataSource, + model$specs$BaseIOSchema, + model$specs$BaseIOLevel, + paste(gsub("Disaggregation.*", "", + model$specs$DisaggregationSpecs), collapse = "_"), + "Disagg",sep = "_") + return(SectorSchema) +} + #' Write metadata of downloaded data to JSON. #' @param name A string specifying data name. #' @param year A numeric value specifying data year. diff --git a/R/WriteModel.R b/R/WriteModel.R index c925fd6f..6411cd24 100644 --- a/R/WriteModel.R +++ b/R/WriteModel.R @@ -305,19 +305,6 @@ writeSessionInfotoFile <- function(path) { writeLines(utils::capture.output(s), f) } -#'Create sector schema for a model -#'@param model, any model object -#'@return char string -generateModelSectorSchema <- function(model) { - SectorSchema <- paste(model$specs$IODataSource, - model$specs$BaseIOSchema, - model$specs$BaseIOLevel, - paste(gsub("Disaggregation.*", "", - model$specs$DisaggregationSpecs), collapse = "_"), - "Disagg",sep = "_") - return(SectorSchema) -} - #' Prepare sectorcrosswalk table for a model #' @param model, any model object #' @return a data.frame, sectorcrosswalk table From 2b5ff213b71d7292c853dd39742e97765988e757 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 29 Sep 2021 12:49:31 -0400 Subject: [PATCH 069/319] remove IO year from schema --- R/UtilityFunctions.R | 1 - 1 file changed, 1 deletion(-) diff --git a/R/UtilityFunctions.R b/R/UtilityFunctions.R index 7fd157ad..d14913c0 100644 --- a/R/UtilityFunctions.R +++ b/R/UtilityFunctions.R @@ -332,7 +332,6 @@ writeDatatoRDA <- function(data, data_name) { #'@return char string generateModelSectorSchema <- function(model) { SectorSchema <- paste(model$specs$IODataSource, - model$specs$BaseIOSchema, model$specs$BaseIOLevel, paste(gsub("Disaggregation.*", "", model$specs$DisaggregationSpecs), collapse = "_"), From 7a1285fcfa20e7e2e045d1a9d3f13d343874d12a Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 29 Sep 2021 12:54:38 -0400 Subject: [PATCH 070/319] conditional sectorschema based on disagg specs --- R/UtilityFunctions.R | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/R/UtilityFunctions.R b/R/UtilityFunctions.R index d14913c0..f2c86c16 100644 --- a/R/UtilityFunctions.R +++ b/R/UtilityFunctions.R @@ -332,10 +332,14 @@ writeDatatoRDA <- function(data, data_name) { #'@return char string generateModelSectorSchema <- function(model) { SectorSchema <- paste(model$specs$IODataSource, - model$specs$BaseIOLevel, - paste(gsub("Disaggregation.*", "", - model$specs$DisaggregationSpecs), collapse = "_"), - "Disagg",sep = "_") + model$specs$BaseIOLevel, sep = "_") + if(!is.null(model$specs$DisaggregationSpecs)){ + SectorSchema <- paste(SectorSchema, + paste(gsub("Disaggregation.*", "", + model$specs$DisaggregationSpecs), collapse = "_"), + "Disagg",sep = "_") + } + return(SectorSchema) } From 54110612ca6b7e7b2fbee107489843ced4c0954a Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 29 Sep 2021 12:55:14 -0400 Subject: [PATCH 071/319] generate new crosswalk column with model schema when disaggregation present --- R/InitializeModel.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/InitializeModel.R b/R/InitializeModel.R index ba3fe2c0..e864fa61 100644 --- a/R/InitializeModel.R +++ b/R/InitializeModel.R @@ -16,6 +16,12 @@ initializeModel <- function(modelname) { as.environment("package:useeior")) model$crosswalk <- unique(model$crosswalk[, c("NAICS_2012_Code", colnames(model$crosswalk)[startsWith(colnames(model$crosswalk), "BEA")])]) colnames(model$crosswalk) <- gsub(paste0("_", model$specs$BaseIOSchema, "|_Code"), "", colnames(model$crosswalk)) + rownames(model$crosswalk) <- NULL + if(!is.null(model$specs$DisaggregationSpecs)){ + modelschema <- generateModelSectorSchema(model) + baseschema <- paste0("BEA_", model$specs$BaseIOLevel) + model$crosswalk[modelschema] <- model$crosswalk[baseschema] + } } return(model) } \ No newline at end of file From 04c8f1a0276e1bc7bee2da0a37824b84bc69053d Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 4 Oct 2021 13:43:45 -0400 Subject: [PATCH 072/319] Fix typos --- R/AggregationFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index e17ded09..c5d3c4f4 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -343,7 +343,7 @@ getIndex <- function(sectorList, sector){ } -#' Disaggregate the MasterCrosswalk to include the new sectors for disaggregation +#' Aggregate the MasterCrosswalk to include the new sectors for aggregation #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @return crosswalk with aggregated sectors removed aggregateMasterCrosswalk <- function (model){ From 92137f27e9eae846aaa0a2c82a49c2b85a599b07 Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 4 Oct 2021 18:36:08 -0400 Subject: [PATCH 073/319] Adding aggregation specs folder and file for electricity separate from disaggregation specs folder --- inst/extdata/aggspecs/ElectricityAggregationDetail.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 inst/extdata/aggspecs/ElectricityAggregationDetail.yml diff --git a/inst/extdata/aggspecs/ElectricityAggregationDetail.yml b/inst/extdata/aggspecs/ElectricityAggregationDetail.yml new file mode 100644 index 00000000..ee6e2abc --- /dev/null +++ b/inst/extdata/aggspecs/ElectricityAggregationDetail.yml @@ -0,0 +1,3 @@ +Aggregation: + Sectors: ["221100/US", "S00101/US", "S00202/US"] # Aggregates to first sector listed + AssociatedDisaggregation: 221100/US From f72f492b91f8dc19c2a9937b488a5a40ea02a0b8 Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 4 Oct 2021 20:18:51 -0400 Subject: [PATCH 074/319] Changes in aggregation functionality to look for specs in its own subfolder "extdata/aggspecs" rather than in the disaggregation subfolder "extdata/disaggspecs" --- R/AggregationFunctions.R | 35 +++++++++++++++++++++++++++++------ R/DisaggregateFunctions.R | 8 ++++---- R/LoadIOTables.R | 3 ++- 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index c5d3c4f4..671760da 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -22,7 +22,8 @@ aggregateModel <- function (model){ #obtaining indeces to aggregate sectors in remaining model objects #agg <- model$DisaggregationSpecs$Aggregation - agg <- model$DisaggregationSpecs$Aggregation$Sectors + #agg <- model$DisaggregationSpecs$Aggregation$Sectors + agg<- model$AggregationSpecs$Aggregation$Sectors mainComIndex <- getIndex(model$Commodities$Code_Loc, agg[1])#first item in Aggregation is the sector to aggregate to, not to be removed mainIndIndex <- getIndex(model$Industries$Code_Loc, agg[1]) comIndecesToAggregate <- which(model$Commodities$Code_Loc %in% agg[2:length(agg)]) #find com indeces containing references to the sectors to be aggregated @@ -50,6 +51,23 @@ aggregateModel <- function (model){ } +#' Obtain aggregation specs from input files +#' @param model Model file loaded with IO tables +#' @return A model with the specified aggregation and disaggregation specs. +getAggregationSpecs <- function (model){ + model$AggregationSpecs$Aggregation <- vector(mode='list') + + for (configFile in model$specs$AggregationSpecs){ + logging::loginfo(paste0("Loading aggregation specs for ", configFile, "...")) + config <- getConfiguration(configFile, "agg")#maybe chnage this flag from disagg to non-BEA + if('Aggregation' %in% names(config)){ + model$AggregationSpecs$Aggregation <- append(model$AggregationSpecs$Aggregation, config$Aggregation) + } + + } + + return(model) +} #TODO: Complete this function #' Aggregate satellite tables from static file based on specs @@ -67,7 +85,8 @@ aggSatelliteTable <- function (model, sattable, sat){ #obtaining indeces to aggregate sectors in remaining model objects newSatTable <- sattable #agg <- model$DisaggregationSpecs$Aggregation - agg <- model$DisaggregationSpecs$Aggregation$Sectors + #agg <- model$DisaggregationSpecs$Aggregation$Sectors + agg <- model$AggregationSpecs$Aggregation$Sectors #variable to determine length of Code substring, i.e., code length minus geographic identifer and separator character (e.g. "/US") codeLength <- nchar(gsub("/.*", "", agg[1])) @@ -150,7 +169,8 @@ aggregateMultiYearCPI <- function(model, mainIndex, indecesToAggregate, type){ aggregateMakeTable <- function(model){ #agg <- model$DisaggregationSpecs$Aggregation - agg <- model$DisaggregationSpecs$Aggregation$Sectors + #agg <- model$DisaggregationSpecs$Aggregation$Sectors + agg <- model$AggregationSpecs$Aggregation$Sectors count <- 1 @@ -184,7 +204,8 @@ aggregateMakeTable <- function(model){ aggregateUseTable <- function(model, domestic = FALSE){ #agg <- model$DisaggregationSpecs$Aggregation - agg <- model$DisaggregationSpecs$Aggregation$Sectors + #agg <- model$DisaggregationSpecs$Aggregation$Sectors + agg <- model$AggregationSpecs$Aggregation$Sectors count <- 1 @@ -233,7 +254,8 @@ aggregateUseTable <- function(model, domestic = FALSE){ aggregateVA <- function(model){ #agg <- model$DisaggregationSpecs$Aggregation - agg <- model$DisaggregationSpecs$Aggregation$Sectors + #agg <- model$DisaggregationSpecs$Aggregation$Sectors + agg <- model$AggregationSpecs$Aggregation$Sectors count <- 1 @@ -350,7 +372,8 @@ aggregateMasterCrosswalk <- function (model){ #agg <- model$DisaggregationSpecs$Aggregation - agg <- model$DisaggregationSpecs$Aggregation$Sectors + #agg <- model$DisaggregationSpecs$Aggregation$Sectors + agg <- model$AggregationSpecs$Aggregation$Sectors crosswalk <- model$crosswalk#temp variable for storing intermediate changes new_cw <- crosswalk#variable to return with complete changes to crosswalk#temp diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 8f90a1e4..168d5a5f 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -54,14 +54,14 @@ disaggregateModel <- function (model){ #' @param model Model file loaded with IO tables #' @return A model with the specified aggregation and disaggregation specs. getDisaggregationSpecs <- function (model){ - model$DisaggregationSpecs$Aggregation <- vector(mode='list') + #model$DisaggregationSpecs$Aggregation <- vector(mode='list') model$DisaggregationSpecs$Disaggregation <- vector(mode='list') for (configFile in model$specs$DisaggregationSpecs){ logging::loginfo(paste0("Loading disaggregation specs for ", configFile, "...")) config <- getConfiguration(configFile, "disagg") - if('Aggregation' %in% names(config)){ - model$DisaggregationSpecs$Aggregation <- append(model$DisaggregationSpecs$Aggregation, config$Aggregation) - } + # if('Aggregation' %in% names(config)){ + # model$DisaggregationSpecs$Aggregation <- append(model$DisaggregationSpecs$Aggregation, config$Aggregation) + # } if('Disaggregation' %in% names(config)){ model$DisaggregationSpecs$Disaggregation <- append(model$DisaggregationSpecs$Disaggregation, config$Disaggregation) } diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index f4d54516..adc67ded 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -22,9 +22,10 @@ loadIOData <- function(model) { } model <- getDisaggregationSpecs(model) + model <- getAggregationSpecs(model) # Check for aggregation - if(length(model$DisaggregationSpecs$Aggregation)!=0){ + if(length(model$AggregationSpecs$Aggregation)!=0){ model <- aggregateModel(model) } # Check for disaggregation From ffc0069a32694ed43cec865651c9f2c4de3bd470 Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 4 Oct 2021 20:43:10 -0400 Subject: [PATCH 075/319] Changed if statement that checks for aggregation for satellite tables from checking disaggragationSpecs to aggregationSpecs --- R/LoadSatellites.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index 01a4e690..7f036a9c 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -141,7 +141,7 @@ conformTbStoIOSchema <- function(tbs, sat_spec, model) { tbs <- mapFlowTotalsbySectorandLocationfromNAICStoBEA(tbs, sat_spec$DataYears[1], model) } # Check if aggregation is needed based on model metadata - if(!is.null(model$DisaggregationSpecs$Aggregation) & !is.null(sat_spec$StaticFile)){ + if(!is.null(model$AggregationSpecs$Aggregation) & !is.null(sat_spec$StaticFile)){ tbs <- aggSatelliteTable(model, tbs, sat_spec) } # Check if disaggregation is needed based on model metadata From e430584e981f1508e9d628909d6bacd3b778e55c Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 5 Oct 2021 20:18:14 -0400 Subject: [PATCH 076/319] assign active model crosswalk sector list as USEEIO for all models --- R/InitializeModel.R | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/R/InitializeModel.R b/R/InitializeModel.R index e864fa61..d2241faf 100644 --- a/R/InitializeModel.R +++ b/R/InitializeModel.R @@ -17,11 +17,10 @@ initializeModel <- function(modelname) { model$crosswalk <- unique(model$crosswalk[, c("NAICS_2012_Code", colnames(model$crosswalk)[startsWith(colnames(model$crosswalk), "BEA")])]) colnames(model$crosswalk) <- gsub(paste0("_", model$specs$BaseIOSchema, "|_Code"), "", colnames(model$crosswalk)) rownames(model$crosswalk) <- NULL - if(!is.null(model$specs$DisaggregationSpecs)){ - modelschema <- generateModelSectorSchema(model) - baseschema <- paste0("BEA_", model$specs$BaseIOLevel) - model$crosswalk[modelschema] <- model$crosswalk[baseschema] - } + # Assign initial model crosswalk based on base schema + modelschema <- "USEEIO" + baseschema <- paste0("BEA_", model$specs$BaseIOLevel) + model$crosswalk[modelschema] <- model$crosswalk[baseschema] } return(model) } \ No newline at end of file From 6526ed135dd0c8f4be4e35d7c21f039313569ec8 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 5 Oct 2021 20:21:16 -0400 Subject: [PATCH 077/319] update aggregateSatelliteTable and mapfromNAICS... to always aggregate to the active sector list "USEEIO" --- R/LoadSatellites.R | 2 +- R/SatelliteFunctions.R | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index 01a4e690..a4a3b2fc 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -135,7 +135,7 @@ conformTbStoIOSchema <- function(tbs, sat_spec, model) { } # If the original data is at Detail level but model is not, apply aggregation if (sat_spec$SectorListLevel == "Detail" && model$specs$BaseIOLevel != "Detail") { - tbs <- aggregateSatelliteTable(tbs,from_level = sat_spec$SectorListLevel,to_level = model$specs$BaseIOLevel,model) + tbs <- aggregateSatelliteTable(tbs,from_level = sat_spec$SectorListLevel,model) } } else if ("NAICS" %in% sat_spec$SectorListSource) { tbs <- mapFlowTotalsbySectorandLocationfromNAICStoBEA(tbs, sat_spec$DataYears[1], model) diff --git a/R/SatelliteFunctions.R b/R/SatelliteFunctions.R index 269de8ec..dbdb05a5 100644 --- a/R/SatelliteFunctions.R +++ b/R/SatelliteFunctions.R @@ -14,7 +14,7 @@ getStandardSatelliteTableFormat <- function () { #' @return A satellite table aggregated by the USEEIO model sector codes. mapFlowTotalsbySectorandLocationfromNAICStoBEA <- function (totals_by_sector, totals_by_sector_year, model) { # Consolidate master crosswalk on model level and rename - NAICStoBEA <- unique(model$crosswalk[, c("NAICS",paste("BEA", model$specs$BaseIOLevel, sep = "_"))]) + NAICStoBEA <- unique(model$crosswalk[, c("NAICS","USEEIO")]) colnames(NAICStoBEA) <- c("NAICS","BEA") # Modify TechnologicalCorrelation score based on the the correspondence between NAICS and BEA code # If there is allocation (1 NAICS to 2 or more BEA), add one to score = 2 @@ -130,16 +130,15 @@ stackSatelliteTables <- function (sattable1, sattable2) { return(rbind(sattable1, sattable2)) } -#' Aggreagte (FlowAmount in) satellite tables from one BEA level to another +#' Aggregate (FlowAmount in) satellite tables from one BEA level to another #' @param sattable A satellite table to be aggregated based on the level (Detail, Summary, or Sector) of BEA code. #' @param from_level The level of BEA code in the satellite table. -#' @param to_level The level of BEA code this satellite table will be aggregated to. #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @return A more aggregated satellite table. -aggregateSatelliteTable <- function(sattable, from_level, to_level, model) { +aggregateSatelliteTable <- function(sattable, from_level, model) { # Determine the columns within MasterCrosswalk that will be used in aggregation from_code <- paste0("BEA_", from_level) - to_code <- paste0("BEA_", to_level) + to_code <- "USEEIO" # Merge the satellite table with model$crosswalk sattable <- merge(sattable, unique(model$crosswalk[, c(from_code, to_code)]), by.x = "Sector", by.y = from_code) # Replace NA in DQ cols with 5 From 50fe9f97c0470bcb38656632a6df847bda91640c Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 5 Oct 2021 20:21:58 -0400 Subject: [PATCH 078/319] use "USEEIO" column for active sector list in crosswalk --- R/AggregationFunctions.R | 4 ++-- R/CalculationFunctions.R | 12 +++++------- R/CrosswalkFunctions.R | 2 +- R/DisaggregateFunctions.R | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index e17ded09..576dc7e2 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -355,8 +355,8 @@ aggregateMasterCrosswalk <- function (model){ crosswalk <- model$crosswalk#temp variable for storing intermediate changes new_cw <- crosswalk#variable to return with complete changes to crosswalk#temp - #deterime which rows and columns to modify - cwColIndex <- match(paste0("BEA_", model$specs$BaseIOLevel), colnames(crosswalk)) #search for concatenation of "BEA" and model$specs$BaseIOlevel object in crosswalk column names + #determine which rows and columns to modify + cwColIndex <- match("USEEIO", colnames(crosswalk)) OriginalCodeLength <- regexpr(pattern ='/',agg[1]) - 1 #used to determine the length of the sector codes. E.g., detail would be 6, while summary would generally be 3 though variable, and sector would be variable aggCodeLength <- regexpr(pattern ='/',agg[2]) - 1 #used to determine length of disaggregated sector codes. diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 63352199..d2a45560 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -207,14 +207,13 @@ calculateFlowContributiontoImpact <- function (model, sector, indicator, domesti #' Aggregate result matrix by rows #' #' @param matrix A matrix with sectors as rows -#' @param from_level The level of BEA code this matrix starts at #' @param to_level The level of BEA code this matrix will be aggregated to #' @param crosswalk Sector crosswalk between levels of detail #' @export #' @return aggregated matrix with sectors as rows -aggregateResultTable <- function (matrix, from_level, to_level, crosswalk) { +aggregateResultTable <- function (matrix, to_level, crosswalk) { # Determine the columns within MasterCrosswalk that will be used in aggregation - from_code <- paste0("BEA_", from_level) + from_code <- "USEEIO" to_code <- paste0("BEA_", to_level) # Remove location codes from sectors df <- as.data.frame(matrix) @@ -233,14 +232,13 @@ aggregateResultTable <- function (matrix, from_level, to_level, crosswalk) { #' Aggregate result matrix by rows and columns #' #' @param matrix A matrix with sectors as rows and columns -#' @param from_level The level of BEA code this matrix starts at #' @param to_level The level of BEA code this matrix will be aggregated to #' @param crosswalk Sector crosswalk between levels of detail #' @export #' @return aggregated matrix with sectors as rows and columns -aggregateResultMatrix <- function (matrix, from_level, to_level, crosswalk) { - row_agg_matrix <- aggregateResultTable (matrix, from_level, to_level, crosswalk) - col_agg_matrix <- aggregateResultTable (t(row_agg_matrix), from_level, to_level, crosswalk) +aggregateResultMatrix <- function (matrix, to_level, crosswalk) { + row_agg_matrix <- aggregateResultTable (matrix, to_level, crosswalk) + col_agg_matrix <- aggregateResultTable (t(row_agg_matrix), to_level, crosswalk) agg_matrix <- t(col_agg_matrix) return(agg_matrix) } diff --git a/R/CrosswalkFunctions.R b/R/CrosswalkFunctions.R index 744c26d9..7161038a 100644 --- a/R/CrosswalkFunctions.R +++ b/R/CrosswalkFunctions.R @@ -14,7 +14,7 @@ loadMasterCrosswalk <- function(){ #' @return A table of allocation factors between NAICS and BEA sectors. getNAICStoBEAAllocation <- function (year, model) { # Keep USEEIO and NAICS columns in MasterCrosswalk2012 table based on the model specs - NAICStoBEA <- unique(model$crosswalk[, c("NAICS", paste0("BEA_", model$specs$BaseIOLevel))]) + NAICStoBEA <- unique(model$crosswalk[, c("NAICS", "USEEIO")]) colnames(NAICStoBEA) <- c("NAICS_Code", "BEA_Code") # Drop 2-digit NAICS code NAICStoBEA <- NAICStoBEA[nchar(NAICStoBEA$NAICS_Code) > 2, ] diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 8f90a1e4..dc67ccff 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -668,7 +668,7 @@ disaggregateMasterCrosswalk <- function (model, disagg){ new_cw <- crosswalk#variable to return with complete changes to crosswalk#temp #determine which rows and columns to modify - cwColIndex <- match(paste0("BEA_", model$specs$BaseIOLevel), colnames(crosswalk)) #search for concatenation of "BEA" and model$specs$BaseIOlevel object in crosswalk column names + cwColIndex <- match("USEEIO", colnames(crosswalk)) OriginalCodeLength <- regexpr(pattern ='/',disagg$OriginalSectorCode) - 1 #used to determine the length of the sector codes. E.g., detail would be 6, while summary would generally be 3 though variable, and sector would be variable DisaggCodeLength <- regexpr(pattern ='/',disagg$DisaggregatedSectorCodes[[1]]) - 1 #used to determine length of disaggregated sector codes. From 9c6f4cbf5bc37507e58c221bd6f25a4b5b9dd923 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 5 Oct 2021 21:57:12 -0400 Subject: [PATCH 079/319] update disaggregation of crosswalk by merging in new sectors to resolve error of 1:many matching --- R/DisaggregateFunctions.R | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index dc67ccff..475b6cd3 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -664,46 +664,38 @@ disaggregateCol <- function (originalColVector, disagg_specs, duplicate = FALSE, #' @param disagg Specifications for disaggregating the current Table #' @return crosswalk with new sectors added. disaggregateMasterCrosswalk <- function (model, disagg){ - crosswalk <- model$crosswalk#temp variable for storing intermediate changes - new_cw <- crosswalk#variable to return with complete changes to crosswalk#temp + new_cw <- model$crosswalk #variable to return with complete changes to crosswalk#temp + + secLength <- regexpr(pattern ='/',disagg$OriginalSectorCode) - 1 #used to determine the length of the sector codes. E.g., detail would be 6, while summary would generally be 3 though variable, and sector would be variable + cw <- disagg$NAICSSectorCW[, c('NAICS_2012_Code','USEEIO_Code')] + cw$USEEIO_Code <- sapply(cw$USEEIO_Code, function(x) {substr(x, 1, secLength)}) - #determine which rows and columns to modify - cwColIndex <- match("USEEIO", colnames(crosswalk)) - OriginalCodeLength <- regexpr(pattern ='/',disagg$OriginalSectorCode) - 1 #used to determine the length of the sector codes. E.g., detail would be 6, while summary would generally be 3 though variable, and sector would be variable - DisaggCodeLength <- regexpr(pattern ='/',disagg$DisaggregatedSectorCodes[[1]]) - 1 #used to determine length of disaggregated sector codes. - #Update original sector codes with disaggregated sector codes in the relevant column (i.e. cwColIndex) where rows have an exact match for the disaggregated codes in the NAICS column - disaggNAICSIndex <- which(new_cw[,cwColIndex] == substr(disagg$OriginalSectorCode,1,OriginalCodeLength)) #Get the indeces of the BEA_Detail column that are mapped to the originalSector - disaggNAICSRows <- new_cw[disaggNAICSIndex,] #create a dataframe with only the relevant rows - codeMatches <- match(disagg$NAICSSectorCW$NAICS_2012_Code,disaggNAICSRows$NAICS) #find matches between the crosswalk included in the disagg specs and NAICS column of the master crosswalk - disaggNAICSRows[codeMatches,cwColIndex] <- substr(disagg$NAICSSectorCW$USEEIO_Code,1,DisaggCodeLength)#in the new crosswalk, replace codes in the new column (i.e. USEEIOv2.0) with the disaggregated codes for the rows where there is a match in between the NAICS crosswalk and the disaggregated Crosswalk - new_cw[disaggNAICSIndex,] <- disaggNAICSRows #replace the rows that have a match for 6-digit naics for the disaggregated sectors in the crosswalk - crosswalk <- new_cw #update crosswalk with the new sectors as a static index reference for the rows still containing the originalSectorCode in the last column. + new_cw <-merge(new_cw, cw, by.x=c("NAICS"), by.y=c("NAICS_2012_Code"), all=T) + + new_cw$USEEIO <- ifelse(is.na(new_cw$USEEIO_Code), new_cw$USEEIO, new_cw$USEEIO_Code) #Update remaining rows where the original sector is present in cwColIndex but there is no exact match in the NAICS column for the disaggregated sector codes (e.g. 2-5 level NAICS codes) - #get the indeces of the remaining rows that have 56200 in the new column - remainingDisaggNAICSIndex <- which(new_cw[,cwColIndex] == substr(disagg$OriginalSectorCode,1,OriginalCodeLength)) + remainingDisaggNAICSIndex <- which(new_cw$USEEIO == substr(disagg$OriginalSectorCode,1,secLength)) for (i in 1:length(remainingDisaggNAICSIndex)){ - #get the indeces of the remaining rows that have 56200 in the new column - disaggNAICSIndex <- which(new_cw[,cwColIndex] == substr(disagg$OriginalSectorCode,1,OriginalCodeLength)) + disaggNAICSIndex <- which(new_cw$USEEIO == substr(disagg$OriginalSectorCode,1,secLength)) crosswalkRow <- new_cw[disaggNAICSIndex[1],] #extract current row where code in last column needs to be updated rowComparisons <- grepl(crosswalkRow$NAICS[1], disagg$NAICSSectorCW$NAICS_2012_Code) #compare the value in the first column (NAICS) to the NAICS values in the disaggCrosswalk. Result is a string with TRUE where first column is a substring of values in disaggCrosswalk rowReplacements <- disagg$NAICSSectorCW$NAICS_2012_Code[rowComparisons] #Get the NAICS sector codes in the disagg crosswalk that are a match for the NAICS substring in the master crosswalk - rowReplacements <- substr(disagg$NAICSSectorCW$USEEIO_Code[rowComparisons],1,DisaggCodeLength) #Get the disaggregated sector codes that are mapped to the matches of the NAICS substring + rowReplacements <- substr(disagg$NAICSSectorCW$USEEIO_Code[rowComparisons],1,secLength) #Get the disaggregated sector codes that are mapped to the matches of the NAICS substring rowReplacements <- unique(rowReplacements) #reduce the list to the unique number of disaggregated sectors that the row comparisons map to crosswalkRow <- crosswalkRow[rep(seq_len(nrow(crosswalkRow)), length(rowReplacements)),, drop=FALSE] #replicate the crosswalk row as many times as there were matches in the substring search - crosswalkRow[,cwColIndex] <- rowReplacements #replace the values in the last column (e.g. originalSectorCode) with the newSectorCodes that matched the substring search + crosswalkRow$USEEIO <- rowReplacements #replace the values in the last column (e.g. originalSectorCode) with the newSectorCodes that matched the substring search new_cw <- rbind(new_cw[1:disaggNAICSIndex[1]-1,],crosswalkRow, new_cw[-(1:disaggNAICSIndex[1]),]) #include the expanded rows in the crosswalk - } #renaming rows of crosswalk rownames(new_cw) <- 1:nrow(new_cw) - + new_cw$USEEIO_Code <- NULL return(new_cw) } From 2c8f1ab432329d742f97a17eb771809ecf539cc6 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 5 Oct 2021 21:57:53 -0400 Subject: [PATCH 080/319] when aggregating crosswalk, replace sectors in existing cw rows instead of removing them --- R/AggregationFunctions.R | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 576dc7e2..f55e8dbb 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -343,27 +343,18 @@ getIndex <- function(sectorList, sector){ } -#' Disaggregate the MasterCrosswalk to include the new sectors for disaggregation +#' Aggregate the MasterCrosswalk on the selected sectors #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @return crosswalk with aggregated sectors removed aggregateMasterCrosswalk <- function (model){ - - #agg <- model$DisaggregationSpecs$Aggregation agg <- model$DisaggregationSpecs$Aggregation$Sectors - crosswalk <- model$crosswalk#temp variable for storing intermediate changes - new_cw <- crosswalk#variable to return with complete changes to crosswalk#temp + new_cw <- model$crosswalk #variable to return with complete changes to crosswalk#temp + + secLength <- regexpr(pattern ='/',agg[1]) - 1 #used to determine the length of the sector codes. E.g., detail would be 6, while summary would generally be 3 though variable, and sector would be variable + new_cw$USEEIO[which(new_cw$USEEIO %in% substr(agg[2:length(agg)],1,secLength))] <- substr(agg[1],1,secLength) - #determine which rows and columns to modify - cwColIndex <- match("USEEIO", colnames(crosswalk)) - OriginalCodeLength <- regexpr(pattern ='/',agg[1]) - 1 #used to determine the length of the sector codes. E.g., detail would be 6, while summary would generally be 3 though variable, and sector would be variable - aggCodeLength <- regexpr(pattern ='/',agg[2]) - 1 #used to determine length of disaggregated sector codes. - - rowIndecesToRemove <- which(new_cw[,cwColIndex] %in% substr(agg[2:length(agg)],1,aggCodeLength)) #find row indeces containing references to the sectors to be aggregated - new_cw <-new_cw[-(rowIndecesToRemove),] #remove rows from model that have the same rownames as values in agg list - - return(new_cw) } From b55a8ba09039b213db8f8a43c982720fd4c963f4 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 5 Oct 2021 22:08:00 -0400 Subject: [PATCH 081/319] resolve #166 by updating row names to remove location code --- R/CrosswalkFunctions.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/CrosswalkFunctions.R b/R/CrosswalkFunctions.R index 744c26d9..d3c88197 100644 --- a/R/CrosswalkFunctions.R +++ b/R/CrosswalkFunctions.R @@ -22,8 +22,9 @@ getNAICStoBEAAllocation <- function (year, model) { AllocationCodes <- NAICStoBEA[duplicated(NAICStoBEA$NAICS_Code) | duplicated(NAICStoBEA$NAICS_Code, fromLast = TRUE), ] AllocationCodes <- stats::na.omit(AllocationCodes) # Merge AllocationCodes with Gross Output table to calculate allocation factors - AllocationTable <- merge(AllocationCodes, model$MultiYearIndustryOutput[, as.character(year), drop = FALSE], - by.x = "BEA_Code", by.y = 0, all.x = TRUE) + output <- model$MultiYearIndustryOutput[, as.character(year), drop = FALSE] + row.names(output) <- gsub("/.*", "", row.names(output)) + AllocationTable <- merge(AllocationCodes, output, by.x = "BEA_Code", by.y = 0, all.x = TRUE) colnames(AllocationTable)[3] <- "Output" # Insert placeholders for NAs in the "Output" column AllocationTable[is.na(AllocationTable)] <- 1 From d3550cbc484c9406a1d9df54fc4e96b4f89a01ce Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 5 Oct 2021 22:34:46 -0400 Subject: [PATCH 082/319] use and rename the exisiting model crosswalk when writing to excel --- R/WriteModel.R | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/R/WriteModel.R b/R/WriteModel.R index 6411cd24..5119ac72 100644 --- a/R/WriteModel.R +++ b/R/WriteModel.R @@ -310,30 +310,11 @@ writeSessionInfotoFile <- function(path) { #' @return a data.frame, sectorcrosswalk table prepareModelSectorCrosswalk <- function(model) { crosswalk <- model$crosswalk - - # Check for disaggregation - if(!is.null(model$specs$DisaggregationSpecs)){ - #create name to use as column header for disaggregated schema - SectorSchema <- generateModelSectorSchema(model) - #deterime which rows and columns to modify - cwColIndex <- match(paste0("BEA_", model$specs$BaseIOLevel), colnames(crosswalk))#search for concatenation of "BEA" and model$specs$BaseIOlevel object in crosswalk column names - - #copy relevant column over as last column - crosswalk <- cbind(model$crosswalk, model$crosswalk[, paste0("BEA_", model$specs$BaseIOLevel)]) - colnames(crosswalk)[length(crosswalk)] <- SectorSchema #rename column - - #replace disaggregated sector codes in original column with original sector code (e.g. 562HAZ with 562000) - for (disagg in model$DisaggregationSpecs$Disaggregation){ - OriginalCodeLength <- regexpr(pattern ='/',disagg$OriginalSectorCode) - 1 #used to determine the length of the sector codes. E.g., detail would be 6, while summary would generally be 3 though variable, and sector would be variable - DisaggCodeLength <- regexpr(pattern ='/',disagg$DisaggregatedSectorCodes[[1]]) - 1 #used to determine length of disaggregated sector codes. - - disaggNAICSIndex <- crosswalk[,cwColIndex] %in% substr(disagg$DisaggregatedSectorCodes,1,DisaggCodeLength) #find all the indeces in crosswalk where there disaggregated codes - crosswalk[disaggNAICSIndex,cwColIndex] <- substr(disagg$OriginalSectorCode,1,OriginalCodeLength) #replace the disaggregated codes with the original sector code - - } - - - } + + #create name to use as column header for disaggregated schema + SectorSchema <- generateModelSectorSchema(model) + #rename "USEEIO" (the last column) as the sector schema + colnames(crosswalk)[length(crosswalk)] <- SectorSchema #rename column return(crosswalk) From a6870c0c4941f4d785c026fa1cb32bf832534df5 Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 6 Oct 2021 13:11:10 -0400 Subject: [PATCH 083/319] Fixing function descriptions and removing block comments containing obsolete code. --- R/ConfigurationFunctions.R | 2 +- R/DisaggregateFunctions.R | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/R/ConfigurationFunctions.R b/R/ConfigurationFunctions.R index d17ddde6..6a3c22d6 100644 --- a/R/ConfigurationFunctions.R +++ b/R/ConfigurationFunctions.R @@ -2,7 +2,7 @@ #' Gets a stored configuration file #' @param modelname, str, the name of the model -#' @param spectype, str, specification type, either "model" or "disagg" +#' @param spectype, str, specification type, either "model", "disagg", or "agg" #' @return A list of model specifications. getConfiguration <- function(modelname, spectype) { configname <- paste(modelname, ".yml", sep = "") diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 168d5a5f..0523ab48 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -54,14 +54,12 @@ disaggregateModel <- function (model){ #' @param model Model file loaded with IO tables #' @return A model with the specified aggregation and disaggregation specs. getDisaggregationSpecs <- function (model){ - #model$DisaggregationSpecs$Aggregation <- vector(mode='list') + model$DisaggregationSpecs$Disaggregation <- vector(mode='list') for (configFile in model$specs$DisaggregationSpecs){ logging::loginfo(paste0("Loading disaggregation specs for ", configFile, "...")) config <- getConfiguration(configFile, "disagg") - # if('Aggregation' %in% names(config)){ - # model$DisaggregationSpecs$Aggregation <- append(model$DisaggregationSpecs$Aggregation, config$Aggregation) - # } + if('Disaggregation' %in% names(config)){ model$DisaggregationSpecs$Disaggregation <- append(model$DisaggregationSpecs$Disaggregation, config$Disaggregation) } From fa3039f5cc529e60f3433e5a220b461fba29714c Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 6 Oct 2021 15:18:52 -0400 Subject: [PATCH 084/319] Change aggregation and disaggregation specs structure to place space under, e.g. AggregationSpecs rather than AggregationSpecs$Aggregation --- R/AggregationFunctions.R | 44 +++++++++++++++++++-------------------- R/DisaggregateFunctions.R | 17 ++++++++------- R/LoadIOTables.R | 6 ++++-- R/LoadSatellites.R | 6 ++++-- R/WriteModel.R | 3 ++- 5 files changed, 41 insertions(+), 35 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 671760da..ac34ff1e 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -3,7 +3,8 @@ #' @return An aggregated model. aggregateModel <- function (model){ - logging::loginfo(paste0("Aggregating sectors to ",model$DisaggregationSpecs$Aggregation$Sectors[1], "...")) + #logging::loginfo(paste0("Aggregating sectors to ",model$AggregationSpecs$Aggregation$Sectors[1], "...")) + logging::loginfo(paste0("Aggregating sectors to ",model$AggregationSpecs$Sectors[1], "...")) #aggregating economic tables model$MakeTransactions <- aggregateMakeTable(model) model$UseTransactions <- aggregateUseTable(model) @@ -21,9 +22,9 @@ aggregateModel <- function (model){ model$crosswalk <- aggregateMasterCrosswalk(model) #obtaining indeces to aggregate sectors in remaining model objects - #agg <- model$DisaggregationSpecs$Aggregation - #agg <- model$DisaggregationSpecs$Aggregation$Sectors - agg<- model$AggregationSpecs$Aggregation$Sectors + #agg<- model$AggregationSpecs$Aggregation$Sectors + agg <- model$AggregationSpecs$Sectors + mainComIndex <- getIndex(model$Commodities$Code_Loc, agg[1])#first item in Aggregation is the sector to aggregate to, not to be removed mainIndIndex <- getIndex(model$Industries$Code_Loc, agg[1]) comIndecesToAggregate <- which(model$Commodities$Code_Loc %in% agg[2:length(agg)]) #find com indeces containing references to the sectors to be aggregated @@ -55,13 +56,15 @@ aggregateModel <- function (model){ #' @param model Model file loaded with IO tables #' @return A model with the specified aggregation and disaggregation specs. getAggregationSpecs <- function (model){ - model$AggregationSpecs$Aggregation <- vector(mode='list') - + #model$AggregationSpecs$Aggregation <- vector(mode='list') + model$AggregationSpecs <- vector(mode = 'list') + for (configFile in model$specs$AggregationSpecs){ logging::loginfo(paste0("Loading aggregation specs for ", configFile, "...")) config <- getConfiguration(configFile, "agg")#maybe chnage this flag from disagg to non-BEA if('Aggregation' %in% names(config)){ - model$AggregationSpecs$Aggregation <- append(model$AggregationSpecs$Aggregation, config$Aggregation) + #model$AggregationSpecs$Aggregation <- append(model$AggregationSpecs$Aggregation, config$Aggregation) + model$AggregationSpecs <- append(model$AggregationSpecs, config$Aggregation) } } @@ -84,9 +87,9 @@ aggSatelliteTable <- function (model, sattable, sat){ #obtaining indeces to aggregate sectors in remaining model objects newSatTable <- sattable - #agg <- model$DisaggregationSpecs$Aggregation - #agg <- model$DisaggregationSpecs$Aggregation$Sectors - agg <- model$AggregationSpecs$Aggregation$Sectors + + #agg <- model$AggregationSpecs$Aggregation$Sectors + agg <- model$AggregationSpecs$Sectors #variable to determine length of Code substring, i.e., code length minus geographic identifer and separator character (e.g. "/US") codeLength <- nchar(gsub("/.*", "", agg[1])) @@ -168,9 +171,8 @@ aggregateMultiYearCPI <- function(model, mainIndex, indecesToAggregate, type){ #' @return An aggregated MakeTable. aggregateMakeTable <- function(model){ - #agg <- model$DisaggregationSpecs$Aggregation - #agg <- model$DisaggregationSpecs$Aggregation$Sectors - agg <- model$AggregationSpecs$Aggregation$Sectors + #agg <- model$AggregationSpecs$Aggregation$Sectors + agg <- model$AggregationSpecs$Sectors count <- 1 @@ -203,9 +205,8 @@ aggregateMakeTable <- function(model){ #' @return An aggregated UseTransactions or DomesticUseTransactions Table. aggregateUseTable <- function(model, domestic = FALSE){ - #agg <- model$DisaggregationSpecs$Aggregation - #agg <- model$DisaggregationSpecs$Aggregation$Sectors - agg <- model$AggregationSpecs$Aggregation$Sectors + #agg <- model$AggregationSpecs$Aggregation$Sectors + agg <- model$AggregationSpecs$Sectors count <- 1 @@ -253,9 +254,8 @@ aggregateUseTable <- function(model, domestic = FALSE){ #' @return An aggregated MakeTable. aggregateVA <- function(model){ - #agg <- model$DisaggregationSpecs$Aggregation - #agg <- model$DisaggregationSpecs$Aggregation$Sectors - agg <- model$AggregationSpecs$Aggregation$Sectors + #agg <- model$AggregationSpecs$Aggregation$Sectors + agg <- model$AggregationSpecs$Sectors count <- 1 @@ -370,10 +370,8 @@ getIndex <- function(sectorList, sector){ #' @return crosswalk with aggregated sectors removed aggregateMasterCrosswalk <- function (model){ - - #agg <- model$DisaggregationSpecs$Aggregation - #agg <- model$DisaggregationSpecs$Aggregation$Sectors - agg <- model$AggregationSpecs$Aggregation$Sectors + #agg <- model$AggregationSpecs$Aggregation$Sectors + agg <- model$AggregationSpecs$Sectors crosswalk <- model$crosswalk#temp variable for storing intermediate changes new_cw <- crosswalk#variable to return with complete changes to crosswalk#temp diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 0523ab48..91267f55 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -6,8 +6,8 @@ disaggregateModel <- function (model){ logging::loginfo("Initializing Disaggregation of IO tables...") counter = 1 - for (disagg in model$DisaggregationSpecs$Disaggregation){ - + #for (disagg in model$DisaggregationSpecs$Disaggregation){ + for (disagg in model$DisaggregationSpecs){ #Disaggregating sector lists model$Commodities <- disaggregateSectorDFs(model, disagg, "Commodity") @@ -55,13 +55,15 @@ disaggregateModel <- function (model){ #' @return A model with the specified aggregation and disaggregation specs. getDisaggregationSpecs <- function (model){ - model$DisaggregationSpecs$Disaggregation <- vector(mode='list') + #model$DisaggregationSpecs$Disaggregation <- vector(mode='list') + model$DisaggregationSpecs <- vector(mode='list') for (configFile in model$specs$DisaggregationSpecs){ logging::loginfo(paste0("Loading disaggregation specs for ", configFile, "...")) config <- getConfiguration(configFile, "disagg") if('Disaggregation' %in% names(config)){ - model$DisaggregationSpecs$Disaggregation <- append(model$DisaggregationSpecs$Disaggregation, config$Disaggregation) + #model$DisaggregationSpecs$Disaggregation <- append(model$DisaggregationSpecs$Disaggregation, config$Disaggregation) + model$DisaggregationSpecs <- append(model$DisaggregationSpecs, config$Disaggregation) } } @@ -76,8 +78,8 @@ getDisaggregationSpecs <- function (model){ disaggregateSetup <- function (model){ counter = 1 - for (disagg in model$DisaggregationSpecs$Disaggregation){ - + #for (disagg in model$DisaggregationSpecs$Disaggregation){ + for (disagg in model$DisaggregationSpecs){ disagg$NAICSSectorCW <- utils::read.csv(system.file("extdata/disaggspecs", disagg$SectorFile, package = "useeior"), header = TRUE, stringsAsFactors = FALSE, colClasses=c("NAICS_2012_Code"="character", "USEEIO_Code"="character")) @@ -113,7 +115,8 @@ disaggregateSetup <- function (model){ disagg$EnvAllocRatio <- FALSE } #Need to assign these DFs back to the modelspecs - model$DisaggregationSpecs$Disaggregation[[counter]] <- disagg + #model$DisaggregationSpecs$Disaggregation[[counter]] <- disagg + model$DisaggregationSpecs[[counter]] <- disagg counter <- counter + 1 } diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index adc67ded..f45c62ff 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -25,11 +25,13 @@ loadIOData <- function(model) { model <- getAggregationSpecs(model) # Check for aggregation - if(length(model$AggregationSpecs$Aggregation)!=0){ + #if(length(model$AggregationSpecs$Aggregation)!=0){ + if(length(model$AggregationSpecs)!=0){ model <- aggregateModel(model) } # Check for disaggregation - if(length(model$DisaggregationSpecs$Disaggregation)!=0){ + #if(length(model$DisaggregationSpecs$Disaggregation)!=0){ + if(length(model$DisaggregationSpecs)!=0){ model <- disaggregateModel(model) } diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index 7f036a9c..b1c36893 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -141,12 +141,14 @@ conformTbStoIOSchema <- function(tbs, sat_spec, model) { tbs <- mapFlowTotalsbySectorandLocationfromNAICStoBEA(tbs, sat_spec$DataYears[1], model) } # Check if aggregation is needed based on model metadata - if(!is.null(model$AggregationSpecs$Aggregation) & !is.null(sat_spec$StaticFile)){ + #if(!is.null(model$AggregationSpecs$Aggregation) & !is.null(sat_spec$StaticFile)){ + if(!is.null(model$AggregationSpecs) & !is.null(sat_spec$StaticFile)){ tbs <- aggSatelliteTable(model, tbs, sat_spec) } # Check if disaggregation is needed based on model metadata if(!is.null(model$specs$DisaggregationSpecs) & !is.null(sat_spec$StaticFile)){ - for (disagg in model$DisaggregationSpecs$Disaggregation){ + #for (disagg in model$DisaggregationSpecs$Disaggregation){ + for (disagg in model$DisaggregationSpecs){ tbs <- disaggregateSatelliteTable(disagg, tbs, sat_spec) } } diff --git a/R/WriteModel.R b/R/WriteModel.R index 6411cd24..7f090f33 100644 --- a/R/WriteModel.R +++ b/R/WriteModel.R @@ -323,7 +323,8 @@ prepareModelSectorCrosswalk <- function(model) { colnames(crosswalk)[length(crosswalk)] <- SectorSchema #rename column #replace disaggregated sector codes in original column with original sector code (e.g. 562HAZ with 562000) - for (disagg in model$DisaggregationSpecs$Disaggregation){ + #for (disagg in model$DisaggregationSpecs$Disaggregation){ + for (disagg in model$DisaggregationSpecs){ OriginalCodeLength <- regexpr(pattern ='/',disagg$OriginalSectorCode) - 1 #used to determine the length of the sector codes. E.g., detail would be 6, while summary would generally be 3 though variable, and sector would be variable DisaggCodeLength <- regexpr(pattern ='/',disagg$DisaggregatedSectorCodes[[1]]) - 1 #used to determine length of disaggregated sector codes. From 60e32a9271f238f2e521c1733dc7573b24c9b15c Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 6 Oct 2021 16:44:42 -0400 Subject: [PATCH 085/319] Changed AggSpecs list structure to be analogous to DisaggSpecs list structure --- R/AggregationFunctions.R | 123 ++++++++++-------- R/LoadSatellites.R | 5 +- .../aggspecs/ElectricityAggregationDetail.yml | 7 +- 3 files changed, 77 insertions(+), 58 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index ac34ff1e..90ac3c9d 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -3,51 +3,58 @@ #' @return An aggregated model. aggregateModel <- function (model){ - #logging::loginfo(paste0("Aggregating sectors to ",model$AggregationSpecs$Aggregation$Sectors[1], "...")) - logging::loginfo(paste0("Aggregating sectors to ",model$AggregationSpecs$Sectors[1], "...")) - #aggregating economic tables - model$MakeTransactions <- aggregateMakeTable(model) - model$UseTransactions <- aggregateUseTable(model) - model$DomesticUseTransactions <- aggregateUseTable(model, domestic = TRUE) - model$UseValueAdded <- aggregateVA(model) - #model$FinalDemand <- aggregateFD(model) #todo - #model$DomesticFinalDemand <- aggregateFD(model) #todo - #model$MarginSectors <- aggregateMarginSectors(model) #todo - #model$Margins <- aggregateMargins(model) - - #model$ValueAddedMeta <- aggregateVAMeta(model) #todo - #model$FinalDemandMeta <- aggregateFDMeta(model) #todo - - #aggregating Crosswalk - model$crosswalk <- aggregateMasterCrosswalk(model) - - #obtaining indeces to aggregate sectors in remaining model objects - #agg<- model$AggregationSpecs$Aggregation$Sectors - agg <- model$AggregationSpecs$Sectors - - mainComIndex <- getIndex(model$Commodities$Code_Loc, agg[1])#first item in Aggregation is the sector to aggregate to, not to be removed - mainIndIndex <- getIndex(model$Industries$Code_Loc, agg[1]) - comIndecesToAggregate <- which(model$Commodities$Code_Loc %in% agg[2:length(agg)]) #find com indeces containing references to the sectors to be aggregated - indIndecesToAggregate <- which(model$Industries$Code_Loc %in% agg[2:length(agg)]) #find ind indeces containing references to the sectors to be aggregated - - #aggregating (i.e. removing) sectors from model lists - #aggregate Industry lists - if(length(indIndecesToAggregate)!=0){ + counter <- 1 + for (aggSpec in model$AggregationSpecs){ + + #logging::loginfo(paste0("Aggregating sectors to ",model$AggregationSpecs$Sectors[1], "...")) + logging::loginfo(paste0("Aggregating sectors to ",aggSpec$Sectors[1], "...")) + #aggregating economic tables + model$MakeTransactions <- aggregateMakeTable(model, aggSpec) + model$UseTransactions <- aggregateUseTable(model, aggSpec) + model$DomesticUseTransactions <- aggregateUseTable(model, aggSpec, domestic = TRUE) + model$UseValueAdded <- aggregateVA(model, aggSpec) + #model$FinalDemand <- aggregateFD(model, aggSpec) #todo + #model$DomesticFinalDemand <- aggregateFD(model, aggSpec) #todo + #model$MarginSectors <- aggregateMarginSectors(model, aggSpec) #todo + #model$Margins <- aggregateMargins(model, aggSpec) - model$Industries <- removeRowsFromList(model$Industries, indIndecesToAggregate) - model$MultiYearIndustryCPI <- aggregateMultiYearCPI(model, mainIndIndex, indIndecesToAggregate, "Industry") - model$MultiYearIndustryOutput <- aggregateMultiYearOutput(model$MultiYearIndustryOutput, mainIndIndex, indIndecesToAggregate) - } - - #aggregate Commodity lists - if(length(comIndecesToAggregate !=0)){ - model$Commodities <- removeRowsFromList(model$Commodities, comIndecesToAggregate) - model$MultiYearCommodityCPI <- aggregateMultiYearCPI(model, mainIndIndex, indIndecesToAggregate, "Commodity") - model$MultiYearIndustryOutput <- aggregateMultiYearOutput(model$MultiYearIndustryOutput, mainComIndex, comIndecesToAggregate) + #model$ValueAddedMeta <- aggregateVAMeta(model, aggSpec) #todo + #model$FinalDemandMeta <- aggregateFDMeta(model, aggSpec) #todo + + #aggregating Crosswalk + model$crosswalk <- aggregateMasterCrosswalk(model, aggSpec) + + #obtaining indeces to aggregate sectors in remaining model objects + #agg<- model$AggregationSpecs$Aggregation$Sectors + #agg <- model$AggregationSpecs$Sectors + agg <- aggSpec$Sectors + + mainComIndex <- getIndex(model$Commodities$Code_Loc, agg[1])#first item in Aggregation is the sector to aggregate to, not to be removed + mainIndIndex <- getIndex(model$Industries$Code_Loc, agg[1]) + comIndecesToAggregate <- which(model$Commodities$Code_Loc %in% agg[2:length(agg)]) #find com indeces containing references to the sectors to be aggregated + indIndecesToAggregate <- which(model$Industries$Code_Loc %in% agg[2:length(agg)]) #find ind indeces containing references to the sectors to be aggregated + + #aggregating (i.e. removing) sectors from model lists + #aggregate Industry lists + if(length(indIndecesToAggregate)!=0){ + + model$Industries <- removeRowsFromList(model$Industries, indIndecesToAggregate) + model$MultiYearIndustryCPI <- aggregateMultiYearCPI(model, mainIndIndex, indIndecesToAggregate, "Industry") + model$MultiYearIndustryOutput <- aggregateMultiYearOutput(model$MultiYearIndustryOutput, mainIndIndex, indIndecesToAggregate) + } + + #aggregate Commodity lists + if(length(comIndecesToAggregate !=0)){ + model$Commodities <- removeRowsFromList(model$Commodities, comIndecesToAggregate) + model$MultiYearCommodityCPI <- aggregateMultiYearCPI(model, mainIndIndex, indIndecesToAggregate, "Commodity") + model$MultiYearIndustryOutput <- aggregateMultiYearOutput(model$MultiYearIndustryOutput, mainComIndex, comIndecesToAggregate) + } + + model <- calculateIndustryCommodityOutput(model) + + counter <- counter + 1 } - model <- calculateIndustryCommodityOutput(model) - return(model) } @@ -75,10 +82,11 @@ getAggregationSpecs <- function (model){ #TODO: Complete this function #' Aggregate satellite tables from static file based on specs #' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param aggregationSpecs Specifications for aggregation #' @param sattable A standardized satellite table with resource and emission names from original sources. #' @param sat The abbreviation for the satellite table. #' @return A standardized satellite table with aggregated sectors added. -aggSatelliteTable <- function (model, sattable, sat){ +aggSatelliteTable <- function (model, aggregationSpecs, sattable, sat){ #if(!is.null(ENV_AGG_FILE)) #TODO: implement option to aggregate according to specified file @@ -89,7 +97,8 @@ aggSatelliteTable <- function (model, sattable, sat){ newSatTable <- sattable #agg <- model$AggregationSpecs$Aggregation$Sectors - agg <- model$AggregationSpecs$Sectors + #agg <- model$AggregationSpecs$Sectors + agg <- aggregationSpecs$Sectors #variable to determine length of Code substring, i.e., code length minus geographic identifer and separator character (e.g. "/US") codeLength <- nchar(gsub("/.*", "", agg[1])) @@ -168,11 +177,13 @@ aggregateMultiYearCPI <- function(model, mainIndex, indecesToAggregate, type){ #TODO: rewrite this function to use matrix calculations when possible #' Aggregate the MakeTable based on specified source file #' @param model Model file loaded with IO tables +#' @param aggregationSpecs Specifications for aggregation #' @return An aggregated MakeTable. -aggregateMakeTable <- function(model){ +aggregateMakeTable <- function(model, aggregationSpecs){ #agg <- model$AggregationSpecs$Aggregation$Sectors - agg <- model$AggregationSpecs$Sectors + #agg <- model$AggregationSpecs$Sectors + agg <- aggregationSpecs$Sector count <- 1 @@ -201,18 +212,18 @@ aggregateMakeTable <- function(model){ #TODO: rewrite this function to use matrix calculations when possible #' Aggregate the UseTable based on specified source file #' @param model Model file loaded with IO tables +#' @param aggregationSpecs Specifications for aggregation #' @param domestic Boolean to indicate whether to aggregate the UseTransactions or DomesticUseTransactions table #' @return An aggregated UseTransactions or DomesticUseTransactions Table. -aggregateUseTable <- function(model, domestic = FALSE){ +aggregateUseTable <- function(model, aggregationSpecs, domestic = FALSE){ #agg <- model$AggregationSpecs$Aggregation$Sectors - agg <- model$AggregationSpecs$Sectors + #agg <- model$AggregationSpecs$Sectors + agg <- aggregationSpecs$Sectors count <- 1 - - for (sector in agg){ if(count == 1){ @@ -251,11 +262,13 @@ aggregateUseTable <- function(model, domestic = FALSE){ #TODO: rewrite this function to use matrix calculations when possible #' Aggregate the MakeTable based on specified source file #' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param aggregationSpecs Specifications for aggregation #' @return An aggregated MakeTable. -aggregateVA <- function(model){ +aggregateVA <- function(model, aggregationSpecs){ #agg <- model$AggregationSpecs$Aggregation$Sectors - agg <- model$AggregationSpecs$Sectors + #agg <- model$AggregationSpecs$Sectors + agg <- aggregationSpecs$Sectors count <- 1 @@ -367,11 +380,13 @@ getIndex <- function(sectorList, sector){ #' Aggregate the MasterCrosswalk to include the new sectors for aggregation #' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param aggregationSpecs Specifications for aggregation #' @return crosswalk with aggregated sectors removed -aggregateMasterCrosswalk <- function (model){ +aggregateMasterCrosswalk <- function (model, aggregationSpecs){ #agg <- model$AggregationSpecs$Aggregation$Sectors - agg <- model$AggregationSpecs$Sectors + #agg <- model$AggregationSpecs$Sectors + agg <- aggregationSpecs$Sectors crosswalk <- model$crosswalk#temp variable for storing intermediate changes new_cw <- crosswalk#variable to return with complete changes to crosswalk#temp diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index b1c36893..8ea752af 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -143,7 +143,10 @@ conformTbStoIOSchema <- function(tbs, sat_spec, model) { # Check if aggregation is needed based on model metadata #if(!is.null(model$AggregationSpecs$Aggregation) & !is.null(sat_spec$StaticFile)){ if(!is.null(model$AggregationSpecs) & !is.null(sat_spec$StaticFile)){ - tbs <- aggSatelliteTable(model, tbs, sat_spec) + for(aggSpecs in model$AggregationSpecs){ + tbs <- aggSatelliteTable(model, aggSpecs, tbs, sat_spec) + } + } # Check if disaggregation is needed based on model metadata if(!is.null(model$specs$DisaggregationSpecs) & !is.null(sat_spec$StaticFile)){ diff --git a/inst/extdata/aggspecs/ElectricityAggregationDetail.yml b/inst/extdata/aggspecs/ElectricityAggregationDetail.yml index ee6e2abc..180b690c 100644 --- a/inst/extdata/aggspecs/ElectricityAggregationDetail.yml +++ b/inst/extdata/aggspecs/ElectricityAggregationDetail.yml @@ -1,3 +1,4 @@ -Aggregation: - Sectors: ["221100/US", "S00101/US", "S00202/US"] # Aggregates to first sector listed - AssociatedDisaggregation: 221100/US +Aggregation: + 221100/US: + Sectors: ["221100/US", "S00101/US", "S00202/US"] # Aggregates to first sector listed + #AssociatedDisaggregation: 221100/US From be62e3f2b1d28c64b747c2aad9971c6b737364fc Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 6 Oct 2021 16:56:04 -0400 Subject: [PATCH 086/319] Remove obsolete and commented code --- R/AggregationFunctions.R | 23 ++----------------- R/LoadIOTables.R | 2 -- R/LoadSatellites.R | 2 -- .../ElectricityDisaggregationDetail.yml | 6 ++--- 4 files changed, 5 insertions(+), 28 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 90ac3c9d..e62a6d74 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -6,7 +6,6 @@ aggregateModel <- function (model){ counter <- 1 for (aggSpec in model$AggregationSpecs){ - #logging::loginfo(paste0("Aggregating sectors to ",model$AggregationSpecs$Sectors[1], "...")) logging::loginfo(paste0("Aggregating sectors to ",aggSpec$Sectors[1], "...")) #aggregating economic tables model$MakeTransactions <- aggregateMakeTable(model, aggSpec) @@ -25,8 +24,6 @@ aggregateModel <- function (model){ model$crosswalk <- aggregateMasterCrosswalk(model, aggSpec) #obtaining indeces to aggregate sectors in remaining model objects - #agg<- model$AggregationSpecs$Aggregation$Sectors - #agg <- model$AggregationSpecs$Sectors agg <- aggSpec$Sectors mainComIndex <- getIndex(model$Commodities$Code_Loc, agg[1])#first item in Aggregation is the sector to aggregate to, not to be removed @@ -63,14 +60,13 @@ aggregateModel <- function (model){ #' @param model Model file loaded with IO tables #' @return A model with the specified aggregation and disaggregation specs. getAggregationSpecs <- function (model){ - #model$AggregationSpecs$Aggregation <- vector(mode='list') + model$AggregationSpecs <- vector(mode = 'list') for (configFile in model$specs$AggregationSpecs){ logging::loginfo(paste0("Loading aggregation specs for ", configFile, "...")) - config <- getConfiguration(configFile, "agg")#maybe chnage this flag from disagg to non-BEA + config <- getConfiguration(configFile, "agg") if('Aggregation' %in% names(config)){ - #model$AggregationSpecs$Aggregation <- append(model$AggregationSpecs$Aggregation, config$Aggregation) model$AggregationSpecs <- append(model$AggregationSpecs, config$Aggregation) } @@ -96,8 +92,6 @@ aggSatelliteTable <- function (model, aggregationSpecs, sattable, sat){ #obtaining indeces to aggregate sectors in remaining model objects newSatTable <- sattable - #agg <- model$AggregationSpecs$Aggregation$Sectors - #agg <- model$AggregationSpecs$Sectors agg <- aggregationSpecs$Sectors #variable to determine length of Code substring, i.e., code length minus geographic identifer and separator character (e.g. "/US") @@ -181,8 +175,6 @@ aggregateMultiYearCPI <- function(model, mainIndex, indecesToAggregate, type){ #' @return An aggregated MakeTable. aggregateMakeTable <- function(model, aggregationSpecs){ - #agg <- model$AggregationSpecs$Aggregation$Sectors - #agg <- model$AggregationSpecs$Sectors agg <- aggregationSpecs$Sector count <- 1 @@ -217,8 +209,6 @@ aggregateMakeTable <- function(model, aggregationSpecs){ #' @return An aggregated UseTransactions or DomesticUseTransactions Table. aggregateUseTable <- function(model, aggregationSpecs, domestic = FALSE){ - #agg <- model$AggregationSpecs$Aggregation$Sectors - #agg <- model$AggregationSpecs$Sectors agg <- aggregationSpecs$Sectors @@ -266,8 +256,6 @@ aggregateUseTable <- function(model, aggregationSpecs, domestic = FALSE){ #' @return An aggregated MakeTable. aggregateVA <- function(model, aggregationSpecs){ - #agg <- model$AggregationSpecs$Aggregation$Sectors - #agg <- model$AggregationSpecs$Sectors agg <- aggregationSpecs$Sectors count <- 1 @@ -368,11 +356,6 @@ getIndex <- function(sectorList, sector){ index <- which(sectorList %in% sector) - # if(length(index)==0){ - # logging::logwarn(paste0("'", sector, "' string does not occur in current list.'")) - # - # } - return(index) } @@ -384,8 +367,6 @@ getIndex <- function(sectorList, sector){ #' @return crosswalk with aggregated sectors removed aggregateMasterCrosswalk <- function (model, aggregationSpecs){ - #agg <- model$AggregationSpecs$Aggregation$Sectors - #agg <- model$AggregationSpecs$Sectors agg <- aggregationSpecs$Sectors crosswalk <- model$crosswalk#temp variable for storing intermediate changes diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index f45c62ff..20bd3f1d 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -25,12 +25,10 @@ loadIOData <- function(model) { model <- getAggregationSpecs(model) # Check for aggregation - #if(length(model$AggregationSpecs$Aggregation)!=0){ if(length(model$AggregationSpecs)!=0){ model <- aggregateModel(model) } # Check for disaggregation - #if(length(model$DisaggregationSpecs$Disaggregation)!=0){ if(length(model$DisaggregationSpecs)!=0){ model <- disaggregateModel(model) } diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index 8ea752af..32a73cc4 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -141,7 +141,6 @@ conformTbStoIOSchema <- function(tbs, sat_spec, model) { tbs <- mapFlowTotalsbySectorandLocationfromNAICStoBEA(tbs, sat_spec$DataYears[1], model) } # Check if aggregation is needed based on model metadata - #if(!is.null(model$AggregationSpecs$Aggregation) & !is.null(sat_spec$StaticFile)){ if(!is.null(model$AggregationSpecs) & !is.null(sat_spec$StaticFile)){ for(aggSpecs in model$AggregationSpecs){ tbs <- aggSatelliteTable(model, aggSpecs, tbs, sat_spec) @@ -150,7 +149,6 @@ conformTbStoIOSchema <- function(tbs, sat_spec, model) { } # Check if disaggregation is needed based on model metadata if(!is.null(model$specs$DisaggregationSpecs) & !is.null(sat_spec$StaticFile)){ - #for (disagg in model$DisaggregationSpecs$Disaggregation){ for (disagg in model$DisaggregationSpecs){ tbs <- disaggregateSatelliteTable(disagg, tbs, sat_spec) } diff --git a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml index df99f0e4..200571a9 100644 --- a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml +++ b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml @@ -1,6 +1,6 @@ -Aggregation: - Sectors: ["221100/US", "S00101/US", "S00202/US"] # Aggregates to first sector listed - AssociatedDisaggregation: 221100/US +#Aggregation: +# Sectors: ["221100/US", "S00101/US", "S00202/US"] # Aggregates to first sector listed +# AssociatedDisaggregation: 221100/US Disaggregation: 221100/US: OriginalSectorCode: "221100/US" From c97634671599f04d1ad094545716413bc0e1d40e Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 6 Oct 2021 16:59:07 -0400 Subject: [PATCH 087/319] Removed electricity aggregation parameters from disaggregation specs yml. --- inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml index 200571a9..16d0c63b 100644 --- a/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml +++ b/inst/extdata/disaggspecs/ElectricityDisaggregationDetail.yml @@ -1,6 +1,3 @@ -#Aggregation: -# Sectors: ["221100/US", "S00101/US", "S00202/US"] # Aggregates to first sector listed -# AssociatedDisaggregation: 221100/US Disaggregation: 221100/US: OriginalSectorCode: "221100/US" From d89924d50383b41c969d2a02713e788e6a075786 Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 6 Oct 2021 17:22:04 -0400 Subject: [PATCH 088/319] Added aggregation specs line to USEEIOv2.1.yml file --- inst/extdata/modelspecs/USEEIOv2.1.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/inst/extdata/modelspecs/USEEIOv2.1.yml b/inst/extdata/modelspecs/USEEIOv2.1.yml index a8e5810d..9db6cbff 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1.yml @@ -10,6 +10,7 @@ BasewithRedefinitions: FALSE CommodityorIndustryType: "Commodity" ScrapIncluded: FALSE DisaggregationSpecs: ["ElectricityDisaggregationDetail", "WasteDisaggregationDetail"] #Name of disaggregation yml file. +AggregationSpecs: ["ElectricityAggregationDetail"] SatelliteTable: WAT: From 86bc9ef5f591140489507eb25c8a39e49641b5f4 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 7 Oct 2021 14:49:16 -0400 Subject: [PATCH 089/319] handle crosswalk disaggregation when a sector to be disaggregated does not have naics (e.g. gov't sector for electricity) --- R/DisaggregateFunctions.R | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 475b6cd3..3fdef6ba 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -682,7 +682,13 @@ disaggregateMasterCrosswalk <- function (model, disagg){ disaggNAICSIndex <- which(new_cw$USEEIO == substr(disagg$OriginalSectorCode,1,secLength)) crosswalkRow <- new_cw[disaggNAICSIndex[1],] #extract current row where code in last column needs to be updated - rowComparisons <- grepl(crosswalkRow$NAICS[1], disagg$NAICSSectorCW$NAICS_2012_Code) #compare the value in the first column (NAICS) to the NAICS values in the disaggCrosswalk. Result is a string with TRUE where first column is a substring of values in disaggCrosswalk + # if NAICS is NA map the entire new list of sectors + if(is.na(crosswalkRow$NAICS[1])) { + rowComparisons[1:length(disagg$DisaggregatedSectorCodes)] <- TRUE + } else { + #compare the value in the first column (NAICS) to the NAICS values in the disaggCrosswalk. Result is a string with TRUE where first column is a substring of values in disaggCrosswalk + rowComparisons <- grepl(crosswalkRow$NAICS[1], disagg$NAICSSectorCW$NAICS_2012_Code) + } rowReplacements <- disagg$NAICSSectorCW$NAICS_2012_Code[rowComparisons] #Get the NAICS sector codes in the disagg crosswalk that are a match for the NAICS substring in the master crosswalk rowReplacements <- substr(disagg$NAICSSectorCW$USEEIO_Code[rowComparisons],1,secLength) #Get the disaggregated sector codes that are mapped to the matches of the NAICS substring From 77e8600216033b3066cd3ee1d6f249cbca8fdbf6 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 7 Oct 2021 16:06:16 -0400 Subject: [PATCH 090/319] consolidate function to collapse TBS --- R/SatelliteFunctions.R | 69 +++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/R/SatelliteFunctions.R b/R/SatelliteFunctions.R index dbdb05a5..03d5f787 100644 --- a/R/SatelliteFunctions.R +++ b/R/SatelliteFunctions.R @@ -57,28 +57,8 @@ mapFlowTotalsbySectorandLocationfromNAICStoBEA <- function (totals_by_sector, to # Assign sector names to totals_by_sector_BEA totals_by_sector_BEA <- merge(totals_by_sector_BEA, sectornames, by = "Sector", all.x = TRUE) - # Add FlowUUID field for backwards compatibility if it does not exist - if(!"FlowUUID" %in% colnames(totals_by_sector_BEA)){ - totals_by_sector_BEA[, "FlowUUID"] <- "" - } - # Aggregate to BEA sectors using unique aggregation functions depending on the quantitative variable - totals_by_sector_BEA_agg <- dplyr::group_by(totals_by_sector_BEA, - Flowable, Context, FlowUUID, Sector, SectorName, - Location, Unit, Year, DistributionType) - totals_by_sector_BEA_agg <- dplyr::summarize( - totals_by_sector_BEA_agg, - FlowAmountAgg = sum(FlowAmount), - Min = min(Min), - Max = max(Max), - DataReliability = stats::weighted.mean(DataReliability, FlowAmount), - TemporalCorrelation = stats::weighted.mean(TemporalCorrelation, FlowAmount), - GeographicalCorrelation = stats::weighted.mean(GeographicalCorrelation, FlowAmount), - TechnologicalCorrelation = stats::weighted.mean(TechnologicalCorrelation, FlowAmount), - DataCollection = stats::weighted.mean(DataCollection, FlowAmount), - MetaSources = dplyr::nth(MetaSources, which.max(nchar(MetaSources))), - .groups = 'drop' - ) - colnames(totals_by_sector_BEA_agg)[colnames(totals_by_sector_BEA_agg)=="FlowAmountAgg"] <- "FlowAmount" + totals_by_sector_BEA_agg <- collapseTBS(totals_by_sector_BEA) + return(totals_by_sector_BEA_agg) } @@ -130,7 +110,7 @@ stackSatelliteTables <- function (sattable1, sattable2) { return(rbind(sattable1, sattable2)) } -#' Aggregate (FlowAmount in) satellite tables from one BEA level to another +#' Aggregate (FlowAmount in) satellite tables from BEA level to model configuration #' @param sattable A satellite table to be aggregated based on the level (Detail, Summary, or Sector) of BEA code. #' @param from_level The level of BEA code in the satellite table. #' @param model A complete EEIO model: a list with USEEIO model components and attributes. @@ -141,22 +121,43 @@ aggregateSatelliteTable <- function(sattable, from_level, model) { to_code <- "USEEIO" # Merge the satellite table with model$crosswalk sattable <- merge(sattable, unique(model$crosswalk[, c(from_code, to_code)]), by.x = "Sector", by.y = from_code) + sattable_agg <- collapseTBS(sattable) + return(sattable_agg) +} + +#' Collapse a totals by sector table so that each flow sector combination exists only once +#' @param tbs totals by sector sourced from satellite table +#' @return aggregated totals by sector +collapseTBS <- function(tbs) { # Replace NA in DQ cols with 5 - dq_fields <- getDQfields(sattable) + dq_fields <- getDQfields(tbs) for (f in dq_fields) { - sattable[is.na(sattable[, f]), f] <- 5 + tbs[is.na(tbs[, f]), f] <- 5 } # Add FlowUUID field for backwards compatibility if it does not exist - if(!"FlowUUID" %in% colnames(sattable)){ - sattable[, "FlowUUID"] <- "" + if(!"FlowUUID" %in% colnames(tbs)){ + tbs[, "FlowUUID"] <- "" } - # Aggregate FlowAmount by specified columns - aggbycolumns <- c(to_code, "Flowable", "Context", "Unit", dq_fields, - "Year", "MetaSources", "Location", "FlowUUID") - # Need particular aggregation functions, e.g. sum, weighted avg on ReliabilityScore - sattable_agg <- stats::aggregate(sattable$FlowAmount, by = sattable[, aggbycolumns], sum) - colnames(sattable_agg)[c(1, ncol(sattable_agg))] <- c("Sector", "FlowAmount") - return(sattable_agg) + + # Aggregate to BEA sectors using unique aggregation functions depending on the quantitative variable + tbs_agg <- dplyr::group_by(tbs, Flowable, Context, FlowUUID, Sector, SectorName, + Location, Unit, Year, DistributionType) + tbs_agg <- dplyr::summarize( + tbs_agg, + FlowAmountAgg = sum(FlowAmount), + Min = min(Min), + Max = max(Max), + DataReliability = stats::weighted.mean(DataReliability, FlowAmount), + TemporalCorrelation = stats::weighted.mean(TemporalCorrelation, FlowAmount), + GeographicalCorrelation = stats::weighted.mean(GeographicalCorrelation, FlowAmount), + TechnologicalCorrelation = stats::weighted.mean(TechnologicalCorrelation, FlowAmount), + DataCollection = stats::weighted.mean(DataCollection, FlowAmount), + MetaSources = dplyr::nth(MetaSources, which.max(nchar(MetaSources))), + .groups = 'drop' + ) + colnames(tbs_agg)[colnames(tbs_agg)=="FlowAmountAgg"] <- "FlowAmount" + return(tbs_agg) + } #' Adds an indicator score to a totals by sector table. A short cut alternative to getting totals before model result From 0a82b6cc6a341176f143d8c4d0dec7a2aaec8f08 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 7 Oct 2021 16:07:27 -0400 Subject: [PATCH 091/319] update sat table aggregation to replace sector codes and names with new sector before collapsing --- R/AggregationFunctions.R | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index f55e8dbb..734eb8b6 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -69,36 +69,16 @@ aggSatelliteTable <- function (model, sattable, sat){ #agg <- model$DisaggregationSpecs$Aggregation agg <- model$DisaggregationSpecs$Aggregation$Sectors - #variable to determine length of Code substring, i.e., code length minus geographic identifer and separator character (e.g. "/US") + #variable to determine length of Code substring, i.e., code length minus geographic identifier and separator character (e.g. "/US") codeLength <- nchar(gsub("/.*", "", agg[1])) aggCodes <- substr(agg,1,codeLength) - mainIndeces <- getIndex(newSatTable$Sector, aggCodes[1])#row indeces in sattable where the sector field contains the code for the sector to aggregate to - - - for (sectorCode in aggCodes[2:length(aggCodes)]){ - indecesToAggregate <- which(newSatTable$Sector %in% sectorCode) #row indeces in sattable where the Sector field contaisn the codes for the sectors to be aggregated - - if(length(indecesToAggregate) !=0){ - sattableToAgg <- newSatTable[indecesToAggregate,]#get rows corresponding to flows included in the sector to be aggregated - - for(currentRow in 1:nrow(sattableToAgg)){ - - #get index in sattable that matches the flow in the main sector with the flow in the current sector to be aggregated - sattableMainRowIndex <- which(newSatTable$Sector == aggCodes[1] & newSatTable$Flowable == sattableToAgg$Flowable[currentRow]) - - #add value from sector to add to main sector - newSatTable$FlowAmount[sattableMainRowIndex] <- newSatTable$FlowAmount[sattableMainRowIndex] + sattableToAgg$FlowAmount[currentRow] - - } - - newSatTable <- removeRowsFromList(newSatTable, indecesToAggregate)#remove aggregated sectors - - }else{ - next - } - - }#end for loop + if(any(newSatTable$Sector %in% aggCodes[-1])) { + sectorName <- newSatTable$SectorName[newSatTable$Sector == aggCodes[1]][1] + newSatTable$SectorName[which(newSatTable$Sector %in% aggCodes[-1])] <- sectorName + newSatTable$Sector[which(newSatTable$Sector %in% aggCodes[-1])] <- aggCodes[1] + newSatTable <- collapseTBS(newSatTable) + } return(newSatTable) } From 3a1c3c1248750d3d02031ca25e49ede0d5056159 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 7 Oct 2021 16:30:04 -0400 Subject: [PATCH 092/319] change function name to aggregateSectorsinTBS --- R/AggregationFunctions.R | 10 +--------- R/LoadSatellites.R | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 2e7014d1..ade6bfb2 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -75,23 +75,15 @@ getAggregationSpecs <- function (model){ return(model) } -#TODO: Complete this function #' Aggregate satellite tables from static file based on specs #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param aggregationSpecs Specifications for aggregation #' @param sattable A standardized satellite table with resource and emission names from original sources. #' @param sat The abbreviation for the satellite table. #' @return A standardized satellite table with aggregated sectors added. -aggSatelliteTable <- function (model, aggregationSpecs, sattable, sat){ +aggregateSectorsinTBS <- function (model, aggregationSpecs, sattable, sat){ - - #if(!is.null(ENV_AGG_FILE)) #TODO: implement option to aggregate according to specified file - #if(FLOWSA) #TODO: implement option to aggregate based on flowsa data (e.g. by NAICS sector as mapped by crosswalk) - #else #Default aggregation: sum up the relevant sectors in tbs - - #obtaining indeces to aggregate sectors in remaining model objects newSatTable <- sattable - agg <- aggregationSpecs$Sectors #variable to determine length of Code substring, i.e., code length minus geographic identifier and separator character (e.g. "/US") diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index 3343a85f..4c961f07 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -143,7 +143,7 @@ conformTbStoIOSchema <- function(tbs, sat_spec, model) { # Check if aggregation is needed based on model metadata if(!is.null(model$AggregationSpecs) & !is.null(sat_spec$StaticFile)){ for(aggSpecs in model$AggregationSpecs){ - tbs <- aggSatelliteTable(model, aggSpecs, tbs, sat_spec) + tbs <- aggregateSectorsinTBS(model, aggSpecs, tbs, sat_spec) } } From bf282a185956c5a549b268e77791dc49e84402ef Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 7 Oct 2021 16:53:37 -0400 Subject: [PATCH 093/319] conform TBS to standard earlier to avoid missing fields across satellite tables --- R/DisaggregateFunctions.R | 3 ++- R/LoadSatellites.R | 8 ++++---- R/SatelliteFunctions.R | 9 +++------ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 37c9944c..66d83b4b 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -321,13 +321,14 @@ disaggregateSatelliteTable <- function (disagg, sattable, sat_spec) { } else if(!is.null(disagg$EnvFileDF)) { # If satellite table data is provided as new flow by sector totals file # Select only those rows from the disaggregation env file that apply for this satellite table - new_sector_totals <- subset(disagg$EnvFileDF, SatelliteTable==sat_spec$Abbreviation, colnames(sattable)) + new_sector_totals <- subset(disagg$EnvFileDF, SatelliteTable==sat_spec$Abbreviation) if(nrow(new_sector_totals)==0) { logging::logwarn(paste0("No data found for disaggregation of ",sat_spec$Abbreviation, " for ", disagg$OriginalSectorCode, " - applying default allocation")) sattable <- rbind(sattable, disaggregateSatelliteSubsetByRatio(subset(sattable, Sector==original_code, colnames(sattable)), disagg)) } else { # Check for errors in satellite table + new_sector_totals <- conformTbStoStandardSatTable(new_sector_totals) included_sectors <- unique(new_sector_totals[,"Sector"]) if (!identical(sort(included_sectors),sort(unlist(gsub("/.*","",disagg$DisaggregatedSectorCodes))))) { logging::logwarn("Satellite table does not include all disaggregated sectors") diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index 4c961f07..eecd7e58 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -47,8 +47,11 @@ loadSatTables <- function(model) { ### Generate totals_by_sector, tbs tbs0 <- generateTbSfromSatSpec(sat_spec, model) + # Convert totals_by_sector to standard satellite table format + tbs <- conformTbStoStandardSatTable(tbs0) + ### Make tbs conform to the model schema - tbs <- conformTbStoIOSchema(tbs0, sat_spec, model) + tbs <- conformTbStoIOSchema(tbs, sat_spec, model) ##Check for any loss of flow data checkSatelliteFlowLoss(tbs0,tbs) @@ -58,9 +61,6 @@ loadSatTables <- function(model) { # Only setting TemporalCorrelation for now tbs <- scoreContextualDQ(tbs) - # Convert totals_by_sector to standard satellite table format - tbs <- conformTbStoStandardSatTable(tbs) - #Map names for files not already using FEDEFL if (!substring(sat_spec$OriginalFlowSource,1,6) == 'FEDEFL') { tbs <- mapListbyName(tbs, sat_spec) diff --git a/R/SatelliteFunctions.R b/R/SatelliteFunctions.R index 03d5f787..c0a41215 100644 --- a/R/SatelliteFunctions.R +++ b/R/SatelliteFunctions.R @@ -55,8 +55,10 @@ mapFlowTotalsbySectorandLocationfromNAICStoBEA <- function (totals_by_sector, to sectornames <- rbind.data.frame(sectornames, c("F010", "Household")) } # Assign sector names to totals_by_sector_BEA + if("SectorName" %in% colnames(totals_by_sector_BEA)){ + totals_by_sector_BEA$SectorName <- NULL + } totals_by_sector_BEA <- merge(totals_by_sector_BEA, sectornames, by = "Sector", all.x = TRUE) - totals_by_sector_BEA_agg <- collapseTBS(totals_by_sector_BEA) return(totals_by_sector_BEA_agg) @@ -134,11 +136,6 @@ collapseTBS <- function(tbs) { for (f in dq_fields) { tbs[is.na(tbs[, f]), f] <- 5 } - # Add FlowUUID field for backwards compatibility if it does not exist - if(!"FlowUUID" %in% colnames(tbs)){ - tbs[, "FlowUUID"] <- "" - } - # Aggregate to BEA sectors using unique aggregation functions depending on the quantitative variable tbs_agg <- dplyr::group_by(tbs, Flowable, Context, FlowUUID, Sector, SectorName, Location, Unit, Year, DistributionType) From ddfe510531acd8b442ec1f99ae743535eee9052f Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 7 Oct 2021 18:03:24 -0400 Subject: [PATCH 094/319] add back in another conformTBStoStandardSatTable to avoid tables being stored as tibble --- R/LoadSatellites.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index eecd7e58..d4fe90f5 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -59,7 +59,10 @@ loadSatTables <- function(model) { # Add in DQ columns and additional contextual scores not provided # Only setting TemporalCorrelation for now - tbs <- scoreContextualDQ(tbs) + tbs <- scoreContextualDQ(tbs) + + # Convert totals_by_sector to standard satellite table format + tbs <- conformTbStoStandardSatTable(tbs) #Map names for files not already using FEDEFL if (!substring(sat_spec$OriginalFlowSource,1,6) == 'FEDEFL') { From 1bc015b63a49e93de9b1d03285fb627b764dcbc6 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 8 Oct 2021 09:15:44 -0400 Subject: [PATCH 095/319] move updating of sector names to collapseTBS --- R/AggregationFunctions.R | 4 +--- R/SatelliteFunctions.R | 41 +++++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index ade6bfb2..ab0dac5d 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -91,10 +91,8 @@ aggregateSectorsinTBS <- function (model, aggregationSpecs, sattable, sat){ aggCodes <- substr(agg,1,codeLength) if(any(newSatTable$Sector %in% aggCodes[-1])) { - sectorName <- newSatTable$SectorName[newSatTable$Sector == aggCodes[1]][1] - newSatTable$SectorName[which(newSatTable$Sector %in% aggCodes[-1])] <- sectorName newSatTable$Sector[which(newSatTable$Sector %in% aggCodes[-1])] <- aggCodes[1] - newSatTable <- collapseTBS(newSatTable) + newSatTable <- collapseTBS(newSatTable, model) } return(newSatTable) diff --git a/R/SatelliteFunctions.R b/R/SatelliteFunctions.R index c0a41215..cc905d94 100644 --- a/R/SatelliteFunctions.R +++ b/R/SatelliteFunctions.R @@ -45,21 +45,7 @@ mapFlowTotalsbySectorandLocationfromNAICStoBEA <- function (totals_by_sector, to # Rename BEA to Sector colnames(totals_by_sector_BEA)[colnames(totals_by_sector_BEA)=="BEA"] <- "Sector" - # Add in BEA industry names - sectornames <- model$Industries[, c("Code", "Name")] - colnames(sectornames) <- c("Sector", "SectorName") - # Add F01000 or F010 to sectornames - if (model$specs$BaseIOLevel=="Detail") { - sectornames <- rbind.data.frame(sectornames, c("F01000", "Household")) - } else { - sectornames <- rbind.data.frame(sectornames, c("F010", "Household")) - } - # Assign sector names to totals_by_sector_BEA - if("SectorName" %in% colnames(totals_by_sector_BEA)){ - totals_by_sector_BEA$SectorName <- NULL - } - totals_by_sector_BEA <- merge(totals_by_sector_BEA, sectornames, by = "Sector", all.x = TRUE) - totals_by_sector_BEA_agg <- collapseTBS(totals_by_sector_BEA) + totals_by_sector_BEA_agg <- collapseTBS(totals_by_sector_BEA, model) return(totals_by_sector_BEA_agg) } @@ -120,17 +106,34 @@ stackSatelliteTables <- function (sattable1, sattable2) { aggregateSatelliteTable <- function(sattable, from_level, model) { # Determine the columns within MasterCrosswalk that will be used in aggregation from_code <- paste0("BEA_", from_level) - to_code <- "USEEIO" # Merge the satellite table with model$crosswalk - sattable <- merge(sattable, unique(model$crosswalk[, c(from_code, to_code)]), by.x = "Sector", by.y = from_code) - sattable_agg <- collapseTBS(sattable) + sattable <- merge(sattable, unique(model$crosswalk[, c(from_code, "USEEIO")]), by.x = "Sector", by.y = from_code) + # Update Sector field + sattable$Sector <- sattable$USEEIO + sattable_agg <- collapseTBS(sattable, model) return(sattable_agg) } #' Collapse a totals by sector table so that each flow sector combination exists only once #' @param tbs totals by sector sourced from satellite table +#' @param model A EEIO model with IOdata, and model specs #' @return aggregated totals by sector -collapseTBS <- function(tbs) { +collapseTBS <- function(tbs, model) { + # Add in BEA industry names + sectornames <- model$Industries[, c("Code", "Name")] + colnames(sectornames) <- c("Sector", "SectorName") + # Add F01000 or F010 to sectornames + if (model$specs$BaseIOLevel=="Detail") { + sectornames <- rbind.data.frame(sectornames, c("F01000", "Household")) + } else { + sectornames <- rbind.data.frame(sectornames, c("F010", "Household")) + } + # Assign sector names to TBS + if("SectorName" %in% colnames(tbs)){ + tbs$SectorName <- NULL + } + tbs <- merge(tbs, sectornames, by = "Sector", all.x = TRUE) + # Replace NA in DQ cols with 5 dq_fields <- getDQfields(tbs) for (f in dq_fields) { From b30a8fd2d37a7e05e685b915205981b2c1a063d5 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 8 Oct 2021 09:16:02 -0400 Subject: [PATCH 096/319] consolidate logic for agg/disagg of satellite table --- R/LoadSatellites.R | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index d4fe90f5..081d2933 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -143,16 +143,13 @@ conformTbStoIOSchema <- function(tbs, sat_spec, model) { } else if ("NAICS" %in% sat_spec$SectorListSource) { tbs <- mapFlowTotalsbySectorandLocationfromNAICStoBEA(tbs, sat_spec$DataYears[1], model) } - # Check if aggregation is needed based on model metadata - if(!is.null(model$AggregationSpecs) & !is.null(sat_spec$StaticFile)){ - for(aggSpecs in model$AggregationSpecs){ + + # Check if aggregation or disaggregation are needed based on model metadata + if(!is.null(sat_spec$StaticFile)) { + for(aggSpecs in model$AggregationSpecs) { tbs <- aggregateSectorsinTBS(model, aggSpecs, tbs, sat_spec) } - - } - # Check if disaggregation is needed based on model metadata - if(!is.null(model$specs$DisaggregationSpecs) & !is.null(sat_spec$StaticFile)){ - for (disagg in model$DisaggregationSpecs){ + for (disagg in model$DisaggregationSpecs) { tbs <- disaggregateSatelliteTable(disagg, tbs, sat_spec) } } From 1a61369fc18db6f6063e80645f4dda7b3030e97b Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 8 Oct 2021 10:00:43 -0400 Subject: [PATCH 097/319] update documentation --- man/aggregateMakeTable.Rd | 4 +++- man/aggregateMasterCrosswalk.Rd | 8 +++++--- man/aggregateResultMatrix.Rd | 4 +--- man/aggregateResultTable.Rd | 4 +--- man/aggregateSatelliteTable.Rd | 8 +++----- ...lliteTable.Rd => aggregateSectorsinTBS.Rd} | 8 +++++--- man/aggregateUseTable.Rd | 4 +++- man/aggregateVA.Rd | 4 +++- man/collapseTBS.Rd | 19 +++++++++++++++++++ man/generateModelSectorSchema.Rd | 2 +- man/getAggregationSpecs.Rd | 17 +++++++++++++++++ man/getConfiguration.Rd | 2 +- 12 files changed, 62 insertions(+), 22 deletions(-) rename man/{aggSatelliteTable.Rd => aggregateSectorsinTBS.Rd} (76%) create mode 100644 man/collapseTBS.Rd create mode 100644 man/getAggregationSpecs.Rd diff --git a/man/aggregateMakeTable.Rd b/man/aggregateMakeTable.Rd index 9fc307a9..38d35b49 100644 --- a/man/aggregateMakeTable.Rd +++ b/man/aggregateMakeTable.Rd @@ -4,10 +4,12 @@ \alias{aggregateMakeTable} \title{Aggregate the MakeTable based on specified source file} \usage{ -aggregateMakeTable(model) +aggregateMakeTable(model, aggregationSpecs) } \arguments{ \item{model}{Model file loaded with IO tables} + +\item{aggregationSpecs}{Specifications for aggregation} } \value{ An aggregated MakeTable. diff --git a/man/aggregateMasterCrosswalk.Rd b/man/aggregateMasterCrosswalk.Rd index 98153ee4..9d3b04d1 100644 --- a/man/aggregateMasterCrosswalk.Rd +++ b/man/aggregateMasterCrosswalk.Rd @@ -2,16 +2,18 @@ % Please edit documentation in R/AggregationFunctions.R \name{aggregateMasterCrosswalk} \alias{aggregateMasterCrosswalk} -\title{Disaggregate the MasterCrosswalk to include the new sectors for disaggregation} +\title{Aggregate the MasterCrosswalk on the selected sectors} \usage{ -aggregateMasterCrosswalk(model) +aggregateMasterCrosswalk(model, aggregationSpecs) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} + +\item{aggregationSpecs}{Specifications for aggregation} } \value{ crosswalk with aggregated sectors removed } \description{ -Disaggregate the MasterCrosswalk to include the new sectors for disaggregation +Aggregate the MasterCrosswalk on the selected sectors } diff --git a/man/aggregateResultMatrix.Rd b/man/aggregateResultMatrix.Rd index f3c02ef2..57fa4b21 100644 --- a/man/aggregateResultMatrix.Rd +++ b/man/aggregateResultMatrix.Rd @@ -4,13 +4,11 @@ \alias{aggregateResultMatrix} \title{Aggregate result matrix by rows and columns} \usage{ -aggregateResultMatrix(matrix, from_level, to_level, crosswalk) +aggregateResultMatrix(matrix, to_level, crosswalk) } \arguments{ \item{matrix}{A matrix with sectors as rows and columns} -\item{from_level}{The level of BEA code this matrix starts at} - \item{to_level}{The level of BEA code this matrix will be aggregated to} \item{crosswalk}{Sector crosswalk between levels of detail} diff --git a/man/aggregateResultTable.Rd b/man/aggregateResultTable.Rd index 1c781445..83c98f69 100644 --- a/man/aggregateResultTable.Rd +++ b/man/aggregateResultTable.Rd @@ -4,13 +4,11 @@ \alias{aggregateResultTable} \title{Aggregate result matrix by rows} \usage{ -aggregateResultTable(matrix, from_level, to_level, crosswalk) +aggregateResultTable(matrix, to_level, crosswalk) } \arguments{ \item{matrix}{A matrix with sectors as rows} -\item{from_level}{The level of BEA code this matrix starts at} - \item{to_level}{The level of BEA code this matrix will be aggregated to} \item{crosswalk}{Sector crosswalk between levels of detail} diff --git a/man/aggregateSatelliteTable.Rd b/man/aggregateSatelliteTable.Rd index c7847db8..2a796ea0 100644 --- a/man/aggregateSatelliteTable.Rd +++ b/man/aggregateSatelliteTable.Rd @@ -2,22 +2,20 @@ % Please edit documentation in R/SatelliteFunctions.R \name{aggregateSatelliteTable} \alias{aggregateSatelliteTable} -\title{Aggreagte (FlowAmount in) satellite tables from one BEA level to another} +\title{Aggregate (FlowAmount in) satellite tables from BEA level to model configuration} \usage{ -aggregateSatelliteTable(sattable, from_level, to_level, model) +aggregateSatelliteTable(sattable, from_level, model) } \arguments{ \item{sattable}{A satellite table to be aggregated based on the level (Detail, Summary, or Sector) of BEA code.} \item{from_level}{The level of BEA code in the satellite table.} -\item{to_level}{The level of BEA code this satellite table will be aggregated to.} - \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} } \value{ A more aggregated satellite table. } \description{ -Aggreagte (FlowAmount in) satellite tables from one BEA level to another +Aggregate (FlowAmount in) satellite tables from BEA level to model configuration } diff --git a/man/aggSatelliteTable.Rd b/man/aggregateSectorsinTBS.Rd similarity index 76% rename from man/aggSatelliteTable.Rd rename to man/aggregateSectorsinTBS.Rd index 97f82809..1dfeade4 100644 --- a/man/aggSatelliteTable.Rd +++ b/man/aggregateSectorsinTBS.Rd @@ -1,14 +1,16 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/AggregationFunctions.R -\name{aggSatelliteTable} -\alias{aggSatelliteTable} +\name{aggregateSectorsinTBS} +\alias{aggregateSectorsinTBS} \title{Aggregate satellite tables from static file based on specs} \usage{ -aggSatelliteTable(model, sattable, sat) +aggregateSectorsinTBS(model, aggregationSpecs, sattable, sat) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} +\item{aggregationSpecs}{Specifications for aggregation} + \item{sattable}{A standardized satellite table with resource and emission names from original sources.} \item{sat}{The abbreviation for the satellite table.} diff --git a/man/aggregateUseTable.Rd b/man/aggregateUseTable.Rd index 0d384743..962108ba 100644 --- a/man/aggregateUseTable.Rd +++ b/man/aggregateUseTable.Rd @@ -4,11 +4,13 @@ \alias{aggregateUseTable} \title{Aggregate the UseTable based on specified source file} \usage{ -aggregateUseTable(model, domestic = FALSE) +aggregateUseTable(model, aggregationSpecs, domestic = FALSE) } \arguments{ \item{model}{Model file loaded with IO tables} +\item{aggregationSpecs}{Specifications for aggregation} + \item{domestic}{Boolean to indicate whether to aggregate the UseTransactions or DomesticUseTransactions table} } \value{ diff --git a/man/aggregateVA.Rd b/man/aggregateVA.Rd index 5515c830..8cf656c1 100644 --- a/man/aggregateVA.Rd +++ b/man/aggregateVA.Rd @@ -4,10 +4,12 @@ \alias{aggregateVA} \title{Aggregate the MakeTable based on specified source file} \usage{ -aggregateVA(model) +aggregateVA(model, aggregationSpecs) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} + +\item{aggregationSpecs}{Specifications for aggregation} } \value{ An aggregated MakeTable. diff --git a/man/collapseTBS.Rd b/man/collapseTBS.Rd new file mode 100644 index 00000000..55041cb7 --- /dev/null +++ b/man/collapseTBS.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/SatelliteFunctions.R +\name{collapseTBS} +\alias{collapseTBS} +\title{Collapse a totals by sector table so that each flow sector combination exists only once} +\usage{ +collapseTBS(tbs, model) +} +\arguments{ +\item{tbs}{totals by sector sourced from satellite table} + +\item{model}{A EEIO model with IOdata, and model specs} +} +\value{ +aggregated totals by sector +} +\description{ +Collapse a totals by sector table so that each flow sector combination exists only once +} diff --git a/man/generateModelSectorSchema.Rd b/man/generateModelSectorSchema.Rd index 94bd64ab..ac714d89 100644 --- a/man/generateModelSectorSchema.Rd +++ b/man/generateModelSectorSchema.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/WriteModel.R +% Please edit documentation in R/UtilityFunctions.R \name{generateModelSectorSchema} \alias{generateModelSectorSchema} \title{Create sector schema for a model} diff --git a/man/getAggregationSpecs.Rd b/man/getAggregationSpecs.Rd new file mode 100644 index 00000000..314ea5fa --- /dev/null +++ b/man/getAggregationSpecs.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AggregationFunctions.R +\name{getAggregationSpecs} +\alias{getAggregationSpecs} +\title{Obtain aggregation specs from input files} +\usage{ +getAggregationSpecs(model) +} +\arguments{ +\item{model}{Model file loaded with IO tables} +} +\value{ +A model with the specified aggregation and disaggregation specs. +} +\description{ +Obtain aggregation specs from input files +} diff --git a/man/getConfiguration.Rd b/man/getConfiguration.Rd index bce1f6be..7735cef9 100644 --- a/man/getConfiguration.Rd +++ b/man/getConfiguration.Rd @@ -9,7 +9,7 @@ getConfiguration(modelname, spectype) \arguments{ \item{modelname, }{str, the name of the model} -\item{spectype, }{str, specification type, either "model" or "disagg"} +\item{spectype, }{str, specification type, either "model", "disagg", or "agg"} } \value{ A list of model specifications. From 2b41fb46b16fcc999edd2525e1532ac2b9f48288 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 8 Oct 2021 10:00:54 -0400 Subject: [PATCH 098/319] update agg logging message --- R/AggregationFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index ab0dac5d..09b6f42d 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -6,7 +6,7 @@ aggregateModel <- function (model){ counter <- 1 for (aggSpec in model$AggregationSpecs){ - logging::loginfo(paste0("Aggregating sectors to ",aggSpec$Sectors[1], "...")) + logging::loginfo(paste0("Aggregating ", aggSpec$Sectors[-1], " to ",aggSpec$Sectors[1], "...")) #aggregating economic tables model$MakeTransactions <- aggregateMakeTable(model, aggSpec) model$UseTransactions <- aggregateUseTable(model, aggSpec) From f6618f9a60472fdadfe9bf6696d79d572d585417 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 8 Oct 2021 10:11:57 -0400 Subject: [PATCH 099/319] clean up --- R/AggregationFunctions.R | 52 ++++++++++++++------------------------- R/DisaggregateFunctions.R | 10 -------- 2 files changed, 18 insertions(+), 44 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 09b6f42d..4bc35e0c 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -3,10 +3,9 @@ #' @return An aggregated model. aggregateModel <- function (model){ - counter <- 1 for (aggSpec in model$AggregationSpecs){ - logging::loginfo(paste0("Aggregating ", aggSpec$Sectors[-1], " to ",aggSpec$Sectors[1], "...")) + logging::loginfo(paste0("Aggregating [", paste(aggSpec$Sectors[-1], collapse = ', '), "] to ",aggSpec$Sectors[1], "...")) #aggregating economic tables model$MakeTransactions <- aggregateMakeTable(model, aggSpec) model$UseTransactions <- aggregateUseTable(model, aggSpec) @@ -28,8 +27,8 @@ aggregateModel <- function (model){ mainComIndex <- getIndex(model$Commodities$Code_Loc, agg[1])#first item in Aggregation is the sector to aggregate to, not to be removed mainIndIndex <- getIndex(model$Industries$Code_Loc, agg[1]) - comIndecesToAggregate <- which(model$Commodities$Code_Loc %in% agg[2:length(agg)]) #find com indeces containing references to the sectors to be aggregated - indIndecesToAggregate <- which(model$Industries$Code_Loc %in% agg[2:length(agg)]) #find ind indeces containing references to the sectors to be aggregated + comIndecesToAggregate <- which(model$Commodities$Code_Loc %in% agg[-1]) #find com indeces containing references to the sectors to be aggregated + indIndecesToAggregate <- which(model$Industries$Code_Loc %in% agg[-1]) #find ind indeces containing references to the sectors to be aggregated #aggregating (i.e. removing) sectors from model lists #aggregate Industry lists @@ -48,8 +47,7 @@ aggregateModel <- function (model){ } model <- calculateIndustryCommodityOutput(model) - - counter <- counter + 1 + } return(model) @@ -107,17 +105,14 @@ aggregateSectorsinTBS <- function (model, aggregationSpecs, sattable, sat){ aggregateMultiYearCPI <- function(model, mainIndex, indecesToAggregate, type){ if(type == "Industry"){ - originalCPI <- model$MultiYearIndustryCPI originalOutput <- model$MultiYearIndustryOutput - }else { - + } else { originalCPI <- model$MultiYearCommodityCPI originalOutput <- model$MultiYearCommodityOutput } - newCPI <- originalCPI aggOutputs <- originalOutput[mainIndex,] + colSums(originalOutput[indecesToAggregate,])#get aggregated total for all relevant indeces (denominator for ratios) @@ -162,7 +157,7 @@ aggregateMakeTable <- function(model, aggregationSpecs){ } #remove rows and cols from model - agg <- agg[2:length(agg)] + agg <- agg[-1] model$MakeTransactions <- model$MakeTransactions[!(rownames(model$MakeTransactions)) %in% agg,] #remove rows from model that have the same rownames as values in agg list model$MakeTransactions <- model$MakeTransactions[,!(colnames(model$MakeTransactions)) %in% agg] #as above but with cols @@ -181,7 +176,6 @@ aggregateUseTable <- function(model, aggregationSpecs, domestic = FALSE){ agg <- aggregationSpecs$Sectors - count <- 1 for (sector in agg){ @@ -201,7 +195,7 @@ aggregateUseTable <- function(model, aggregationSpecs, domestic = FALSE){ } #remove rows and cols from model - agg <- agg[2:length(agg)] + agg <- agg[-1] if(domestic == TRUE){ @@ -229,8 +223,7 @@ aggregateVA <- function(model, aggregationSpecs){ agg <- aggregationSpecs$Sectors count <- 1 - - + for (sector in agg){ if(count == 1){ @@ -243,7 +236,7 @@ aggregateVA <- function(model, aggregationSpecs){ } #remove rows and cols from model - agg <- agg[2:length(agg)] + agg <- agg[-1] model$UseValueAdded <- model$UseValueAdded[!(rownames(model$UseValueAdded)) %in% agg,] #remove rows from model that have the same rownames as values in agg list model$UseValueAdded <- model$UseValueAdded[,!(colnames(model$UseValueAdded)) %in% agg] #as above but with cols @@ -253,7 +246,6 @@ aggregateVA <- function(model, aggregationSpecs){ - #' Aggregate a sector in a table #' @param model Model file loaded with IO tables #' @param mainSector Sector to aggregate to (string) @@ -263,21 +255,20 @@ aggregateVA <- function(model, aggregationSpecs){ #' @return aggregated table aggregateSector <- function(model, mainSector, sectorToRemove, tableType, domestic = FALSE){ #get correct indeces - if(tableType == "Use"){ + if(tableType == "Use") { mainRowIndex <- getIndex(model$Commodities$Code_Loc, mainSector) mainColIndex <- getIndex(model$Industries$Code_Loc, mainSector) removeRowIndex <- getIndex(model$Commodities$Code_Loc, sectorToRemove) removeColIndex <- getIndex(model$Industries$Code_Loc, sectorToRemove) - if(domestic == TRUE){ + if(domestic == TRUE) { table <- model$DomesticUseTransactions - }else{ + } else { table <- model$UseTransactions } - - }else if(tableType == "Make"){ + } else if(tableType == "Make") { mainRowIndex <- getIndex(model$Industries$Code_Loc, mainSector) mainColIndex <- getIndex(model$Commodities$Code_Loc, mainSector) @@ -286,7 +277,7 @@ aggregateSector <- function(model, mainSector, sectorToRemove, tableType, domest table <- model$MakeTransactions - }else if(tableType == "VA"){ + } else if(tableType == "VA") { mainRowIndex <- getIndex(model$ValueAddedMeta$Code_Loc, mainSector) mainColIndex <- getIndex(model$Industries$Code_Loc, mainSector) @@ -295,12 +286,10 @@ aggregateSector <- function(model, mainSector, sectorToRemove, tableType, domest table <- model$UseValueAdded - } - else{ + } else { #continue } - if(length(removeRowIndex) != 0 && length(mainRowIndex) !=0){#if there a row to remove and merge with the main sector table[mainRowIndex,] <- table[mainRowIndex,] + table[removeRowIndex,]#add rows together table[removeRowIndex,] <- table[removeRowIndex,] - table[removeRowIndex,]# subtract row from itself to ensure table total is unchanged @@ -312,26 +301,22 @@ aggregateSector <- function(model, mainSector, sectorToRemove, tableType, domest } - - - return(table) } + #' Return the index where a sector occurrs in a sectorList #' @param sectorList Dataframe (of strings) to match the index of the sector param #' @param sector String of the sector to look the index for #' @return Index of sector in sectorList getIndex <- function(sectorList, sector){ - index <- which(sectorList %in% sector) - + return(index) } - #' Aggregate the MasterCrosswalk on the selected sectors #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param aggregationSpecs Specifications for aggregation @@ -343,7 +328,7 @@ aggregateMasterCrosswalk <- function (model, aggregationSpecs){ new_cw <- model$crosswalk #variable to return with complete changes to crosswalk#temp secLength <- regexpr(pattern ='/',agg[1]) - 1 #used to determine the length of the sector codes. E.g., detail would be 6, while summary would generally be 3 though variable, and sector would be variable - new_cw$USEEIO[which(new_cw$USEEIO %in% substr(agg[2:length(agg)],1,secLength))] <- substr(agg[1],1,secLength) + new_cw$USEEIO[which(new_cw$USEEIO %in% substr(agg[-1],1,secLength))] <- substr(agg[1],1,secLength) return(new_cw) @@ -362,7 +347,6 @@ removeRowsFromList <- function(sectorList, indecesToAggregate){ } - #' Aggregate MultiYear Output model objects #' @param originalOutput MultiYear Output dataframe #' @param mainIdex Index to aggregate the others to. diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 66d83b4b..a112d3c8 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -5,8 +5,6 @@ disaggregateModel <- function (model){ logging::loginfo("Initializing Disaggregation of IO tables...") - counter = 1 - #for (disagg in model$DisaggregationSpecs$Disaggregation){ for (disagg in model$DisaggregationSpecs){ #Disaggregating sector lists @@ -43,7 +41,6 @@ disaggregateModel <- function (model){ #Disaggregate Margins model$Margins <- disaggregateMargins(model, disagg) - counter <- counter + 1 } return(model) @@ -55,14 +52,12 @@ disaggregateModel <- function (model){ #' @return A model with the specified aggregation and disaggregation specs. getDisaggregationSpecs <- function (model){ - #model$DisaggregationSpecs$Disaggregation <- vector(mode='list') model$DisaggregationSpecs <- vector(mode='list') for (configFile in model$specs$DisaggregationSpecs){ logging::loginfo(paste0("Loading disaggregation specs for ", configFile, "...")) config <- getConfiguration(configFile, "disagg") if('Disaggregation' %in% names(config)){ - #model$DisaggregationSpecs$Disaggregation <- append(model$DisaggregationSpecs$Disaggregation, config$Disaggregation) model$DisaggregationSpecs <- append(model$DisaggregationSpecs, config$Disaggregation) } } @@ -78,7 +73,6 @@ getDisaggregationSpecs <- function (model){ disaggregateSetup <- function (model){ counter = 1 - #for (disagg in model$DisaggregationSpecs$Disaggregation){ for (disagg in model$DisaggregationSpecs){ disagg$NAICSSectorCW <- utils::read.csv(system.file("extdata/disaggspecs", disagg$SectorFile, package = "useeior"), header = TRUE, stringsAsFactors = FALSE, colClasses=c("NAICS_2012_Code"="character", @@ -115,7 +109,6 @@ disaggregateSetup <- function (model){ disagg$EnvAllocRatio <- FALSE } #Need to assign these DFs back to the modelspecs - #model$DisaggregationSpecs$Disaggregation[[counter]] <- disagg model$DisaggregationSpecs[[counter]] <- disagg counter <- counter + 1 @@ -479,11 +472,9 @@ disaggregateVA <- function(model, disagg) { numNewSectors <- length(disagg$DisaggregatedSectorCodes) #Determine commodity and industry indeces corresponding to the original sector code - #originalRowIndex <- which(rownames(model$UseValueAdded)==disagg$OriginalSectorCode) originalColIndex <- which(colnames(model$UseValueAdded)==disagg$OriginalSectorCode) #Determine end index of disaggregated sectors - #endRowIndex <- originalRowIndex + numNewSectors endColIndex <- originalColIndex + numNewSectors tablePartOne <- model$UseValueAdded[, 1:originalColIndex-1]#all rows, columns to the left of diagg col @@ -622,7 +613,6 @@ disaggregateRow <- function (originalRowVector, disagg_specs, duplicate = FALSE, disaggRows <-uniformRowVector[rep(seq_len(nrow(uniformRowVector)), numNewSectors),,drop=FALSE] } - #Rename rows to use the disaggregated codes rownames(disaggRows) <- disagg_specs$DisaggregatedSectorCodes From 5188a90e43ca49a9fc1de3697b624c5f4e73067d Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 8 Oct 2021 19:36:04 -0400 Subject: [PATCH 100/319] disaggregate prior to mapping NAICS to BEA to avoid incorrect disaggregation allocations --- R/LoadSatellites.R | 20 ++++++++++---------- R/SatelliteFunctions.R | 6 ++++++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index 081d2933..4ab10381 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -129,6 +129,16 @@ generateTbSfromSatSpec <- function(sat_spec, model) { #'@param model an EEIO model with IO tables loaded #'@return a totals-by-sector df with the sectors and flow amounts corresponding to the model schema conformTbStoIOSchema <- function(tbs, sat_spec, model) { + # Check if aggregation or disaggregation are needed based on model metadata + if(!is.null(sat_spec$StaticFile)) { + for(aggSpecs in model$AggregationSpecs) { + tbs <- aggregateSectorsinTBS(model, aggSpecs, tbs, sat_spec) + } + for (disagg in model$DisaggregationSpecs) { + tbs <- disaggregateSatelliteTable(disagg, tbs, sat_spec) + } + } + # Check if the original data is BEA-based. If so, apply necessary allocation or aggregation. # If not, map data from original sector to BEA. if (sat_spec$SectorListSource == "BEA") { @@ -144,16 +154,6 @@ conformTbStoIOSchema <- function(tbs, sat_spec, model) { tbs <- mapFlowTotalsbySectorandLocationfromNAICStoBEA(tbs, sat_spec$DataYears[1], model) } - # Check if aggregation or disaggregation are needed based on model metadata - if(!is.null(sat_spec$StaticFile)) { - for(aggSpecs in model$AggregationSpecs) { - tbs <- aggregateSectorsinTBS(model, aggSpecs, tbs, sat_spec) - } - for (disagg in model$DisaggregationSpecs) { - tbs <- disaggregateSatelliteTable(disagg, tbs, sat_spec) - } - } - for (r in model$specs$ModelRegionAcronyms) { # Change Location if model is a state model if (model$specs$ModelRegionAcronyms!="US") { diff --git a/R/SatelliteFunctions.R b/R/SatelliteFunctions.R index 3df69e55..3de1ee6d 100644 --- a/R/SatelliteFunctions.R +++ b/R/SatelliteFunctions.R @@ -28,6 +28,12 @@ mapFlowTotalsbySectorandLocationfromNAICStoBEA <- function (totals_by_sector, to # Merge totals_by_sector table with NAICStoBEA mapping totals_by_sector_BEA <- merge(totals_by_sector, NAICStoBEA, by = "NAICS", all.x = TRUE) + # Because this occurs after disaggregation, some sectors may not map, update those sectors + disaggNAICS <- unique(totals_by_sector_BEA[is.na(totals_by_sector_BEA$BEA),"NAICS"]) + totals_by_sector_BEA$BEA <- ifelse(totals_by_sector_BEA$NAICS %in% disaggNAICS, totals_by_sector_BEA$NAICS, totals_by_sector_BEA$BEA) + totals_by_sector_BEA$TechnologicalCorrelationAdjustment[is.na(totals_by_sector_BEA$TechnologicalCorrelationAdjustment)] <- 0 + + # Generate allocation_factor data frame containing allocation factors between NAICS and BEA sectors allocation_factor <- getNAICStoBEAAllocation(totals_by_sector_year, model) colnames(allocation_factor) <- c("NAICS", "BEA", "allocation_factor") From da345b6c6009995e736c71faab3d7ca54c98054d Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 8 Oct 2021 19:37:56 -0400 Subject: [PATCH 101/319] update disaggregation of satellite table to be more flexible to the number of sectors needing allocation --- R/DisaggregateFunctions.R | 59 ++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index a112d3c8..b29b6c6d 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -255,25 +255,37 @@ disaggregateSectorDFs <- function(model, disagg, list_type) { #' Disaggregate a portion of a satellite table based on an allocation_vector #' @param sattable A standardized satellite table to be disaggregated. #' @param disagg Specifications for disaggregating the current Table +#' @param allocating_sectors vector of sectors to allocate to, if NULL allocate to all sectors in the disaggregation #' @param allocation_vector named vector of allocation ratios #' @return A satellite table with new sectors added. -disaggregateSatelliteSubsetByRatio <- function(sattable, disagg, allocation_vector = NULL) { +disaggregateSatelliteSubsetByRatio <- function(sattable, disagg, allocating_sectors = NULL, allocation_vector = NULL) { + + if(is.null(allocating_sectors)) { + allocating_sectors <- disagg$DisaggregatedSectorCodes + } if(is.null(allocation_vector) & !is.null(disagg$MakeFileDF)) { GrossOutputAlloc <- subset(disagg$MakeFileDF, IndustryCode == disagg$OriginalSectorCode) allocation_vector <- setNames(GrossOutputAlloc$PercentMake, gsub("/.*", "", GrossOutputAlloc$CommodityCode)) + allocation_vector <- allocation_vector[!duplicated(allocation_vector)] } else if(is.null(allocation_vector)) { - allocation_vector <- setNames(rep(1/length(disagg$DisaggregatedSectorCodes), - times = length(disagg$DisaggregatedSectorCodes)), - gsub("/.*", "", disagg$DisaggregatedSectorCodes)) + allocation_vector <- setNames(rep(1/length(allocating_sectors), + times = length(allocating_sectors)), + gsub("/.*", "", allocating_sectors)) } + + # only maintain the appropriate sectors in the allocation vector + allocation_vector <- subset(allocation_vector, names(allocation_vector) %in% gsub("/.*", "", allocating_sectors)) + allocation_vector <- sapply(allocation_vector, function(x){x / sum(allocation_vector)}) + + sattable_subset_disaggregated <- sattable i<-1 - for (new_sector in gsub("/.*", "", disagg$DisaggregatedSectorCodes)){ + for (new_sector in gsub("/.*", "", allocating_sectors)){ new_sector_totals <- sattable # Update the sector and sector name new_sector_totals$Sector <- new_sector - new_sector_totals$SectorName <- disagg$DisaggregatedSectorNames[[i]] + new_sector_totals$SectorName <- disagg$DisaggregatedSectorNames[[match(new_sector, gsub("/.*", "", disagg$DisaggregatedSectorCode))]] allocation <- 0 if (new_sector %in% names(allocation_vector)){ allocation <- allocation_vector[[new_sector]] @@ -291,24 +303,37 @@ disaggregateSatelliteSubsetByRatio <- function(sattable, disagg, allocation_vect #' Disaggregate satellite tables from static file based on specs #' @param disagg Specifications for disaggregating the current Table -#' @param sattable A standardized satellite table with resource and emission names from original sources. +#' @param tbs A standardized satellite table with resource and emission names from original sources. #' @param sat_spec, a standard specification for a single satellite table. #' @return A standardized satellite table with old sectors removed and new sectors added. -disaggregateSatelliteTable <- function (disagg, sattable, sat_spec) { +disaggregateSatelliteTable <- function (disagg, tbs, sat_spec) { + sattable <- tbs + # identify NAICS that require further disaggregation + naics <- disagg$NAICSSectorCW[c('NAICS_2012_Code','USEEIO_Code')] + codes <- unique(naics[duplicated(naics$NAICS_2012_Code),]$NAICS_2012_Code) + naics <- naics[which(naics$NAICS_2012_Code %in% codes),] + original_code <- gsub("/.*", "", disagg$OriginalSectorCode) - if(original_code %in% sattable$Sector) { + codes <- c(original_code, codes) + allocating_sectors <- NULL + if(any(codes %in% sattable$Sector)) { if(!is.null(disagg$EnvFileDF) & disagg$EnvAllocRatio) { # If satellite table data is provided as flow by sector ratios, loop through each flow assigned to original sector - sattable_original = subset(sattable, Sector==original_code) - for(flow in unique(sattable_original$FlowUUID)) { + sattable_to_disaggregate = subset(sattable, Sector %in% codes) + # Check if allocating to full sector list from original code or just a subset based on duplicate NAICS + if(!(original_code %in% sattable_to_disaggregate$Sector)){ + allocating_sectors <- naics$USEEIO_Code + } + for(flow in unique(sattable_to_disaggregate$FlowUUID)) { allocation_df <- subset(disagg$EnvFileDF, FlowUUID==flow) if(nrow(allocation_df)==0) { allocation_vector <- NULL } else { allocation_vector <- setNames(allocation_df$FlowRatio, allocation_df$Sector) } - disaggregated_flows <- disaggregateSatelliteSubsetByRatio(subset(sattable_original, FlowUUID==flow, colnames(sattable)), - disagg, allocation_vector) + + disaggregated_flows <- disaggregateSatelliteSubsetByRatio(subset(sattable_to_disaggregate, FlowUUID==flow, colnames(sattable)), + disagg, allocating_sectors = allocating_sectors, allocation_vector) sattable <- rbind(sattable, disaggregated_flows) } } else if(!is.null(disagg$EnvFileDF)) { @@ -318,7 +343,8 @@ disaggregateSatelliteTable <- function (disagg, sattable, sat_spec) { if(nrow(new_sector_totals)==0) { logging::logwarn(paste0("No data found for disaggregation of ",sat_spec$Abbreviation, " for ", disagg$OriginalSectorCode, " - applying default allocation")) - sattable <- rbind(sattable, disaggregateSatelliteSubsetByRatio(subset(sattable, Sector==original_code, colnames(sattable)), disagg)) + sattable <- rbind(sattable, disaggregateSatelliteSubsetByRatio(subset(sattable, Sector==original_code, colnames(sattable)), + disagg, allocating_sectors = allocating_sectors)) } else { # Check for errors in satellite table new_sector_totals <- conformTbStoStandardSatTable(new_sector_totals) @@ -331,11 +357,12 @@ disaggregateSatelliteTable <- function (disagg, sattable, sat_spec) { } } else { # No satellite table data provided, use default allocation - sattable <- rbind(sattable, disaggregateSatelliteSubsetByRatio(subset(sattable, Sector==original_code, colnames(sattable)), disagg)) + sattable <- rbind(sattable, disaggregateSatelliteSubsetByRatio(subset(sattable, Sector==original_code, colnames(sattable)), + disagg, allocating_sectors = allocating_sectors)) } } # Remove data for the original sector - sattable_disaggregated <- subset(sattable, Sector!=original_code) + sattable_disaggregated <- subset(sattable, !(Sector %in% codes)) return(sattable_disaggregated) } From 7a6ea7707b2a36557b0eb5222982bd4806767871 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 8 Oct 2021 20:04:40 -0400 Subject: [PATCH 102/319] prevent already disaggregated sectors from dropping when updating BEA schema --- R/SatelliteFunctions.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/SatelliteFunctions.R b/R/SatelliteFunctions.R index 3de1ee6d..39090b94 100644 --- a/R/SatelliteFunctions.R +++ b/R/SatelliteFunctions.R @@ -259,12 +259,12 @@ mapFlowTotalsbySectorfromBEASchema2007to2012 <- function(totals_by_sector) { weight <- useeior::Detail_GrossOutput_IO[industries, as.character(year)] mapping_year[mapping_year$BEA_2007_Code==industry, "Ratio"] <- weight/sum(weight) } - mapping_year[is.na(mapping_year$Ratio), "Ratio"] <- 1 # Map totals_by_sector from BEA 2007 schema to 2012 schema totals_by_sector_year <- merge(totals_by_sector_year, mapping_year, by.x = "Sector", by.y = "BEA_2007_Code", all.x = TRUE) + totals_by_sector_year[is.na(totals_by_sector_year$Ratio), "Ratio"] <- 1 totals_by_sector_year$FlowAmount <- totals_by_sector_year$FlowAmount*totals_by_sector_year$Ratio - totals_by_sector_year$Sector <- totals_by_sector_year$BEA_2012_Code + totals_by_sector_year$Sector <- ifelse(is.na(totals_by_sector_year$BEA_2012_Code), totals_by_sector_year$Sector, totals_by_sector_year$BEA_2012_Code) totals_by_sector_year[, c("BEA_2012_Code", "Ratio")] <- NULL totals_by_sector_new <- rbind(totals_by_sector_new, totals_by_sector_year) } From 391119a4355c01a666ff4199566381e271a0b1c8 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 8 Oct 2021 20:13:50 -0400 Subject: [PATCH 103/319] fix error in appending lost flows to dataframe on data loss --- R/SatelliteFunctions.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/SatelliteFunctions.R b/R/SatelliteFunctions.R index 39090b94..c5e161f8 100644 --- a/R/SatelliteFunctions.R +++ b/R/SatelliteFunctions.R @@ -294,7 +294,8 @@ checkSatelliteFlowLoss <- function(tbs0, tbs, tolerance=0.005) { lost_flows <- setdiff(tbs0_agg$Flow, tbs_agg$Flow) if(length(lost_flows) > 0){ - tbs_agg[, lost_flows] <- 0 + df <- data.frame(Flow = lost_flows, FlowAmount = 0) + tbs_agg <- rbind(tbs_agg, df) logging::logdebug("Flows lost upon conforming to model schema :") logging::logdebug(lost_flows) } From f03b3f6b6d73ddb4740ea853da616910629fedc8 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 8 Oct 2021 20:14:15 -0400 Subject: [PATCH 104/319] avoid allocation error when no UUIDs in sattable --- R/DisaggregateFunctions.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index b29b6c6d..4219790d 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -324,6 +324,7 @@ disaggregateSatelliteTable <- function (disagg, tbs, sat_spec) { if(!(original_code %in% sattable_to_disaggregate$Sector)){ allocating_sectors <- naics$USEEIO_Code } + sattable_to_disaggregate$FlowUUID[is.na(sattable_to_disaggregate$FlowUUID)] <- "" for(flow in unique(sattable_to_disaggregate$FlowUUID)) { allocation_df <- subset(disagg$EnvFileDF, FlowUUID==flow) if(nrow(allocation_df)==0) { From fdc7ce4d157d2f0ec14f3c33320aa6164ff2cc55 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Sun, 10 Oct 2021 13:19:54 -0400 Subject: [PATCH 105/319] fix error preventing disaggregation when flow present in EnvFileDF but for non target sectors --- R/DisaggregateFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 4219790d..48800c6e 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -326,7 +326,7 @@ disaggregateSatelliteTable <- function (disagg, tbs, sat_spec) { } sattable_to_disaggregate$FlowUUID[is.na(sattable_to_disaggregate$FlowUUID)] <- "" for(flow in unique(sattable_to_disaggregate$FlowUUID)) { - allocation_df <- subset(disagg$EnvFileDF, FlowUUID==flow) + allocation_df <- subset(disagg$EnvFileDF, (FlowUUID==flow & Sector %in% gsub("/.*","",allocating_sectors))) if(nrow(allocation_df)==0) { allocation_vector <- NULL } else { From 25799827e8a55f4df52ef7c2a841353246c1e62f Mon Sep 17 00:00:00 2001 From: Ben Young Date: Sun, 10 Oct 2021 13:34:26 -0400 Subject: [PATCH 106/319] assign allocating sectors prior to subsetting envDF --- R/DisaggregateFunctions.R | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 48800c6e..b1a77c65 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -255,14 +255,10 @@ disaggregateSectorDFs <- function(model, disagg, list_type) { #' Disaggregate a portion of a satellite table based on an allocation_vector #' @param sattable A standardized satellite table to be disaggregated. #' @param disagg Specifications for disaggregating the current Table -#' @param allocating_sectors vector of sectors to allocate to, if NULL allocate to all sectors in the disaggregation +#' @param allocating_sectors vector of sectors to allocate to #' @param allocation_vector named vector of allocation ratios #' @return A satellite table with new sectors added. -disaggregateSatelliteSubsetByRatio <- function(sattable, disagg, allocating_sectors = NULL, allocation_vector = NULL) { - - if(is.null(allocating_sectors)) { - allocating_sectors <- disagg$DisaggregatedSectorCodes - } +disaggregateSatelliteSubsetByRatio <- function(sattable, disagg, allocating_sectors, allocation_vector = NULL) { if(is.null(allocation_vector) & !is.null(disagg$MakeFileDF)) { GrossOutputAlloc <- subset(disagg$MakeFileDF, IndustryCode == disagg$OriginalSectorCode) @@ -315,7 +311,7 @@ disaggregateSatelliteTable <- function (disagg, tbs, sat_spec) { original_code <- gsub("/.*", "", disagg$OriginalSectorCode) codes <- c(original_code, codes) - allocating_sectors <- NULL + allocating_sectors <- disagg$DisaggregatedSectorCodes if(any(codes %in% sattable$Sector)) { if(!is.null(disagg$EnvFileDF) & disagg$EnvAllocRatio) { # If satellite table data is provided as flow by sector ratios, loop through each flow assigned to original sector From 85a3c387d21a0a2380c111c62345dcc6de534219 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Sun, 10 Oct 2021 13:59:37 -0400 Subject: [PATCH 107/319] update the sector and summary fields to match the aggregated target sector in the crosswalk --- R/AggregationFunctions.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 4bc35e0c..51ad10fc 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -328,6 +328,10 @@ aggregateMasterCrosswalk <- function (model, aggregationSpecs){ new_cw <- model$crosswalk #variable to return with complete changes to crosswalk#temp secLength <- regexpr(pattern ='/',agg[1]) - 1 #used to determine the length of the sector codes. E.g., detail would be 6, while summary would generally be 3 though variable, and sector would be variable + # Update the sector and summary fields to match the aggregated sector + new_cw$BEA_Sector[which(new_cw$USEEIO %in% substr(agg[-1],1,secLength))] <- new_cw$BEA_Sector[new_cw$USEEIO == substr(agg[1],1,secLength)][1] + new_cw$BEA_Summary[which(new_cw$USEEIO %in% substr(agg[-1],1,secLength))] <- new_cw$BEA_Summary[new_cw$USEEIO == substr(agg[1],1,secLength)][1] + # Update the value in USEEIO column with the aggregated sector new_cw$USEEIO[which(new_cw$USEEIO %in% substr(agg[-1],1,secLength))] <- substr(agg[1],1,secLength) return(new_cw) From 4a934f05c09e9bd177cb9ed931a8ae5c73425d8d Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 12 Oct 2021 11:06:36 -0700 Subject: [PATCH 108/319] Update usage of model crosswalk in visualization function --- R/VisualizationFunctions.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/VisualizationFunctions.R b/R/VisualizationFunctions.R index 64cb087e..37ea6f2b 100644 --- a/R/VisualizationFunctions.R +++ b/R/VisualizationFunctions.R @@ -70,7 +70,7 @@ plotMatrixCoefficient <- function(model_list, matrix_name, coefficient_name, sec label_colors <- rev(unique(df[, c("Sector", "color")])[, "color"]) df$x <- df$Sector } - + df <- df[complete.cases(df), ] # plot p <- ggplot(df, aes(x = factor(x, levels = rev(unique(x))), y = Value, shape = as.character(modelname))) + @@ -323,7 +323,7 @@ getBEASectorColorMapping <- function(model) { # ColorLabelMapping["#42D4F4", ] <- c("Used", "Used", "#42D4F4") # cyan (bright blue) # ColorLabelMapping["#469990", ] <- c("Other", "Other", "#469990") # teal # Prepare BEA Sector-modelIOLevel mapping - mapping <- unique(model$crosswalk[, c("BEA_Sector", paste0("BEA_", model$specs$BaseIOLevel))]) + mapping <- unique(model$crosswalk[, c("BEA_Sector", "USEEIO")]) colnames(mapping) <- c("Sector", paste0(model$specs$BaseIOLevel, "Code")) # Merge BEA mapping with ColorLabelMapping mapping <- merge(mapping, ColorLabelMapping) From e4c3975a4643a7e115ba09777298bced6276bfe8 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 12 Oct 2021 11:07:08 -0700 Subject: [PATCH 109/319] Re-org aggregation and disaggregation in load IO table step --- R/LoadIOTables.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index 20bd3f1d..a859211e 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -21,14 +21,14 @@ loadIOData <- function(model) { model$MultiYearCommodityCPI[, year_col] <- transformIndustryCPItoCommodityCPIforYear(as.numeric(year_col), model) } - model <- getDisaggregationSpecs(model) - model <- getAggregationSpecs(model) - # Check for aggregation + model <- getAggregationSpecs(model) if(length(model$AggregationSpecs)!=0){ model <- aggregateModel(model) } + # Check for disaggregation + model <- getDisaggregationSpecs(model) if(length(model$DisaggregationSpecs)!=0){ model <- disaggregateModel(model) } From 633bdfb42dffa2fc7f4f39786f1a6b260ffd0480 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 13 Oct 2021 16:26:44 -0400 Subject: [PATCH 110/319] add manual allocations for energy flows and SF6 --- inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv b/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv index a48c577d..f2c72362 100644 --- a/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv +++ b/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv @@ -1180,3 +1180,10 @@ "Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111A",0.808855207362032 "Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111B",0.0867986402620995 "Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111C",1.03434667825116e-05 +"Biomass","resource/biotic","7feeb363-fbeb-37ad-937f-080834b9dc35","221117",1 +"Energy, geothermal","resource/ground","d2792697-9e22-3380-974f-54b92a3549a9","221116",1 +"Energy, hydro","resource/water","5af7a834-bf92-32eb-a0b2-2f2dcdc9f3d9","221111",1 +"Energy, solar","resource/air","4d1571a6-ffff-3a36-82df-224ed975a094","221114",1 +"Energy, wind","resource/air","35962866-662b-3817-a2a7-39375c7e6a3c","221115",1 +"Uranium","resource/ground","af4664da-60f0-31e5-83ba-0d2518959c5b","221113",1 +"Sulfur hexafluoride","emissions/air","8334c424-1603-3274-bec1-15a7bd5c8e86","221121",1 From c515469de46f278f1dcb321ea4398ebf268b20cb Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 14 Oct 2021 12:41:44 -0400 Subject: [PATCH 111/319] revise logging messages --- R/AggregationFunctions.R | 5 ++--- R/DisaggregateFunctions.R | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 51ad10fc..11064f2d 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -3,9 +3,8 @@ #' @return An aggregated model. aggregateModel <- function (model){ + logging::loginfo("Initializing Aggregation of IO tables...") for (aggSpec in model$AggregationSpecs){ - - logging::loginfo(paste0("Aggregating [", paste(aggSpec$Sectors[-1], collapse = ', '), "] to ",aggSpec$Sectors[1], "...")) #aggregating economic tables model$MakeTransactions <- aggregateMakeTable(model, aggSpec) model$UseTransactions <- aggregateUseTable(model, aggSpec) @@ -62,7 +61,7 @@ getAggregationSpecs <- function (model){ model$AggregationSpecs <- vector(mode = 'list') for (configFile in model$specs$AggregationSpecs){ - logging::loginfo(paste0("Loading aggregation specs for ", configFile, "...")) + logging::loginfo(paste0("Loading aggregation specification file for ", configFile, "...")) config <- getConfiguration(configFile, "agg") if('Aggregation' %in% names(config)){ model$AggregationSpecs <- append(model$AggregationSpecs, config$Aggregation) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index b1a77c65..932aeb3e 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -54,7 +54,7 @@ getDisaggregationSpecs <- function (model){ model$DisaggregationSpecs <- vector(mode='list') for (configFile in model$specs$DisaggregationSpecs){ - logging::loginfo(paste0("Loading disaggregation specs for ", configFile, "...")) + logging::loginfo(paste0("Loading disaggregation specification file for ", configFile, "...")) config <- getConfiguration(configFile, "disagg") if('Disaggregation' %in% names(config)){ From c4a4f7939a9f442b76568e75f9d276694b80e6dc Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 14 Oct 2021 12:42:39 -0400 Subject: [PATCH 112/319] add env allocations for "compounds" --- .../ElectricityDisaggregation_Env.csv | 197 +++++++++++++++++- 1 file changed, 196 insertions(+), 1 deletion(-) diff --git a/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv b/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv index f2c72362..9a9d99c1 100644 --- a/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv +++ b/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv @@ -1180,10 +1180,205 @@ "Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111A",0.808855207362032 "Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111B",0.0867986402620995 "Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111C",1.03434667825116e-05 +"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","221117",0.00902630849358238 +"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","221118",0.00108215580071407 +"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","22111A",0.817148888152601 +"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","22111B",0.147405393011013 +"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","22111C",0.0253372545420892 +"Antimony compounds","emission/water","a0eb7d41-1d2e-37b2-9969-1758504bd806","221117",3.60235305701684e-06 +"Antimony compounds","emission/water","a0eb7d41-1d2e-37b2-9969-1758504bd806","22111A",0.580074424614158 +"Antimony compounds","emission/water","a0eb7d41-1d2e-37b2-9969-1758504bd806","22111B",0.419921973032785 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221111",4.68910844884048e-06 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221113",6.88249874491178e-05 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221114",2.40323406691013e-06 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221116",3.51685827005052e-05 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221117",0.00867216678082411 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221118",4.36730104395758e-05 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","22111A",0.93796544771784 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","22111B",0.0515264264616952 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","22111C",0.00168120011653568 +"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","221113",0.0611270928718908 +"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","221114",0.000386571644392111 +"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","221117",0.000137734559796674 +"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","22111A",0.82906976884918 +"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","22111B",0.109270329443928 +"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","22111C",8.50263081249218e-06 +"Barium compounds","emission/air","ac1eb121-e94a-3198-a613-528dbb56c2d2","22111A",1 +"Barium compounds","emission/water","d97a56c9-1cfd-3886-aa9f-e8f4960dff04","221111",1.78119362085015e-06 +"Barium compounds","emission/water","d97a56c9-1cfd-3886-aa9f-e8f4960dff04","221117",6.01774962949311e-05 +"Barium compounds","emission/water","d97a56c9-1cfd-3886-aa9f-e8f4960dff04","22111A",0.999810006867451 +"Barium compounds","emission/water","d97a56c9-1cfd-3886-aa9f-e8f4960dff04","22111B",0.000128034442632883 +"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","221113",0.000215204702832989 +"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","221116",1.83137717554675e-06 +"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","221117",0.00431766761888397 +"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","22111A",0.966897009683047 +"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","22111B",0.027748358411903 +"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","22111C",0.000819928206157186 +"Beryllium compounds","emission/water","b9b2f179-18a6-36d1-8155-e3f43b903829","221113",0.0951945777168532 +"Beryllium compounds","emission/water","b9b2f179-18a6-36d1-8155-e3f43b903829","22111A",0.852448404538877 +"Beryllium compounds","emission/water","b9b2f179-18a6-36d1-8155-e3f43b903829","22111B",0.0523570177442693 "Biomass","resource/biotic","7feeb363-fbeb-37ad-937f-080834b9dc35","221117",1 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221111",2.70960434552523e-05 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221113",0.000279680029908436 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221114",1.99977424816819e-06 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221116",8.15794856717273e-07 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221117",0.0101834128599021 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221118",0.00874933351530136 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","22111A",0.507239845492535 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","22111B",0.456648061156291 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","22111C",0.0168697553335021 +"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","221113",0.191973059282297 +"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","221117",0.000714827654746219 +"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","22111A",0.641923883120178 +"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","22111B",0.165358012611144 +"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","22111C",3.02173316347454e-05 +"Chromium compounds","emission/air","04d6d3dd-ddba-389c-83f6-e5f4a8638828","221111",0.0155074823602388 +"Chromium compounds","emission/air","04d6d3dd-ddba-389c-83f6-e5f4a8638828","22111A",0.984492517639761 +"Chromium compounds","emission/ground","3e9e5cb3-0f07-3618-ac5c-5d89626970b1","221111",1 +"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","221113",0.0137513695680843 +"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","221117",2.54635748439216e-05 +"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","22111A",0.979766872679347 +"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","22111B",0.00588519456232118 +"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","22111C",0.000571099615403631 +"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","221113",8.00293022844756e-07 +"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","221117",0.00525905230305557 +"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","221118",4.7037149108416e-05 +"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","22111A",0.949552334858303 +"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","22111B",0.0420629335568934 +"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","22111C",0.0030778418396173 +"Cobalt compounds","emission/ground","98b4a1e7-bda4-31ef-a1ae-45edc475eb5a","22111A",1 +"Cobalt compounds","emission/water","71a07160-4ecc-3056-8e1a-2598a62db1a5","221117",0.000509257105316605 +"Cobalt compounds","emission/water","71a07160-4ecc-3056-8e1a-2598a62db1a5","22111A",0.154386526000982 +"Cobalt compounds","emission/water","71a07160-4ecc-3056-8e1a-2598a62db1a5","22111C",0.845104216893701 +"Copper compounds","emission/air","233fa408-5db8-3c9a-aa2f-60dcb6d587e6","221111",0.0108499095840868 +"Copper compounds","emission/air","233fa408-5db8-3c9a-aa2f-60dcb6d587e6","22111A",0.989150090415913 +"Copper compounds","emission/ground","eda80ec2-392d-31ab-8116-70aad9d8d157","221111",1 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","221111",4.27006871910041e-06 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","221113",0.101597499583333 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","221114",0.000941388947235539 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","221117",0.00015746895337093 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","22111A",0.414753939767835 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","22111B",0.411172544133085 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","22111C",0.0713728885464211 +"Cyanide compounds","emission/air","87345046-bc9a-3701-b002-69fa7045c16d","221117",0.000768070796673517 +"Cyanide compounds","emission/air","87345046-bc9a-3701-b002-69fa7045c16d","22111A",0.981902254276292 +"Cyanide compounds","emission/air","87345046-bc9a-3701-b002-69fa7045c16d","22111B",0.0163435226233169 +"Cyanide compounds","emission/air","87345046-bc9a-3701-b002-69fa7045c16d","22111C",0.000986152303717198 +"Cyanide compounds","emission/water","1df3147c-9485-3401-b2b5-b403b8f2d52f","221113",9.55933439672715e-07 +"Cyanide compounds","emission/water","1df3147c-9485-3401-b2b5-b403b8f2d52f","221118",0.0168030536290297 +"Cyanide compounds","emission/water","1df3147c-9485-3401-b2b5-b403b8f2d52f","22111A",0.982678242636664 +"Cyanide compounds","emission/water","1df3147c-9485-3401-b2b5-b403b8f2d52f","22111B",0.000517747800866216 "Energy, geothermal","resource/ground","d2792697-9e22-3380-974f-54b92a3549a9","221116",1 "Energy, hydro","resource/water","5af7a834-bf92-32eb-a0b2-2f2dcdc9f3d9","221111",1 "Energy, solar","resource/air","4d1571a6-ffff-3a36-82df-224ed975a094","221114",1 "Energy, wind","resource/air","35962866-662b-3817-a2a7-39375c7e6a3c","221115",1 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221111",0.00221760983320083 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221113",0.000286675937165634 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221115",4.95901348987923e-05 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221116",1.39815426373479e-07 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221117",0.0203250985888215 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221118",0.053898842472777 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","22111A",0.869703600853836 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","22111B",0.0503547111646986 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","22111C",0.00316373119917542 +"Lead compounds","emission/ground","b6686ba5-0857-310b-a88c-04516ee2dc16","221111",0.228277146718288 +"Lead compounds","emission/ground","b6686ba5-0857-310b-a88c-04516ee2dc16","221113",0.771722853281712 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","221111",7.25351258600312e-05 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","221113",0.00555017984038333 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","221117",0.000117702603337506 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","221118",0.000903390134895935 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","22111A",0.963273679952945 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","22111B",0.0300822365513369 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","22111C",2.75791241797374e-07 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","221111",8.02605506253131e-05 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","221113",0.0012866896677402 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","221117",0.119518653915219 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","221118",0.0202875553222923 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","22111A",0.617156177709701 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","22111B",0.231056899207197 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","22111C",0.0106137636272255 +"Manganese compounds","emission/water","a59ee0ff-0f7a-3f04-95d6-9f0620010da0","221117",1.55385245436573e-05 +"Manganese compounds","emission/water","a59ee0ff-0f7a-3f04-95d6-9f0620010da0","22111A",0.999934068743368 +"Manganese compounds","emission/water","a59ee0ff-0f7a-3f04-95d6-9f0620010da0","22111B",5.03148074798522e-05 +"Manganese compounds","emission/water","a59ee0ff-0f7a-3f04-95d6-9f0620010da0","22111C",7.79246087622165e-08 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221111",2.27728668398306e-05 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221113",0.000108676169305612 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221114",2.22056339968165e-06 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221116",0.00336887864820634 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221117",0.00498125459117253 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221118",0.00782107834579958 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","22111A",0.840680380289928 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","22111B",0.133723525647032 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","22111C",0.00929121287831623 +"Mercury compounds","emission/ground","88e61068-63be-3194-a36f-24f4e632fc66","22111A",1 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","221113",0.00170798113977818 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","221114",4.3671725926746e-05 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","221117",2.02711189119524e-06 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","221118",3.5801556236767e-05 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","22111A",0.426110380651609 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","22111B",0.572074829817908 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","22111C",2.53079966501284e-05 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221111",7.78985651536027e-05 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221113",1.2220838094579e-05 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221114",3.52831467546434e-07 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221116",5.53593864035755e-08 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221117",0.00277195954607319 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221118",0.00166078159210727 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","22111A",0.504757073620865 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","22111B",0.468431741455482 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","22111C",0.0222879161913707 +"Nickel compounds","emission/ground","80e4b266-b196-35a4-aa89-7f45a3ad5472","221111",1 +"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","221111",1.4991470467667e-05 +"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","221113",3.43064529860694e-06 +"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","221117",0.000496055445922847 +"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","22111A",0.852130717029683 +"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","22111B",0.147343538482016 +"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","22111C",1.12669266117062e-05 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221111",3.35097885682699e-05 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221113",3.63500203864185e-05 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221114",7.82354813735511e-05 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221115",7.95234277365237e-06 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221116",4.56962922712412e-23 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221117",0.0988097117581696 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221118",0.00271691025166238 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","22111A",0.632249146495727 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","22111B",0.260238364083901 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","22111C",0.00582981977743792 +"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","221113",2.90789353311929e-05 +"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","221116",3.32279542862122e-08 +"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","221117",0.000224239355491044 +"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","22111A",0.984117058906931 +"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","22111B",0.0155082552434486 +"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","22111C",0.000121334330844268 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","221113",1.12256072535743e-07 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","221114",0.00104117507276902 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","221115",0.000189151482222727 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","221117",5.58473960865321e-06 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","22111A",0.976421919747112 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","22111B",0.0223394018460994 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","22111C",2.65485611547032e-06 +"Silver compounds","emission/water","ef4acec0-54d2-30f5-9a5f-a3ed67ac49c0","221117",9.42422155883817e-06 +"Silver compounds","emission/water","ef4acec0-54d2-30f5-9a5f-a3ed67ac49c0","22111A",0.974749725595623 +"Silver compounds","emission/water","ef4acec0-54d2-30f5-9a5f-a3ed67ac49c0","22111B",0.0252266677437206 +"Silver compounds","emission/water","ef4acec0-54d2-30f5-9a5f-a3ed67ac49c0","22111C",1.41824390973514e-05 +"Sulfur hexafluoride","emission/air","8334c424-1603-3274-bec1-15a7bd5c8e86","221121",1 +"Thallium compounds","emission/air","fadad103-b2f4-3cfd-944d-d36126854972","22111B",1 +"Thallium compounds","emission/water","9daa2e85-d57f-39ad-afbd-93645948a896","221117",1.96194336185957e-05 +"Thallium compounds","emission/water","9daa2e85-d57f-39ad-afbd-93645948a896","22111A",0.581119396278383 +"Thallium compounds","emission/water","9daa2e85-d57f-39ad-afbd-93645948a896","22111B",0.418791472423726 +"Thallium compounds","emission/water","9daa2e85-d57f-39ad-afbd-93645948a896","22111C",6.95118642723363e-05 "Uranium","resource/ground","af4664da-60f0-31e5-83ba-0d2518959c5b","221113",1 -"Sulfur hexafluoride","emissions/air","8334c424-1603-3274-bec1-15a7bd5c8e86","221121",1 +"Vanadium compounds","emission/air","769dbca1-f841-3aea-a60d-bbefd9bf412e","22111A",1 +"Vanadium compounds","emission/ground","cd004848-4775-3235-aa5b-07c8116958e4","22111A",1 +"Vanadium compounds","emission/water","52284d66-6c39-3e5c-a406-bcd75379fc85","221117",0.0065960262224871 +"Vanadium compounds","emission/water","52284d66-6c39-3e5c-a406-bcd75379fc85","22111A",0.265305710158688 +"Vanadium compounds","emission/water","52284d66-6c39-3e5c-a406-bcd75379fc85","22111B",0.728098263618824 +"Zinc compounds","emission/air","f654e940-5737-3bc7-9492-f163c47bfbd5","22111A",1 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221111",0.0100271001251767 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221113",0.090068910663191 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221114",0.000689164936262362 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221117",0.00012478429839769 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221118",0.00342584888605783 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","22111A",0.808855207362032 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","22111B",0.0867986402620995 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","22111C",1.03434667825116e-05 From 9068a3992017607a4dca5049347a2f6646f42fa7 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 14 Oct 2021 12:43:23 -0400 Subject: [PATCH 113/319] update function docstrings --- man/disaggregateSatelliteSubsetByRatio.Rd | 9 ++++++++- man/disaggregateSatelliteTable.Rd | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/man/disaggregateSatelliteSubsetByRatio.Rd b/man/disaggregateSatelliteSubsetByRatio.Rd index 40f822de..9b9b011b 100644 --- a/man/disaggregateSatelliteSubsetByRatio.Rd +++ b/man/disaggregateSatelliteSubsetByRatio.Rd @@ -4,13 +4,20 @@ \alias{disaggregateSatelliteSubsetByRatio} \title{Disaggregate a portion of a satellite table based on an allocation_vector} \usage{ -disaggregateSatelliteSubsetByRatio(sattable, disagg, allocation_vector = NULL) +disaggregateSatelliteSubsetByRatio( + sattable, + disagg, + allocating_sectors, + allocation_vector = NULL +) } \arguments{ \item{sattable}{A standardized satellite table to be disaggregated.} \item{disagg}{Specifications for disaggregating the current Table} +\item{allocating_sectors}{vector of sectors to allocate to} + \item{allocation_vector}{named vector of allocation ratios} } \value{ diff --git a/man/disaggregateSatelliteTable.Rd b/man/disaggregateSatelliteTable.Rd index 284d5c48..28edab5f 100644 --- a/man/disaggregateSatelliteTable.Rd +++ b/man/disaggregateSatelliteTable.Rd @@ -4,12 +4,12 @@ \alias{disaggregateSatelliteTable} \title{Disaggregate satellite tables from static file based on specs} \usage{ -disaggregateSatelliteTable(disagg, sattable, sat_spec) +disaggregateSatelliteTable(disagg, tbs, sat_spec) } \arguments{ \item{disagg}{Specifications for disaggregating the current Table} -\item{sattable}{A standardized satellite table with resource and emission names from original sources.} +\item{tbs}{A standardized satellite table with resource and emission names from original sources.} \item{sat_spec, }{a standard specification for a single satellite table.} } From e65d5c9ef67cf06f54820e85c2475f0536d89c8f Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 18 Oct 2021 17:03:26 -0700 Subject: [PATCH 114/319] Add parameters to functions for loading external model configuration --- R/BuildModel.R | 5 +++-- R/ConfigurationFunctions.R | 15 +++++++-------- R/InitializeModel.R | 5 +++-- man/buildModel.Rd | 4 +++- man/getConfiguration.Rd | 4 +++- man/initializeModel.Rd | 4 +++- 6 files changed, 22 insertions(+), 15 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 11a0ecd7..0043cad9 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -1,9 +1,10 @@ #' Build an EEIO model. #' @param modelname Name of the model from a config file. +#' @param configfile Directory of model configuration file. #' @export #' @return A list of EEIO model components and attributes -buildModel <- function(modelname) { - model <- initializeModel(modelname) +buildModel <- function(modelname, configfile = NULL) { + model <- initializeModel(modelname, configfile) model <- loadIOData(model) model <- loadandbuildSatelliteTables(model) model <- loadandbuildIndicators(model) diff --git a/R/ConfigurationFunctions.R b/R/ConfigurationFunctions.R index 6a3c22d6..be61098f 100644 --- a/R/ConfigurationFunctions.R +++ b/R/ConfigurationFunctions.R @@ -3,16 +3,15 @@ #' Gets a stored configuration file #' @param modelname, str, the name of the model #' @param spectype, str, specification type, either "model", "disagg", or "agg" +#' @param configfile, str, model configuration file directory #' @return A list of model specifications. -getConfiguration <- function(modelname, spectype) { - configname <- paste(modelname, ".yml", sep = "") - configpath <- paste0("extdata/",spectype,"specs/") - configfile <- system.file(configpath, configname, package="useeior") - if (configfile == "") { - config <- NA - } else { - config <- configr::read.config(configfile) +getConfiguration <- function(modelname, spectype, configfile = NULL) { + if (is.null(configfile)) { + configname <- paste(modelname, ".yml", sep = "") + configpath <- paste0("extdata/",spectype,"specs/") + configfile <- system.file(configpath, configname, package="useeior") } + config <- configr::read.config(configfile) return(config) } diff --git a/R/InitializeModel.R b/R/InitializeModel.R index d2241faf..0485cea8 100644 --- a/R/InitializeModel.R +++ b/R/InitializeModel.R @@ -1,12 +1,13 @@ #' Initialize model with specifications and fundamental crosswalk table. #' @param modelname Name of the model from a config file. +#' @param configfile Directory of model configuration file. #' @return A list of model specifications and fundamental crosswalk table. -initializeModel <- function(modelname) { +initializeModel <- function(modelname, configfile = NULL) { startLogging() logging::loginfo("Begin model initialization...") model <- list() # Get model specs - model$specs <- getConfiguration(modelname, "model") + model$specs <- getConfiguration(modelname, "model", configfile) if (rlang::is_na(model$specs)) { logging::logerror(paste("No configuration exists for a model named",modelname)) stop() diff --git a/man/buildModel.Rd b/man/buildModel.Rd index 8062dc51..1b262b73 100644 --- a/man/buildModel.Rd +++ b/man/buildModel.Rd @@ -4,10 +4,12 @@ \alias{buildModel} \title{Build an EEIO model.} \usage{ -buildModel(modelname) +buildModel(modelname, configfile = NULL) } \arguments{ \item{modelname}{Name of the model from a config file.} + +\item{configfile}{Directory of model configuration file.} } \value{ A list of EEIO model components and attributes diff --git a/man/getConfiguration.Rd b/man/getConfiguration.Rd index 7735cef9..8dc2966d 100644 --- a/man/getConfiguration.Rd +++ b/man/getConfiguration.Rd @@ -4,12 +4,14 @@ \alias{getConfiguration} \title{Gets a stored configuration file} \usage{ -getConfiguration(modelname, spectype) +getConfiguration(modelname, spectype, configfile = NULL) } \arguments{ \item{modelname, }{str, the name of the model} \item{spectype, }{str, specification type, either "model", "disagg", or "agg"} + +\item{configfile, }{str, model configuration file directory} } \value{ A list of model specifications. diff --git a/man/initializeModel.Rd b/man/initializeModel.Rd index 0a27c33e..f57b76a1 100644 --- a/man/initializeModel.Rd +++ b/man/initializeModel.Rd @@ -4,10 +4,12 @@ \alias{initializeModel} \title{Initialize model with specifications and fundamental crosswalk table.} \usage{ -initializeModel(modelname) +initializeModel(modelname, configfile = NULL) } \arguments{ \item{modelname}{Name of the model from a config file.} + +\item{configfile}{Directory of model configuration file.} } \value{ A list of model specifications and fundamental crosswalk table. From ccce47cd9a73e75ff43b45863bd242c1d5016bb3 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 21 Oct 2021 20:25:53 -0400 Subject: [PATCH 115/319] update water sat table to use data correctly allocated to electricity sectors --- inst/extdata/modelspecs/USEEIOv2.1.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/extdata/modelspecs/USEEIOv2.1.yml b/inst/extdata/modelspecs/USEEIOv2.1.yml index 9db6cbff..ae107770 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1.yml @@ -17,7 +17,7 @@ SatelliteTable: FullName: "Water withdrawals" Abbreviation: "WAT" StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v0.3.1_f3cdf5b.parquet" + StaticFile: "flowsa/FlowBySector/Water_national_2015_m3_v0.3.2_b67a100.parquet" FileLocation: "DataCommons" DataYears: [2015] Locations: ["US"] From 5d0642ea06e430e60cc82f4b531691bd07b73074 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 21 Oct 2021 20:26:51 -0400 Subject: [PATCH 116/319] update electricity disaggregation to match flow context --- .../ElectricityDisaggregation_Env.csv | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv b/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv index 9a9d99c1..dfb476fc 100644 --- a/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv +++ b/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv @@ -1373,6 +1373,24 @@ "Vanadium compounds","emission/water","52284d66-6c39-3e5c-a406-bcd75379fc85","221117",0.0065960262224871 "Vanadium compounds","emission/water","52284d66-6c39-3e5c-a406-bcd75379fc85","22111A",0.265305710158688 "Vanadium compounds","emission/water","52284d66-6c39-3e5c-a406-bcd75379fc85","22111B",0.728098263618824 +"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","221113",0.230395931895793 +"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","221114",1.21962438262634e-29 +"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","221117",3.71440103394613e-06 +"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","22111A",0.448568094869307 +"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","22111B",0.321032258833866 +"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","221113",0.230395931895793 +"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","221114",1.21962438262634e-29 +"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","221117",3.71440103394613e-06 +"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","22111A",0.448568094869307 +"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","22111B",0.321032258833866 +"Water, saline","resource/water/saline water body","272e60cf-1e1f-3997-a93d-17f7698571e6","221113",0.379748786979834 +"Water, saline","resource/water/saline water body","272e60cf-1e1f-3997-a93d-17f7698571e6","22111A",0.0161601149204466 +"Water, saline","resource/water/saline water body","272e60cf-1e1f-3997-a93d-17f7698571e6","22111B",0.598351010648577 +"Water, saline","resource/water/saline water body","272e60cf-1e1f-3997-a93d-17f7698571e6","22111C",0.00574008745114206 +"Water, saline","resource/water/subterranean/saline water body","dcffa66d-c69a-3b45-956c-915dcfe19995","221113",0.379748786979834 +"Water, saline","resource/water/subterranean/saline water body","dcffa66d-c69a-3b45-956c-915dcfe19995","22111A",0.0161601149204466 +"Water, saline","resource/water/subterranean/saline water body","dcffa66d-c69a-3b45-956c-915dcfe19995","22111B",0.598351010648577 +"Water, saline","resource/water/subterranean/saline water body","dcffa66d-c69a-3b45-956c-915dcfe19995","22111C",0.00574008745114206 "Zinc compounds","emission/air","f654e940-5737-3bc7-9492-f163c47bfbd5","22111A",1 "Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221111",0.0100271001251767 "Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221113",0.090068910663191 From 0fd59c1ceb1a55ebddfc35d7ea72f8e2450520be Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 22 Oct 2021 15:17:38 -0700 Subject: [PATCH 117/319] Tidy code --- R/LCIAfmtFunctions.R | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/R/LCIAfmtFunctions.R b/R/LCIAfmtFunctions.R index f2171cea..2c4f8cbb 100644 --- a/R/LCIAfmtFunctions.R +++ b/R/LCIAfmtFunctions.R @@ -13,8 +13,7 @@ getImpactMethod <- function(ind_spec) { } else { indicators <- parameters$indicators } - } - else { + } else { indicators <- NULL } @@ -25,8 +24,7 @@ getImpactMethod <- function(ind_spec) { } else { methods <- parameters$methods } - } - else { + } else { methods <- NULL } @@ -38,10 +36,7 @@ getImpactMethod <- function(ind_spec) { lciafmt <- reticulate::import("lciafmt") imp_method <- lciafmt$get_mapped_method(method_id = parameters$method_id, indicators = indicators, methods = methods) - } - - else{ - + } else { f <- loadDataCommonsfile(ind_spec$StaticFile) imp_method <- as.data.frame(arrow::read_parquet(f)) } From 74559d622a0e25f26430e50be5f9111005e0c944 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 22 Oct 2021 15:25:54 -0700 Subject: [PATCH 118/319] Parameterize model validation and comparison --- .Rbuildignore | 1 + inst/doc/CompareModels.Rmd | 26 +++++++++++++ inst/doc/CompareModels_render.Rmd | 33 ++++++++++++++++ inst/doc/ValidateModel.Rmd | 64 +++++++++++++++++++++++++++++++ inst/doc/ValidateModel_render.Rmd | 34 ++++++++++++++++ 5 files changed, 158 insertions(+) create mode 100644 inst/doc/CompareModels.Rmd create mode 100644 inst/doc/CompareModels_render.Rmd create mode 100644 inst/doc/ValidateModel.Rmd create mode 100644 inst/doc/ValidateModel_render.Rmd diff --git a/.Rbuildignore b/.Rbuildignore index edbd86d0..9a8745d7 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -3,3 +3,4 @@ ^data-raw$ ^build-scripts$ ^examples$ +^inst/doc$ diff --git a/inst/doc/CompareModels.Rmd b/inst/doc/CompareModels.Rmd new file mode 100644 index 00000000..d8728b66 --- /dev/null +++ b/inst/doc/CompareModels.Rmd @@ -0,0 +1,26 @@ +--- +title: "Compare `r modelname_pair[1]` and `r modelname_pair[2]` Model" +date: "`r Sys.Date()`" +output: + html_document: + keep_md: yes +editor_options: + chunk_output_type: console +--- + +This document presents comparison results of `r modelname_pair[1]` and `r modelname_pair[2]` model. + +#### Compare flow totals between two models +```{r, results='markup'} +mA <- buildModel(modelname_pair[1]) +mB <- buildModel(modelname_pair[2]) +``` + +```{r} +# Compare flow totals +model_com <- compareFlowTotals(mA, mB) +cat(paste("Number of flow totals by commodity passing:",model_com$N_Pass)) +cat(paste("Number of flow totals by commodity failing:",model_com$N_Fail)) +#cat(paste("Sectors with flow totals failing:", paste(model_com$Failure$rownames, collapse = ", "))) +``` + diff --git a/inst/doc/CompareModels_render.Rmd b/inst/doc/CompareModels_render.Rmd new file mode 100644 index 00000000..d3d20902 --- /dev/null +++ b/inst/doc/CompareModels_render.Rmd @@ -0,0 +1,33 @@ +--- +output: html_document +params: + modelname_pair: + value: + - ["USEEIOv2.0", "USEEIOv2.0_nodisagg"] + - ["USEEIOv2.0", "USEEIOv2.1"] +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set( + echo = TRUE, + collapse = TRUE, + comment = "#>", + results = "asis" +) + +require(rmarkdown) +require(knitr) +require(devtools) +``` + +# Load the `useeior` package +```{r loadpackage} +devtools::load_all() +``` +# Compare models +```{r compare} +for (modelname_pair in params$modelname_pair) { + rmarkdown::render("inst/doc/CompareModels.Rmd", + output_file = paste0("Compare", modelname_pair[1], "&", modelname_pair[2], ".html")) +} +``` diff --git a/inst/doc/ValidateModel.Rmd b/inst/doc/ValidateModel.Rmd new file mode 100644 index 00000000..69b659a5 --- /dev/null +++ b/inst/doc/ValidateModel.Rmd @@ -0,0 +1,64 @@ +--- +title: "Validating `r modelname` Model" +date: "`r Sys.Date()`" +output: + html_document: + keep_md: yes +editor_options: + chunk_output_type: console +--- + +This document presents validation results of `r modelname` model. + +### Build and Calculate Model +```{r, results='markup'} +model <- buildModel(modelname) +``` + +### Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production +```{r} +econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01) +cat(paste("Number of sectors passing:",econval$N_Pass)) +cat(paste("Number of sectors failing:",econval$N_Fail)) +cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +``` + +### Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production +```{r} +econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01) +cat(paste("Number of sectors passing:",econval$N_Pass)) +cat(paste("Number of sectors failing:",econval$N_Fail)) +cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +``` + +### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production +```{r} +modelval <- compareEandLCIResult(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass)) +cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail)) +#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", "))) +``` + +### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production +```{r} +dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass)) +cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail)) +cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", "))) +``` + +### Validate that commodity output are properly transformed to industry output via MarketShare +```{r} +q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass)) +cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) +cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", "))) +``` + +### Validate that commodity output equals to domestic use plus production demand +```{r} +q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) +cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) +cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", "))) +``` diff --git a/inst/doc/ValidateModel_render.Rmd b/inst/doc/ValidateModel_render.Rmd new file mode 100644 index 00000000..0aeb14d4 --- /dev/null +++ b/inst/doc/ValidateModel_render.Rmd @@ -0,0 +1,34 @@ +--- +output: html_document +params: + modelname: + - "USEEIOv2.0" + - "USEEIOv2.0.1" + - "USEEIOv2.1" +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set( + echo = TRUE, + collapse = TRUE, + comment = "#>", + results = "asis" +) + +require(rmarkdown) +require(knitr) +require(devtools) +``` + +# Load the `useeior` package +```{r loadpackage} +devtools::load_all() +``` + +# Validate model +```{r validate} +for (modelname in params$modelname) { + rmarkdown::render("inst/doc/ValidateModel.Rmd", + output_file = paste0("Validate", modelname, ".html")) +} +``` From 63a29a8aa5a50b60c992582a5d175b58660fbbf1 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 22 Oct 2021 15:46:24 -0700 Subject: [PATCH 119/319] Refactor getConfiguration function --- R/BuildModel.R | 7 ++++--- R/ConfigurationFunctions.R | 22 ++++++++++++---------- R/InitializeModel.R | 7 ++++--- man/buildModel.Rd | 5 +++-- man/getConfiguration.Rd | 13 +++++++------ man/initializeModel.Rd | 5 +++-- 6 files changed, 33 insertions(+), 26 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 0043cad9..ec845251 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -1,10 +1,11 @@ #' Build an EEIO model. #' @param modelname Name of the model from a config file. -#' @param configfile Directory of model configuration file. +#' @param configpaths str vector, paths (including file name) of model configuration file +#' and optional agg/disagg configuration file(s). If NULL, built-in config files are loaded. #' @export #' @return A list of EEIO model components and attributes -buildModel <- function(modelname, configfile = NULL) { - model <- initializeModel(modelname, configfile) +buildModel <- function(modelname, configpaths = NULL) { + model <- initializeModel(modelname, configpaths) model <- loadIOData(model) model <- loadandbuildSatelliteTables(model) model <- loadandbuildIndicators(model) diff --git a/R/ConfigurationFunctions.R b/R/ConfigurationFunctions.R index be61098f..0314d3e7 100644 --- a/R/ConfigurationFunctions.R +++ b/R/ConfigurationFunctions.R @@ -1,17 +1,19 @@ #Handle configuration files -#' Gets a stored configuration file -#' @param modelname, str, the name of the model -#' @param spectype, str, specification type, either "model", "disagg", or "agg" -#' @param configfile, str, model configuration file directory +#' Gets a stored or user specified model or aggregation/disaggregation configuration file +#' @param configname str, name of the configuration file +#' @param configtype str, configuration type, can be "model", "disagg", or "agg" +#' @param configpaths str vector, paths (including file name) of model configuration file +#' and optional agg/disagg configuration file(s). If NULL, built-in config files are loaded. #' @return A list of model specifications. -getConfiguration <- function(modelname, spectype, configfile = NULL) { - if (is.null(configfile)) { - configname <- paste(modelname, ".yml", sep = "") - configpath <- paste0("extdata/",spectype,"specs/") - configfile <- system.file(configpath, configname, package="useeior") +getConfiguration <- function(configname, configtype, configpaths = NULL) { + configfile <- paste0(configname, ".yml") + if (is.null(configpaths)) { + configpath <- system.file(paste0("extdata/", configtype, "specs/"), configfile, package = "useeior") + } else { + configpath <- configpaths[endsWith(configpaths, configfile)] } - config <- configr::read.config(configfile) + config <- configr::read.config(configpath) return(config) } diff --git a/R/InitializeModel.R b/R/InitializeModel.R index 0485cea8..0faedb8f 100644 --- a/R/InitializeModel.R +++ b/R/InitializeModel.R @@ -1,13 +1,14 @@ #' Initialize model with specifications and fundamental crosswalk table. #' @param modelname Name of the model from a config file. -#' @param configfile Directory of model configuration file. +#' @param configpaths str vector, paths (including file name) of model configuration file +#' and optional agg/disagg configuration file(s). If NULL, built-in config files are loaded. #' @return A list of model specifications and fundamental crosswalk table. -initializeModel <- function(modelname, configfile = NULL) { +initializeModel <- function(modelname, configpaths = NULL) { startLogging() logging::loginfo("Begin model initialization...") model <- list() # Get model specs - model$specs <- getConfiguration(modelname, "model", configfile) + model$specs <- getConfiguration(modelname, "model", configpaths) if (rlang::is_na(model$specs)) { logging::logerror(paste("No configuration exists for a model named",modelname)) stop() diff --git a/man/buildModel.Rd b/man/buildModel.Rd index 1b262b73..f6537771 100644 --- a/man/buildModel.Rd +++ b/man/buildModel.Rd @@ -4,12 +4,13 @@ \alias{buildModel} \title{Build an EEIO model.} \usage{ -buildModel(modelname, configfile = NULL) +buildModel(modelname, configpaths = NULL) } \arguments{ \item{modelname}{Name of the model from a config file.} -\item{configfile}{Directory of model configuration file.} +\item{configpaths}{str vector, paths (including file name) of model configuration file +and optional agg/disagg configuration file(s). If NULL, built-in config files are loaded.} } \value{ A list of EEIO model components and attributes diff --git a/man/getConfiguration.Rd b/man/getConfiguration.Rd index 8dc2966d..dd2b69ef 100644 --- a/man/getConfiguration.Rd +++ b/man/getConfiguration.Rd @@ -2,20 +2,21 @@ % Please edit documentation in R/ConfigurationFunctions.R \name{getConfiguration} \alias{getConfiguration} -\title{Gets a stored configuration file} +\title{Gets a stored or user specified model or aggregation/disaggregation configuration file} \usage{ -getConfiguration(modelname, spectype, configfile = NULL) +getConfiguration(configname, configtype, configpaths = NULL) } \arguments{ -\item{modelname, }{str, the name of the model} +\item{configname}{str, name of the configuration file} -\item{spectype, }{str, specification type, either "model", "disagg", or "agg"} +\item{configtype}{str, configuration type, can be "model", "disagg", or "agg"} -\item{configfile, }{str, model configuration file directory} +\item{configpaths}{str vector, paths (including file name) of model configuration file +and optional agg/disagg configuration file(s). If NULL, built-in config files are loaded.} } \value{ A list of model specifications. } \description{ -Gets a stored configuration file +Gets a stored or user specified model or aggregation/disaggregation configuration file } diff --git a/man/initializeModel.Rd b/man/initializeModel.Rd index f57b76a1..a5dfaca7 100644 --- a/man/initializeModel.Rd +++ b/man/initializeModel.Rd @@ -4,12 +4,13 @@ \alias{initializeModel} \title{Initialize model with specifications and fundamental crosswalk table.} \usage{ -initializeModel(modelname, configfile = NULL) +initializeModel(modelname, configpaths = NULL) } \arguments{ \item{modelname}{Name of the model from a config file.} -\item{configfile}{Directory of model configuration file.} +\item{configpaths}{str vector, paths (including file name) of model configuration file +and optional agg/disagg configuration file(s). If NULL, built-in config files are loaded.} } \value{ A list of model specifications and fundamental crosswalk table. From 1dd115462bc937c53fa5b81685554eddab257cd0 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 25 Oct 2021 15:08:28 -0700 Subject: [PATCH 120/319] Modify compareFlowTotals to allow unequal flow comparison --- R/CompareModels.R | 13 ++++++++++--- inst/doc/CompareModels.Rmd | 10 ++++++++++ inst/doc/CompareModels_render.Rmd | 2 +- man/compareFlowTotals.Rd | 4 ++-- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/R/CompareModels.R b/R/CompareModels.R index feb4195f..c6385b43 100644 --- a/R/CompareModels.R +++ b/R/CompareModels.R @@ -1,17 +1,24 @@ # Functions for comparing models #' Compare flow totals for two models -#' @param modelA, a useeior model +#' @param modelA a useeior model #' @param modelB a useeior model -#' @return comparison, a list with pass/fail comparison results +#' @return a list with pass/fail comparison results #' @export compareFlowTotals <- function(modelA, modelB) { # Get flow totals for each model A <- groupandsumTbSbyFlowLoc(modelA$TbS) B <- groupandsumTbSbyFlowLoc(modelB$TbS) # Generate a comparison to see if flow totals from two models are within 1% - rel_diff <- (A - B)/B + A_B <- merge(A, B, by = 0, all = TRUE) + rel_diff <- (A_B$FlowAmount.x - A_B$FlowAmount.y)/A_B$FlowAmount.y comparison <- formatValidationResult(rel_diff, abs_diff = TRUE, tolerance = 0.01) + # Report flow difference in models + comparison[["FlowDifference"]] <- list(setdiff(rownames(A), rownames(B)), + setdiff(rownames(B), rownames(A))) + names(comparison[["FlowDifference"]]) <- c(paste("Flows in", modelA$specs$Model, "not in", modelB$specs$Model), + paste("Flows in", modelB$specs$Model, "not in", modelA$specs$Model)) + # comparison[[paste("Flows in", modelB$specs$Model, "not in", modelA$specs$Model)]] <- setdiff(rownames(B), rownames(A)) return(comparison) } diff --git a/inst/doc/CompareModels.Rmd b/inst/doc/CompareModels.Rmd index d8728b66..af1a1975 100644 --- a/inst/doc/CompareModels.Rmd +++ b/inst/doc/CompareModels.Rmd @@ -24,3 +24,13 @@ cat(paste("Number of flow totals by commodity failing:",model_com$N_Fail)) #cat(paste("Sectors with flow totals failing:", paste(model_com$Failure$rownames, collapse = ", "))) ``` +```{r echo=FALSE} +if (!is.null(model_com[["FlowDifference"]])) { + cat("There are flow differences between", mA$specs$Model, "and", mB$specs$Model, "\n\n") + cat(names(model_com[["FlowDifference"]])[1], "are\n\n") + print(unlist(model_com[["FlowDifference"]][1], use.names = FALSE)) + cat("\n", names(model_com[["FlowDifference"]])[2], "are\n\n") + print(unlist(model_com[["FlowDifference"]][2], use.names = FALSE)) +} +``` + diff --git a/inst/doc/CompareModels_render.Rmd b/inst/doc/CompareModels_render.Rmd index d3d20902..4f99068a 100644 --- a/inst/doc/CompareModels_render.Rmd +++ b/inst/doc/CompareModels_render.Rmd @@ -3,7 +3,7 @@ output: html_document params: modelname_pair: value: - - ["USEEIOv2.0", "USEEIOv2.0_nodisagg"] + # - ["USEEIOv2.0", "USEEIOv2.0_nodisagg"] - ["USEEIOv2.0", "USEEIOv2.1"] --- diff --git a/man/compareFlowTotals.Rd b/man/compareFlowTotals.Rd index 6af21750..8ee2de45 100644 --- a/man/compareFlowTotals.Rd +++ b/man/compareFlowTotals.Rd @@ -7,12 +7,12 @@ compareFlowTotals(modelA, modelB) } \arguments{ -\item{modelA, }{a useeior model} +\item{modelA}{a useeior model} \item{modelB}{a useeior model} } \value{ -comparison, a list with pass/fail comparison results +a list with pass/fail comparison results } \description{ Compare flow totals for two models From 3dc2893cd2b030bea8233b2ddb69d19852646308 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 26 Oct 2021 07:23:52 -0400 Subject: [PATCH 121/319] split comparison from 2.0 to 2.0.1 and 2.0.1 to 2.1 --- inst/doc/CompareModels_render.Rmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inst/doc/CompareModels_render.Rmd b/inst/doc/CompareModels_render.Rmd index 4f99068a..e64ec14c 100644 --- a/inst/doc/CompareModels_render.Rmd +++ b/inst/doc/CompareModels_render.Rmd @@ -4,7 +4,8 @@ params: modelname_pair: value: # - ["USEEIOv2.0", "USEEIOv2.0_nodisagg"] - - ["USEEIOv2.0", "USEEIOv2.1"] + - ["USEEIOv2.0", "USEEIOv2.0.1"] + - ["USEEIOv2.0.1", "USEEIOv2.1"] --- ```{r setup, include=FALSE} From 1426d27340203c899dc1948d56bc9ed3d59093da Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 26 Oct 2021 13:57:40 -0700 Subject: [PATCH 122/319] Revise if-else test expression in calculateEEIOModel --- R/CalculationFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index d2a45560..0a9d6357 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -20,7 +20,7 @@ calculateEEIOModel <- function(model, perspective, demand = "Production", use_do } # Prepare demand vector - if (class(demand)=="character") { + if (is.character(demand)) { #assume this is a model build-in demand #try to load the model vector meta <- model$DemandVectors$meta From 9d2f6553e84d3be24be0d26d928bf8a8df5b7ee5 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 27 Oct 2021 15:21:36 -0700 Subject: [PATCH 123/319] Correct reference to model IO year --- R/AdjustPrice.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/AdjustPrice.R b/R/AdjustPrice.R index 3aab1a8d..bd3129a7 100644 --- a/R/AdjustPrice.R +++ b/R/AdjustPrice.R @@ -47,10 +47,10 @@ calculateProducerbyPurchaserPriceRatio <- function(model) { PHI <- model$Rho for (year in colnames(model$Rho)) { # Adjust ProducersValue from model$specs$IOyear to currency year using model$Rho - ProducersValue <- Margins$ProducersValue * (Margins[, year]/Margins[, as.character(model$specs$BaseIOSchema)]) + ProducersValue <- Margins$ProducersValue * (Margins[, year]/Margins[, as.character(model$specs$IOYear)]) # Adjust Transportation, Wholesale and Retail using corresponding CPI_ratio TWR_CPI <- useeior::Sector_CPI_IO[c("48TW", "42", "44RT"), ] - TWR_CPI_ratio <- TWR_CPI[, year]/TWR_CPI[, as.character(model$specs$BaseIOSchema)] + TWR_CPI_ratio <- TWR_CPI[, year]/TWR_CPI[, as.character(model$specs$IOYear)] TWRValue <- sweep(Margins[, c("Transportation", "Wholesale", "Retail")], 2, TWR_CPI_ratio, "*") # Calculate PurchasersValue PurchasersValue <- rowSums(Margins[, c("ProducersValue", "Transportation", "Wholesale", "Retail")]) From 38b7143f6139942cf702ca470d5d963b5f6d713f Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 29 Oct 2021 11:40:57 -0700 Subject: [PATCH 124/319] Add configpaths as parameter in aggregation function(s) --- R/AggregationFunctions.R | 6 ++++-- man/getAggregationSpecs.Rd | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 11064f2d..078955ac 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -55,14 +55,16 @@ aggregateModel <- function (model){ #' Obtain aggregation specs from input files #' @param model Model file loaded with IO tables +#' @param configpaths str vector, paths (including file name) of agg configuration file(s). +#' If NULL, built-in config files are used. #' @return A model with the specified aggregation and disaggregation specs. -getAggregationSpecs <- function (model){ +getAggregationSpecs <- function (model, configpaths = NULL){ model$AggregationSpecs <- vector(mode = 'list') for (configFile in model$specs$AggregationSpecs){ logging::loginfo(paste0("Loading aggregation specification file for ", configFile, "...")) - config <- getConfiguration(configFile, "agg") + config <- getConfiguration(configFile, "agg", configpaths) if('Aggregation' %in% names(config)){ model$AggregationSpecs <- append(model$AggregationSpecs, config$Aggregation) } diff --git a/man/getAggregationSpecs.Rd b/man/getAggregationSpecs.Rd index 314ea5fa..991a7130 100644 --- a/man/getAggregationSpecs.Rd +++ b/man/getAggregationSpecs.Rd @@ -4,10 +4,13 @@ \alias{getAggregationSpecs} \title{Obtain aggregation specs from input files} \usage{ -getAggregationSpecs(model) +getAggregationSpecs(model, configpaths = NULL) } \arguments{ \item{model}{Model file loaded with IO tables} + +\item{configpaths}{str vector, paths (including file name) of agg configuration file(s). +If NULL, built-in config files are used.} } \value{ A model with the specified aggregation and disaggregation specs. From c44dbfd825b6ffe807a77c123f564fb559705c77 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 29 Oct 2021 11:41:17 -0700 Subject: [PATCH 125/319] Add configpaths as parameter in disaggregation function(s) --- R/DisaggregateFunctions.R | 51 +++++++++++++++++++++++++++-------- man/disaggregateModel.Rd | 5 +++- man/disaggregateSetup.Rd | 5 +++- man/getDisaggregationSpecs.Rd | 5 +++- 4 files changed, 52 insertions(+), 14 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 932aeb3e..490cdd75 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -1,7 +1,9 @@ #' Disaggregate a model based on specified source file #' @param model Model file loaded with IO tables +#' @param configpaths str vector, paths (including file name) of disagg configuration file(s). +#' If NULL, built-in config files are used. #' @return A disaggregated model. -disaggregateModel <- function (model){ +disaggregateModel <- function (model, configpaths = NULL){ logging::loginfo("Initializing Disaggregation of IO tables...") @@ -49,13 +51,15 @@ disaggregateModel <- function (model){ #' Obtain aggregation and disaggregation specs from input files #' @param model Model file loaded with IO tables +#' @param configpaths str vector, paths (including file name) of disagg configuration file(s). +#' If NULL, built-in config files are used. #' @return A model with the specified aggregation and disaggregation specs. -getDisaggregationSpecs <- function (model){ +getDisaggregationSpecs <- function (model, configpaths = NULL){ model$DisaggregationSpecs <- vector(mode='list') for (configFile in model$specs$DisaggregationSpecs){ logging::loginfo(paste0("Loading disaggregation specification file for ", configFile, "...")) - config <- getConfiguration(configFile, "disagg") + config <- getConfiguration(configFile, "disagg", configpaths) if('Disaggregation' %in% names(config)){ model$DisaggregationSpecs <- append(model$DisaggregationSpecs, config$Disaggregation) @@ -69,8 +73,10 @@ getDisaggregationSpecs <- function (model){ #' Setup the configuration specs based on the input files #' @param model Model file loaded with IO tables +#' @param configpaths str vector, paths (including file name) of disagg configuration file(s). +#' If NULL, built-in config files are used. #' @return A model object with the correct disaggregation specs. -disaggregateSetup <- function (model){ +disaggregateSetup <- function (model, configpaths = NULL){ counter = 1 for (disagg in model$DisaggregationSpecs){ @@ -93,16 +99,39 @@ disaggregateSetup <- function (model){ disagg$DisaggregatedSectorNames <- as.list(disagg$DisaggregatedSectorNames[match(newNames$SectorName,disagg$DisaggregatedSectorNames)]) disagg$DisaggregatedSectorCodes <- as.list(disagg$DisaggregatedSectorCodes[match(newNames$SectorCode,disagg$DisaggregatedSectorCodes)]) + # Load Make table if(!is.null(disagg$MakeFile)){ - disagg$MakeFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$MakeFile, package = "useeior"), - header = TRUE, stringsAsFactors = FALSE, colClasses=c("IndustryCode"="character", - "CommodityCode"="character"))} + filename <- ifelse(is.null(configpaths), + system.file("extdata/disaggspecs", disagg$MakeFile, package = "useeior"), + file.path(dirname(configpaths)[1], disagg$MakeFile)) + disagg$MakeFileDF <- utils::read.table(filename, + sep = ",", header = TRUE, + stringsAsFactors = FALSE, + check.names = FALSE) + } + + # Load Use table if(!is.null(disagg$UseFile)){ - disagg$UseFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$UseFile, package = "useeior"), - header = TRUE, stringsAsFactors = FALSE)} + filename <- ifelse(is.null(configpaths), + system.file("extdata/disaggspecs", disagg$UseFile, package = "useeior"), + file.path(dirname(configpaths)[1], disagg$UseFile)) + disagg$UseFileDF <- utils::read.table(filename, + sep = ",", header = TRUE, + stringsAsFactors = FALSE, + check.names = FALSE) + } + + # Load Environment flows table if(!is.null(disagg$EnvFile)){ - disagg$EnvFileDF <- utils::read.csv(system.file("extdata/disaggspecs", disagg$EnvFile, package = "useeior"), - header = TRUE, stringsAsFactors = FALSE, colClasses=c("Sector"="character"))} + filename <- ifelse(is.null(configpaths), + system.file("extdata/disaggspecs", disagg$EnvFile, package = "useeior"), + file.path(dirname(configpaths)[1], disagg$EnvFile)) + disagg$EnvFileDF <- utils::read.table(filename, + sep = ",", header = TRUE, + stringsAsFactors = FALSE, + check.names = FALSE) + } + if("FlowRatio" %in% colnames(disagg$EnvFileDF)) { disagg$EnvAllocRatio <- TRUE } else { diff --git a/man/disaggregateModel.Rd b/man/disaggregateModel.Rd index 12a1151b..c8355657 100644 --- a/man/disaggregateModel.Rd +++ b/man/disaggregateModel.Rd @@ -4,10 +4,13 @@ \alias{disaggregateModel} \title{Disaggregate a model based on specified source file} \usage{ -disaggregateModel(model) +disaggregateModel(model, configpaths = NULL) } \arguments{ \item{model}{Model file loaded with IO tables} + +\item{configpaths}{str vector, paths (including file name) of disagg configuration file(s). +If NULL, built-in config files are used.} } \value{ A disaggregated model. diff --git a/man/disaggregateSetup.Rd b/man/disaggregateSetup.Rd index e1ea4f71..60f4bd50 100644 --- a/man/disaggregateSetup.Rd +++ b/man/disaggregateSetup.Rd @@ -4,10 +4,13 @@ \alias{disaggregateSetup} \title{Setup the configuration specs based on the input files} \usage{ -disaggregateSetup(model) +disaggregateSetup(model, configpaths = NULL) } \arguments{ \item{model}{Model file loaded with IO tables} + +\item{configpaths}{str vector, paths (including file name) of disagg configuration file(s). +If NULL, built-in config files are used.} } \value{ A model object with the correct disaggregation specs. diff --git a/man/getDisaggregationSpecs.Rd b/man/getDisaggregationSpecs.Rd index 194bfa0e..538a8bfc 100644 --- a/man/getDisaggregationSpecs.Rd +++ b/man/getDisaggregationSpecs.Rd @@ -4,10 +4,13 @@ \alias{getDisaggregationSpecs} \title{Obtain aggregation and disaggregation specs from input files} \usage{ -getDisaggregationSpecs(model) +getDisaggregationSpecs(model, configpaths = NULL) } \arguments{ \item{model}{Model file loaded with IO tables} + +\item{configpaths}{str vector, paths (including file name) of disagg configuration file(s). +If NULL, built-in config files are used.} } \value{ A model with the specified aggregation and disaggregation specs. From d9f06d84f07c5c7112e4045a3a1c3a58be26e81e Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 29 Oct 2021 11:41:56 -0700 Subject: [PATCH 126/319] Add configpaths as parameter in loadIOData and buildModel --- R/BuildModel.R | 4 ++-- R/LoadIOTables.R | 10 ++++++---- man/buildModel.Rd | 2 +- man/loadIOData.Rd | 5 ++++- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index ec845251..8de567d4 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -1,12 +1,12 @@ #' Build an EEIO model. #' @param modelname Name of the model from a config file. #' @param configpaths str vector, paths (including file name) of model configuration file -#' and optional agg/disagg configuration file(s). If NULL, built-in config files are loaded. +#' and optional agg/disagg configuration file(s). If NULL, built-in config files are used. #' @export #' @return A list of EEIO model components and attributes buildModel <- function(modelname, configpaths = NULL) { model <- initializeModel(modelname, configpaths) - model <- loadIOData(model) + model <- loadIOData(model, configpaths) model <- loadandbuildSatelliteTables(model) model <- loadandbuildIndicators(model) model <- loadDemandVectors(model) diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index a859211e..f1ea6dfc 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -2,8 +2,10 @@ #' Prepare economic components of an EEIO model. #' @param model A list of model specs +#' @param configpaths str vector, paths (including file name) of model configuration file +#' and optional agg/disagg configuration file(s). If NULL, built-in config files are used. #' @return A list with EEIO model economic components. -loadIOData <- function(model) { +loadIOData <- function(model, configpaths = NULL) { # Declare model IO objects logging::loginfo("Initializing IO tables...") if (model$specs$IODataSource=="BEA") { @@ -22,15 +24,15 @@ loadIOData <- function(model) { } # Check for aggregation - model <- getAggregationSpecs(model) + model <- getAggregationSpecs(model, configpaths) if(length(model$AggregationSpecs)!=0){ model <- aggregateModel(model) } # Check for disaggregation - model <- getDisaggregationSpecs(model) + model <- getDisaggregationSpecs(model, configpaths) if(length(model$DisaggregationSpecs)!=0){ - model <- disaggregateModel(model) + model <- disaggregateModel(model, configpaths) } return(model) diff --git a/man/buildModel.Rd b/man/buildModel.Rd index f6537771..9ec0be4c 100644 --- a/man/buildModel.Rd +++ b/man/buildModel.Rd @@ -10,7 +10,7 @@ buildModel(modelname, configpaths = NULL) \item{modelname}{Name of the model from a config file.} \item{configpaths}{str vector, paths (including file name) of model configuration file -and optional agg/disagg configuration file(s). If NULL, built-in config files are loaded.} +and optional agg/disagg configuration file(s). If NULL, built-in config files are used.} } \value{ A list of EEIO model components and attributes diff --git a/man/loadIOData.Rd b/man/loadIOData.Rd index 83cb0454..29b60341 100644 --- a/man/loadIOData.Rd +++ b/man/loadIOData.Rd @@ -4,10 +4,13 @@ \alias{loadIOData} \title{Prepare economic components of an EEIO model.} \usage{ -loadIOData(model) +loadIOData(model, configpaths = NULL) } \arguments{ \item{model}{A list of model specs} + +\item{configpaths}{str vector, paths (including file name) of model configuration file +and optional agg/disagg configuration file(s). If NULL, built-in config files are used.} } \value{ A list with EEIO model economic components. From 0c601cb76faf2d5390ea66ef1f0c5449fe9d3436 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 29 Oct 2021 11:42:27 -0700 Subject: [PATCH 127/319] Minor changes in function documentation --- R/ConfigurationFunctions.R | 2 +- R/InitializeModel.R | 2 +- man/getConfiguration.Rd | 2 +- man/initializeModel.Rd | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/ConfigurationFunctions.R b/R/ConfigurationFunctions.R index 0314d3e7..881542a1 100644 --- a/R/ConfigurationFunctions.R +++ b/R/ConfigurationFunctions.R @@ -4,7 +4,7 @@ #' @param configname str, name of the configuration file #' @param configtype str, configuration type, can be "model", "disagg", or "agg" #' @param configpaths str vector, paths (including file name) of model configuration file -#' and optional agg/disagg configuration file(s). If NULL, built-in config files are loaded. +#' and optional agg/disagg configuration file(s). If NULL, built-in config files are used. #' @return A list of model specifications. getConfiguration <- function(configname, configtype, configpaths = NULL) { configfile <- paste0(configname, ".yml") diff --git a/R/InitializeModel.R b/R/InitializeModel.R index 0faedb8f..c4959598 100644 --- a/R/InitializeModel.R +++ b/R/InitializeModel.R @@ -1,7 +1,7 @@ #' Initialize model with specifications and fundamental crosswalk table. #' @param modelname Name of the model from a config file. #' @param configpaths str vector, paths (including file name) of model configuration file -#' and optional agg/disagg configuration file(s). If NULL, built-in config files are loaded. +#' and optional agg/disagg configuration file(s). If NULL, built-in config files are used. #' @return A list of model specifications and fundamental crosswalk table. initializeModel <- function(modelname, configpaths = NULL) { startLogging() diff --git a/man/getConfiguration.Rd b/man/getConfiguration.Rd index dd2b69ef..05bc2b20 100644 --- a/man/getConfiguration.Rd +++ b/man/getConfiguration.Rd @@ -12,7 +12,7 @@ getConfiguration(configname, configtype, configpaths = NULL) \item{configtype}{str, configuration type, can be "model", "disagg", or "agg"} \item{configpaths}{str vector, paths (including file name) of model configuration file -and optional agg/disagg configuration file(s). If NULL, built-in config files are loaded.} +and optional agg/disagg configuration file(s). If NULL, built-in config files are used.} } \value{ A list of model specifications. diff --git a/man/initializeModel.Rd b/man/initializeModel.Rd index a5dfaca7..04209fc2 100644 --- a/man/initializeModel.Rd +++ b/man/initializeModel.Rd @@ -10,7 +10,7 @@ initializeModel(modelname, configpaths = NULL) \item{modelname}{Name of the model from a config file.} \item{configpaths}{str vector, paths (including file name) of model configuration file -and optional agg/disagg configuration file(s). If NULL, built-in config files are loaded.} +and optional agg/disagg configuration file(s). If NULL, built-in config files are used.} } \value{ A list of model specifications and fundamental crosswalk table. From aea0e84fa3377dd67277d6e666052fd8ac62381a Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 1 Nov 2021 12:34:21 -0400 Subject: [PATCH 128/319] pass configpaths to disaggregateSetup and not disaggregateModel --- R/DisaggregateFunctions.R | 10 ++++------ R/LoadIOTables.R | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 490cdd75..ce63cb6f 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -1,9 +1,7 @@ #' Disaggregate a model based on specified source file #' @param model Model file loaded with IO tables -#' @param configpaths str vector, paths (including file name) of disagg configuration file(s). -#' If NULL, built-in config files are used. #' @return A disaggregated model. -disaggregateModel <- function (model, configpaths = NULL){ +disaggregateModel <- function (model){ logging::loginfo("Initializing Disaggregation of IO tables...") @@ -66,7 +64,7 @@ getDisaggregationSpecs <- function (model, configpaths = NULL){ } } - model <- disaggregateSetup(model) + model <- disaggregateSetup(model, configpaths) return(model) } @@ -99,7 +97,7 @@ disaggregateSetup <- function (model, configpaths = NULL){ disagg$DisaggregatedSectorNames <- as.list(disagg$DisaggregatedSectorNames[match(newNames$SectorName,disagg$DisaggregatedSectorNames)]) disagg$DisaggregatedSectorCodes <- as.list(disagg$DisaggregatedSectorCodes[match(newNames$SectorCode,disagg$DisaggregatedSectorCodes)]) - # Load Make table + # Load Make table disaggregation file if(!is.null(disagg$MakeFile)){ filename <- ifelse(is.null(configpaths), system.file("extdata/disaggspecs", disagg$MakeFile, package = "useeior"), @@ -110,7 +108,7 @@ disaggregateSetup <- function (model, configpaths = NULL){ check.names = FALSE) } - # Load Use table + # Load Use table disaggregation file if(!is.null(disagg$UseFile)){ filename <- ifelse(is.null(configpaths), system.file("extdata/disaggspecs", disagg$UseFile, package = "useeior"), diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index f1ea6dfc..c9f1865d 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -32,7 +32,7 @@ loadIOData <- function(model, configpaths = NULL) { # Check for disaggregation model <- getDisaggregationSpecs(model, configpaths) if(length(model$DisaggregationSpecs)!=0){ - model <- disaggregateModel(model, configpaths) + model <- disaggregateModel(model) } return(model) From 8fb0265e2ed7d02d3c3264157a48d05e09a776d9 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 1 Nov 2021 12:43:24 -0400 Subject: [PATCH 129/319] enable external path for disagg$SectorFile --- R/DisaggregateFunctions.R | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index ce63cb6f..e4fcbad9 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -78,9 +78,14 @@ disaggregateSetup <- function (model, configpaths = NULL){ counter = 1 for (disagg in model$DisaggregationSpecs){ - disagg$NAICSSectorCW <- utils::read.csv(system.file("extdata/disaggspecs", disagg$SectorFile, package = "useeior"), - header = TRUE, stringsAsFactors = FALSE, colClasses=c("NAICS_2012_Code"="character", - "USEEIO_Code"="character")) + filename <- ifelse(is.null(configpaths), + system.file("extdata/disaggspecs", disagg$SectorFile, package = "useeior"), + file.path(dirname(configpaths)[1], disagg$SectorFile)) + disagg$NAICSSectorCW <- utils::read.table(filename, + sep = ",", header = TRUE, + stringsAsFactors = FALSE, + check.names = FALSE) + newNames <- unique(data.frame("SectorCode" = disagg$NAICSSectorCW$USEEIO_Code, "SectorName" = disagg$NAICSSectorCW$USEEIO_Name, "Category" = disagg$NAICSSectorCW$Category, From 29611db1cc2dc179e83ca0ae1cb874c6e1a4ba05 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 1 Nov 2021 12:53:03 -0400 Subject: [PATCH 130/319] update docs --- man/disaggregateModel.Rd | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/man/disaggregateModel.Rd b/man/disaggregateModel.Rd index c8355657..12a1151b 100644 --- a/man/disaggregateModel.Rd +++ b/man/disaggregateModel.Rd @@ -4,13 +4,10 @@ \alias{disaggregateModel} \title{Disaggregate a model based on specified source file} \usage{ -disaggregateModel(model, configpaths = NULL) +disaggregateModel(model) } \arguments{ \item{model}{Model file loaded with IO tables} - -\item{configpaths}{str vector, paths (including file name) of disagg configuration file(s). -If NULL, built-in config files are used.} } \value{ A disaggregated model. From 8eec704aec35ae3e21ccb3e43bd07dc33deec98d Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 1 Nov 2021 11:56:36 -0700 Subject: [PATCH 131/319] Stop model building and remind users if necessary config file is not available --- R/ConfigurationFunctions.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/ConfigurationFunctions.R b/R/ConfigurationFunctions.R index 881542a1..954cb579 100644 --- a/R/ConfigurationFunctions.R +++ b/R/ConfigurationFunctions.R @@ -13,6 +13,10 @@ getConfiguration <- function(configname, configtype, configpaths = NULL) { } else { configpath <- configpaths[endsWith(configpaths, configfile)] } + if (!file.exists(configpath)) { + stop(paste(configfile, "must be available in ", dirname(configpath)), + call. = FALSE) + } config <- configr::read.config(configpath) return(config) } From f837cbd4aff5ad55ab0e6064c935ef93cff0fa5a Mon Sep 17 00:00:00 2001 From: a-w-beck Date: Tue, 2 Nov 2021 13:46:58 -0400 Subject: [PATCH 132/319] implemented gh actions via usethis::use_github_action_check_standard(), followed by manual modifications; initial testing may fail before setup of GITHUB_PAT is complete --- .Rbuildignore | 1 + .github/.gitignore | 1 + .github/workflows/R-CMD-check.yaml | 73 ++++++++++++++++++++++++++++++ README.md | 1 + 4 files changed, 76 insertions(+) create mode 100644 .github/.gitignore create mode 100644 .github/workflows/R-CMD-check.yaml diff --git a/.Rbuildignore b/.Rbuildignore index 9a8745d7..9d6b7ea2 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,3 +4,4 @@ ^build-scripts$ ^examples$ ^inst/doc$ +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 00000000..2d19fc76 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 00000000..fe733cd4 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,73 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +name: R CI/CD test #R-CMD-check + +on: + push: + # branches: [main, master] + paths-ignore: + - '**.md' # prevent md files (e.g., README.md) in any repo dir from trigering workflow + - '**.bib' + - '**.ya?ml' # captures both .yml and .yaml + - 'LICENSE' + - '.gitignore' + pull_request: + branches: [master, develop] + paths-ignore: + - '**.md' + - '**.bib' + - '**.ya?ml' + - 'LICENSE' + - '.gitignore' + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: # generated by + - {os: macOS-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + + # env: + # GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + # R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-pandoc@v1 + + - uses: r-lib/actions/setup-r@v1 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v1 + with: + extra-packages: rcmdcheck + + - uses: r-lib/actions/check-r-package@v1 + + - name: Show testthat output + if: always() # step will run even if previous steps fail + run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true + shell: bash + + - name: Upload check results + if: failure() # if any of the previous steps fail, export a log + uses: actions/upload-artifact@main + with: + name: ${{ runner.os }}-r${{ matrix.config.r }}-results + path: check + + # Another job: + # runs-on: ? \ No newline at end of file diff --git a/README.md b/README.md index 2853a20b..0753cec3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # useeior +[![R-CMD-check](https://github.com/USEPA/useeior/workflows/R-CMD-check/badge.svg)](https://github.com/USEPA/useeior/actions) `useeior` is an R package for building and using [USEEIO models](https://www.epa.gov/land-research/us-environmentally-extended-input-output-useeio-models). The [model object](format_specs/Model.md) is the primary output that is built according to a given [model specification](format_specs/ModelSpecification.md) and optional [disaggregation specification](format_specs/DisaggregationSpecification.md). [Model specifications](inst/extdata/modelspecs) and associated [disaggregation specifications](inst/extdata/disaggspecs) for EPA-validated models are included in the package. The package offers various functions for validating, calculating, visualizing, and writing out models or their components. `useeior` is a core component of the [USEEIO Modeling Framework](https://github.com/USEPA/useeio). From 7b2df248a8c1a48ca112b04b2115e13d9a747800 Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Tue, 2 Nov 2021 13:55:57 -0400 Subject: [PATCH 133/319] Update R-CMD-check.yaml fixed YAML syntax --- .github/workflows/R-CMD-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index fe733cd4..31e3082d 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -5,7 +5,7 @@ name: R CI/CD test #R-CMD-check on: push: # branches: [main, master] - paths-ignore: + paths-ignore: - '**.md' # prevent md files (e.g., README.md) in any repo dir from trigering workflow - '**.bib' - '**.ya?ml' # captures both .yml and .yaml @@ -70,4 +70,4 @@ jobs: path: check # Another job: - # runs-on: ? \ No newline at end of file + # runs-on: ? From 4ba0ba23efc76c9d3414fe44e4db33b605f53fcf Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Tue, 2 Nov 2021 13:56:53 -0400 Subject: [PATCH 134/319] Update R-CMD-check.yaml allowing for manual gh actions trigger --- .github/workflows/R-CMD-check.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 31e3082d..9b968892 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -19,6 +19,7 @@ on: - '**.ya?ml' - 'LICENSE' - '.gitignore' + workflow_dispatch: # also allow manual trigger, for testing purposes jobs: R-CMD-check: From 517041e79a89cc90ea21b5b82b1d3137937f3299 Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Tue, 2 Nov 2021 13:58:38 -0400 Subject: [PATCH 135/319] Update R-CMD-check.yaml temporarily enable workflow trigger on YAML modification --- .github/workflows/R-CMD-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 9b968892..7489d624 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -8,7 +8,7 @@ on: paths-ignore: - '**.md' # prevent md files (e.g., README.md) in any repo dir from trigering workflow - '**.bib' - - '**.ya?ml' # captures both .yml and .yaml + #- '**.ya?ml' # captures both .yml and .yaml - 'LICENSE' - '.gitignore' pull_request: From 6f222a2e12854906196b3ffc5fe54051f683c4e0 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 2 Nov 2021 15:57:39 -0400 Subject: [PATCH 136/319] fix documentation --- R/AggregationFunctions.R | 6 +++--- R/DisaggregateFunctions.R | 2 +- man/Detail_Use_2012_PUR_AfterRedef.Rd | 19 +++++++++++++++++++ man/Summary_Import_2018_BeforeRedef.Rd | 19 +++++++++++++++++++ man/aggregateMultiYearCPI.Rd | 4 ++-- man/aggregateMultiYearOutput.Rd | 4 ++-- man/calculateDefaultIntersection.Rd | 2 +- man/removeRowsFromList.Rd | 2 +- 8 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 man/Detail_Use_2012_PUR_AfterRedef.Rd create mode 100644 man/Summary_Import_2018_BeforeRedef.Rd diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 11064f2d..a85ad37b 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -97,7 +97,7 @@ aggregateSectorsinTBS <- function (model, aggregationSpecs, sattable, sat){ #' Aggregate MultiYear CPI model objects #' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @param mainIdex Index to aggregate the others to. +#' @param mainIndex Index to aggregate the others to. #' @param indecesToAggregate List of indeces to aggregate. #' @param type String to designate either commodity or industry #' @return newCPI A dataframe with the aggregatded CPI values by year. @@ -339,7 +339,7 @@ aggregateMasterCrosswalk <- function (model, aggregationSpecs){ #' Remove specific rows from the specified list object in the model #' @param sectorList Model object to be aggregated -#' @param indencesToAggregate List of indeces of sectors to remove from list (i.e. aggregated sectors) +#' @param indecesToAggregate List of indeces of sectors to remove from list (i.e. aggregated sectors) #' @return An aggregated sectorList removeRowsFromList <- function(sectorList, indecesToAggregate){ @@ -352,7 +352,7 @@ removeRowsFromList <- function(sectorList, indecesToAggregate){ #' Aggregate MultiYear Output model objects #' @param originalOutput MultiYear Output dataframe -#' @param mainIdex Index to aggregate the others to. +#' @param mainIndex Index to aggregate the others to. #' @param indecesToAggregate List of indeces to aggregate. #' @return model A dataframe with the disaggregated GDPGrossOutputIO by year. aggregateMultiYearOutput <- function(originalOutput, mainIndex, indecesToAggregate){ diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 932aeb3e..ae73965a 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -1160,7 +1160,7 @@ createBlankIntersection <- function (newSectorCodes) { #' Creates a square dataframe matrix with values assigned based on default percentages #' @param originalIntersection int value of the original intersection to be disaggregated #' @param defaultPercentages vector of allocation percentages -#' @param newSectorCode vector of named disaggregated sectors +#' @param newSectorCodes vector of named disaggregated sectors #' @return square dataframe matrix with new sectors as row and column names with default values calculateDefaultIntersection <- function(originalIntersection, defaultPercentages, newSectorCodes) { numNewSectors <- length(newSectorCodes) diff --git a/man/Detail_Use_2012_PUR_AfterRedef.Rd b/man/Detail_Use_2012_PUR_AfterRedef.Rd new file mode 100644 index 00000000..c0abf61e --- /dev/null +++ b/man/Detail_Use_2012_PUR_AfterRedef.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/DataDocumentation.R +\docType{data} +\name{Detail_Use_2012_PUR_AfterRedef} +\alias{Detail_Use_2012_PUR_AfterRedef} +\title{Detail 2012 Use Purchaser's Value After Redefinition (2012 schema)} +\format{ +A dataframe with 403 obs. and 428 variables +} +\source{ +\url{https://edap-ord-data-commons.s3.amazonaws.com/useeior/AllTablesIO.zip} +} +\usage{ +Detail_Use_2012_PUR_AfterRedef +} +\description{ +Detail 2012 Use Purchaser's Value After Redefinition (2012 schema) +} +\keyword{datasets} diff --git a/man/Summary_Import_2018_BeforeRedef.Rd b/man/Summary_Import_2018_BeforeRedef.Rd new file mode 100644 index 00000000..ed855ab4 --- /dev/null +++ b/man/Summary_Import_2018_BeforeRedef.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/DataDocumentation.R +\docType{data} +\name{Summary_Import_2018_BeforeRedef} +\alias{Summary_Import_2018_BeforeRedef} +\title{Summary 2018 Import Before Redefinition (2012 schema)} +\format{ +A dataframe with 73 obs. and 93 variables +} +\source{ +\url{https://apps.bea.gov/industry/xls/io-annual/ImportMatrices_Before_Redefinitions_SUM_1997-2018.xlsx} +} +\usage{ +Summary_Import_2018_BeforeRedef +} +\description{ +Summary 2018 Import Before Redefinition (2012 schema) +} +\keyword{datasets} diff --git a/man/aggregateMultiYearCPI.Rd b/man/aggregateMultiYearCPI.Rd index ab9e5d02..cbc66409 100644 --- a/man/aggregateMultiYearCPI.Rd +++ b/man/aggregateMultiYearCPI.Rd @@ -9,11 +9,11 @@ aggregateMultiYearCPI(model, mainIndex, indecesToAggregate, type) \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} +\item{mainIndex}{Index to aggregate the others to.} + \item{indecesToAggregate}{List of indeces to aggregate.} \item{type}{String to designate either commodity or industry} - -\item{mainIdex}{Index to aggregate the others to.} } \value{ newCPI A dataframe with the aggregatded CPI values by year. diff --git a/man/aggregateMultiYearOutput.Rd b/man/aggregateMultiYearOutput.Rd index 81c2b041..b6a5be67 100644 --- a/man/aggregateMultiYearOutput.Rd +++ b/man/aggregateMultiYearOutput.Rd @@ -9,9 +9,9 @@ aggregateMultiYearOutput(originalOutput, mainIndex, indecesToAggregate) \arguments{ \item{originalOutput}{MultiYear Output dataframe} -\item{indecesToAggregate}{List of indeces to aggregate.} +\item{mainIndex}{Index to aggregate the others to.} -\item{mainIdex}{Index to aggregate the others to.} +\item{indecesToAggregate}{List of indeces to aggregate.} } \value{ model A dataframe with the disaggregated GDPGrossOutputIO by year. diff --git a/man/calculateDefaultIntersection.Rd b/man/calculateDefaultIntersection.Rd index 9b48b240..32a1df9f 100644 --- a/man/calculateDefaultIntersection.Rd +++ b/man/calculateDefaultIntersection.Rd @@ -15,7 +15,7 @@ calculateDefaultIntersection( \item{defaultPercentages}{vector of allocation percentages} -\item{newSectorCode}{vector of named disaggregated sectors} +\item{newSectorCodes}{vector of named disaggregated sectors} } \value{ square dataframe matrix with new sectors as row and column names with default values diff --git a/man/removeRowsFromList.Rd b/man/removeRowsFromList.Rd index fbc07813..c14c5fca 100644 --- a/man/removeRowsFromList.Rd +++ b/man/removeRowsFromList.Rd @@ -9,7 +9,7 @@ removeRowsFromList(sectorList, indecesToAggregate) \arguments{ \item{sectorList}{Model object to be aggregated} -\item{indencesToAggregate}{List of indeces of sectors to remove from list (i.e. aggregated sectors)} +\item{indecesToAggregate}{List of indeces of sectors to remove from list (i.e. aggregated sectors)} } \value{ An aggregated sectorList From f92874a5a737a31d4254fe35c088272207979917 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 2 Nov 2021 16:18:25 -0400 Subject: [PATCH 137/319] remove unneeded breaks and replace with stop --- R/DisaggregateFunctions.R | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index ae73965a..3abe8cea 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -379,8 +379,7 @@ disaggregateMakeTable <- function (model, disagg) { } else if(disaggType == "Userdefined") { disaggTable <- specifiedMakeDisagg(model, disagg) } else { - logging::logwarn("Disaggregation not performed, type not defined") - break + stop("Disaggregation not performed, type not defined") } return(disaggTable) @@ -407,8 +406,7 @@ disaggregateUseTable <- function (model, disagg, domestic = FALSE) { } else if(disaggType == "Userdefined") { disaggTable <- specifiedUseDisagg(model, disagg, domestic) } else { - logging::logwarn("Disaggregation not performed, type not defined") - break + stop("Disaggregation not performed, type not defined") } return(disaggTable) @@ -459,8 +457,7 @@ disaggregateFinalDemand <- function(model, disagg, domestic = FALSE) { originalFD[-(1:originalRowIndex),]) #include all rows except from 1st row to disaggregated row } else { - logging::logwarn("Disaggregation not performed, type not defined") - break + stop("Disaggregation not performed, type not defined") } return(disaggTable) @@ -507,8 +504,7 @@ disaggregateVA <- function(model, disagg) { disaggTable <- cbind(tablePartOne, AllocVADF, tablePartTwo) } else { - logging::logwarn("Disaggregation not performed, type not defined") - break + stop("Disaggregation not performed, type not defined") } return(disaggTable) From 37c15623d7288b3aa3711af82c4874ba2e33c662 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 2 Nov 2021 14:15:41 -0700 Subject: [PATCH 138/319] Add calculateMarginSectorImpacts function --- NAMESPACE | 1 + R/CalculationFunctions.R | 38 +++++++++++++++++++++++++++++ man/calculateMarginSectorImpacts.Rd | 17 +++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 man/calculateMarginSectorImpacts.Rd diff --git a/NAMESPACE b/NAMESPACE index b215e781..96884d82 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -9,6 +9,7 @@ export(buildModel) export(calculateConsumptionContributiontoImpact) export(calculateEEIOModel) export(calculateFlowContributiontoImpact) +export(calculateMarginSectorImpacts) export(calculateSectorContributiontoImpact) export(compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation) export(compareCommodityOutputandDomesticUseplusProductionDemand) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 0a9d6357..309532af 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -257,3 +257,41 @@ calculateConsumptionContributiontoImpact <- function (y, model, indicator) { colnames(impacts) <- rownames(impacts) return(impacts) } + +#' Calculate sector margin impacts in the form of M and N Matrix +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @export +#' @return A list with M_margin and N_margin +calculateMarginSectorImpacts <- function(model) { + # Calculation fractions of producer price for each margin + MarginCoefficients <- as.matrix(model$Margins[, c("Transportation", "Wholesale", "Retail")]/model$Margins[, c("ProducersValue")]) + rownames(MarginCoefficients) <- model$Margins$SectorCode + + # Create margin_allocation matrix to allocate fractions by margin sector + # In the matrix, rows are three margin types and columns are margin sectors + margin_allocation <- matrix(nrow = 3, ncol = nrow(model$MarginSectors), 0) + rownames(margin_allocation) <- colnames(MarginCoefficients) + colnames(margin_allocation) <- model$MarginSectors$Code + # Assign allocation factors to margin sectors based on total Commodity output + output_ratio <- calculateOutputRatio(model, output_type="Commodity") + for (i in rownames(margin_allocation)) { + codes <- model$MarginSectors[model$MarginSectors$Name==i, "Code"] + margin_allocation[i, codes] <- output_ratio[output_ratio$SectorCode%in%codes, "toSectorRatio"] + } + # Multiply fractions by allocation matrix to get a fraction per margin sector for each commodity + margins_by_sector <- MarginCoefficients %*% margin_allocation + + # Put margins_by_sector into a matrix in the form of A + A_margin <- model$A + # Make sure sector ordering is the same + A_margin[,] <- 0 + for (i in model$MarginSectors$Code_Loc) { + A_margin[i, ] <- margins_by_sector[gsub("/.*", "", colnames(A_margin)), + gsub("/.*", "", i)] + } + # Multiply M and N by margins_by_sector to derive M_margin and N_margin + ls <- list("M_margin" = model$M %*% A_margin, + "N_margin" = model$N %*% A_margin) + logging::loginfo("Model margin impacts calculated.") + return(ls) +} diff --git a/man/calculateMarginSectorImpacts.Rd b/man/calculateMarginSectorImpacts.Rd new file mode 100644 index 00000000..faf526d5 --- /dev/null +++ b/man/calculateMarginSectorImpacts.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/CalculationFunctions.R +\name{calculateMarginSectorImpacts} +\alias{calculateMarginSectorImpacts} +\title{Calculate sector margin impacts in the form of M and N Matrix} +\usage{ +calculateMarginSectorImpacts(model) +} +\arguments{ +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} +} +\value{ +A list with M_margin and N_margin +} +\description{ +Calculate sector margin impacts in the form of M and N Matrix +} From 3e664b7d9268e13d0637a74847e7e4f3624374eb Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 2 Nov 2021 14:15:57 -0700 Subject: [PATCH 139/319] Modify calculateOutputRatio function --- R/UtilityFunctions.R | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/R/UtilityFunctions.R b/R/UtilityFunctions.R index f2c86c16..2f0d99de 100644 --- a/R/UtilityFunctions.R +++ b/R/UtilityFunctions.R @@ -54,16 +54,17 @@ aggregateMatrix <- function (matrix, from_level, to_level, specs) { #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param output_type Either Commodity or Industry, default is Commodity calculateOutputRatio <- function (model, output_type="Commodity") { - # Generate Output based on output_type and model Commodity/Industry type + # Generate Output based on output_type if (output_type=="Commodity") { - Output <- model$CommodityOutput + Output <- model$q } else { - Output <- model$IndustryOutput + Output <- model$x } # Map CommodityOutput to more aggregated IO levels - Crosswalk <- unique(model$crosswalk[startsWith(colnames(model$crosswalk), "BEA")]) + Crosswalk <- unique(model$crosswalk[startsWith(colnames(model$crosswalk), "BEA")| + colnames(model$crosswalk)=="USEEIO"]) ratio_table <- merge(Crosswalk, as.data.frame(Output, row.names = gsub("/.*", "", names(Output))), - by.x = paste0("BEA_", model$specs$BaseIOLevel), by.y = 0) + by.x = "USEEIO", by.y = 0) # Calculate output ratios for (iolevel in c("Summary", "Sector")) { # Generate flexible sector_code From c6d7c467b12e91707f47df097836944cc73880db Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Tue, 2 Nov 2021 17:28:16 -0400 Subject: [PATCH 140/319] Update R-CMD-check.yaml reinstate YAML push exclusion, exclude ubuntu development R version for now, and reinstate GITHUB_PAT and R_KEEP_PKG_SOURCE as env vars --- .github/workflows/R-CMD-check.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 7489d624..a61276c2 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -8,7 +8,7 @@ on: paths-ignore: - '**.md' # prevent md files (e.g., README.md) in any repo dir from trigering workflow - '**.bib' - #- '**.ya?ml' # captures both .yml and .yaml + - '**.ya?ml' # captures both .yml and .yaml - 'LICENSE' - '.gitignore' pull_request: @@ -30,16 +30,16 @@ jobs: strategy: fail-fast: false matrix: - config: # generated by + config: - {os: macOS-latest, r: 'release'} - {os: windows-latest, r: 'release'} - - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + #- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - {os: ubuntu-latest, r: 'release'} - {os: ubuntu-latest, r: 'oldrel-1'} - # env: - # GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - # R_KEEP_PKG_SOURCE: yes + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} # increases api rate limit, per https://github.com/r-lib/actions/issues/208 + R_KEEP_PKG_SOURCE: yes steps: - uses: actions/checkout@v2 From eb247c8201a8475211d4343167762bc7d50ddcc9 Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Wed, 3 Nov 2021 13:43:25 -0400 Subject: [PATCH 141/319] Update DESCRIPTION The reshape2::melt() function now depends on rcpp::Rcpp_precious_remove(), which is unavailable before Rcpp 1.0.7. Require at least that version to prevent errors. https://stackoverflow.com/questions/68416435/rcpp-package-doesnt-include-rcpp-precious-remove --- DESCRIPTION | 1 + 1 file changed, 1 insertion(+) diff --git a/DESCRIPTION b/DESCRIPTION index ffcd0834..080b240d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,6 +25,7 @@ Imports: jsonlite (>= 1.6), logging (>= 0.10), rappdirs (>= 0.3), + rcpp (>= 1.0.7), readxl (>= 1.3.1), reshape2 (>= 1.4.3), reticulate (>= 1.1), From 76e3a5eaa46d830548ccfd19e6a5c0171f8cc93f Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Wed, 3 Nov 2021 13:56:16 -0400 Subject: [PATCH 142/319] Update DESCRIPTION "Rcpp" requires capitalization --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 080b240d..b97b5aa1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,7 +25,7 @@ Imports: jsonlite (>= 1.6), logging (>= 0.10), rappdirs (>= 0.3), - rcpp (>= 1.0.7), + Rcpp (>= 1.0.7), readxl (>= 1.3.1), reshape2 (>= 1.4.3), reticulate (>= 1.1), From 9aa8bb9c0b9bb88ce9128cd3d9de993996b0895d Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 3 Nov 2021 15:41:38 -0700 Subject: [PATCH 143/319] Correct margin coefficient of sectors with 0 producer value or margins from NaN to 0 --- R/CalculationFunctions.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 309532af..218f8020 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -266,6 +266,7 @@ calculateMarginSectorImpacts <- function(model) { # Calculation fractions of producer price for each margin MarginCoefficients <- as.matrix(model$Margins[, c("Transportation", "Wholesale", "Retail")]/model$Margins[, c("ProducersValue")]) rownames(MarginCoefficients) <- model$Margins$SectorCode + MarginCoefficients[is.na(MarginCoefficients)] <- 0 # Create margin_allocation matrix to allocate fractions by margin sector # In the matrix, rows are three margin types and columns are margin sectors From 9544a42bf4b616015337e9342694f9320f52f54c Mon Sep 17 00:00:00 2001 From: Catherine Birney Date: Thu, 4 Nov 2021 11:18:55 -0400 Subject: [PATCH 144/319] update water m3 version/tag parquet --- inst/extdata/modelspecs/USEEIOv2.1.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/extdata/modelspecs/USEEIOv2.1.yml b/inst/extdata/modelspecs/USEEIOv2.1.yml index ae107770..c06d4d6c 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1.yml @@ -17,7 +17,7 @@ SatelliteTable: FullName: "Water withdrawals" Abbreviation: "WAT" StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Water_national_2015_m3_v0.3.2_b67a100.parquet" + StaticFile: "flowsa/FlowBySector/Water_national_2015_m3_v0.4.0_3e0801b.parquet" FileLocation: "DataCommons" DataYears: [2015] Locations: ["US"] From fa289fb16f0b1e4f27e84ecb722140a2310907cc Mon Sep 17 00:00:00 2001 From: Catherine Birney Date: Thu, 4 Nov 2021 14:08:04 -0400 Subject: [PATCH 145/319] update water m3 parquet revised msw and other gases naics assignments --- inst/extdata/modelspecs/USEEIOv2.1.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/extdata/modelspecs/USEEIOv2.1.yml b/inst/extdata/modelspecs/USEEIOv2.1.yml index c06d4d6c..9147f28a 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1.yml @@ -17,7 +17,7 @@ SatelliteTable: FullName: "Water withdrawals" Abbreviation: "WAT" StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Water_national_2015_m3_v0.4.0_3e0801b.parquet" + StaticFile: "flowsa/FlowBySector/Water_national_2015_m3_v0.4.1_7c5071e.parquet" FileLocation: "DataCommons" DataYears: [2015] Locations: ["US"] From 9f26d45e3ad4c957a969d538f25f1f9edd44bbaa Mon Sep 17 00:00:00 2001 From: Mo Li Date: Thu, 4 Nov 2021 12:25:43 -0700 Subject: [PATCH 146/319] Move installation and usage instruction to README --- README.md | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2853a20b..9d2bcc3f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,84 @@ # useeior -`useeior` is an R package for building and using [USEEIO models](https://www.epa.gov/land-research/us-environmentally-extended-input-output-useeio-models). The [model object](format_specs/Model.md) is the primary output that is built according to a given [model specification](format_specs/ModelSpecification.md) and optional [disaggregation specification](format_specs/DisaggregationSpecification.md). [Model specifications](inst/extdata/modelspecs) and associated [disaggregation specifications](inst/extdata/disaggspecs) for EPA-validated models are included in the package. The package offers various functions for validating, calculating, visualizing, and writing out models or their components. `useeior` is a core component of the [USEEIO Modeling Framework](https://github.com/USEPA/useeio). +`useeior` is an R package for building and using [USEEIO models](https://www.epa.gov/land-research/us-environmentally-extended-input-output-useeio-models). The [model object](format_specs/Model.md) is the primary output that is built according to a given [model specification](format_specs/ModelSpecification.md) and optional [disaggregation specification](format_specs/DisaggregationSpecification.md). [Model specifications](inst/extdata/modelspecs) and associated [disaggregation specifications](inst/extdata/disaggspecs) for EPA-validated models are included in the package. The package offers various functions for validating, calculating, visualizing, and writing out models and/or their components. `useeior` is a core component of the [USEEIO Modeling Framework](https://github.com/USEPA/useeio). `useeior` is in a beta development state. See [Releases](https://github.com/USEPA/useeior/releases) for working and tested versions. -See the [Wiki](https://github.com/USEPA/useeior/wiki) for installation instructions for users and developers, details about built-in data and metadata and how to use and contribute to useeior. +See the following sections for installation and basic usage of `useeior`. See [Wiki](https://github.com/USEPA/useeior/wiki) for advanced uses, details about built-in data and metadata and how to contribute to `useeior`. + +## Installation + +``` +# Install development version from GitHub +devtools::install_github("USEPA/useeior") +``` + +``` +# Install a previously released version (e.g. v0.4) from GitHub +devtools::install_github("USEPA/useeior@v0.4") +``` + +See [Releases](https://github.com/USEPA/useeior/releases) for all previously realeased versions. + +## Usage + +### Build Model + +View all models with existing config files that can be built using useeior + +``` +useeior::seeAvailableModels() +``` + +Build a model available in useeior (e.g. USEEIOv2.0) + +``` +model <- useeior::buildModel('USEEIOv2.0') +``` + +To build a customized model, refer to [Advanced Uses](https://github.com/USEPA/useeior/wiki/Using-useeior#advanced-uses) in Wiki. + +This generates a complete USEEIO model with components described in the [Model](format_specs/Model.md#model) table. + +### Adjust Price Year and Type of Model Results + +Adjust model results (e.g. `N` matrix) to user-specified price year (e.g. `2018`) and type (producer's or purchaser's) + +``` +N_adj <- useeior::adjustResultMatrixPrice("N", + currency_year = 2018, + purchaser_price = TRUE, + model) +``` + +### Calculate Model LCI and LCIA + +Calculate model total emissions/resources (LCI) and total impacts (LCIA) under user-specified perspective, demand vector and direct requirements + +``` +result <- useeior::calculateEEIOModel(model, + perspective = "DIRECT", + demand = "Production", + use_domestic_requirements = FALSE) +``` + +### Write Model Results to File + +Write selected model matrices, demand vectors, and metadata as one `.xlsx` file to output folder +``` +useeior::writeModeltoXLSX(model, outputfolder) +``` + +Write model matrices as `.csv` files to output folder +``` +useeior::writeModelMatrices(model, to_format = "csv", outputfolder) +``` + +### Validate and Visualize Model + +Once a model is built, model results can be validated, exported, and visualized for further applications. + +Complete list of available functions for calculating, validating, exporting and visualizing model can be found [here](https://github.com/USEPA/useeior/wiki/Using-useeior#calculate-validate-export-visualize-model) in Wiki. ## Disclaimer From a6aec7affa957eab618eb746927b8d8cf0fee10b Mon Sep 17 00:00:00 2001 From: Mo Li Date: Thu, 4 Nov 2021 13:56:07 -0700 Subject: [PATCH 147/319] Add full name of LCI and LCIA in READMe --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d2bcc3f..4ecb98a9 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ N_adj <- useeior::adjustResultMatrixPrice("N", ### Calculate Model LCI and LCIA -Calculate model total emissions/resources (LCI) and total impacts (LCIA) under user-specified perspective, demand vector and direct requirements +Calculate model life cycle inventory (LCI) and life cycle impact assessment (LCIA) results under user-specified perspective, demand vector and direct requirements ``` result <- useeior::calculateEEIOModel(model, From c41e0f2cfe0885a6dbafc11b501d5067001e5bd1 Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Fri, 5 Nov 2021 14:44:03 -0400 Subject: [PATCH 148/319] Update README.md fixing gh action status badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0753cec3..a8fdd5c6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # useeior -[![R-CMD-check](https://github.com/USEPA/useeior/workflows/R-CMD-check/badge.svg)](https://github.com/USEPA/useeior/actions) +[![R CI/CD test](https://github.com/USEPA/useeior/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/USEPA/useeior/actions/workflows/R-CMD-check.yaml) `useeior` is an R package for building and using [USEEIO models](https://www.epa.gov/land-research/us-environmentally-extended-input-output-useeio-models). The [model object](format_specs/Model.md) is the primary output that is built according to a given [model specification](format_specs/ModelSpecification.md) and optional [disaggregation specification](format_specs/DisaggregationSpecification.md). [Model specifications](inst/extdata/modelspecs) and associated [disaggregation specifications](inst/extdata/disaggspecs) for EPA-validated models are included in the package. The package offers various functions for validating, calculating, visualizing, and writing out models or their components. `useeior` is a core component of the [USEEIO Modeling Framework](https://github.com/USEPA/useeio). From c1ce951c1397251031578d089d98fefcef8c5341 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 5 Nov 2021 17:05:42 -0700 Subject: [PATCH 149/319] Tidy code and fix documentation --- R/AdjustPrice.R | 9 +++-- R/BuildModel.R | 8 ++-- R/CalculationFunctions.R | 27 ++++++------- R/DemandFunctions.R | 12 +++--- R/IOFunctions.R | 2 - R/InitializeModel.R | 17 ++++---- R/LoadIOTables.R | 2 - R/LoadIndicators.R | 8 ++-- R/UtilityFunctions.R | 40 ++++++++++++------- man/RAS.Rd | 2 +- man/aggregateMatrix.Rd | 3 ++ man/aggregateResultMatrix.Rd | 2 +- man/aggregateResultTable.Rd | 2 +- man/applyRAS.Rd | 2 +- man/buildModel.Rd | 2 +- ...alculateConsumptionContributiontoImpact.Rd | 2 +- man/calculateDirectPerspectiveLCI.Rd | 2 +- man/calculateDirectPerspectiveLCIA.Rd | 2 +- man/calculateFinalPerspectiveLCI.Rd | 2 +- man/calculateFinalPerspectiveLCIA.Rd | 2 +- man/calculateFlowContributiontoImpact.Rd | 2 +- man/calculateOutputRatio.Rd | 3 ++ man/calculatePercentContributiontoImpact.Rd | 2 +- man/calculateProducerbyPurchaserPriceRatio.Rd | 2 +- man/calculateSectorContributiontoImpact.Rd | 2 +- man/calculateYearbyModelIOYearPriceRatio.Rd | 2 +- man/checkIndicatorforFlows.Rd | 4 +- man/convertStrEncodingLatintoASCII.Rd | 2 +- man/createCfromFactorsandBflows.Rd | 2 +- man/downloadDataCommonsfile.Rd | 3 +- man/formatDemandVector.Rd | 2 +- man/generateCbSfromTbSandModel.Rd | 2 +- man/generateModelSectorSchema.Rd | 2 +- man/loadDataCommonsfile.Rd | 6 ++- man/loadIndicators.Rd | 2 +- man/loadLCIAfactors.Rd | 2 +- man/prepareDomesticConsumptionDemand.Rd | 2 +- man/prepareHouseholdDemand.Rd | 2 +- man/prepareProductionDemand.Rd | 2 +- man/removeExtraSpaces.Rd | 2 +- man/removeNumberinSlashes.Rd | 2 +- man/standardizeandcastSatelliteTable.Rd | 2 +- man/sumDemandCols.Rd | 2 +- man/sumforConsumption.Rd | 2 +- 44 files changed, 112 insertions(+), 92 deletions(-) diff --git a/R/AdjustPrice.R b/R/AdjustPrice.R index bd3129a7..6f6bf69b 100644 --- a/R/AdjustPrice.R +++ b/R/AdjustPrice.R @@ -5,12 +5,13 @@ #' @param currency_year An integer representing the currency year, e.g. 2018. #' @param purchaser_price A logical value indicating whether to adjust producer's price to purchaser's price. #' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @export #' @return A model result matrix after price adjustment +#' @export adjustResultMatrixPrice <- function(matrix_name, currency_year, purchaser_price=TRUE, model) { # Adjust price year of matrix if (currency_year!=model$specs$IOYear) { - logging::loginfo(paste("Adjusting", matrix_name, "matrix from", model$specs$IOYear, "to", currency_year, "dollar...")) + logging::loginfo(paste("Adjusting", matrix_name, "matrix from", + model$specs$IOYear, "to", currency_year, "dollar...")) mat <- adjustMultiplierPriceYear(matrix_name, currency_year, model) } else { logging::loginfo(paste("Keeping", matrix_name, "matrix in", model$specs$IOYear, "dollar...")) @@ -29,7 +30,7 @@ adjustResultMatrixPrice <- function(matrix_name, currency_year, purchaser_price= #' Calculate year by model IO year price ratio. #' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @return A data.frame of year by model IO year price ratio. +#' @return A dataframe of year by model IO year price ratio. calculateYearbyModelIOYearPriceRatio <- function(model) { CPI_df <- model[[paste0("MultiYear", model$specs$CommodityorIndustryType, "CPI")]] CPI_ratio_matrix <- as.matrix(CPI_df/CPI_df[, as.character(model$specs$IOYear)]) @@ -38,7 +39,7 @@ calculateYearbyModelIOYearPriceRatio <- function(model) { #' Calculate producer to purchaser price ratio. #' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @return A data.frame of producer to purchaser price ratio. +#' @return A dataframe of producer to purchaser price ratio. calculateProducerbyPurchaserPriceRatio <- function(model) { # Get Margins table Margins <- merge(model$Margins, model$Rho, by.x = "Code_Loc", by.y = 0, all.y = TRUE) diff --git a/R/BuildModel.R b/R/BuildModel.R index 8de567d4..2d355b13 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -2,8 +2,8 @@ #' @param modelname Name of the model from a config file. #' @param configpaths str vector, paths (including file name) of model configuration file #' and optional agg/disagg configuration file(s). If NULL, built-in config files are used. +#' @return A list of EEIO model complete components and attributes #' @export -#' @return A list of EEIO model components and attributes buildModel <- function(modelname, configpaths = NULL) { model <- initializeModel(modelname, configpaths) model <- loadIOData(model, configpaths) @@ -140,7 +140,7 @@ createBfromFlowDataandOutput <- function(model) { #'Prepare coefficients (x unit/$) from the totals by flow and sector (x unit) #'@param model, a model with econ and flow data loaded -#'@return df, a Coefficients-by-sector table +#'@return A dataframe of Coefficients-by-Sector (CbS) table generateCbSfromTbSandModel <- function(model) { CbS <- data.frame() @@ -169,7 +169,7 @@ generateCbSfromTbSandModel <- function(model) { #'Converts flows table into flows x sector matrix-like format #'@param df a dataframe of flowables, contexts, units, sectors and locations #'@param model an EEIO model with IO tables loaded -#'@return a flows x sector matrix-like dataframe +#'@return A matrix-like dataframe of flows x sector standardizeandcastSatelliteTable <- function(df,model) { # Add fields for sector as combinations of existing fields df[, "Sector"] <- apply(df[, c("Sector", "Location")], @@ -189,7 +189,7 @@ standardizeandcastSatelliteTable <- function(df,model) { #' Generate C matrix from indicator factors and a model B matrix #' @param factors df in model$Indicators$factors format #' @param B_flows Flows from B matrix to use for reference -#' @return a C matrix in indicator x flow format +#' @return C, a matrix in indicator x flow format createCfromFactorsandBflows <- function(factors,B_flows) { # Add flow field to factors factors$Flow <- apply(factors[, c("Flowable", "Context", "Unit")], diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 218f8020..c49b43c9 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -42,9 +42,8 @@ calculateEEIOModel <- function(model, perspective, demand = "Production", use_do stop() } } - #convert demand vector into a matrix + # Convert demand vector into a matrix f <- as.matrix(d) - # Calculate LCI and LCIA in direct or final perspective if (perspective=="DIRECT") { # Calculate DirectPerspectiveLCI (transposed m_d with total impacts in form of sectorxflows) @@ -84,7 +83,7 @@ getScalingVector <- function(L, demand) { #' Multiply the B matrix and the scaling vector c. #' @param B Marginal impact per unit of the environmental flows. #' @param c Scaling vector. -#' @return Transposed m_d with total impacts in form of sector x flows. +#' @return A transposed matrix with total impacts in form of sector x flows. #' @references Yang, Yi, Wesley W. Ingwersen, Troy R. Hawkins, Michael Srocka, and David E. Meyer. #' 2017. “USEEIO: A New and Transparent United States Environmentally-Extended Input-Output Model.†#' Journal of Cleaner Production 158 (August): 308–18. https://doi.org/10.1016/j.jclepro.2017.04.150. @@ -100,7 +99,7 @@ calculateDirectPerspectiveLCI <- function(B, c) { #' Multiply the M matrix and the diagonal of demand, y. #' @param M, a model M matrix, direct + indirect flows per $ output of sector. #' @param y, a model demand vector -#' @return matrix, model sectors x model flows with total flows per sector +#' @return A matrix of model sectors x model flows with total flows per sector #' @references Yang, Yi, Wesley W. Ingwersen, Troy R. Hawkins, Michael Srocka, and David E. Meyer. #' 2017. “USEEIO: A New and Transparent United States Environmentally-Extended Input-Output Model.†#' Journal of Cleaner Production 158 (August): 308–18. https://doi.org/10.1016/j.jclepro.2017.04.150. @@ -117,7 +116,7 @@ calculateFinalPerspectiveLCI <- function(M, y) { #' @param B Marginal impact per unit of the environmental flows. #' @param C LCIA indicators. #' @param c Scaling vector. -#' @return Transposed u_d with total impacts in form of sector x impact categories. +#' @return A transposed matrix with total impacts in form of sector x impact categories. #' @references Yang, Yi, Wesley W. Ingwersen, Troy R. Hawkins, Michael Srocka, and David E. Meyer. #' 2017. “USEEIO: A New and Transparent United States Environmentally-Extended Input-Output Model.†#' Journal of Cleaner Production 158 (August): 308–18. https://doi.org/10.1016/j.jclepro.2017.04.150. @@ -133,7 +132,7 @@ calculateDirectPerspectiveLCIA <- function(B, C, c) { #' Multiply the N matrix and the diagonal of demand, y. #' @param N, a model N matrix, direct + indirect impact per unit of the environmental flows. #' @param y, a model demand vector -#' @return Transposed u_d with total impacts in form of sector x impact categories. +#' @return A transposed matrix with total impacts in form of sector x impact categories. #' @references Yang, Yi, Wesley W. Ingwersen, Troy R. Hawkins, Michael Srocka, and David E. Meyer. #' 2017. “USEEIO: A New and Transparent United States Environmentally-Extended Input-Output Model.†#' Journal of Cleaner Production 158 (August): 308–18. https://doi.org/10.1016/j.jclepro.2017.04.150. @@ -148,8 +147,8 @@ calculateFinalPerspectiveLCIA <- function(N, y) { #' Divide/Normalize a sector x flows matrix by the total of respective flow (column sum) #' @param m A sector x flows matrix. -#' @export #' @return A normalized sector x flows matrix. +#' @export normalizeResultMatrixByTotalImpacts <- function(m) { #Use sweep function to prevent error m_norm <- sweep(m, MARGIN = 2, FUN = "/", STATS = colSums(m)) @@ -159,7 +158,7 @@ normalizeResultMatrixByTotalImpacts <- function(m) { #' Dot multiplies two vectors to calculate an impact score and the percent contribution each score to the total #' @param x, numeric vector of length n #' @param y, numeric vector of length n -#' @return df, dataframe sorted from highest "contribution", also showing "x","y","impact" +#' @return A dataframe sorted from highest "contribution", also showing "x","y","impact" calculatePercentContributiontoImpact <- function (x,y) { df <- cbind.data.frame(x,y) df["impact"] <- df[,"x"]*df[,"y"] @@ -174,7 +173,7 @@ calculatePercentContributiontoImpact <- function (x,y) { #' @param sector, str, index of a model sector for use in the M matrix, e.g. "221100/us" #' @param indicator, str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential" #' @param domestic, boolean, sets model to use domestic flow matrix. Default is FALSE. -#' @return df, dataframe sorted from highest process contribution "contribution", also showing "x","y","impact" +#' @return A dataframe sorted from highest process contribution "contribution", also showing "x","y","impact" #' @export calculateSectorContributiontoImpact <- function (model, sector, indicator, domestic=FALSE) { L <- model$L @@ -192,7 +191,7 @@ calculateSectorContributiontoImpact <- function (model, sector, indicator, domes #' @param sector, str, index of a model sector for use in the M matrix, e.g. "221100/us" #' @param indicator, str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential" #' @param domestic, boolean, sets model to use domestic flow matrix. Default is FALSE. -#' @return df, dataframe sorted from highest flow contribution "contribution", also showing "x","y","impact" +#' @return A dataframe sorted from highest flow contribution "contribution", also showing "x","y","impact" #' @export calculateFlowContributiontoImpact <- function (model, sector, indicator, domestic=FALSE) { M <- model$M @@ -209,8 +208,8 @@ calculateFlowContributiontoImpact <- function (model, sector, indicator, domesti #' @param matrix A matrix with sectors as rows #' @param to_level The level of BEA code this matrix will be aggregated to #' @param crosswalk Sector crosswalk between levels of detail +#' @return An aggregated matrix with sectors as rows #' @export -#' @return aggregated matrix with sectors as rows aggregateResultTable <- function (matrix, to_level, crosswalk) { # Determine the columns within MasterCrosswalk that will be used in aggregation from_code <- "USEEIO" @@ -234,8 +233,8 @@ aggregateResultTable <- function (matrix, to_level, crosswalk) { #' @param matrix A matrix with sectors as rows and columns #' @param to_level The level of BEA code this matrix will be aggregated to #' @param crosswalk Sector crosswalk between levels of detail +#' @return An aggregated matrix with sectors as rows and columns #' @export -#' @return aggregated matrix with sectors as rows and columns aggregateResultMatrix <- function (matrix, to_level, crosswalk) { row_agg_matrix <- aggregateResultTable (matrix, to_level, crosswalk) col_agg_matrix <- aggregateResultTable (t(row_agg_matrix), to_level, crosswalk) @@ -247,7 +246,7 @@ aggregateResultMatrix <- function (matrix, to_level, crosswalk) { #' @param y, a model demand vector #' @param model, A complete EEIO Model object #' @param indicator, str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential" -#' @return impacts, matrix of impacts sector purchased x sector sourced +#' @return A matrix of impacts sector purchased x sector sourced #' @export calculateConsumptionContributiontoImpact <- function (y, model, indicator) { L <- model$L @@ -260,8 +259,8 @@ calculateConsumptionContributiontoImpact <- function (y, model, indicator) { #' Calculate sector margin impacts in the form of M and N Matrix #' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @export #' @return A list with M_margin and N_margin +#' @export calculateMarginSectorImpacts <- function(model) { # Calculation fractions of producer price for each margin MarginCoefficients <- as.matrix(model$Margins[, c("Transportation", "Wholesale", "Retail")]/model$Margins[, c("ProducersValue")]) diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index e8e5076a..8411d072 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -11,7 +11,7 @@ DemandVectorFunctionRegistry$Consumption$Domestic <- "prepareDomesticConsumption #'Sums across sectors for a given set of codes/cols in a given final demand df #'@param Y, a model Demand df #'@param codes, sector code(s) for a subset of Final Demand cols -#'@return a named vector with model sectors and demand amounts +#'@return A named vector with model sectors and demand amounts sumDemandCols <- function(Y,codes) { if (length(codes)>1) { y <- rowSums(Y[,codes]) @@ -27,7 +27,7 @@ sumDemandCols <- function(Y,codes) { #'Domestic portion of national consumption: y_dc <- Y_dh + Y_dv + Y_dg #'@param model, a model #'@param Y, a model Demand df. -#'@return a named vector with model sectors and demand amounts +#'@return A named vector with model sectors and demand amounts sumforConsumption <- function(model, Y) { codes <- model$FinalDemandMeta[model$FinalDemandMeta$Group%in%c("Household", "Investment", "Government"), "Code_Loc"] @@ -38,7 +38,7 @@ sumforConsumption <- function(model, Y) { #'Prepares a demand vector representing production #'Formula for production vector: y_p <- y_dc + y_e + y_d_delta #'@param model, a model -#'@return a named vector with demand +#'@return A named vector with demand prepareProductionDemand <- function(model) { y_dc <- sumforConsumption(model, model$DomesticFinalDemand) export_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Export", "Code_Loc"] @@ -59,7 +59,7 @@ prepareConsumptionDemand <- function(model) { #'Prepares a demand vector representing domestic consumption #'@param model, a model -#'@return a named vector with demand +#'@return A named vector with demand prepareDomesticConsumptionDemand <- function(model) { y_c_d <- sumforConsumption(model, model$DomesticFinalDemand) return(y_c_d) @@ -67,7 +67,7 @@ prepareDomesticConsumptionDemand <- function(model) { #'Prepares a demand vector representing household consumption #'@param model, a model -#'@return a named vector with demand +#'@return A named vector with demand prepareHouseholdDemand <- function(model) { Y <- model$FinalDemand household_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Household", "Code_Loc"] @@ -89,7 +89,7 @@ isDemandVectorValid <- function(dv, L){ #' Format a named demand vector with partial sectors to have all the rows and ordering needed #' @param dv, a user provided demand vector. See calculateEEIOModel() #' @param L, the L matrix for the given model, used as a reference -#' @return a named vector with values for all names in L and ordered like L +#' @return A named vector with values for all names in L and ordered like L formatDemandVector <- function(dv,L) { #create a named vector using the first col of L d <- c(L[,1]) diff --git a/R/IOFunctions.R b/R/IOFunctions.R index 24f68745..2b663c60 100644 --- a/R/IOFunctions.R +++ b/R/IOFunctions.R @@ -196,8 +196,6 @@ generateDomesticUse <- function(Use, specs) { # See documentation of the Import matrix (https://apps.bea.gov/industry/xls/io-annual/ImportMatrices_Before_Redefinitions_SUM_1997-2019.xlsx) # So, ImportCost <- Use$Imports - Import$Imports ImportCost <- Use[, ImportCode] - Import[, ImportCode] - # Estimate DomesticUse - DomesticUse <- Use # Calculate row_sum of Use, except for Export and Import, for allocating ImportCost row_sum <- rowSums(Use) - (Use[, ExportCode] + Use[, ImportCode]) # Calculate allocation ratios diff --git a/R/InitializeModel.R b/R/InitializeModel.R index c4959598..56134e7c 100644 --- a/R/InitializeModel.R +++ b/R/InitializeModel.R @@ -10,19 +10,22 @@ initializeModel <- function(modelname, configpaths = NULL) { # Get model specs model$specs <- getConfiguration(modelname, "model", configpaths) if (rlang::is_na(model$specs)) { - logging::logerror(paste("No configuration exists for a model named",modelname)) + logging::logerror(paste("No configuration exists for a model named", modelname)) stop() } else { # Get model crosswalk - model$crosswalk <- get(paste0("MasterCrosswalk", model$specs$BaseIOSchema), - as.environment("package:useeior")) - model$crosswalk <- unique(model$crosswalk[, c("NAICS_2012_Code", colnames(model$crosswalk)[startsWith(colnames(model$crosswalk), "BEA")])]) - colnames(model$crosswalk) <- gsub(paste0("_", model$specs$BaseIOSchema, "|_Code"), "", colnames(model$crosswalk)) - rownames(model$crosswalk) <- NULL + crosswalk <- get(paste0("MasterCrosswalk", model$specs$BaseIOSchema), + as.environment("package:useeior")) + crosswalk <- unique(crosswalk[, c("NAICS_2012_Code", + colnames(crosswalk)[startsWith(colnames(crosswalk), "BEA")])]) + colnames(crosswalk) <- gsub(paste0("_", model$specs$BaseIOSchema, "|_Code"), + "", colnames(crosswalk)) + rownames(crosswalk) <- NULL # Assign initial model crosswalk based on base schema modelschema <- "USEEIO" baseschema <- paste0("BEA_", model$specs$BaseIOLevel) - model$crosswalk[modelschema] <- model$crosswalk[baseschema] + crosswalk[modelschema] <- crosswalk[baseschema] + model$crosswalk <- crosswalk } return(model) } \ No newline at end of file diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index c9f1865d..2648d7d4 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -150,8 +150,6 @@ loadBEAtables <- function(specs) { BEA$FinalDemandCodes <- c(BEA$HouseholdDemandCodes, BEA$InvestmentDemandCodes, BEA$ChangeInventoriesCodes, BEA$ExportCodes, BEA$ImportCodes, BEA$GovernmentDemandCodes) -# BEA$TotalConsumptionCodes <- c(BEA$HouseholdDemandCodes, BEA$InvestmentDemandCodes, -# BEA$GovernmentDemandCodes) BEA$ScrapCodes <- getVectorOfCodes(specs$BaseIOSchema, specs$BaseIOLevel, "Scrap") BEA$TransportationCodes <- getVectorOfCodes(specs$BaseIOSchema, specs$BaseIOLevel, "Distribution") BEA$WholesaleCodes <- getVectorOfCodes(specs$BaseIOSchema, specs$BaseIOLevel, "Wholesale") diff --git a/R/LoadIndicators.R b/R/LoadIndicators.R index 76db40cc..43eac33e 100644 --- a/R/LoadIndicators.R +++ b/R/LoadIndicators.R @@ -13,7 +13,7 @@ loadandbuildIndicators <- function(model) { #' Load indicators and associated factors in a list based on model config. #' @param model A model object with IO tables and satellite tables loaded. -#' @return A list with data.frame for indicators and data.frame for factors. +#' @return A list with a dataframe for indicator meta and a dataframe for indicator factors. loadIndicators <- function(model) { logging::loginfo("Initializing model indicators...") meta <- data.frame() @@ -60,7 +60,7 @@ loadFactors <- function(ind_spec) { } #' Loads all LCIA factors from static source file after melting it to long file -#' @return A dataframe with "Flowable", "UUID", "Context", "Unit", "Amount", "Code". +#' @return A dataframe of LCIA factors. loadLCIAfactors <- function() { # Load static LCIA factors lciafact <- utils::read.table(system.file("extdata", "USEEIO_LCIA_Factors.csv", package = "useeior"), @@ -77,8 +77,8 @@ loadLCIAfactors <- function() { } #' Checks an LCIA indicator to ensure that flows exist in the model for that indicator -#' @param factors a df of indicator characterization factors -#' @param flows a df of model$SatelliteTables$flows +#' @param factors A dataframe of indicator characterization factors +#' @param flows A dataframe of flows from model SatelliteTables checkIndicatorforFlows <- function(factors, flows){ if(is.null(flows)){ logging::logwarn("No flows found in model") diff --git a/R/UtilityFunctions.R b/R/UtilityFunctions.R index 2f0d99de..5b4d1b50 100644 --- a/R/UtilityFunctions.R +++ b/R/UtilityFunctions.R @@ -29,20 +29,26 @@ joinStringswithSlashes <- function(...) { #' @param from_level The level of BEA code this matrix starts at #' @param to_level The level of BEA code this matrix will be aggregated to #' @param specs Model specifications +#' @return An aggregated matrix aggregateMatrix <- function (matrix, from_level, to_level, specs) { # Determine the columns within MasterCrosswalk that will be used in aggregation from_code <- paste0("BEA_", from_level) to_code <- paste0("BEA_", to_level) # Aggregate by rows value_columns_1 <- colnames(matrix) - df_fromlevel <- merge(matrix, unique(model$crosswalk[, c(from_code, to_code)]), by.x = 0, by.y = from_code) - df_fromlevel_agg <- stats::aggregate(df_fromlevel[, value_columns_1], by = list(df_fromlevel[, to_code]), sum) + df_fromlevel <- merge(matrix, unique(model$crosswalk[, c(from_code, to_code)]), + by.x = 0, by.y = from_code) + df_fromlevel_agg <- stats::aggregate(df_fromlevel[, value_columns_1], + by = list(df_fromlevel[, to_code]), sum) rownames(df_fromlevel_agg) <- df_fromlevel_agg[, 1] df_fromlevel_agg[, 1] <- NULL # aggregate by columns value_columns_2 <- rownames(df_fromlevel_agg) - df_fromlevel_agg <- merge(t(df_fromlevel_agg), unique(model$crosswalk[, c(from_code, to_code)]), by.x = 0, by.y = from_code) - matrix_fromlevel_agg <- stats::aggregate(df_fromlevel_agg[, value_columns_2], by = list(df_fromlevel_agg[, to_code]), sum) + df_fromlevel_agg <- merge(t(df_fromlevel_agg), + unique(model$crosswalk[, c(from_code, to_code)]), + by.x = 0, by.y = from_code) + matrix_fromlevel_agg <- stats::aggregate(df_fromlevel_agg[, value_columns_2], + by = list(df_fromlevel_agg[, to_code]), sum) # reshape back to orginal CxI (IxC) format rownames(matrix_fromlevel_agg) <- matrix_fromlevel_agg[, 1] matrix_fromlevel_agg <- t(matrix_fromlevel_agg[, -1]) @@ -53,6 +59,7 @@ aggregateMatrix <- function (matrix, from_level, to_level, specs) { #' #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param output_type Either Commodity or Industry, default is Commodity +#' @return A data frame of output ratio calculateOutputRatio <- function (model, output_type="Commodity") { # Generate Output based on output_type if (output_type=="Commodity") { @@ -63,7 +70,8 @@ calculateOutputRatio <- function (model, output_type="Commodity") { # Map CommodityOutput to more aggregated IO levels Crosswalk <- unique(model$crosswalk[startsWith(colnames(model$crosswalk), "BEA")| colnames(model$crosswalk)=="USEEIO"]) - ratio_table <- merge(Crosswalk, as.data.frame(Output, row.names = gsub("/.*", "", names(Output))), + ratio_table <- merge(Crosswalk, + as.data.frame(Output, row.names = gsub("/.*", "", names(Output))), by.x = "USEEIO", by.y = 0) # Calculate output ratios for (iolevel in c("Summary", "Sector")) { @@ -125,7 +133,8 @@ writeMatrixasBinFile <- function(matrix, path) { #' downloads files from the Data Commons and stores in a local temporary data directory #' @param source The name of the source file (e.g. "TRACI_2.1_v1.parquet") -#' @param subdirectory The name of the package where the source file is stored on Data Commons including any subfolders (e.g. "lciafmt/traci_2_1") +#' @param subdirectory The name of the package where the source file is stored on +#' Data Commons including any subfolders (e.g. "lciafmt/traci_2_1") #' @param debug_url The Data Commons base url, including directory and subdirectories downloadDataCommonsfile <- function(source, subdirectory, debug_url) { # Define file directory @@ -136,10 +145,13 @@ downloadDataCommonsfile <- function(source, subdirectory, debug_url) { } # Download file - utils::download.file(paste0(debug_url, "/", source), paste0(directory, "/", source), mode = "wb", quiet = TRUE) + utils::download.file(paste0(debug_url, "/", source), + paste0(directory, "/", source), + mode = "wb", quiet = TRUE) } -#' Load the static file originating from Data Commons either by loading from local directory or downloading from Data Commons and +#' Load the static file originating from Data Commons either by loading from local directory +#' or downloading from Data Commons and #' saving to local directory #' @param static_file The name of a static file, including the subdirectories #' @return The static file originating from Data Commons @@ -225,7 +237,7 @@ setToleranceforRAS <- function(t_r, t_c, relative_diff = NULL, absolute_diff = N #' @param t_c A vector setting the target column sums of the matrix. #' @param t A numeric value setting the tolerance of RAS. #' @param max_itr A numeric value setting the maximum number of iterations to try for convergence. -#' Defualt: 1000000. +#' Default is 1,000,000. #' @return A RAS balanced matrix. RAS <- function(m0, t_r, t_c, t, max_itr = 1E6) { m <- m0 @@ -277,7 +289,7 @@ RAS <- function(m0, t_r, t_c, t, max_itr = 1E6) { #' @param relative_diff A numeric value setting the relative difference of the two numerical vectors. #' @param absolute_diff A numeric value setting the mean absolute difference of the two numerical vectors. #' @param max_itr A numeric value setting the maximum number of iterations to try for convergence. -#' Defualt: 1000000. +#' Default is 1,000,000. #' @return A RAS balanced matrix. applyRAS <- function(m0, t_r, t_c, relative_diff, absolute_diff, max_itr) { # Adjust t_c/t_r, make sum(t_c)==sum(t_r) @@ -295,7 +307,7 @@ applyRAS <- function(m0, t_r, t_c, relative_diff, absolute_diff, max_itr) { #' Remove spaces around strings, like "321A " #' @param s, string -#' @return s, string with spaces removed +#' @return A string with spaces removed removeExtraSpaces <- function(s) { s <- gsub("\\s", "",s) return(s) @@ -304,7 +316,7 @@ removeExtraSpaces <- function(s) { #' Remove numbers in slashes from a string, like /1/ #' @param s, string -#' @return s, string with numbers in slashes removed +#' @return A string with numbers in slashes removed removeNumberinSlashes <- function(s) { s <- gsub(" /.*", "",s) return(s) @@ -312,7 +324,7 @@ removeNumberinSlashes <- function(s) { #' Forces a string encoding to ASCII from Latin-1 #' @param s, string with Latin-1 encoding -#' @return s, string with ASCII encoding +#' @return A string with ASCII encoding convertStrEncodingLatintoASCII <- function(s) { s <- iconv(s, from = 'latin1', to = 'ASCII', sub='') return(s) @@ -330,7 +342,7 @@ writeDatatoRDA <- function(data, data_name) { #'Create sector schema for a model #'@param model, any model object -#'@return char string +#'@return A string of sector schema for a model generateModelSectorSchema <- function(model) { SectorSchema <- paste(model$specs$IODataSource, model$specs$BaseIOLevel, sep = "_") diff --git a/man/RAS.Rd b/man/RAS.Rd index a84567fa..1ba114ed 100644 --- a/man/RAS.Rd +++ b/man/RAS.Rd @@ -18,7 +18,7 @@ RAS(m0, t_r, t_c, t, max_itr = 1e+06) \item{t}{A numeric value setting the tolerance of RAS.} \item{max_itr}{A numeric value setting the maximum number of iterations to try for convergence. -Defualt: 1000000.} +Default is 1,000,000.} } \value{ A RAS balanced matrix. diff --git a/man/aggregateMatrix.Rd b/man/aggregateMatrix.Rd index 3cfa5a52..6629ee82 100644 --- a/man/aggregateMatrix.Rd +++ b/man/aggregateMatrix.Rd @@ -15,6 +15,9 @@ aggregateMatrix(matrix, from_level, to_level, specs) \item{specs}{Model specifications} } +\value{ +An aggregated matrix +} \description{ Aggregate matrix by rows then by columns } diff --git a/man/aggregateResultMatrix.Rd b/man/aggregateResultMatrix.Rd index 57fa4b21..15080cd9 100644 --- a/man/aggregateResultMatrix.Rd +++ b/man/aggregateResultMatrix.Rd @@ -14,7 +14,7 @@ aggregateResultMatrix(matrix, to_level, crosswalk) \item{crosswalk}{Sector crosswalk between levels of detail} } \value{ -aggregated matrix with sectors as rows and columns +An aggregated matrix with sectors as rows and columns } \description{ Aggregate result matrix by rows and columns diff --git a/man/aggregateResultTable.Rd b/man/aggregateResultTable.Rd index 83c98f69..23a84d29 100644 --- a/man/aggregateResultTable.Rd +++ b/man/aggregateResultTable.Rd @@ -14,7 +14,7 @@ aggregateResultTable(matrix, to_level, crosswalk) \item{crosswalk}{Sector crosswalk between levels of detail} } \value{ -aggregated matrix with sectors as rows +An aggregated matrix with sectors as rows } \description{ Aggregate result matrix by rows diff --git a/man/applyRAS.Rd b/man/applyRAS.Rd index 8c6db67c..7780c81c 100644 --- a/man/applyRAS.Rd +++ b/man/applyRAS.Rd @@ -18,7 +18,7 @@ applyRAS(m0, t_r, t_c, relative_diff, absolute_diff, max_itr) \item{absolute_diff}{A numeric value setting the mean absolute difference of the two numerical vectors.} \item{max_itr}{A numeric value setting the maximum number of iterations to try for convergence. -Defualt: 1000000.} +Default is 1,000,000.} } \value{ A RAS balanced matrix. diff --git a/man/buildModel.Rd b/man/buildModel.Rd index 9ec0be4c..66e25bb4 100644 --- a/man/buildModel.Rd +++ b/man/buildModel.Rd @@ -13,7 +13,7 @@ buildModel(modelname, configpaths = NULL) and optional agg/disagg configuration file(s). If NULL, built-in config files are used.} } \value{ -A list of EEIO model components and attributes +A list of EEIO model complete components and attributes } \description{ Build an EEIO model. diff --git a/man/calculateConsumptionContributiontoImpact.Rd b/man/calculateConsumptionContributiontoImpact.Rd index 6c552c9a..2487b4fb 100644 --- a/man/calculateConsumptionContributiontoImpact.Rd +++ b/man/calculateConsumptionContributiontoImpact.Rd @@ -14,7 +14,7 @@ calculateConsumptionContributiontoImpact(y, model, indicator) \item{indicator, }{str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential"} } \value{ -impacts, matrix of impacts sector purchased x sector sourced +A matrix of impacts sector purchased x sector sourced } \description{ Calculates the result matrix by sector for a specified indciator diff --git a/man/calculateDirectPerspectiveLCI.Rd b/man/calculateDirectPerspectiveLCI.Rd index cfbf8488..3b817bbb 100644 --- a/man/calculateDirectPerspectiveLCI.Rd +++ b/man/calculateDirectPerspectiveLCI.Rd @@ -12,7 +12,7 @@ calculateDirectPerspectiveLCI(B, c) \item{c}{Scaling vector.} } \value{ -Transposed m_d with total impacts in form of sector x flows. +A transposed matrix with total impacts in form of sector x flows. } \description{ Multiply the B matrix and the scaling vector c. diff --git a/man/calculateDirectPerspectiveLCIA.Rd b/man/calculateDirectPerspectiveLCIA.Rd index 1768565a..57a694c8 100644 --- a/man/calculateDirectPerspectiveLCIA.Rd +++ b/man/calculateDirectPerspectiveLCIA.Rd @@ -14,7 +14,7 @@ calculateDirectPerspectiveLCIA(B, C, c) \item{c}{Scaling vector.} } \value{ -Transposed u_d with total impacts in form of sector x impact categories. +A transposed matrix with total impacts in form of sector x impact categories. } \description{ Multiply the C matrix and the product of B matrix and scaling vector c. diff --git a/man/calculateFinalPerspectiveLCI.Rd b/man/calculateFinalPerspectiveLCI.Rd index 28f3e78b..d504794c 100644 --- a/man/calculateFinalPerspectiveLCI.Rd +++ b/man/calculateFinalPerspectiveLCI.Rd @@ -13,7 +13,7 @@ calculateFinalPerspectiveLCI(M, y) \item{y, }{a model demand vector} } \value{ -matrix, model sectors x model flows with total flows per sector +A matrix of model sectors x model flows with total flows per sector } \description{ The final perspective LCI aligns flows with sectors consumed by final users diff --git a/man/calculateFinalPerspectiveLCIA.Rd b/man/calculateFinalPerspectiveLCIA.Rd index 383be5cf..0145e386 100644 --- a/man/calculateFinalPerspectiveLCIA.Rd +++ b/man/calculateFinalPerspectiveLCIA.Rd @@ -13,7 +13,7 @@ calculateFinalPerspectiveLCIA(N, y) \item{y, }{a model demand vector} } \value{ -Transposed u_d with total impacts in form of sector x impact categories. +A transposed matrix with total impacts in form of sector x impact categories. } \description{ The final perspective aligns impacts with sectors consumed by final users diff --git a/man/calculateFlowContributiontoImpact.Rd b/man/calculateFlowContributiontoImpact.Rd index 719dae08..f030444a 100644 --- a/man/calculateFlowContributiontoImpact.Rd +++ b/man/calculateFlowContributiontoImpact.Rd @@ -17,7 +17,7 @@ calculateFlowContributiontoImpact(model, sector, indicator, domestic = FALSE) \item{domestic, }{boolean, sets model to use domestic flow matrix. Default is FALSE.} } \value{ -df, dataframe sorted from highest flow contribution "contribution", also showing "x","y","impact" +A dataframe sorted from highest flow contribution "contribution", also showing "x","y","impact" } \description{ Calculate the percent contribution of M flows to an N indicator result diff --git a/man/calculateOutputRatio.Rd b/man/calculateOutputRatio.Rd index 4febf403..db97081b 100644 --- a/man/calculateOutputRatio.Rd +++ b/man/calculateOutputRatio.Rd @@ -11,6 +11,9 @@ calculateOutputRatio(model, output_type = "Commodity") \item{output_type}{Either Commodity or Industry, default is Commodity} } +\value{ +A data frame of output ratio +} \description{ Generate Output Ratio table, flexible to Commodity/Industry output and model Commodity/Industry type } diff --git a/man/calculatePercentContributiontoImpact.Rd b/man/calculatePercentContributiontoImpact.Rd index aa2187ec..ef2742af 100644 --- a/man/calculatePercentContributiontoImpact.Rd +++ b/man/calculatePercentContributiontoImpact.Rd @@ -12,7 +12,7 @@ calculatePercentContributiontoImpact(x, y) \item{y, }{numeric vector of length n} } \value{ -df, dataframe sorted from highest "contribution", also showing "x","y","impact" +A dataframe sorted from highest "contribution", also showing "x","y","impact" } \description{ Dot multiplies two vectors to calculate an impact score and the percent contribution each score to the total diff --git a/man/calculateProducerbyPurchaserPriceRatio.Rd b/man/calculateProducerbyPurchaserPriceRatio.Rd index 738783d3..11745878 100644 --- a/man/calculateProducerbyPurchaserPriceRatio.Rd +++ b/man/calculateProducerbyPurchaserPriceRatio.Rd @@ -10,7 +10,7 @@ calculateProducerbyPurchaserPriceRatio(model) \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} } \value{ -A data.frame of producer to purchaser price ratio. +A dataframe of producer to purchaser price ratio. } \description{ Calculate producer to purchaser price ratio. diff --git a/man/calculateSectorContributiontoImpact.Rd b/man/calculateSectorContributiontoImpact.Rd index de4374f4..0f618c69 100644 --- a/man/calculateSectorContributiontoImpact.Rd +++ b/man/calculateSectorContributiontoImpact.Rd @@ -17,7 +17,7 @@ calculateSectorContributiontoImpact(model, sector, indicator, domestic = FALSE) \item{domestic, }{boolean, sets model to use domestic flow matrix. Default is FALSE.} } \value{ -df, dataframe sorted from highest process contribution "contribution", also showing "x","y","impact" +A dataframe sorted from highest process contribution "contribution", also showing "x","y","impact" } \description{ Calculate the percent contribution of sectors to an N indicator result diff --git a/man/calculateYearbyModelIOYearPriceRatio.Rd b/man/calculateYearbyModelIOYearPriceRatio.Rd index 5dd110f9..4e47802d 100644 --- a/man/calculateYearbyModelIOYearPriceRatio.Rd +++ b/man/calculateYearbyModelIOYearPriceRatio.Rd @@ -10,7 +10,7 @@ calculateYearbyModelIOYearPriceRatio(model) \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} } \value{ -A data.frame of year by model IO year price ratio. +A dataframe of year by model IO year price ratio. } \description{ Calculate year by model IO year price ratio. diff --git a/man/checkIndicatorforFlows.Rd b/man/checkIndicatorforFlows.Rd index 00f55cc3..c5a5c8e7 100644 --- a/man/checkIndicatorforFlows.Rd +++ b/man/checkIndicatorforFlows.Rd @@ -7,9 +7,9 @@ checkIndicatorforFlows(factors, flows) } \arguments{ -\item{factors}{a df of indicator characterization factors} +\item{factors}{A dataframe of indicator characterization factors} -\item{flows}{a df of model$SatelliteTables$flows} +\item{flows}{A dataframe of flows from model SatelliteTables} } \description{ Checks an LCIA indicator to ensure that flows exist in the model for that indicator diff --git a/man/convertStrEncodingLatintoASCII.Rd b/man/convertStrEncodingLatintoASCII.Rd index 016d6b0a..b5326299 100644 --- a/man/convertStrEncodingLatintoASCII.Rd +++ b/man/convertStrEncodingLatintoASCII.Rd @@ -10,7 +10,7 @@ convertStrEncodingLatintoASCII(s) \item{s, }{string with Latin-1 encoding} } \value{ -s, string with ASCII encoding +A string with ASCII encoding } \description{ Forces a string encoding to ASCII from Latin-1 diff --git a/man/createCfromFactorsandBflows.Rd b/man/createCfromFactorsandBflows.Rd index 2b476cf0..035a4f8c 100644 --- a/man/createCfromFactorsandBflows.Rd +++ b/man/createCfromFactorsandBflows.Rd @@ -12,7 +12,7 @@ createCfromFactorsandBflows(factors, B_flows) \item{B_flows}{Flows from B matrix to use for reference} } \value{ -a C matrix in indicator x flow format +C, a matrix in indicator x flow format } \description{ Generate C matrix from indicator factors and a model B matrix diff --git a/man/downloadDataCommonsfile.Rd b/man/downloadDataCommonsfile.Rd index 9cf21cf3..23e97043 100644 --- a/man/downloadDataCommonsfile.Rd +++ b/man/downloadDataCommonsfile.Rd @@ -9,7 +9,8 @@ downloadDataCommonsfile(source, subdirectory, debug_url) \arguments{ \item{source}{The name of the source file (e.g. "TRACI_2.1_v1.parquet")} -\item{subdirectory}{The name of the package where the source file is stored on Data Commons including any subfolders (e.g. "lciafmt/traci_2_1")} +\item{subdirectory}{The name of the package where the source file is stored on +Data Commons including any subfolders (e.g. "lciafmt/traci_2_1")} \item{debug_url}{The Data Commons base url, including directory and subdirectories} } diff --git a/man/formatDemandVector.Rd b/man/formatDemandVector.Rd index b3d890b7..d2582d8f 100644 --- a/man/formatDemandVector.Rd +++ b/man/formatDemandVector.Rd @@ -12,7 +12,7 @@ formatDemandVector(dv, L) \item{L, }{the L matrix for the given model, used as a reference} } \value{ -a named vector with values for all names in L and ordered like L +A named vector with values for all names in L and ordered like L } \description{ Format a named demand vector with partial sectors to have all the rows and ordering needed diff --git a/man/generateCbSfromTbSandModel.Rd b/man/generateCbSfromTbSandModel.Rd index 85386855..931b0ab8 100644 --- a/man/generateCbSfromTbSandModel.Rd +++ b/man/generateCbSfromTbSandModel.Rd @@ -10,7 +10,7 @@ generateCbSfromTbSandModel(model) \item{model, }{a model with econ and flow data loaded} } \value{ -df, a Coefficients-by-sector table +A dataframe of Coefficients-by-Sector (CbS) table } \description{ Prepare coefficients (x unit/$) from the totals by flow and sector (x unit) diff --git a/man/generateModelSectorSchema.Rd b/man/generateModelSectorSchema.Rd index ac714d89..f0fc92f1 100644 --- a/man/generateModelSectorSchema.Rd +++ b/man/generateModelSectorSchema.Rd @@ -10,7 +10,7 @@ generateModelSectorSchema(model) \item{model, }{any model object} } \value{ -char string +A string of sector schema for a model } \description{ Create sector schema for a model diff --git a/man/loadDataCommonsfile.Rd b/man/loadDataCommonsfile.Rd index b8491a1d..042955bb 100644 --- a/man/loadDataCommonsfile.Rd +++ b/man/loadDataCommonsfile.Rd @@ -2,7 +2,8 @@ % Please edit documentation in R/UtilityFunctions.R \name{loadDataCommonsfile} \alias{loadDataCommonsfile} -\title{Load the static file originating from Data Commons either by loading from local directory or downloading from Data Commons and +\title{Load the static file originating from Data Commons either by loading from local directory +or downloading from Data Commons and saving to local directory} \usage{ loadDataCommonsfile(static_file) @@ -14,6 +15,7 @@ loadDataCommonsfile(static_file) The static file originating from Data Commons } \description{ -Load the static file originating from Data Commons either by loading from local directory or downloading from Data Commons and +Load the static file originating from Data Commons either by loading from local directory +or downloading from Data Commons and saving to local directory } diff --git a/man/loadIndicators.Rd b/man/loadIndicators.Rd index 2dcc368c..5088acc8 100644 --- a/man/loadIndicators.Rd +++ b/man/loadIndicators.Rd @@ -10,7 +10,7 @@ loadIndicators(model) \item{model}{A model object with IO tables and satellite tables loaded.} } \value{ -A list with data.frame for indicators and data.frame for factors. +A list with a dataframe for indicator meta and a dataframe for indicator factors. } \description{ Load indicators and associated factors in a list based on model config. diff --git a/man/loadLCIAfactors.Rd b/man/loadLCIAfactors.Rd index 5c9ca65f..3f5fea74 100644 --- a/man/loadLCIAfactors.Rd +++ b/man/loadLCIAfactors.Rd @@ -7,7 +7,7 @@ loadLCIAfactors() } \value{ -A dataframe with "Flowable", "UUID", "Context", "Unit", "Amount", "Code". +A dataframe of LCIA factors. } \description{ Loads all LCIA factors from static source file after melting it to long file diff --git a/man/prepareDomesticConsumptionDemand.Rd b/man/prepareDomesticConsumptionDemand.Rd index ee1d758b..20efdacb 100644 --- a/man/prepareDomesticConsumptionDemand.Rd +++ b/man/prepareDomesticConsumptionDemand.Rd @@ -10,7 +10,7 @@ prepareDomesticConsumptionDemand(model) \item{model, }{a model} } \value{ -a named vector with demand +A named vector with demand } \description{ Prepares a demand vector representing domestic consumption diff --git a/man/prepareHouseholdDemand.Rd b/man/prepareHouseholdDemand.Rd index eb3fffa5..cd65b978 100644 --- a/man/prepareHouseholdDemand.Rd +++ b/man/prepareHouseholdDemand.Rd @@ -10,7 +10,7 @@ prepareHouseholdDemand(model) \item{model, }{a model} } \value{ -a named vector with demand +A named vector with demand } \description{ Prepares a demand vector representing household consumption diff --git a/man/prepareProductionDemand.Rd b/man/prepareProductionDemand.Rd index cbc41bf9..770ba937 100644 --- a/man/prepareProductionDemand.Rd +++ b/man/prepareProductionDemand.Rd @@ -11,7 +11,7 @@ prepareProductionDemand(model) \item{model, }{a model} } \value{ -a named vector with demand +A named vector with demand } \description{ Prepares a demand vector representing production diff --git a/man/removeExtraSpaces.Rd b/man/removeExtraSpaces.Rd index a404a6d7..def416e9 100644 --- a/man/removeExtraSpaces.Rd +++ b/man/removeExtraSpaces.Rd @@ -10,7 +10,7 @@ removeExtraSpaces(s) \item{s, }{string} } \value{ -s, string with spaces removed +A string with spaces removed } \description{ Remove spaces around strings, like "321A " diff --git a/man/removeNumberinSlashes.Rd b/man/removeNumberinSlashes.Rd index ad65df8c..e6ffa034 100644 --- a/man/removeNumberinSlashes.Rd +++ b/man/removeNumberinSlashes.Rd @@ -10,7 +10,7 @@ removeNumberinSlashes(s) \item{s, }{string} } \value{ -s, string with numbers in slashes removed +A string with numbers in slashes removed } \description{ Remove numbers in slashes from a string, like /1/ diff --git a/man/standardizeandcastSatelliteTable.Rd b/man/standardizeandcastSatelliteTable.Rd index ee7a8d93..a7d19888 100644 --- a/man/standardizeandcastSatelliteTable.Rd +++ b/man/standardizeandcastSatelliteTable.Rd @@ -12,7 +12,7 @@ standardizeandcastSatelliteTable(df, model) \item{model}{an EEIO model with IO tables loaded} } \value{ -a flows x sector matrix-like dataframe +A matrix-like dataframe of flows x sector } \description{ Converts flows table into flows x sector matrix-like format diff --git a/man/sumDemandCols.Rd b/man/sumDemandCols.Rd index a5b657d2..f385df29 100644 --- a/man/sumDemandCols.Rd +++ b/man/sumDemandCols.Rd @@ -12,7 +12,7 @@ sumDemandCols(Y, codes) \item{codes, }{sector code(s) for a subset of Final Demand cols} } \value{ -a named vector with model sectors and demand amounts +A named vector with model sectors and demand amounts } \description{ Sums across sectors for a given set of codes/cols in a given final demand df diff --git a/man/sumforConsumption.Rd b/man/sumforConsumption.Rd index e4cf5006..7bc0decc 100644 --- a/man/sumforConsumption.Rd +++ b/man/sumforConsumption.Rd @@ -14,7 +14,7 @@ sumforConsumption(model, Y) \item{Y, }{a model Demand df.} } \value{ -a named vector with model sectors and demand amounts +A named vector with model sectors and demand amounts } \description{ Sums the demand cols representing final consumption, i.e. household, investment, and government From ea960f5778fd0351e200371846295c52e5ca3af9 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 9 Nov 2021 16:36:23 -0500 Subject: [PATCH 150/319] add example of how to calculateConsumptionContributiontoImpact --- examples/USEEIO2s-GHG.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/USEEIO2s-GHG.R b/examples/USEEIO2s-GHG.R index b412d847..31746090 100644 --- a/examples/USEEIO2s-GHG.R +++ b/examples/USEEIO2s-GHG.R @@ -15,6 +15,11 @@ model <- buildModel("USEEIOv2.0s-GHG") # result using total US production result <- calculateEEIOModel(model, perspective = "DIRECT", demand = "Production") +# Calculate a sector by sector result matrix for a specified indicator based on one of the demand +# vectors included in the model +y <- model[["DemandVectors"]][["vectors"]][["2012_US_Consumption_Complete"]] +impact_result <- calculateConsumptionContributiontoImpact(y, model, indicator = "Greenhouse Gases") + # Adjust N matrix (direct + indirect impacts per dollar) to 2018 dollar and purchaser price N_adj <- adjustResultMatrixPrice("N", currency_year = 2012, purchaser_price = FALSE, model) From b2c1a34f19c012833358fea04935aaac74ce13ea Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 9 Nov 2021 16:37:48 -0500 Subject: [PATCH 151/319] add (and export) extractAndFormatDemandVector to enable reading of custom demand from csv file --- NAMESPACE | 1 + R/DemandFunctions.R | 22 ++++++++++++++++++++++ man/extractAndFormatDemandVector.Rd | 21 +++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 man/extractAndFormatDemandVector.Rd diff --git a/NAMESPACE b/NAMESPACE index 96884d82..fa9c50b7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -16,6 +16,7 @@ export(compareCommodityOutputandDomesticUseplusProductionDemand) export(compareEandLCIResult) export(compareFlowTotals) export(compareOutputandLeontiefXDemand) +export(extractAndFormatDemandVector) export(generateModelIdentifier) export(heatmapSatelliteTableCoverage) export(heatmapSectorRanking) diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index 8411d072..dc2f2d92 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -100,3 +100,25 @@ formatDemandVector <- function(dv,L) { d[match(names(dv),names(d))] <- dv return(d) } + +#' Read demand vector from a csv file and format for use in model calculations +#' @param file_path str, path to csv file containing demand data +#' @param demand_name str, name of demand data as field header +#' @param model, a model +#' @return a demand vector formatted for use in calculating model results +#' @export +extractAndFormatDemandVector <- function(file_path, demand_name, model){ + demand_df <- read.csv(file_path, stringsAsFactors = FALSE) + row.names(demand_df) <- demand_df$Code + demand_df$Code <- NULL + y <- na.omit(demand_df[,demand_name]) + names(y) <- row.names(demand_df) + if(isDemandVectorValid(y, model$L)) { + y <- formatDemandVector(y, model$L) + } + else { + logging::logerror("Format of the demand vector is invalid.") + stop() + } + return(y) +} diff --git a/man/extractAndFormatDemandVector.Rd b/man/extractAndFormatDemandVector.Rd new file mode 100644 index 00000000..5ed2af59 --- /dev/null +++ b/man/extractAndFormatDemandVector.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/DemandFunctions.R +\name{extractAndFormatDemandVector} +\alias{extractAndFormatDemandVector} +\title{Read demand vector from a csv file and format for use in model calculations} +\usage{ +extractAndFormatDemandVector(file_path, demand_name, model) +} +\arguments{ +\item{file_path}{str, path to csv file containing demand data} + +\item{demand_name}{str, name of demand data as field header} + +\item{model, }{a model} +} +\value{ +a demand vector formatted for use in calculating model results +} +\description{ +Read demand vector from a csv file and format for use in model calculations +} From 6a88e2d2bcae5b0e21f7e2e2b7a0db7d0108db3f Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 9 Nov 2021 16:48:53 -0500 Subject: [PATCH 152/319] fix link typos --- format_specs/Model.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/format_specs/Model.md b/format_specs/Model.md index 42b99b10..4d8cfa4a 100644 --- a/format_specs/Model.md +++ b/format_specs/Model.md @@ -4,16 +4,16 @@ A fully constructed USEEIO model is an R named list that contains the following ## Notes - A _sector_ is either a commodity or industry, depending on the [model CommodityorIndustry Type](https://github.com/USEPA/useeior/blob/master/format_specs/ModelSpecifications.md#model-specifications). The _sector_ will be synononmous for that same CommodityorIndustryType for all tables in a given model in which _sector_ is used. + A _sector_ is either a commodity or industry, depending on the [model CommodityorIndustry Type](https://github.com/USEPA/useeior/blob/master/format_specs/ModelSpecification.md#model-specifications). The _sector_ will be synononmous for that same CommodityorIndustryType for all tables in a given model in which _sector_ is used. -Unless another year is specifically called out, all economic values are given in US dollars (USD) in the value the [model IOyear](https://github.com/USEPA/useeior/blob/master/format_specs/ModelSpecifications.md#model-specifications). +Unless another year is specifically called out, all economic values are given in US dollars (USD) in the value the [model IOyear](https://github.com/USEPA/useeior/blob/master/format_specs/ModelSpecification.md#model-specifications). ## Model Items are listed in the order in which they appear in a built Model object in R. | Item | Data Structure | Category | Description | | --- | --- | --------- | ------ | -| specs | list | metadata | [Model specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md) | +| specs | list | metadata | [Model specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md) | | crosswalk | data.frame | metadata | Sector [crosswalk](#crosswalk) | | Commodities | data.frame | metadata | Commodity metadata in [sector meta format](#sector-meta) | | Industries | data.frame | metadata | Industry metadata in [sector meta format](#sector-meta) | @@ -144,19 +144,19 @@ The Indicators object contains meta and factors dataframes. | Item | Type | Description | | --- | --- | --------- | -| Name | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) | -| Code | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) | -| Group | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) | -| Unit | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) | -| SimpleUnit | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) | -| SimpleName | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) | +| Name | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| Code | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| Group | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| Unit | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| SimpleUnit | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| SimpleName | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | #### factors A data table of the characterization factors for indicators included in the model | Item | Type | Description | | --- | --- | --------- | -| Indicator | str | Matches the [Name](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) of the indicator | +| Indicator | str | Matches the [Name](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) of the indicator | | Flowable | str | [Federal Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | | Context | str | [Federal Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | | Unit | str | [Federal Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | @@ -174,11 +174,11 @@ The DemandVector object contains the demand vectors and a metadata table. | Item | Type | Description | | --- | --- | --------- | -| Type | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#demand-vector-specifications) | -| Year | int | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#demand-vector-specifications) | -| System | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#demand-vector-specifications) | -| Location | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#demand-vector-specifications) | -| Name | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#demand-vector-specifications) | +| Type | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | +| Year | int | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | +| System | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | +| Location | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | +| Name | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | | ID | str | Year_Location_Type_System | ### Model Component Matrices @@ -189,7 +189,7 @@ When used in matrix indices, items below take the following format: | --- | --------- | | sector (commodity or industry) | [Code_Loc](#sector-meta) (e.g. `1111A0/US`) | | flow | [Flowable/Context/Unit](#satellite-tables) (e.g. `Carbon dioxide/emission/air/kg`) | -| indicator | [Name](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) (e.g. `Greenhouse Gases`) | +| indicator | [Name](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) (e.g. `Greenhouse Gases`) | #### Output vectors From 3a5353511f7e9403bce6b4835db69c7a46d5520a Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 9 Nov 2021 16:49:49 -0500 Subject: [PATCH 153/319] add detail for demand vector format --- format_specs/Model.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format_specs/Model.md b/format_specs/Model.md index 4d8cfa4a..65487310 100644 --- a/format_specs/Model.md +++ b/format_specs/Model.md @@ -167,7 +167,7 @@ The Indicators object contains meta and factors dataframes. The DemandVector object contains the demand vectors and a metadata table. #### vectors - A data table of the demand vectors included in the model + A data table of the demand vectors included in the model. Each vector is in the format of a named vector with names assigned in [Code_Loc](#sector-meta) (e.g. `1111A0/US`) format. #### meta A table of metadata for the demand vectors included in the model. From 37fef880d3f3c4ae3f41a03b7d0b398c263a2cbe Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 10 Nov 2021 09:25:28 -0800 Subject: [PATCH 154/319] Move log error message to within stop() --- R/DemandFunctions.R | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index dc2f2d92..ba379540 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -115,10 +115,8 @@ extractAndFormatDemandVector <- function(file_path, demand_name, model){ names(y) <- row.names(demand_df) if(isDemandVectorValid(y, model$L)) { y <- formatDemandVector(y, model$L) - } - else { - logging::logerror("Format of the demand vector is invalid.") - stop() + } else { + stop("Format of the demand vector is invalid.") } return(y) } From 4a1f41bf84e6feb605c340306ebfa97c02d4837d Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 10 Nov 2021 09:34:56 -0800 Subject: [PATCH 155/319] Move log error message to within stop() --- R/CalculationFunctions.R | 6 ++---- R/DataQualityFunctions.R | 3 +-- R/IOFunctions.R | 6 ++---- R/InitializeModel.R | 3 +-- R/LoadDemandVectors.R | 3 +-- R/LoadSatellites.R | 1 - R/WriteModel.R | 6 ++---- 7 files changed, 9 insertions(+), 19 deletions(-) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index c49b43c9..2236bf82 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -29,8 +29,7 @@ calculateEEIOModel <- function(model, perspective, demand = "Production", use_do id <- meta[which(meta$Name==demand),"ID"] d <- model$DemandVectors$vectors[[id]] } else { - logging::logerror(paste0("'", demand, "' is not a valid demand vector name in model.")) - stop() + stop(paste0("'", demand, "' is not a valid demand vector name in model.")) } } else { # Assume this is a user-defined demand vector @@ -38,8 +37,7 @@ calculateEEIOModel <- function(model, perspective, demand = "Production", use_do if (isDemandVectorValid(demand,L)) { d <- formatDemandVector(demand,L) } else { - logging::logerror("Format of the demand vector is invalid. Cannot calculate result.") - stop() + stop("Format of the demand vector is invalid. Cannot calculate result.") } } # Convert demand vector into a matrix diff --git a/R/DataQualityFunctions.R b/R/DataQualityFunctions.R index b7d98d61..0217cbe8 100644 --- a/R/DataQualityFunctions.R +++ b/R/DataQualityFunctions.R @@ -59,8 +59,7 @@ lookupDQBoundScore <- function(raw_score,dqi,scoring_bounds) { } if (is.na(score)) score<-5 } else { - logging::logerror(paste("No bounds defined for", dqi)) - stop() + stop(paste("No bounds defined for", dqi)) } return(score) diff --git a/R/IOFunctions.R b/R/IOFunctions.R index 2b663c60..3886e0b2 100644 --- a/R/IOFunctions.R +++ b/R/IOFunctions.R @@ -130,8 +130,7 @@ transformDirectRequirementswithMarketShares <- function (B, D, model) { if (all(colnames(B) == rownames(D)) && all(colnames(D) == rownames(B))) { } else { - logging::logerror("Column names of the direct requirements do not match the row names of the market shares matrix.") - stop() + stop("Column names of the direct requirements do not match the row names of the market shares matrix.") } if (model$specs$CommodityorIndustryType == "Commodity") { # commodity model DR_coeffs = dr %*% ms (CxI x IxC) = CxC @@ -142,8 +141,7 @@ transformDirectRequirementswithMarketShares <- function (B, D, model) { A <- D %*% B dimnames(A) <- c(dimnames(D)[1], dimnames(B)[2]) } else { - logging::logerror("CommodityorIndustryType not specified or incorrectly specified for model.") - stop() + stop("CommodityorIndustryType not specified or incorrectly specified for model.") } return(A) } diff --git a/R/InitializeModel.R b/R/InitializeModel.R index 56134e7c..13be230e 100644 --- a/R/InitializeModel.R +++ b/R/InitializeModel.R @@ -10,8 +10,7 @@ initializeModel <- function(modelname, configpaths = NULL) { # Get model specs model$specs <- getConfiguration(modelname, "model", configpaths) if (rlang::is_na(model$specs)) { - logging::logerror(paste("No configuration exists for a model named", modelname)) - stop() + stop(paste("No configuration exists for a model named", modelname)) } else { # Get model crosswalk crosswalk <- get(paste0("MasterCrosswalk", model$specs$BaseIOSchema), diff --git a/R/LoadDemandVectors.R b/R/LoadDemandVectors.R index c3fb6b56..a78e9a00 100644 --- a/R/LoadDemandVectors.R +++ b/R/LoadDemandVectors.R @@ -23,8 +23,7 @@ loadDemandVectors <- function(model) { dv <- do.call(eval(demandFunction), list(model)) model$DemandVectors$vectors[[i$ID]] <- dv } else { - logging::logerror(paste(v, "not found in registered demand vector functions. This vector must be registered or removed from the model spec.")) - stop() + stop(paste(v, "not found in registered demand vector functions. This vector must be registered or removed from the model spec.")) } } model$DemandVectors$meta <- meta diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index 4ab10381..bde5f0f7 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -104,7 +104,6 @@ generateTbSfromSatSpec <- function(sat_spec, model) { totals_by_sector <- utils::read.table(system.file("extdata", sat_spec$StaticFile, package = "useeior"), sep = ",", header = TRUE, stringsAsFactors = FALSE, fileEncoding = 'UTF-8-BOM') - } else if (!is.null(sat_spec$ScriptFunctionCall)) { func_to_eval <- sat_spec$ScriptFunctionCall totalsgenfunction <- as.name(func_to_eval) diff --git a/R/WriteModel.R b/R/WriteModel.R index cc5bac67..d57e4993 100644 --- a/R/WriteModel.R +++ b/R/WriteModel.R @@ -180,8 +180,7 @@ prepareWriteDirs <- function(model, dirs) { writeModelDemandstoJSON <- function(model, demandsfolder) { #!WARNING: Only works for single region model if (model$specs$ModelRegionAcronyms!="US") { - logging::logerror("Currently only works for single region US models.") - stop() + stop("Currently only works for single region US models.") } for (n in names(model$DemandVectors$vectors)) { @@ -204,8 +203,7 @@ writeModelDemandstoJSON <- function(model, demandsfolder) { writeModelMetadata <- function(model, dirs) { #!WARNING: Only works for single region model if (model$specs$ModelRegionAcronyms!="US") { - logging::logerror("Currently only works for single region US models.") - stop() + stop("Currently only works for single region US models.") } # Load metadata fields for API From cd3c9fd2e80062608d36fa8b7d1cc3deda0624f9 Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Mon, 15 Nov 2021 11:08:10 -0500 Subject: [PATCH 156/319] Update R-CMD-check.yaml --- .github/workflows/R-CMD-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index a61276c2..0a048eac 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -64,7 +64,7 @@ jobs: shell: bash - name: Upload check results - if: failure() # if any of the previous steps fail, export a log + #if: failure() # if any of the previous steps fail, export a log uses: actions/upload-artifact@main with: name: ${{ runner.os }}-r${{ matrix.config.r }}-results From 03a924deebea9496824b6022898d0bbce4dacdca Mon Sep 17 00:00:00 2001 From: a-w-beck Date: Fri, 5 Nov 2021 14:25:16 -0400 Subject: [PATCH 157/319] preparing to render validation scripts on gh runners, plus update to testthat edition requirement --- DESCRIPTION | 3 +- inst/doc/ValidateModel_render.Rmd | 8 +- inst/doc/ValidateModel_render.html | 230 ++++++++++++++ inst/doc/output/ValidateUSEEIOv2.0.1.html | 351 +++++++++++++++++++++ inst/doc/output/ValidateUSEEIOv2.0.1.md | 208 +++++++++++++ inst/doc/output/ValidateUSEEIOv2.0.html | 351 +++++++++++++++++++++ inst/doc/output/ValidateUSEEIOv2.0.md | 208 +++++++++++++ inst/doc/output/ValidateUSEEIOv2.1.html | 354 ++++++++++++++++++++++ inst/doc/output/ValidateUSEEIOv2.1.md | 211 +++++++++++++ useeior.Rproj | 4 +- 10 files changed, 1923 insertions(+), 5 deletions(-) create mode 100644 inst/doc/ValidateModel_render.html create mode 100644 inst/doc/output/ValidateUSEEIOv2.0.1.html create mode 100644 inst/doc/output/ValidateUSEEIOv2.0.1.md create mode 100644 inst/doc/output/ValidateUSEEIOv2.0.html create mode 100644 inst/doc/output/ValidateUSEEIOv2.0.md create mode 100644 inst/doc/output/ValidateUSEEIOv2.1.html create mode 100644 inst/doc/output/ValidateUSEEIOv2.1.md diff --git a/DESCRIPTION b/DESCRIPTION index b97b5aa1..d83b6291 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -43,4 +43,5 @@ Encoding: UTF-8 LazyData: true RoxygenNote: 7.1.1 Suggests: - testthat (>= 2.1.0) + testthat (>= 3.0.0) +Config/testthat/edition: 3 diff --git a/inst/doc/ValidateModel_render.Rmd b/inst/doc/ValidateModel_render.Rmd index 0aeb14d4..eb9cd1dd 100644 --- a/inst/doc/ValidateModel_render.Rmd +++ b/inst/doc/ValidateModel_render.Rmd @@ -1,4 +1,5 @@ --- +title: "ValidateModel_render" output: html_document params: modelname: @@ -15,6 +16,8 @@ knitr::opts_chunk$set( results = "asis" ) +knitr::opts_knit$set(progress = FALSE, verbose = FALSE) #, root.dir = "../..") # set as repo top level + require(rmarkdown) require(knitr) require(devtools) @@ -28,7 +31,8 @@ devtools::load_all() # Validate model ```{r validate} for (modelname in params$modelname) { - rmarkdown::render("inst/doc/ValidateModel.Rmd", - output_file = paste0("Validate", modelname, ".html")) + rmarkdown::render("ValidateModel.Rmd", # "inst/doc/ValidateModel.Rmd", # + output_file = paste0("output/Validate", modelname, ".html"), + quiet = TRUE) } ``` diff --git a/inst/doc/ValidateModel_render.html b/inst/doc/ValidateModel_render.html new file mode 100644 index 00000000..11c77a87 --- /dev/null +++ b/inst/doc/ValidateModel_render.html @@ -0,0 +1,230 @@ + + + + + + + + + + + + + +ValidateModel_render + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+

Load the useeior package

+
devtools::load_all()
+
+
+

Validate model

+
for (modelname in params$modelname) {
+  rmarkdown::render("ValidateModel.Rmd", # "inst/doc/ValidateModel.Rmd", # 
+                    output_file = paste0("output/Validate", modelname, ".html"),
+                    quiet = TRUE)
+}
+
+ + + + +
+ + + + + + + + + + + + + + + diff --git a/inst/doc/output/ValidateUSEEIOv2.0.1.html b/inst/doc/output/ValidateUSEEIOv2.0.1.html new file mode 100644 index 00000000..78cc37f3 --- /dev/null +++ b/inst/doc/output/ValidateUSEEIOv2.0.1.html @@ -0,0 +1,351 @@ + + + + + + + + + + + + + + +Validating USEEIOv2.0.1 Model + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +

This document presents validation results of USEEIOv2.0.1 model.

+
+

Build and Calculate Model

+
model <- buildModel(modelname)
+#> 2021-11-05 13:54:36 INFO::Begin model initialization...
+#> 2021-11-05 13:54:36 INFO::Initializing IO tables...
+#> 2021-11-05 13:54:36 INFO::Initializing Gross Output tables...
+#> 2021-11-05 13:54:37 INFO::Initializing Chain Price Index tables...
+#> 2021-11-05 13:54:38 INFO::Loading disaggregation specification file for WasteDisaggregationDetail...
+#> 2021-11-05 13:54:38 INFO::Initializing Disaggregation of IO tables...
+#> 2021-11-05 13:54:39 INFO::Initializing model satellite tables...
+#> 2021-11-05 13:54:39 INFO::Loading Water withdrawals flows from DataCommons...
+#> 2021-11-05 13:54:39 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons...
+#> 2021-11-05 13:54:45 INFO::Loading Point source industrial releases to ground flows from DataCommons...
+#> 2021-11-05 13:54:45 INFO::Loading Point source releases to water flows from DataCommons...
+#> 2021-11-05 13:54:46 INFO::Loading Greenhouse Gases flows from DataCommons...
+#> 2021-11-05 13:54:46 INFO::Loading Land use flows from DataCommons...
+#> 2021-11-05 13:54:46 INFO::Loading Mineral extraction flows from DataCommons...
+#> 2021-11-05 13:54:46 INFO::Loading Energy extraction flows from DataCommons...
+#> 2021-11-05 13:54:46 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation
+#> 2021-11-05 13:54:46 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons...
+#> 2021-11-05 13:54:46 INFO::Loading Pesticide releases flows from DataCommons...
+#> 2021-11-05 13:54:46 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons...
+#> 2021-11-05 13:54:46 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation
+#> 2021-11-05 13:54:47 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons...
+#> 2021-11-05 13:54:47 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons...
+#> 2021-11-05 13:54:49 INFO::Loading Employment flows from DataCommons...
+#> 2021-11-05 13:54:49 INFO::Generating Value Added flows...
+#> 2021-11-05 13:54:49 INFO::Initializing model indicators...
+#> 2021-11-05 13:54:49 INFO::Getting Greenhouse Gases indicator from DataCommons...
+#> 2021-11-05 13:54:49 INFO::Getting Acidification Potential indicator from DataCommons...
+#> 2021-11-05 13:54:49 INFO::Getting Eutrophication Potential indicator from DataCommons...
+#> 2021-11-05 13:54:49 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons...
+#> 2021-11-05 13:54:53 INFO::Getting Human Health - Cancer indicator from DataCommons...
+#> 2021-11-05 13:54:54 INFO::Getting Human Health - Noncancer indicator from DataCommons...
+#> 2021-11-05 13:54:54 INFO::Getting Human Health Toxicity indicator from DataCommons...
+#> 2021-11-05 13:54:56 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons...
+#> 2021-11-05 13:54:56 INFO::Getting Ozone Depletion indicator from DataCommons...
+#> 2021-11-05 13:54:56 INFO::Getting Smog Formation Potential indicator from DataCommons...
+#> 2021-11-05 13:54:57 INFO::Getting Freshwater withdrawals indicator from DataCommons...
+#> 2021-11-05 13:54:57 INFO::Getting Land use indicator from DataCommons...
+#> 2021-11-05 13:54:57 INFO::Getting Hazardous Air Pollutants indicator from DataCommons...
+#> 2021-11-05 13:54:57 INFO::Getting Pesticides indicator from DataCommons...
+#> 2021-11-05 13:54:57 INFO::Getting Nonrenewable Energy Use indicator from DataCommons...
+#> 2021-11-05 13:54:57 INFO::Getting Renewable Energy Use indicator from DataCommons...
+#> 2021-11-05 13:54:58 INFO::Getting Energy Use indicator from DataCommons...
+#> 2021-11-05 13:54:58 INFO::Getting Minerals and Metals Use indicator from DataCommons...
+#> 2021-11-05 13:54:58 INFO::Getting Value Added indicator from useeior...
+#> 2021-11-05 13:54:58 INFO::Getting Jobs Supported indicator from useeior...
+#> 2021-11-05 13:54:58 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior...
+#> 2021-11-05 13:54:58 INFO::Getting Commercial Municipal Solid Waste indicator from useeior...
+#> 2021-11-05 13:54:58 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior...
+#> 2021-11-05 13:54:58 INFO::Loading demand vectors from model spec...
+#> 2021-11-05 13:54:58 INFO::Loading Consumption demand vector...
+#> 2021-11-05 13:54:58 INFO::Loading Production demand vector...
+#> 2021-11-05 13:54:58 INFO::Loading HouseholdConsumption demand vector...
+#> 2021-11-05 13:54:58 INFO::Loading DomesticConsumption demand vector...
+#> 2021-11-05 13:55:01 INFO::Building commodity-by-commodity A matrix (direct requirements)...
+#> 2021-11-05 13:55:01 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)...
+#> 2021-11-05 13:55:01 INFO::Calculating L matrix (total requirements)...
+#> 2021-11-05 13:55:01 INFO::Calculating L_d matrix (domestic total requirements)...
+#> 2021-11-05 13:55:01 INFO::Building B matrix (direct emissions and resource use per dollar)...
+#> 2021-11-05 13:55:03 INFO::Building C matrix (characterization factors for model indicators)...
+#> 2021-11-05 13:55:07 INFO::Calculating D matrix (direct environmental impacts per dollar)...
+#> 2021-11-05 13:55:07 INFO::Calculating M matrix (total emissions and resource use per dollar)...
+#> 2021-11-05 13:55:07 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)...
+#> 2021-11-05 13:55:07 INFO::Calculating N matrix (total environmental impacts per dollar)...
+#> 2021-11-05 13:55:07 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)...
+#> 2021-11-05 13:55:07 INFO::Calculating Rho matrix (price year ratio)...
+#> 2021-11-05 13:55:07 INFO::Calculating Phi matrix (producer over purchaser price ratio)...
+#> 2021-11-05 13:55:07 INFO::Model build complete.
+
+
+

Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production

+
econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01)
+cat(paste("Number of sectors passing:",econval$N_Pass))
+

Number of sectors passing: 409

+
cat(paste("Number of sectors failing:",econval$N_Fail))
+

Number of sectors failing: 2

+
cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")))
+

Sectors failing: S00402/US, S00300/US

+
+
+

Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production

+
econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01)
+cat(paste("Number of sectors passing:",econval$N_Pass))
+

Number of sectors passing: 408

+
cat(paste("Number of sectors failing:",econval$N_Fail))
+

Number of sectors failing: 3

+
cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")))
+

Sectors failing: 4200ID/US, S00402/US, S00300/US

+
+
+

Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production

+
modelval <- compareEandLCIResult(model, tolerance = 0.01)
+cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass))
+

Number of flow totals by commodity passing: 1119564

+
cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail))
+

Number of flow totals by commodity failing: 0

+
#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", ")))
+
+
+

Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production

+
dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01)
+cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass))
+

Number of flow totals by commodity passing: 1119501

+
cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail))
+

Number of flow totals by commodity failing: 63

+
cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", ")))
+

Sectors with flow totals failing: 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US

+
+
+

Validate that commodity output are properly transformed to industry output via MarketShare

+
q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01)
+cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass))
+

Number of flow totals by commodity passing: 409

+
cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail))
+

Number of flow totals by commodity failing: 2

+
cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", ")))
+

Sectors with flow totals failing: S00402/US, S00300/US

+
+
+

Validate that commodity output equals to domestic use plus production demand

+
q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01)
+cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass))
+

Number of flow totals by commodity passing: 409

+
cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail))
+

Number of flow totals by commodity failing: 2

+
cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", ")))
+

Sectors with flow totals failing: 4200ID/US, S00300/US

+
+ + + + +
+ + + + + + + + + + + + + + + diff --git a/inst/doc/output/ValidateUSEEIOv2.0.1.md b/inst/doc/output/ValidateUSEEIOv2.0.1.md new file mode 100644 index 00000000..65a6018c --- /dev/null +++ b/inst/doc/output/ValidateUSEEIOv2.0.1.md @@ -0,0 +1,208 @@ +--- +title: "Validating USEEIOv2.0.1 Model" +date: "2021-11-05" +output: + html_document: + keep_md: yes +editor_options: + chunk_output_type: console +--- + +This document presents validation results of USEEIOv2.0.1 model. + +### Build and Calculate Model + +```r +model <- buildModel(modelname) +#> 2021-11-05 13:54:36 INFO::Begin model initialization... +#> 2021-11-05 13:54:36 INFO::Initializing IO tables... +#> 2021-11-05 13:54:36 INFO::Initializing Gross Output tables... +#> 2021-11-05 13:54:37 INFO::Initializing Chain Price Index tables... +#> 2021-11-05 13:54:38 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... +#> 2021-11-05 13:54:38 INFO::Initializing Disaggregation of IO tables... +#> 2021-11-05 13:54:39 INFO::Initializing model satellite tables... +#> 2021-11-05 13:54:39 INFO::Loading Water withdrawals flows from DataCommons... +#> 2021-11-05 13:54:39 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... +#> 2021-11-05 13:54:45 INFO::Loading Point source industrial releases to ground flows from DataCommons... +#> 2021-11-05 13:54:45 INFO::Loading Point source releases to water flows from DataCommons... +#> 2021-11-05 13:54:46 INFO::Loading Greenhouse Gases flows from DataCommons... +#> 2021-11-05 13:54:46 INFO::Loading Land use flows from DataCommons... +#> 2021-11-05 13:54:46 INFO::Loading Mineral extraction flows from DataCommons... +#> 2021-11-05 13:54:46 INFO::Loading Energy extraction flows from DataCommons... +#> 2021-11-05 13:54:46 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation +#> 2021-11-05 13:54:46 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... +#> 2021-11-05 13:54:46 INFO::Loading Pesticide releases flows from DataCommons... +#> 2021-11-05 13:54:46 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... +#> 2021-11-05 13:54:46 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation +#> 2021-11-05 13:54:47 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... +#> 2021-11-05 13:54:47 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... +#> 2021-11-05 13:54:49 INFO::Loading Employment flows from DataCommons... +#> 2021-11-05 13:54:49 INFO::Generating Value Added flows... +#> 2021-11-05 13:54:49 INFO::Initializing model indicators... +#> 2021-11-05 13:54:49 INFO::Getting Greenhouse Gases indicator from DataCommons... +#> 2021-11-05 13:54:49 INFO::Getting Acidification Potential indicator from DataCommons... +#> 2021-11-05 13:54:49 INFO::Getting Eutrophication Potential indicator from DataCommons... +#> 2021-11-05 13:54:49 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... +#> 2021-11-05 13:54:53 INFO::Getting Human Health - Cancer indicator from DataCommons... +#> 2021-11-05 13:54:54 INFO::Getting Human Health - Noncancer indicator from DataCommons... +#> 2021-11-05 13:54:54 INFO::Getting Human Health Toxicity indicator from DataCommons... +#> 2021-11-05 13:54:56 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... +#> 2021-11-05 13:54:56 INFO::Getting Ozone Depletion indicator from DataCommons... +#> 2021-11-05 13:54:56 INFO::Getting Smog Formation Potential indicator from DataCommons... +#> 2021-11-05 13:54:57 INFO::Getting Freshwater withdrawals indicator from DataCommons... +#> 2021-11-05 13:54:57 INFO::Getting Land use indicator from DataCommons... +#> 2021-11-05 13:54:57 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... +#> 2021-11-05 13:54:57 INFO::Getting Pesticides indicator from DataCommons... +#> 2021-11-05 13:54:57 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... +#> 2021-11-05 13:54:57 INFO::Getting Renewable Energy Use indicator from DataCommons... +#> 2021-11-05 13:54:58 INFO::Getting Energy Use indicator from DataCommons... +#> 2021-11-05 13:54:58 INFO::Getting Minerals and Metals Use indicator from DataCommons... +#> 2021-11-05 13:54:58 INFO::Getting Value Added indicator from useeior... +#> 2021-11-05 13:54:58 INFO::Getting Jobs Supported indicator from useeior... +#> 2021-11-05 13:54:58 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... +#> 2021-11-05 13:54:58 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... +#> 2021-11-05 13:54:58 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... +#> 2021-11-05 13:54:58 INFO::Loading demand vectors from model spec... +#> 2021-11-05 13:54:58 INFO::Loading Consumption demand vector... +#> 2021-11-05 13:54:58 INFO::Loading Production demand vector... +#> 2021-11-05 13:54:58 INFO::Loading HouseholdConsumption demand vector... +#> 2021-11-05 13:54:58 INFO::Loading DomesticConsumption demand vector... +#> 2021-11-05 13:55:01 INFO::Building commodity-by-commodity A matrix (direct requirements)... +#> 2021-11-05 13:55:01 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... +#> 2021-11-05 13:55:01 INFO::Calculating L matrix (total requirements)... +#> 2021-11-05 13:55:01 INFO::Calculating L_d matrix (domestic total requirements)... +#> 2021-11-05 13:55:01 INFO::Building B matrix (direct emissions and resource use per dollar)... +#> 2021-11-05 13:55:03 INFO::Building C matrix (characterization factors for model indicators)... +#> 2021-11-05 13:55:07 INFO::Calculating D matrix (direct environmental impacts per dollar)... +#> 2021-11-05 13:55:07 INFO::Calculating M matrix (total emissions and resource use per dollar)... +#> 2021-11-05 13:55:07 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... +#> 2021-11-05 13:55:07 INFO::Calculating N matrix (total environmental impacts per dollar)... +#> 2021-11-05 13:55:07 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... +#> 2021-11-05 13:55:07 INFO::Calculating Rho matrix (price year ratio)... +#> 2021-11-05 13:55:07 INFO::Calculating Phi matrix (producer over purchaser price ratio)... +#> 2021-11-05 13:55:07 INFO::Model build complete. +``` + +### Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production + +```r +econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01) +cat(paste("Number of sectors passing:",econval$N_Pass)) +``` + +Number of sectors passing: 409 + +```r +cat(paste("Number of sectors failing:",econval$N_Fail)) +``` + +Number of sectors failing: 2 + +```r +cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +``` + +Sectors failing: S00402/US, S00300/US + +### Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production + +```r +econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01) +cat(paste("Number of sectors passing:",econval$N_Pass)) +``` + +Number of sectors passing: 408 + +```r +cat(paste("Number of sectors failing:",econval$N_Fail)) +``` + +Number of sectors failing: 3 + +```r +cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +``` + +Sectors failing: 4200ID/US, S00402/US, S00300/US + +### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production + +```r +modelval <- compareEandLCIResult(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass)) +``` + +Number of flow totals by commodity passing: 1119564 + +```r +cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail)) +``` + +Number of flow totals by commodity failing: 0 + +```r +#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", "))) +``` + +### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production + +```r +dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 1119501 + +```r +cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 63 + +```r +cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", "))) +``` + +Sectors with flow totals failing: 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US + +### Validate that commodity output are properly transformed to industry output via MarketShare + +```r +q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 409 + +```r +cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 2 + +```r +cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", "))) +``` + +Sectors with flow totals failing: S00402/US, S00300/US + +### Validate that commodity output equals to domestic use plus production demand + +```r +q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 409 + +```r +cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 2 + +```r +cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", "))) +``` + +Sectors with flow totals failing: 4200ID/US, S00300/US diff --git a/inst/doc/output/ValidateUSEEIOv2.0.html b/inst/doc/output/ValidateUSEEIOv2.0.html new file mode 100644 index 00000000..e2bbde12 --- /dev/null +++ b/inst/doc/output/ValidateUSEEIOv2.0.html @@ -0,0 +1,351 @@ + + + + + + + + + + + + + + +Validating USEEIOv2.0 Model + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +

This document presents validation results of USEEIOv2.0 model.

+
+

Build and Calculate Model

+
model <- buildModel(modelname)
+#> 2021-11-05 13:53:54 INFO::Begin model initialization...
+#> 2021-11-05 13:53:54 INFO::Initializing IO tables...
+#> 2021-11-05 13:53:54 INFO::Initializing Gross Output tables...
+#> 2021-11-05 13:53:55 INFO::Initializing Chain Price Index tables...
+#> 2021-11-05 13:53:56 INFO::Loading disaggregation specification file for WasteDisaggregationDetail...
+#> 2021-11-05 13:53:56 INFO::Initializing Disaggregation of IO tables...
+#> 2021-11-05 13:53:57 INFO::Initializing model satellite tables...
+#> 2021-11-05 13:53:57 INFO::Loading Water withdrawals flows from DataCommons...
+#> 2021-11-05 13:53:57 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons...
+#> 2021-11-05 13:54:03 INFO::Loading Point source industrial releases to ground flows from DataCommons...
+#> 2021-11-05 13:54:03 INFO::Loading Point source releases to water flows from DataCommons...
+#> 2021-11-05 13:54:04 INFO::Loading Greenhouse Gases flows from DataCommons...
+#> 2021-11-05 13:54:04 INFO::Loading Land use flows from DataCommons...
+#> 2021-11-05 13:54:04 INFO::Loading Mineral extraction flows from DataCommons...
+#> 2021-11-05 13:54:04 INFO::Loading Energy extraction flows from DataCommons...
+#> 2021-11-05 13:54:04 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation
+#> 2021-11-05 13:54:04 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons...
+#> 2021-11-05 13:54:04 INFO::Loading Pesticide releases flows from DataCommons...
+#> 2021-11-05 13:54:04 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons...
+#> 2021-11-05 13:54:05 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation
+#> 2021-11-05 13:54:05 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons...
+#> 2021-11-05 13:54:05 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons...
+#> 2021-11-05 13:54:07 INFO::Loading Employment flows from DataCommons...
+#> 2021-11-05 13:54:07 INFO::Generating Value Added flows...
+#> 2021-11-05 13:54:07 INFO::Initializing model indicators...
+#> 2021-11-05 13:54:07 INFO::Getting Greenhouse Gases indicator from DataCommons...
+#> 2021-11-05 13:54:07 INFO::Getting Acidification Potential indicator from DataCommons...
+#> 2021-11-05 13:54:07 INFO::Getting Eutrophication Potential indicator from DataCommons...
+#> 2021-11-05 13:54:07 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons...
+#> 2021-11-05 13:54:11 INFO::Getting Human Health - Cancer indicator from DataCommons...
+#> 2021-11-05 13:54:12 INFO::Getting Human Health - Noncancer indicator from DataCommons...
+#> 2021-11-05 13:54:12 INFO::Getting Human Health Toxicity indicator from DataCommons...
+#> 2021-11-05 13:54:14 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons...
+#> 2021-11-05 13:54:14 INFO::Getting Ozone Depletion indicator from DataCommons...
+#> 2021-11-05 13:54:14 INFO::Getting Smog Formation Potential indicator from DataCommons...
+#> 2021-11-05 13:54:15 INFO::Getting Freshwater withdrawals indicator from DataCommons...
+#> 2021-11-05 13:54:15 INFO::Getting Land use indicator from DataCommons...
+#> 2021-11-05 13:54:15 INFO::Getting Hazardous Air Pollutants indicator from DataCommons...
+#> 2021-11-05 13:54:15 INFO::Getting Pesticides indicator from DataCommons...
+#> 2021-11-05 13:54:15 INFO::Getting Nonrenewable Energy Use indicator from DataCommons...
+#> 2021-11-05 13:54:15 INFO::Getting Renewable Energy Use indicator from DataCommons...
+#> 2021-11-05 13:54:16 INFO::Getting Energy Use indicator from DataCommons...
+#> 2021-11-05 13:54:16 INFO::Getting Minerals and Metals Use indicator from DataCommons...
+#> 2021-11-05 13:54:16 INFO::Getting Value Added indicator from useeior...
+#> 2021-11-05 13:54:16 INFO::Getting Jobs Supported indicator from useeior...
+#> 2021-11-05 13:54:16 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior...
+#> 2021-11-05 13:54:16 INFO::Getting Commercial Municipal Solid Waste indicator from useeior...
+#> 2021-11-05 13:54:16 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior...
+#> 2021-11-05 13:54:16 INFO::Loading demand vectors from model spec...
+#> 2021-11-05 13:54:16 INFO::Loading Consumption demand vector...
+#> 2021-11-05 13:54:16 INFO::Loading Production demand vector...
+#> 2021-11-05 13:54:16 INFO::Loading HouseholdConsumption demand vector...
+#> 2021-11-05 13:54:16 INFO::Loading DomesticConsumption demand vector...
+#> 2021-11-05 13:54:19 INFO::Building commodity-by-commodity A matrix (direct requirements)...
+#> 2021-11-05 13:54:19 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)...
+#> 2021-11-05 13:54:19 INFO::Calculating L matrix (total requirements)...
+#> 2021-11-05 13:54:19 INFO::Calculating L_d matrix (domestic total requirements)...
+#> 2021-11-05 13:54:19 INFO::Building B matrix (direct emissions and resource use per dollar)...
+#> 2021-11-05 13:54:21 INFO::Building C matrix (characterization factors for model indicators)...
+#> 2021-11-05 13:54:24 INFO::Calculating D matrix (direct environmental impacts per dollar)...
+#> 2021-11-05 13:54:24 INFO::Calculating M matrix (total emissions and resource use per dollar)...
+#> 2021-11-05 13:54:25 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)...
+#> 2021-11-05 13:54:25 INFO::Calculating N matrix (total environmental impacts per dollar)...
+#> 2021-11-05 13:54:25 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)...
+#> 2021-11-05 13:54:25 INFO::Calculating Rho matrix (price year ratio)...
+#> 2021-11-05 13:54:25 INFO::Calculating Phi matrix (producer over purchaser price ratio)...
+#> 2021-11-05 13:54:25 INFO::Model build complete.
+
+
+

Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production

+
econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01)
+cat(paste("Number of sectors passing:",econval$N_Pass))
+

Number of sectors passing: 409

+
cat(paste("Number of sectors failing:",econval$N_Fail))
+

Number of sectors failing: 2

+
cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")))
+

Sectors failing: S00402/US, S00300/US

+
+
+

Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production

+
econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01)
+cat(paste("Number of sectors passing:",econval$N_Pass))
+

Number of sectors passing: 408

+
cat(paste("Number of sectors failing:",econval$N_Fail))
+

Number of sectors failing: 3

+
cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")))
+

Sectors failing: 4200ID/US, S00402/US, S00300/US

+
+
+

Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production

+
modelval <- compareEandLCIResult(model, tolerance = 0.01)
+cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass))
+

Number of flow totals by commodity passing: 1096548

+
cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail))
+

Number of flow totals by commodity failing: 0

+
#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", ")))
+
+
+

Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production

+
dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01)
+cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass))
+

Number of flow totals by commodity passing: 1096485

+
cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail))
+

Number of flow totals by commodity failing: 63

+
cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", ")))
+

Sectors with flow totals failing: 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US

+
+
+

Validate that commodity output are properly transformed to industry output via MarketShare

+
q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01)
+cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass))
+

Number of flow totals by commodity passing: 409

+
cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail))
+

Number of flow totals by commodity failing: 2

+
cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", ")))
+

Sectors with flow totals failing: S00402/US, S00300/US

+
+
+

Validate that commodity output equals to domestic use plus production demand

+
q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01)
+cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass))
+

Number of flow totals by commodity passing: 409

+
cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail))
+

Number of flow totals by commodity failing: 2

+
cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", ")))
+

Sectors with flow totals failing: 4200ID/US, S00300/US

+
+ + + + +
+ + + + + + + + + + + + + + + diff --git a/inst/doc/output/ValidateUSEEIOv2.0.md b/inst/doc/output/ValidateUSEEIOv2.0.md new file mode 100644 index 00000000..e4c42686 --- /dev/null +++ b/inst/doc/output/ValidateUSEEIOv2.0.md @@ -0,0 +1,208 @@ +--- +title: "Validating USEEIOv2.0 Model" +date: "2021-11-05" +output: + html_document: + keep_md: yes +editor_options: + chunk_output_type: console +--- + +This document presents validation results of USEEIOv2.0 model. + +### Build and Calculate Model + +```r +model <- buildModel(modelname) +#> 2021-11-05 13:53:54 INFO::Begin model initialization... +#> 2021-11-05 13:53:54 INFO::Initializing IO tables... +#> 2021-11-05 13:53:54 INFO::Initializing Gross Output tables... +#> 2021-11-05 13:53:55 INFO::Initializing Chain Price Index tables... +#> 2021-11-05 13:53:56 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... +#> 2021-11-05 13:53:56 INFO::Initializing Disaggregation of IO tables... +#> 2021-11-05 13:53:57 INFO::Initializing model satellite tables... +#> 2021-11-05 13:53:57 INFO::Loading Water withdrawals flows from DataCommons... +#> 2021-11-05 13:53:57 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... +#> 2021-11-05 13:54:03 INFO::Loading Point source industrial releases to ground flows from DataCommons... +#> 2021-11-05 13:54:03 INFO::Loading Point source releases to water flows from DataCommons... +#> 2021-11-05 13:54:04 INFO::Loading Greenhouse Gases flows from DataCommons... +#> 2021-11-05 13:54:04 INFO::Loading Land use flows from DataCommons... +#> 2021-11-05 13:54:04 INFO::Loading Mineral extraction flows from DataCommons... +#> 2021-11-05 13:54:04 INFO::Loading Energy extraction flows from DataCommons... +#> 2021-11-05 13:54:04 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation +#> 2021-11-05 13:54:04 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... +#> 2021-11-05 13:54:04 INFO::Loading Pesticide releases flows from DataCommons... +#> 2021-11-05 13:54:04 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... +#> 2021-11-05 13:54:05 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation +#> 2021-11-05 13:54:05 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... +#> 2021-11-05 13:54:05 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... +#> 2021-11-05 13:54:07 INFO::Loading Employment flows from DataCommons... +#> 2021-11-05 13:54:07 INFO::Generating Value Added flows... +#> 2021-11-05 13:54:07 INFO::Initializing model indicators... +#> 2021-11-05 13:54:07 INFO::Getting Greenhouse Gases indicator from DataCommons... +#> 2021-11-05 13:54:07 INFO::Getting Acidification Potential indicator from DataCommons... +#> 2021-11-05 13:54:07 INFO::Getting Eutrophication Potential indicator from DataCommons... +#> 2021-11-05 13:54:07 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... +#> 2021-11-05 13:54:11 INFO::Getting Human Health - Cancer indicator from DataCommons... +#> 2021-11-05 13:54:12 INFO::Getting Human Health - Noncancer indicator from DataCommons... +#> 2021-11-05 13:54:12 INFO::Getting Human Health Toxicity indicator from DataCommons... +#> 2021-11-05 13:54:14 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... +#> 2021-11-05 13:54:14 INFO::Getting Ozone Depletion indicator from DataCommons... +#> 2021-11-05 13:54:14 INFO::Getting Smog Formation Potential indicator from DataCommons... +#> 2021-11-05 13:54:15 INFO::Getting Freshwater withdrawals indicator from DataCommons... +#> 2021-11-05 13:54:15 INFO::Getting Land use indicator from DataCommons... +#> 2021-11-05 13:54:15 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... +#> 2021-11-05 13:54:15 INFO::Getting Pesticides indicator from DataCommons... +#> 2021-11-05 13:54:15 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... +#> 2021-11-05 13:54:15 INFO::Getting Renewable Energy Use indicator from DataCommons... +#> 2021-11-05 13:54:16 INFO::Getting Energy Use indicator from DataCommons... +#> 2021-11-05 13:54:16 INFO::Getting Minerals and Metals Use indicator from DataCommons... +#> 2021-11-05 13:54:16 INFO::Getting Value Added indicator from useeior... +#> 2021-11-05 13:54:16 INFO::Getting Jobs Supported indicator from useeior... +#> 2021-11-05 13:54:16 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... +#> 2021-11-05 13:54:16 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... +#> 2021-11-05 13:54:16 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... +#> 2021-11-05 13:54:16 INFO::Loading demand vectors from model spec... +#> 2021-11-05 13:54:16 INFO::Loading Consumption demand vector... +#> 2021-11-05 13:54:16 INFO::Loading Production demand vector... +#> 2021-11-05 13:54:16 INFO::Loading HouseholdConsumption demand vector... +#> 2021-11-05 13:54:16 INFO::Loading DomesticConsumption demand vector... +#> 2021-11-05 13:54:19 INFO::Building commodity-by-commodity A matrix (direct requirements)... +#> 2021-11-05 13:54:19 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... +#> 2021-11-05 13:54:19 INFO::Calculating L matrix (total requirements)... +#> 2021-11-05 13:54:19 INFO::Calculating L_d matrix (domestic total requirements)... +#> 2021-11-05 13:54:19 INFO::Building B matrix (direct emissions and resource use per dollar)... +#> 2021-11-05 13:54:21 INFO::Building C matrix (characterization factors for model indicators)... +#> 2021-11-05 13:54:24 INFO::Calculating D matrix (direct environmental impacts per dollar)... +#> 2021-11-05 13:54:24 INFO::Calculating M matrix (total emissions and resource use per dollar)... +#> 2021-11-05 13:54:25 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... +#> 2021-11-05 13:54:25 INFO::Calculating N matrix (total environmental impacts per dollar)... +#> 2021-11-05 13:54:25 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... +#> 2021-11-05 13:54:25 INFO::Calculating Rho matrix (price year ratio)... +#> 2021-11-05 13:54:25 INFO::Calculating Phi matrix (producer over purchaser price ratio)... +#> 2021-11-05 13:54:25 INFO::Model build complete. +``` + +### Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production + +```r +econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01) +cat(paste("Number of sectors passing:",econval$N_Pass)) +``` + +Number of sectors passing: 409 + +```r +cat(paste("Number of sectors failing:",econval$N_Fail)) +``` + +Number of sectors failing: 2 + +```r +cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +``` + +Sectors failing: S00402/US, S00300/US + +### Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production + +```r +econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01) +cat(paste("Number of sectors passing:",econval$N_Pass)) +``` + +Number of sectors passing: 408 + +```r +cat(paste("Number of sectors failing:",econval$N_Fail)) +``` + +Number of sectors failing: 3 + +```r +cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +``` + +Sectors failing: 4200ID/US, S00402/US, S00300/US + +### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production + +```r +modelval <- compareEandLCIResult(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass)) +``` + +Number of flow totals by commodity passing: 1096548 + +```r +cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail)) +``` + +Number of flow totals by commodity failing: 0 + +```r +#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", "))) +``` + +### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production + +```r +dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 1096485 + +```r +cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 63 + +```r +cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", "))) +``` + +Sectors with flow totals failing: 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US + +### Validate that commodity output are properly transformed to industry output via MarketShare + +```r +q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 409 + +```r +cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 2 + +```r +cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", "))) +``` + +Sectors with flow totals failing: S00402/US, S00300/US + +### Validate that commodity output equals to domestic use plus production demand + +```r +q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 409 + +```r +cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 2 + +```r +cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", "))) +``` + +Sectors with flow totals failing: 4200ID/US, S00300/US diff --git a/inst/doc/output/ValidateUSEEIOv2.1.html b/inst/doc/output/ValidateUSEEIOv2.1.html new file mode 100644 index 00000000..2621d374 --- /dev/null +++ b/inst/doc/output/ValidateUSEEIOv2.1.html @@ -0,0 +1,354 @@ + + + + + + + + + + + + + + +Validating USEEIOv2.1 Model + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +

This document presents validation results of USEEIOv2.1 model.

+
+

Build and Calculate Model

+
model <- buildModel(modelname)
+#> 2021-11-05 13:55:19 INFO::Begin model initialization...
+#> 2021-11-05 13:55:19 INFO::Initializing IO tables...
+#> 2021-11-05 13:55:19 INFO::Initializing Gross Output tables...
+#> 2021-11-05 13:55:20 INFO::Initializing Chain Price Index tables...
+#> 2021-11-05 13:55:21 INFO::Loading aggregation specification file for ElectricityAggregationDetail...
+#> 2021-11-05 13:55:21 INFO::Initializing Aggregation of IO tables...
+#> 2021-11-05 13:55:21 INFO::Loading disaggregation specification file for ElectricityDisaggregationDetail...
+#> 2021-11-05 13:55:21 INFO::Loading disaggregation specification file for WasteDisaggregationDetail...
+#> 2021-11-05 13:55:21 INFO::Initializing Disaggregation of IO tables...
+#> 2021-11-05 13:55:22 INFO::Initializing model satellite tables...
+#> 2021-11-05 13:55:22 INFO::Loading Water withdrawals flows from DataCommons...
+#> 2021-11-05 13:55:22 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons...
+#> 2021-11-05 13:55:31 INFO::Loading Point source industrial releases to ground flows from DataCommons...
+#> 2021-11-05 13:55:32 INFO::Loading Point source releases to water flows from DataCommons...
+#> 2021-11-05 13:55:33 INFO::Loading Greenhouse Gases flows from DataCommons...
+#> 2021-11-05 13:55:33 INFO::Loading Land use flows from DataCommons...
+#> 2021-11-05 13:55:33 INFO::Loading Mineral extraction flows from DataCommons...
+#> 2021-11-05 13:55:33 INFO::Loading Energy extraction flows from DataCommons...
+#> 2021-11-05 13:55:33 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation
+#> 2021-11-05 13:55:33 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons...
+#> 2021-11-05 13:55:33 INFO::Loading Pesticide releases flows from DataCommons...
+#> 2021-11-05 13:55:34 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons...
+#> 2021-11-05 13:55:34 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation
+#> 2021-11-05 13:55:34 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons...
+#> 2021-11-05 13:55:34 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons...
+#> 2021-11-05 13:55:36 INFO::Loading Employment flows from DataCommons...
+#> 2021-11-05 13:55:36 INFO::Generating Value Added flows...
+#> 2021-11-05 13:55:36 INFO::Initializing model indicators...
+#> 2021-11-05 13:55:36 INFO::Getting Greenhouse Gases indicator from DataCommons...
+#> 2021-11-05 13:55:37 INFO::Getting Acidification Potential indicator from DataCommons...
+#> 2021-11-05 13:55:37 INFO::Getting Eutrophication Potential indicator from DataCommons...
+#> 2021-11-05 13:55:37 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons...
+#> 2021-11-05 13:55:40 INFO::Getting Human Health - Cancer indicator from DataCommons...
+#> 2021-11-05 13:55:41 INFO::Getting Human Health - Noncancer indicator from DataCommons...
+#> 2021-11-05 13:55:42 INFO::Getting Human Health Toxicity indicator from DataCommons...
+#> 2021-11-05 13:55:43 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons...
+#> 2021-11-05 13:55:43 INFO::Getting Ozone Depletion indicator from DataCommons...
+#> 2021-11-05 13:55:43 INFO::Getting Smog Formation Potential indicator from DataCommons...
+#> 2021-11-05 13:55:44 INFO::Getting Freshwater withdrawals indicator from DataCommons...
+#> 2021-11-05 13:55:44 INFO::Getting Land use indicator from DataCommons...
+#> 2021-11-05 13:55:44 INFO::Getting Hazardous Air Pollutants indicator from DataCommons...
+#> 2021-11-05 13:55:44 INFO::Getting Pesticides indicator from DataCommons...
+#> 2021-11-05 13:55:45 INFO::Getting Nonrenewable Energy Use indicator from DataCommons...
+#> 2021-11-05 13:55:45 INFO::Getting Renewable Energy Use indicator from DataCommons...
+#> 2021-11-05 13:55:45 INFO::Getting Energy Use indicator from DataCommons...
+#> 2021-11-05 13:55:45 INFO::Getting Minerals and Metals Use indicator from DataCommons...
+#> 2021-11-05 13:55:45 INFO::Getting Value Added indicator from useeior...
+#> 2021-11-05 13:55:45 INFO::Getting Jobs Supported indicator from useeior...
+#> 2021-11-05 13:55:45 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior...
+#> 2021-11-05 13:55:45 INFO::Getting Commercial Municipal Solid Waste indicator from useeior...
+#> 2021-11-05 13:55:45 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior...
+#> 2021-11-05 13:55:45 INFO::Loading demand vectors from model spec...
+#> 2021-11-05 13:55:45 INFO::Loading Consumption demand vector...
+#> 2021-11-05 13:55:45 INFO::Loading Production demand vector...
+#> 2021-11-05 13:55:45 INFO::Loading HouseholdConsumption demand vector...
+#> 2021-11-05 13:55:45 INFO::Loading DomesticConsumption demand vector...
+#> 2021-11-05 13:55:48 INFO::Building commodity-by-commodity A matrix (direct requirements)...
+#> 2021-11-05 13:55:48 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)...
+#> 2021-11-05 13:55:48 INFO::Calculating L matrix (total requirements)...
+#> 2021-11-05 13:55:48 INFO::Calculating L_d matrix (domestic total requirements)...
+#> 2021-11-05 13:55:48 INFO::Building B matrix (direct emissions and resource use per dollar)...
+#> 2021-11-05 13:55:50 INFO::Building C matrix (characterization factors for model indicators)...
+#> 2021-11-05 13:55:53 INFO::Calculating D matrix (direct environmental impacts per dollar)...
+#> 2021-11-05 13:55:53 INFO::Calculating M matrix (total emissions and resource use per dollar)...
+#> 2021-11-05 13:55:54 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)...
+#> 2021-11-05 13:55:54 INFO::Calculating N matrix (total environmental impacts per dollar)...
+#> 2021-11-05 13:55:54 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)...
+#> 2021-11-05 13:55:54 INFO::Calculating Rho matrix (price year ratio)...
+#> 2021-11-05 13:55:54 INFO::Calculating Phi matrix (producer over purchaser price ratio)...
+#> 2021-11-05 13:55:54 INFO::Model build complete.
+
+
+

Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production

+
econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01)
+cat(paste("Number of sectors passing:",econval$N_Pass))
+

Number of sectors passing: 420

+
cat(paste("Number of sectors failing:",econval$N_Fail))
+

Number of sectors failing: 2

+
cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")))
+

Sectors failing: S00402/US, S00300/US

+
+
+

Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production

+
econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01)
+cat(paste("Number of sectors passing:",econval$N_Pass))
+

Number of sectors passing: 419

+
cat(paste("Number of sectors failing:",econval$N_Fail))
+

Number of sectors failing: 3

+
cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")))
+

Sectors failing: 4200ID/US, S00402/US, S00300/US

+
+
+

Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production

+
modelval <- compareEandLCIResult(model, tolerance = 0.01)
+cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass))
+

Number of flow totals by commodity passing: 1149106

+
cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail))
+

Number of flow totals by commodity failing: 0

+
#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", ")))
+
+
+

Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production

+
dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01)
+cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass))
+

Number of flow totals by commodity passing: 1149043

+
cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail))
+

Number of flow totals by commodity failing: 63

+
cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", ")))
+

Sectors with flow totals failing: 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US

+
+
+

Validate that commodity output are properly transformed to industry output via MarketShare

+
q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01)
+cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass))
+

Number of flow totals by commodity passing: 417

+
cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail))
+

Number of flow totals by commodity failing: 5

+
cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", ")))
+

Sectors with flow totals failing: 562213/US, 562910/US, 562920/US, S00402/US, S00300/US

+
+
+

Validate that commodity output equals to domestic use plus production demand

+
q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01)
+cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass))
+

Number of flow totals by commodity passing: 420

+
cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail))
+

Number of flow totals by commodity failing: 2

+
cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", ")))
+

Sectors with flow totals failing: 4200ID/US, S00300/US

+
+ + + + +
+ + + + + + + + + + + + + + + diff --git a/inst/doc/output/ValidateUSEEIOv2.1.md b/inst/doc/output/ValidateUSEEIOv2.1.md new file mode 100644 index 00000000..277dddfb --- /dev/null +++ b/inst/doc/output/ValidateUSEEIOv2.1.md @@ -0,0 +1,211 @@ +--- +title: "Validating USEEIOv2.1 Model" +date: "2021-11-05" +output: + html_document: + keep_md: yes +editor_options: + chunk_output_type: console +--- + +This document presents validation results of USEEIOv2.1 model. + +### Build and Calculate Model + +```r +model <- buildModel(modelname) +#> 2021-11-05 13:55:19 INFO::Begin model initialization... +#> 2021-11-05 13:55:19 INFO::Initializing IO tables... +#> 2021-11-05 13:55:19 INFO::Initializing Gross Output tables... +#> 2021-11-05 13:55:20 INFO::Initializing Chain Price Index tables... +#> 2021-11-05 13:55:21 INFO::Loading aggregation specification file for ElectricityAggregationDetail... +#> 2021-11-05 13:55:21 INFO::Initializing Aggregation of IO tables... +#> 2021-11-05 13:55:21 INFO::Loading disaggregation specification file for ElectricityDisaggregationDetail... +#> 2021-11-05 13:55:21 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... +#> 2021-11-05 13:55:21 INFO::Initializing Disaggregation of IO tables... +#> 2021-11-05 13:55:22 INFO::Initializing model satellite tables... +#> 2021-11-05 13:55:22 INFO::Loading Water withdrawals flows from DataCommons... +#> 2021-11-05 13:55:22 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... +#> 2021-11-05 13:55:31 INFO::Loading Point source industrial releases to ground flows from DataCommons... +#> 2021-11-05 13:55:32 INFO::Loading Point source releases to water flows from DataCommons... +#> 2021-11-05 13:55:33 INFO::Loading Greenhouse Gases flows from DataCommons... +#> 2021-11-05 13:55:33 INFO::Loading Land use flows from DataCommons... +#> 2021-11-05 13:55:33 INFO::Loading Mineral extraction flows from DataCommons... +#> 2021-11-05 13:55:33 INFO::Loading Energy extraction flows from DataCommons... +#> 2021-11-05 13:55:33 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation +#> 2021-11-05 13:55:33 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... +#> 2021-11-05 13:55:33 INFO::Loading Pesticide releases flows from DataCommons... +#> 2021-11-05 13:55:34 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... +#> 2021-11-05 13:55:34 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation +#> 2021-11-05 13:55:34 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... +#> 2021-11-05 13:55:34 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... +#> 2021-11-05 13:55:36 INFO::Loading Employment flows from DataCommons... +#> 2021-11-05 13:55:36 INFO::Generating Value Added flows... +#> 2021-11-05 13:55:36 INFO::Initializing model indicators... +#> 2021-11-05 13:55:36 INFO::Getting Greenhouse Gases indicator from DataCommons... +#> 2021-11-05 13:55:37 INFO::Getting Acidification Potential indicator from DataCommons... +#> 2021-11-05 13:55:37 INFO::Getting Eutrophication Potential indicator from DataCommons... +#> 2021-11-05 13:55:37 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... +#> 2021-11-05 13:55:40 INFO::Getting Human Health - Cancer indicator from DataCommons... +#> 2021-11-05 13:55:41 INFO::Getting Human Health - Noncancer indicator from DataCommons... +#> 2021-11-05 13:55:42 INFO::Getting Human Health Toxicity indicator from DataCommons... +#> 2021-11-05 13:55:43 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... +#> 2021-11-05 13:55:43 INFO::Getting Ozone Depletion indicator from DataCommons... +#> 2021-11-05 13:55:43 INFO::Getting Smog Formation Potential indicator from DataCommons... +#> 2021-11-05 13:55:44 INFO::Getting Freshwater withdrawals indicator from DataCommons... +#> 2021-11-05 13:55:44 INFO::Getting Land use indicator from DataCommons... +#> 2021-11-05 13:55:44 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... +#> 2021-11-05 13:55:44 INFO::Getting Pesticides indicator from DataCommons... +#> 2021-11-05 13:55:45 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... +#> 2021-11-05 13:55:45 INFO::Getting Renewable Energy Use indicator from DataCommons... +#> 2021-11-05 13:55:45 INFO::Getting Energy Use indicator from DataCommons... +#> 2021-11-05 13:55:45 INFO::Getting Minerals and Metals Use indicator from DataCommons... +#> 2021-11-05 13:55:45 INFO::Getting Value Added indicator from useeior... +#> 2021-11-05 13:55:45 INFO::Getting Jobs Supported indicator from useeior... +#> 2021-11-05 13:55:45 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... +#> 2021-11-05 13:55:45 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... +#> 2021-11-05 13:55:45 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... +#> 2021-11-05 13:55:45 INFO::Loading demand vectors from model spec... +#> 2021-11-05 13:55:45 INFO::Loading Consumption demand vector... +#> 2021-11-05 13:55:45 INFO::Loading Production demand vector... +#> 2021-11-05 13:55:45 INFO::Loading HouseholdConsumption demand vector... +#> 2021-11-05 13:55:45 INFO::Loading DomesticConsumption demand vector... +#> 2021-11-05 13:55:48 INFO::Building commodity-by-commodity A matrix (direct requirements)... +#> 2021-11-05 13:55:48 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... +#> 2021-11-05 13:55:48 INFO::Calculating L matrix (total requirements)... +#> 2021-11-05 13:55:48 INFO::Calculating L_d matrix (domestic total requirements)... +#> 2021-11-05 13:55:48 INFO::Building B matrix (direct emissions and resource use per dollar)... +#> 2021-11-05 13:55:50 INFO::Building C matrix (characterization factors for model indicators)... +#> 2021-11-05 13:55:53 INFO::Calculating D matrix (direct environmental impacts per dollar)... +#> 2021-11-05 13:55:53 INFO::Calculating M matrix (total emissions and resource use per dollar)... +#> 2021-11-05 13:55:54 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... +#> 2021-11-05 13:55:54 INFO::Calculating N matrix (total environmental impacts per dollar)... +#> 2021-11-05 13:55:54 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... +#> 2021-11-05 13:55:54 INFO::Calculating Rho matrix (price year ratio)... +#> 2021-11-05 13:55:54 INFO::Calculating Phi matrix (producer over purchaser price ratio)... +#> 2021-11-05 13:55:54 INFO::Model build complete. +``` + +### Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production + +```r +econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01) +cat(paste("Number of sectors passing:",econval$N_Pass)) +``` + +Number of sectors passing: 420 + +```r +cat(paste("Number of sectors failing:",econval$N_Fail)) +``` + +Number of sectors failing: 2 + +```r +cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +``` + +Sectors failing: S00402/US, S00300/US + +### Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production + +```r +econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01) +cat(paste("Number of sectors passing:",econval$N_Pass)) +``` + +Number of sectors passing: 419 + +```r +cat(paste("Number of sectors failing:",econval$N_Fail)) +``` + +Number of sectors failing: 3 + +```r +cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +``` + +Sectors failing: 4200ID/US, S00402/US, S00300/US + +### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production + +```r +modelval <- compareEandLCIResult(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass)) +``` + +Number of flow totals by commodity passing: 1149106 + +```r +cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail)) +``` + +Number of flow totals by commodity failing: 0 + +```r +#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", "))) +``` + +### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production + +```r +dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 1149043 + +```r +cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 63 + +```r +cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", "))) +``` + +Sectors with flow totals failing: 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US + +### Validate that commodity output are properly transformed to industry output via MarketShare + +```r +q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 417 + +```r +cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 5 + +```r +cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", "))) +``` + +Sectors with flow totals failing: 562213/US, 562910/US, 562920/US, S00402/US, S00300/US + +### Validate that commodity output equals to domestic use plus production demand + +```r +q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 420 + +```r +cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 2 + +```r +cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", "))) +``` + +Sectors with flow totals failing: 4200ID/US, S00300/US diff --git a/useeior.Rproj b/useeior.Rproj index eaa6b818..5d79cb75 100644 --- a/useeior.Rproj +++ b/useeior.Rproj @@ -1,7 +1,7 @@ Version: 1.0 -RestoreWorkspace: Default -SaveWorkspace: Default +RestoreWorkspace: No +SaveWorkspace: No AlwaysSaveHistory: Default EnableCodeIndexing: Yes From 3398991bdcd1c2dcacf06f805ffe1c5d2dd01769 Mon Sep 17 00:00:00 2001 From: a-w-beck Date: Mon, 15 Nov 2021 14:03:43 -0500 Subject: [PATCH 158/319] artifact upload testing --- .github/workflows/R-CMD-check.yaml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 0a048eac..7b31ab5d 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -69,6 +69,22 @@ jobs: with: name: ${{ runner.os }}-r${{ matrix.config.r }}-results path: check - - # Another job: - # runs-on: ? + + # artifacts temp test + - name: generate test artifacts + run: | + mkdir ./inst/doc/output/temp_artifact + cd ./inst/doc/output/temp_artifact + echo 'example' > example.html + echo 'sample' > sample.md + cd .. + + - name: upload test artifacts + uses: actions/upload-artifact@v2 + with: + name: example_artifacts + path: | + inst/doc/output/temp_artifact/ + # !inst/doc/output/**.md + # retention-days: 30 + \ No newline at end of file From a34000b04a146c0e942488643bfe551df6c5601d Mon Sep 17 00:00:00 2001 From: a-w-beck Date: Mon, 15 Nov 2021 15:19:02 -0500 Subject: [PATCH 159/319] artifact upload testing pt2 --- .github/workflows/R-CMD-check.yaml | 44 ++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 7b31ab5d..9d2bae39 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -27,6 +27,10 @@ jobs: name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + # defaults: + # run: + # shell: bash + strategy: fail-fast: false matrix: @@ -70,16 +74,38 @@ jobs: name: ${{ runner.os }}-r${{ matrix.config.r }}-results path: check + + # testing shell path syntaxes + - name: Display the path + run: echo $PATH + shell: bash + + - name: Display the path + run: echo %PATH% + shell: pwsh + + - name: Display the path + run: | + import os + print(os.environ['PATH']) + shell: python + + # artifacts temp test - - name: generate test artifacts + # if: matrix.os == 'windows-latest' + + - name: Generate test artifacts + # if: matrix.os == 'windows-latest' run: | mkdir ./inst/doc/output/temp_artifact cd ./inst/doc/output/temp_artifact - echo 'example' > example.html - echo 'sample' > sample.md + echo 'example text' > example.html + echo 'sample text' > sample.md cd .. + shell: bash - - name: upload test artifacts + - name: Upload test artifacts + # if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v2 with: name: example_artifacts @@ -87,4 +113,12 @@ jobs: inst/doc/output/temp_artifact/ # !inst/doc/output/**.md # retention-days: 30 - \ No newline at end of file + + - name: Commit .md validation files on PR + if: github.event_name == 'pull_request' && matrix.os == 'windows-latest' + run: | + git config --local user.email "actions@github.com" + git config --local user.name "GitHub Actions" + git add --all + git commit -m "gh actions validation output" + git push From 112cc476ebb60915a4b6ebdc4bf20240157a5e25 Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Mon, 15 Nov 2021 15:21:05 -0500 Subject: [PATCH 160/319] Update R-CMD-check.yaml disable yaml exclusion for testing --- .github/workflows/R-CMD-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 9d2bae39..60289b5c 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -8,7 +8,7 @@ on: paths-ignore: - '**.md' # prevent md files (e.g., README.md) in any repo dir from trigering workflow - '**.bib' - - '**.ya?ml' # captures both .yml and .yaml + #- '**.ya?ml' # captures both .yml and .yaml - 'LICENSE' - '.gitignore' pull_request: From ffe3bb5b2ceb34f2c307d439e01dc564c704d5fd Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Mon, 15 Nov 2021 15:38:11 -0500 Subject: [PATCH 161/319] Update R-CMD-check.yaml fix bash paths --- .github/workflows/R-CMD-check.yaml | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 60289b5c..08fd276f 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -68,28 +68,11 @@ jobs: shell: bash - name: Upload check results - #if: failure() # if any of the previous steps fail, export a log + if: failure() # if any of the previous steps fail, export a log uses: actions/upload-artifact@main with: name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check - - - # testing shell path syntaxes - - name: Display the path - run: echo $PATH - shell: bash - - - name: Display the path - run: echo %PATH% - shell: pwsh - - - name: Display the path - run: | - import os - print(os.environ['PATH']) - shell: python - + path: check # artifacts temp test # if: matrix.os == 'windows-latest' @@ -97,11 +80,12 @@ jobs: - name: Generate test artifacts # if: matrix.os == 'windows-latest' run: | - mkdir ./inst/doc/output/temp_artifact - cd ./inst/doc/output/temp_artifact + pwd + ls + mkdir inst/doc/output/temp_artifact + cd inst/doc/output/temp_artifact echo 'example text' > example.html echo 'sample text' > sample.md - cd .. shell: bash - name: Upload test artifacts From 5eb7802c5f6cd4f94a78941b69217840e508cb5c Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Mon, 15 Nov 2021 15:55:01 -0500 Subject: [PATCH 162/319] Update R-CMD-check.yaml try more bash path formulations --- .github/workflows/R-CMD-check.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 08fd276f..c3855b9a 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -82,7 +82,11 @@ jobs: run: | pwd ls + find inst mkdir inst/doc/output/temp_artifact + mkdir /inst/doc/output/temp_artifact_1/ + mkdir ./inst/doc/output/temp_artifact_2/ + mkdir -p inst/doc/output/temp_artifact_3 cd inst/doc/output/temp_artifact echo 'example text' > example.html echo 'sample text' > sample.md From b1d1a0686adab1625a250f5a01a4adcaa6e5c5bc Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Mon, 15 Nov 2021 16:19:12 -0500 Subject: [PATCH 163/319] Update R-CMD-check.yaml inst/doc file appears to be missing in cloned repo --- .github/workflows/R-CMD-check.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index c3855b9a..d525dadc 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -83,15 +83,17 @@ jobs: pwd ls find inst - mkdir inst/doc/output/temp_artifact - mkdir /inst/doc/output/temp_artifact_1/ - mkdir ./inst/doc/output/temp_artifact_2/ - mkdir -p inst/doc/output/temp_artifact_3 + cd inst + ls + cd doc + cd ../.. + mkdir -p inst/doc/output/temp_artifact cd inst/doc/output/temp_artifact echo 'example text' > example.html echo 'sample text' > sample.md shell: bash + - name: Upload test artifacts # if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v2 From 2cdc8c36c874284220035143ccfcf738efb0aaa3 Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Mon, 15 Nov 2021 16:42:06 -0500 Subject: [PATCH 164/319] Update .Rbuildignore commenting out "^inst/doc$" to test actions/checkout@v2's behavior --- .Rbuildignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.Rbuildignore b/.Rbuildignore index 9d6b7ea2..dd6c667a 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -3,5 +3,5 @@ ^data-raw$ ^build-scripts$ ^examples$ -^inst/doc$ ^\.github$ +#^inst/doc$ # commenting this out to test actions/checkout@v2's behavior From b04cce0f45fea5acf35188b346f11aaccb5ec8db Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Mon, 15 Nov 2021 16:48:16 -0500 Subject: [PATCH 165/319] Update .Rbuildignore --- .Rbuildignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.Rbuildignore b/.Rbuildignore index dd6c667a..e7282767 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,4 +4,3 @@ ^build-scripts$ ^examples$ ^\.github$ -#^inst/doc$ # commenting this out to test actions/checkout@v2's behavior From b9f7c5dd7208dc0e2d693d34c9bedf9f5675dbc2 Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Mon, 15 Nov 2021 17:00:45 -0500 Subject: [PATCH 166/319] Update .Rbuildignore reverting changes since GH actions were unaffected --- .Rbuildignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.Rbuildignore b/.Rbuildignore index e7282767..9d6b7ea2 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -3,4 +3,5 @@ ^data-raw$ ^build-scripts$ ^examples$ +^inst/doc$ ^\.github$ From 5804e9675563eb15a0a73a2a706329cc7051f5c4 Mon Sep 17 00:00:00 2001 From: a-w-beck Date: Mon, 15 Nov 2021 17:32:16 -0500 Subject: [PATCH 167/319] Reverting gh workflow to simplified state and manually calling buildModel() to screen for errors, due to inst/doc missing from runner after repo checkout. GITHUB_PAT also removed b/c it now limits the API rate limit. --- .github/workflows/R-CMD-check.yaml | 57 +++++++----------------------- 1 file changed, 12 insertions(+), 45 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index d525dadc..9eb44f03 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -8,7 +8,7 @@ on: paths-ignore: - '**.md' # prevent md files (e.g., README.md) in any repo dir from trigering workflow - '**.bib' - #- '**.ya?ml' # captures both .yml and .yaml + - '**.ya?ml' # captures both .yml and .yaml - 'LICENSE' - '.gitignore' pull_request: @@ -27,10 +27,6 @@ jobs: name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - # defaults: - # run: - # shell: bash - strategy: fail-fast: false matrix: @@ -42,7 +38,7 @@ jobs: - {os: ubuntu-latest, r: 'oldrel-1'} env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} # increases api rate limit, per https://github.com/r-lib/actions/issues/208 + #GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes steps: @@ -62,6 +58,15 @@ jobs: - uses: r-lib/actions/check-r-package@v1 + - name: Simple buildModel execution + run: | + require(devtools) + devtools::load_all() + useeior::buildModel(USEEIOv2.0) + useeior::buildModel(USEEIOv2.0.1) + useeior::buildModel(USEEIOv2.1) + shell: Rscript {0} + - name: Show testthat output if: always() # step will run even if previous steps fail run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true @@ -73,42 +78,4 @@ jobs: with: name: ${{ runner.os }}-r${{ matrix.config.r }}-results path: check - - # artifacts temp test - # if: matrix.os == 'windows-latest' - - - name: Generate test artifacts - # if: matrix.os == 'windows-latest' - run: | - pwd - ls - find inst - cd inst - ls - cd doc - cd ../.. - mkdir -p inst/doc/output/temp_artifact - cd inst/doc/output/temp_artifact - echo 'example text' > example.html - echo 'sample text' > sample.md - shell: bash - - - - name: Upload test artifacts - # if: matrix.os == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: example_artifacts - path: | - inst/doc/output/temp_artifact/ - # !inst/doc/output/**.md - # retention-days: 30 - - - name: Commit .md validation files on PR - if: github.event_name == 'pull_request' && matrix.os == 'windows-latest' - run: | - git config --local user.email "actions@github.com" - git config --local user.name "GitHub Actions" - git add --all - git commit -m "gh actions validation output" - git push + \ No newline at end of file From e033c59e426a66107907bf356a05c0bdc24f3c5f Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 15 Nov 2021 15:07:22 -0800 Subject: [PATCH 168/319] Remove ImportCost from generateDomesticUse function --- R/IOFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/IOFunctions.R b/R/IOFunctions.R index 3886e0b2..0ca9d7eb 100644 --- a/R/IOFunctions.R +++ b/R/IOFunctions.R @@ -200,7 +200,7 @@ generateDomesticUse <- function(Use, specs) { ratio <- sweep(Use, 1, FUN = "/", row_sum) ratio[is.na(ratio)] <- 0 # Subtract Import from Use, then allocate ImportCost to each Industry (column), except for Export and Import - DomesticUse <- Use - Import + sweep(ratio, 1, FUN = "*", ImportCost) + DomesticUse <- Use - Import #+ sweep(ratio, 1, FUN = "*", ImportCost) # Adjust Export and Import columns DomesticUse[, ExportCode] <- Use[, ExportCode] DomesticUse[, ImportCode] <- 0 From 0bd9d40e4cc7d5ffbdc530a599369f580e92a52e Mon Sep 17 00:00:00 2001 From: Ben Young <44471635+bl-young@users.noreply.github.com> Date: Tue, 16 Nov 2021 12:02:50 -0500 Subject: [PATCH 169/319] Update R-CMD-check.yaml run action by removing .yaml from ignore --- .github/workflows/R-CMD-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 9eb44f03..18109969 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -8,7 +8,7 @@ on: paths-ignore: - '**.md' # prevent md files (e.g., README.md) in any repo dir from trigering workflow - '**.bib' - - '**.ya?ml' # captures both .yml and .yaml + #- '**.ya?ml' # captures both .yml and .yaml - 'LICENSE' - '.gitignore' pull_request: @@ -78,4 +78,4 @@ jobs: with: name: ${{ runner.os }}-r${{ matrix.config.r }}-results path: check - \ No newline at end of file + From 927fa4556851a37318e4310259f7d31941ca6a6e Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 16 Nov 2021 11:20:08 -0800 Subject: [PATCH 170/319] Remove import cost from Domestic Use calculation; add import cost as an additional column in Use and Domestic Use --- R/BuildModel.R | 3 ++- R/IOFunctions.R | 42 +++++++++++++++++++-------------- R/LoadIOTables.R | 11 ++++++--- man/generateImportCostVector.Rd | 19 +++++++++++++++ 4 files changed, 53 insertions(+), 22 deletions(-) create mode 100644 man/generateImportCostVector.Rd diff --git a/R/BuildModel.R b/R/BuildModel.R index 2d355b13..af17cb8f 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -115,7 +115,8 @@ constructEEIOMatrices <- function(model) { "UseValueAdded", "FinalDemand", "DomesticFinalDemand","CommodityOutput", "IndustryOutput", "U_n","U_d_n","W") if (model$specs$CommodityorIndustryType=="Industry") { - mat_to_remove <- append(mat_to_remove,c("FinalDemandbyCommodity", "DomesticFinalDemandbyCommodity")) + mat_to_remove <- c(mat_to_remove, + c("FinalDemandbyCommodity", "DomesticFinalDemandbyCommodity", "ImportCostbyCommodity")) } model <- within(model, rm(list=mat_to_remove)) diff --git a/R/IOFunctions.R b/R/IOFunctions.R index 0ca9d7eb..a41e5b98 100644 --- a/R/IOFunctions.R +++ b/R/IOFunctions.R @@ -167,7 +167,6 @@ calculateLeontiefInverse <- function(A) { return(L) } - #' Generate domestic Use table by adjusting Use table based on Import matrix. #' @param Use, dataframe of a Use table #' @param specs, list of model specifications @@ -182,10 +181,26 @@ generateDomesticUse <- function(Use, specs) { # Aggregate Import from Summary to Sector Import <- as.data.frame(aggregateMatrix(as.matrix(Import), "Summary", "Sector", specs)) } - # Sort rows and columns in Import to match those in Use - Import <- Import[rownames(Use), colnames(Use)] - # Define Export and Import codes - ExportCode <- getVectorOfCodes(specs$BaseIOSchema, specs$BaseIOLevel, "Export") + # Subtract Import from Use + DomesticUse <- Use - Import[rownames(Use), colnames(Use)] + return(DomesticUse) +} + +#' Generate import cost vector from Use and Import matrix. +#' @param Use, dataframe of a Use table +#' @param specs, list of model specifications +#' @return An import cost vector with names as commodity codes +generateImportCostVector <- function(Use, specs) { + # Load Import matrix + if (specs$BaseIOLevel!="Sector") { + Import <- get(paste(specs$BaseIOLevel, "Import", specs$IOYear, "BeforeRedef", sep = "_"))*1E6 + } else { + # Load Summary level Import matrix + Import <- get(paste("Summary_Import", specs$IOYear, "BeforeRedef", sep = "_"))*1E6 + # Aggregate Import from Summary to Sector + Import <- as.data.frame(aggregateMatrix(as.matrix(Import), "Summary", "Sector", specs)) + } + # Define Import code ImportCode <- getVectorOfCodes(specs$BaseIOSchema, specs$BaseIOLevel, "Import") # Calculate ImportCost. # The imports column in the Import matrix is in foreign port value. @@ -193,16 +208,7 @@ generateDomesticUse <- function(Use, specs) { # domestic port value = foreign port value + value of all transportation and insurance services to import + customs duties # See documentation of the Import matrix (https://apps.bea.gov/industry/xls/io-annual/ImportMatrices_Before_Redefinitions_SUM_1997-2019.xlsx) # So, ImportCost <- Use$Imports - Import$Imports - ImportCost <- Use[, ImportCode] - Import[, ImportCode] - # Calculate row_sum of Use, except for Export and Import, for allocating ImportCost - row_sum <- rowSums(Use) - (Use[, ExportCode] + Use[, ImportCode]) - # Calculate allocation ratios - ratio <- sweep(Use, 1, FUN = "/", row_sum) - ratio[is.na(ratio)] <- 0 - # Subtract Import from Use, then allocate ImportCost to each Industry (column), except for Export and Import - DomesticUse <- Use - Import #+ sweep(ratio, 1, FUN = "*", ImportCost) - # Adjust Export and Import columns - DomesticUse[, ExportCode] <- Use[, ExportCode] - DomesticUse[, ImportCode] <- 0 - return(DomesticUse) -} + ImportCost <- Use[, ImportCode] - Import[rownames(Use), ImportCode] + names(ImportCost) <- rownames(Use) + return(ImportCost) +} \ No newline at end of file diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index 2648d7d4..0dd9a019 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -90,6 +90,7 @@ loadNationalIOData <- function(model) { model$UseValueAdded <- BEA$UseValueAdded model$FinalDemand <- BEA$UseFinalDemand model$DomesticFinalDemand <- BEA$DomesticFinalDemand + model$ImportCost <- BEA$ImportCost ## Modify row and column names in the IO tables # Use model$Industries rownames(model$MakeTransactions) <- colnames(model$UseTransactions) <- colnames(model$DomesticUseTransactions) <- @@ -116,13 +117,15 @@ loadNationalIOData <- function(model) { } model$MultiYearCommodityOutput[, as.character(model$specs$IOYear)] <- model$CommodityOutput - # Transform model FinalDemand and DomesticFinalDemand to by-industry form + # Transform model FinalDemand, DomesticFinalDemand, and ImportCost to by-industry form if (model$specs$CommodityorIndustryType=="Industry") { # Keep the orignal FinalDemand (in by-commodity form) model$FinalDemandbyCommodity <- model$FinalDemand model$DomesticFinalDemandbyCommodity <- model$DomesticFinalDemand - model$FinalDemand <- transformFinalDemandwithMarketShares(model$FinalDemand, model)#This output needs to be tested - producing strange results - model$DomesticFinalDemand <- transformFinalDemandwithMarketShares(model$DomesticFinalDemand, model)#This output needs to be tested - producing strange results + model$ImportCostbyCommodity <- model$ImportCost + model$FinalDemand <- transformFinalDemandwithMarketShares(model$FinalDemand, model) + model$DomesticFinalDemand <- transformFinalDemandwithMarketShares(model$DomesticFinalDemand, model) + model$ImportCost <- transformFinalDemandwithMarketShares(model$ImportCost, model) } # Add Margins table @@ -171,6 +174,8 @@ loadBEAtables <- function(specs) { DomesticUse <- generateDomesticUse(cbind(BEA$UseTransactions, BEA$UseFinalDemand), specs) BEA$DomesticUseTransactions <- DomesticUse[, BEA$Industries] BEA$DomesticFinalDemand <- DomesticUse[, BEA$FinalDemandCodes] + # Generate Import Cost vector + BEA$ImportCost <- generateImportCostVector(cbind(BEA$UseTransactions, BEA$UseFinalDemand), specs) # Replace NA with 0 in IO tables if(specs$BaseIOSchema==2007){ BEA$MakeTransactions[is.na(BEA$MakeTransactions)] <- 0 diff --git a/man/generateImportCostVector.Rd b/man/generateImportCostVector.Rd new file mode 100644 index 00000000..71223db5 --- /dev/null +++ b/man/generateImportCostVector.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/IOFunctions.R +\name{generateImportCostVector} +\alias{generateImportCostVector} +\title{Generate import cost vector from Use and Import matrix.} +\usage{ +generateImportCostVector(Use, specs) +} +\arguments{ +\item{Use, }{dataframe of a Use table} + +\item{specs, }{list of model specifications} +} +\value{ +An import cost vector with names as commodity codes +} +\description{ +Generate import cost vector from Use and Import matrix. +} From 54a5354f47e57f7800b483c111fa5c4ecdd50610 Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Tue, 16 Nov 2021 14:23:52 -0500 Subject: [PATCH 171/319] Update R-CMD-check.yaml Include devtools as additional test dependency --- .github/workflows/R-CMD-check.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 18109969..a376f8e3 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -54,7 +54,9 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v1 with: - extra-packages: rcmdcheck + extra-packages: | + rcmdcheck + devtools - uses: r-lib/actions/check-r-package@v1 From 2d98a674e28dda8316a6b6c300413862aca50bd4 Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Tue, 16 Nov 2021 14:32:34 -0500 Subject: [PATCH 172/319] Update R-CMD-check.yaml corrected syntax error --- .github/workflows/R-CMD-check.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index a376f8e3..9ad73c6b 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -64,9 +64,9 @@ jobs: run: | require(devtools) devtools::load_all() - useeior::buildModel(USEEIOv2.0) - useeior::buildModel(USEEIOv2.0.1) - useeior::buildModel(USEEIOv2.1) + useeior::buildModel("USEEIOv2.0") + useeior::buildModel("USEEIOv2.0.1") + useeior::buildModel("USEEIOv2.1") shell: Rscript {0} - name: Show testthat output From e155f7559a4d32208c40999301685290caf70f32 Mon Sep 17 00:00:00 2001 From: Andrew Beck <86379673+a-w-beck@users.noreply.github.com> Date: Tue, 16 Nov 2021 15:15:22 -0500 Subject: [PATCH 173/319] Update R-CMD-check.yaml Assign model objects to variables and test their existence (i.e., successful assignment) --- .github/workflows/R-CMD-check.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 9ad73c6b..a429fb5d 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -64,9 +64,10 @@ jobs: run: | require(devtools) devtools::load_all() - useeior::buildModel("USEEIOv2.0") - useeior::buildModel("USEEIOv2.0.1") - useeior::buildModel("USEEIOv2.1") + run1 <- useeior::buildModel("USEEIOv2.0") + run2 <- useeior::buildModel("USEEIOv2.0.1") + run3 <- useeior::buildModel("USEEIOv2.1") + exists("run1"); exists("run2"); exists("run3") shell: Rscript {0} - name: Show testthat output From f52b947208c98a6724e745e3b96afa0b887a96d5 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 17 Nov 2021 15:03:42 -0800 Subject: [PATCH 174/319] Correct explanation about import cost --- R/IOFunctions.R | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/R/IOFunctions.R b/R/IOFunctions.R index a41e5b98..4eb6d240 100644 --- a/R/IOFunctions.R +++ b/R/IOFunctions.R @@ -203,12 +203,13 @@ generateImportCostVector <- function(Use, specs) { # Define Import code ImportCode <- getVectorOfCodes(specs$BaseIOSchema, specs$BaseIOLevel, "Import") # Calculate ImportCost. - # The imports column in the Import matrix is in foreign port value. - # But in the Use table it is in domestic port value. + # In the Import matrix, the imports column is in domestic (US) port value. + # But in the Use table, it is in foreign port value. # domestic port value = foreign port value + value of all transportation and insurance services to import + customs duties - # See documentation of the Import matrix (https://apps.bea.gov/industry/xls/io-annual/ImportMatrices_Before_Redefinitions_SUM_1997-2019.xlsx) + # See documentation of the Import matrix (https://apps.bea.gov/industry/xls/io-annual/ImportMatrices_Before_Redefinitions_DET_2007_2012.xlsx) # So, ImportCost <- Use$Imports - Import$Imports + # ImportCost is essentially 'value of all transportation and insurance services to import' and 'customs duties' ImportCost <- Use[, ImportCode] - Import[rownames(Use), ImportCode] names(ImportCost) <- rownames(Use) return(ImportCost) -} \ No newline at end of file +} From 838136c135213f2d1cb6343e14302d55e7ec16bb Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 17 Nov 2021 15:41:41 -0800 Subject: [PATCH 175/319] Correct prepareProdctionDemand to sum over model$FinalDemand --- R/DemandFunctions.R | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index 8411d072..c9fca267 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -3,10 +3,12 @@ #'Registry of functions that construct various demand vector in the form of as a named list with nested names #'as keys and function name as values DemandVectorFunctionRegistry <- list() -DemandVectorFunctionRegistry$Consumption$Complete <- "prepareConsumptionDemand" +# Production DemandVectorFunctionRegistry$Production$Complete <- "prepareProductionDemand" -DemandVectorFunctionRegistry$Consumption$Household <- "prepareHouseholdDemand" +# Consumption +DemandVectorFunctionRegistry$Consumption$Complete <- "prepareConsumptionDemand" DemandVectorFunctionRegistry$Consumption$Domestic <- "prepareDomesticConsumptionDemand" +DemandVectorFunctionRegistry$Consumption$Household <- "prepareHouseholdDemand" #'Sums across sectors for a given set of codes/cols in a given final demand df #'@param Y, a model Demand df @@ -40,11 +42,11 @@ sumforConsumption <- function(model, Y) { #'@param model, a model #'@return A named vector with demand prepareProductionDemand <- function(model) { - y_dc <- sumforConsumption(model, model$DomesticFinalDemand) + y_dc <- sumforConsumption(model, model$FinalDemand) export_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Export", "Code_Loc"] y_e <- sumDemandCols(model$FinalDemand, export_code) changeinventories_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="ChangeInventories", "Code_Loc"] - y_d_delta <- sumDemandCols(model$DomesticFinalDemand, changeinventories_code) + y_d_delta <- sumDemandCols(model$FinalDemand, changeinventories_code) y_p <- y_dc + y_e + y_d_delta return(y_p) } From 0e6ab39dcc54ae7121fe7e0c12a6cb47fe60c09b Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 17 Nov 2021 15:42:36 -0800 Subject: [PATCH 176/319] Add prepareDomesticProductionDemand function --- R/DemandFunctions.R | 15 +++++++++++++++ man/prepareDomesticProductionDemand.Rd | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 man/prepareDomesticProductionDemand.Rd diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index c9fca267..b8d74de0 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -5,6 +5,7 @@ DemandVectorFunctionRegistry <- list() # Production DemandVectorFunctionRegistry$Production$Complete <- "prepareProductionDemand" +DemandVectorFunctionRegistry$Production$Domestic <- "prepareDomesticProductionDemand" # Consumption DemandVectorFunctionRegistry$Consumption$Complete <- "prepareConsumptionDemand" DemandVectorFunctionRegistry$Consumption$Domestic <- "prepareDomesticConsumptionDemand" @@ -51,6 +52,20 @@ prepareProductionDemand <- function(model) { return(y_p) } +#'Prepares a demand vector representing domestic production +#'Formula for production vector: y_p <- y_dc + y_e + y_d_delta +#'@param model, a model +#'@return A named vector with demand +prepareDomesticProductionDemand <- function(model) { + y_dc <- sumforConsumption(model, model$DomesticFinalDemand) + export_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Export", "Code_Loc"] + y_e <- sumDemandCols(model$DomesticFinalDemand, export_code) + changeinventories_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="ChangeInventories", "Code_Loc"] + y_d_delta <- sumDemandCols(model$DomesticFinalDemand, changeinventories_code) + y_p <- y_dc + y_e + y_d_delta + return(y_p) +} + #'Prepares a demand vector representing consumption #'@param model, a model #'@return a named vector with demand diff --git a/man/prepareDomesticProductionDemand.Rd b/man/prepareDomesticProductionDemand.Rd new file mode 100644 index 00000000..50f8a7f4 --- /dev/null +++ b/man/prepareDomesticProductionDemand.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/DemandFunctions.R +\name{prepareDomesticProductionDemand} +\alias{prepareDomesticProductionDemand} +\title{Prepares a demand vector representing domestic production +Formula for production vector: y_p <- y_dc + y_e + y_d_delta} +\usage{ +prepareDomesticProductionDemand(model) +} +\arguments{ +\item{model, }{a model} +} +\value{ +A named vector with demand +} +\description{ +Prepares a demand vector representing domestic production +Formula for production vector: y_p <- y_dc + y_e + y_d_delta +} From 1868a097ade1da1b88d2671ad96c97b87f3ef48b Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 17 Nov 2021 15:43:17 -0800 Subject: [PATCH 177/319] Add prepareImportDemand function --- R/DemandFunctions.R | 12 ++++++++++++ man/prepareImportDemand.Rd | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 man/prepareImportDemand.Rd diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index b8d74de0..1bc83862 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -10,6 +10,8 @@ DemandVectorFunctionRegistry$Production$Domestic <- "prepareDomesticProductionDe DemandVectorFunctionRegistry$Consumption$Complete <- "prepareConsumptionDemand" DemandVectorFunctionRegistry$Consumption$Domestic <- "prepareDomesticConsumptionDemand" DemandVectorFunctionRegistry$Consumption$Household <- "prepareHouseholdDemand" +# Import +DemandVectorFunctionRegistry$Import$Complete <- "prepareImportDemand" #'Sums across sectors for a given set of codes/cols in a given final demand df #'@param Y, a model Demand df @@ -92,6 +94,16 @@ prepareHouseholdDemand <- function(model) { return(y_h) } +#'Prepares a demand vector representing imports +#'@param model, a model +#'@return A named vector with demand +prepareImportDemand <- function(model) { + Y <- model$FinalDemand + import_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Import", "Code_Loc"] + y_i <- sumDemandCols(Y, import_code) + return(y_i) +} + #'A function to validate a user provided demand vector #' @param dv a user provided demand vector #' @param L, the L matrix for the given model, used as a reference diff --git a/man/prepareImportDemand.Rd b/man/prepareImportDemand.Rd new file mode 100644 index 00000000..a52125cc --- /dev/null +++ b/man/prepareImportDemand.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/DemandFunctions.R +\name{prepareImportDemand} +\alias{prepareImportDemand} +\title{Prepares a demand vector representing imports} +\usage{ +prepareImportDemand(model) +} +\arguments{ +\item{model, }{a model} +} +\value{ +A named vector with demand +} +\description{ +Prepares a demand vector representing imports +} From b618695ad0105adcf324380d0dea7d77092e2e2d Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 17 Nov 2021 15:43:43 -0800 Subject: [PATCH 178/319] Update documentation of DemandVectorFunctionRegistry --- man/DemandVectorFunctionRegistry.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/DemandVectorFunctionRegistry.Rd b/man/DemandVectorFunctionRegistry.Rd index 516089d6..a003c467 100644 --- a/man/DemandVectorFunctionRegistry.Rd +++ b/man/DemandVectorFunctionRegistry.Rd @@ -6,7 +6,7 @@ \title{Registry of functions that construct various demand vector in the form of as a named list with nested names as keys and function name as values} \format{ -An object of class \code{list} of length 2. +An object of class \code{list} of length 3. } \usage{ DemandVectorFunctionRegistry From be8f8ffc468d54d757d4eb21c0660859af7594e2 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 17 Nov 2021 15:45:34 -0800 Subject: [PATCH 179/319] Modify validation function to be compatible with industry models --- R/ValidateModel.R | 73 ++++++++++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 26 deletions(-) diff --git a/R/ValidateModel.R b/R/ValidateModel.R index f94afa53..c3a0387a 100644 --- a/R/ValidateModel.R +++ b/R/ValidateModel.R @@ -7,18 +7,7 @@ #'@return A list with pass/fail validation result and the cell-by-cell relative diff matrix #'@export compareEandLCIResult <- function(model, use_domestic = FALSE, tolerance = 0.05) { - #Use L and FinalDemand unless use_domestic, in which case use L_d and DomesticFinalDemand - #c = diag(L%*%y) - if (use_domestic) { - f <- model$U_d[model$Commodities$Code_Loc, model$FinalDemandMeta$Code_Loc] - y <- as.matrix(formatDemandVector(rowSums(f), model$L_d)) - c <- getScalingVector(model$L_d, y) - } else { - f <- model$U[model$Commodities$Code_Loc, model$FinalDemandMeta$Code_Loc] - y <- as.matrix(formatDemandVector(rowSums(f), model$L)) - c <- getScalingVector(model$L, y) - } - + # Prepare left side of the equation CbS_cast <- standardizeandcastSatelliteTable(model$CbS,model) B <- as.matrix(CbS_cast) Chi <- generateChiMatrix(model, "Industry") @@ -28,18 +17,40 @@ compareEandLCIResult <- function(model, use_domestic = FALSE, tolerance = 0.05) } B_chi <- B*Chi - ##Prepare left side of the equation + # Generate E E <- prepareEfromtbs(model) E <- as.matrix(E[rownames(B), colnames(B)]) + # Adjust E and B_chi if model is commodity-based + # Calculate scaling factor c if (model$specs$CommodityorIndustryType=="Commodity") { #transform E with commodity mix to put in commodity form - E <- t(model$C_m %*% t(E)) + E <- t(model$C_m %*% t(E)) #Need to transform B_Chi to be in commodity form B_chi <- B_chi %*% model$V_n + #Use L and FinalDemand unless use_domestic, in which case use L_d and DomesticFinalDemand + if (use_domestic) { + f <- model$U_d[model$Commodities$Code_Loc, model$FinalDemandMeta$Code_Loc] + y <- as.matrix(formatDemandVector(rowSums(f), model$L_d)) + c <- getScalingVector(model$L_d, y) + } else { + f <- model$U[model$Commodities$Code_Loc, model$FinalDemandMeta$Code_Loc] + y <- as.matrix(formatDemandVector(rowSums(f), model$L)) + c <- getScalingVector(model$L, y) + } + } else { + if (use_domestic) { + f <- model$DemandVectors$vectors$`2012_US_Production_Domestic` + y <- as.matrix(formatDemandVector(f, model$L_d)) + c <- getScalingVector(model$L_d, y) + } else { + f <- model$DemandVectors$vectors$`2012_US_Production_Complete` + model$DemandVectors$vectors$`2012_US_Import_Complete` + y <- as.matrix(formatDemandVector(f, model$L)) + c <- getScalingVector(model$L, y) + } } - #LCI = B dot Chi %*% c + #LCI = B dot Chi %*% c LCI <- t(calculateDirectPerspectiveLCI(B_chi, c)) # Calculate relative differences @@ -59,21 +70,31 @@ compareEandLCIResult <- function(model, use_domestic = FALSE, tolerance = 0.05) #'@return A list with pass/fail validation result and the cell-by-cell relative diff matrix #'@export compareOutputandLeontiefXDemand <- function(model, use_domestic=FALSE, tolerance=0.05) { - if (use_domestic) { - f <- model$U_d[model$Commodities$Code_Loc, model$FinalDemandMeta$Code_Loc] - y <- as.matrix(formatDemandVector(rowSums(f), model$L_d)) - c <- getScalingVector(model$L_d, y) - } else { - f <- model$U[model$Commodities$Code_Loc, model$FinalDemandMeta$Code_Loc] - y <- as.matrix(formatDemandVector(rowSums(f), model$L)) - c <- getScalingVector(model$L, y) - } - + # Generate output and scaling vector if(model$specs$CommodityorIndustryType == "Commodity") { - #determine if output to compare is commodity or industry x <- model$q + + if (use_domestic) { + f <- model$U_d[model$Commodities$Code_Loc, model$FinalDemandMeta$Code_Loc] + y <- as.matrix(formatDemandVector(rowSums(f), model$L_d)) + c <- getScalingVector(model$L_d, y) + } else { + f <- model$U[model$Commodities$Code_Loc, model$FinalDemandMeta$Code_Loc] + y <- as.matrix(formatDemandVector(rowSums(f), model$L)) + c <- getScalingVector(model$L, y) + } } else { x <- model$x + + if (use_domestic) { + f <- model$DemandVectors$vectors$`2012_US_Production_Domestic` + y <- as.matrix(formatDemandVector(f, model$L_d)) + c <- getScalingVector(model$L_d, y) + } else { + f <- model$DemandVectors$vectors$`2012_US_Production_Complete` + model$DemandVectors$vectors$`2012_US_Import_Complete` + y <- as.matrix(formatDemandVector(f, model$L)) + c <- getScalingVector(model$L, y) + } } # Row names should be identical if (!identical(rownames(c), names(x))) { From 2c487c550f0702528a5334b09781f05b6f442007 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 17 Nov 2021 15:46:30 -0800 Subject: [PATCH 180/319] Add more Demand Vectors in USEEIOv2.0is-GHG_nodisagg model config --- .../modelspecs/USEEIOv2.0is-GHG_nodisagg.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml index a2b745d9..80cad76b 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml @@ -55,14 +55,19 @@ Indicators: Primary: TRUE DemandVectors: - Consumption: - Type: "Consumption" + Production: + Type: "Production" Year: 2012 System: "Complete" Location: "US" - Production: + DomesticProduction: Type: "Production" Year: 2012 + System: "Domestic" + Location: "US" + Consumption: + Type: "Consumption" + Year: 2012 System: "Complete" Location: "US" HouseholdConsumption: @@ -74,4 +79,9 @@ DemandVectors: Type: "Consumption" Year: 2012 System: "Domestic" - Location: "US" + Location: "US" + Import: + Type: "Import" + Year: 2012 + System: "Complete" + Location: "US" From fce194c341a74ceea73b5acc7be3db8876ad28fb Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 18 Nov 2021 08:31:15 -0800 Subject: [PATCH 181/319] Add compared objects in validation results --- R/ValidateModel.R | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/R/ValidateModel.R b/R/ValidateModel.R index c3a0387a..5e705d84 100644 --- a/R/ValidateModel.R +++ b/R/ValidateModel.R @@ -58,6 +58,8 @@ compareEandLCIResult <- function(model, use_domestic = FALSE, tolerance = 0.05) # Generate Pass/Fail comparison results validation <- formatValidationResult(rel_diff, abs_diff = TRUE, tolerance) + # Add LCI and E to validation list + validation <- c(list("LCI" = LCI, "E" = E), validation) return(validation) } @@ -105,6 +107,8 @@ compareOutputandLeontiefXDemand <- function(model, use_domestic=FALSE, tolerance # Generate Pass/Fail comparison results validation <- formatValidationResult(rel_diff, abs_diff = TRUE, tolerance) + # Add c and x to validation list + validation <- c(list("c" = c, "x" = x), validation) return(validation) } @@ -128,6 +132,8 @@ compareCommodityOutputandDomesticUseplusProductionDemand <- function(model, tole # Generate Pass/Fail comparison results validation <- formatValidationResult(rel_diff, abs_diff = TRUE, tolerance) + # Add q and x to validation list + validation <- c(list("q" = q, "x" = x), validation) return(validation) } @@ -152,6 +158,8 @@ compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation <- func # Generate Pass/Fail comparison results validation <- formatValidationResult(rel_diff, abs_diff = TRUE, tolerance) + # Add q and x to validation list + validation <- c(list("q" = q, "x" = x), validation) return(validation) } @@ -216,6 +224,8 @@ compareIndustryOutputinMakeandUse <- function(model) { # Generate Pass/Fail comparison results validation <- formatValidationResult(rel_diff, abs_diff = TRUE, tolerance) + # Add x_use and x_make to validation list + validation <- c(list("x_use" = x_use, "x_make" = x_make), validation) return(validation) } From 51ab301db0076f2e95de1b8ca289bba5dabb29d1 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Thu, 18 Nov 2021 08:37:35 -0800 Subject: [PATCH 182/319] ModelSpecifications.md -> ModelSpecification.md --- format_specs/Model.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/format_specs/Model.md b/format_specs/Model.md index 42b99b10..4d8cfa4a 100644 --- a/format_specs/Model.md +++ b/format_specs/Model.md @@ -4,16 +4,16 @@ A fully constructed USEEIO model is an R named list that contains the following ## Notes - A _sector_ is either a commodity or industry, depending on the [model CommodityorIndustry Type](https://github.com/USEPA/useeior/blob/master/format_specs/ModelSpecifications.md#model-specifications). The _sector_ will be synononmous for that same CommodityorIndustryType for all tables in a given model in which _sector_ is used. + A _sector_ is either a commodity or industry, depending on the [model CommodityorIndustry Type](https://github.com/USEPA/useeior/blob/master/format_specs/ModelSpecification.md#model-specifications). The _sector_ will be synononmous for that same CommodityorIndustryType for all tables in a given model in which _sector_ is used. -Unless another year is specifically called out, all economic values are given in US dollars (USD) in the value the [model IOyear](https://github.com/USEPA/useeior/blob/master/format_specs/ModelSpecifications.md#model-specifications). +Unless another year is specifically called out, all economic values are given in US dollars (USD) in the value the [model IOyear](https://github.com/USEPA/useeior/blob/master/format_specs/ModelSpecification.md#model-specifications). ## Model Items are listed in the order in which they appear in a built Model object in R. | Item | Data Structure | Category | Description | | --- | --- | --------- | ------ | -| specs | list | metadata | [Model specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md) | +| specs | list | metadata | [Model specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md) | | crosswalk | data.frame | metadata | Sector [crosswalk](#crosswalk) | | Commodities | data.frame | metadata | Commodity metadata in [sector meta format](#sector-meta) | | Industries | data.frame | metadata | Industry metadata in [sector meta format](#sector-meta) | @@ -144,19 +144,19 @@ The Indicators object contains meta and factors dataframes. | Item | Type | Description | | --- | --- | --------- | -| Name | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) | -| Code | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) | -| Group | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) | -| Unit | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) | -| SimpleUnit | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) | -| SimpleName | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) | +| Name | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| Code | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| Group | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| Unit | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| SimpleUnit | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| SimpleName | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | #### factors A data table of the characterization factors for indicators included in the model | Item | Type | Description | | --- | --- | --------- | -| Indicator | str | Matches the [Name](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) of the indicator | +| Indicator | str | Matches the [Name](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) of the indicator | | Flowable | str | [Federal Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | | Context | str | [Federal Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | | Unit | str | [Federal Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | @@ -174,11 +174,11 @@ The DemandVector object contains the demand vectors and a metadata table. | Item | Type | Description | | --- | --- | --------- | -| Type | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#demand-vector-specifications) | -| Year | int | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#demand-vector-specifications) | -| System | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#demand-vector-specifications) | -| Location | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#demand-vector-specifications) | -| Name | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#demand-vector-specifications) | +| Type | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | +| Year | int | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | +| System | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | +| Location | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | +| Name | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | | ID | str | Year_Location_Type_System | ### Model Component Matrices @@ -189,7 +189,7 @@ When used in matrix indices, items below take the following format: | --- | --------- | | sector (commodity or industry) | [Code_Loc](#sector-meta) (e.g. `1111A0/US`) | | flow | [Flowable/Context/Unit](#satellite-tables) (e.g. `Carbon dioxide/emission/air/kg`) | -| indicator | [Name](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecifications.md#indicator-specifications) (e.g. `Greenhouse Gases`) | +| indicator | [Name](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) (e.g. `Greenhouse Gases`) | #### Output vectors From 1ba8202e807fee262b62a9c8af97d83ed4732fa6 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Thu, 18 Nov 2021 16:44:18 -0800 Subject: [PATCH 183/319] Update crosswalk table in Model.md --- format_specs/Model.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/format_specs/Model.md b/format_specs/Model.md index 42b99b10..af355b5a 100644 --- a/format_specs/Model.md +++ b/format_specs/Model.md @@ -64,10 +64,13 @@ Items are listed in the order in which they appear in a built Model object in R. | Item | Type | Description | | --- | --- | --------- | -| NAICS | str | 6-digit [NAICS code](https://www.census.gov/naics/) | +| NAICS | str | 2-6 digit [NAICS code](https://www.census.gov/naics/)2 | | BEA_Sector | str | Code used at the BEA Sector level | | BEA_Summary | str | Code used at the BEA Summary level | | BEA_Detail | str | Code used at the BEA Detail level | +| USEEIO | str | Code used at the model level of detail | + +2 7-10 digit NAICS code exists for manufacturing and mining industries. ### Sector Meta From 700131f6f468093889fc6b70ce323cd86de5f212 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 22 Nov 2021 12:22:00 -0800 Subject: [PATCH 184/319] =?UTF-8?q?Fix=20Rho=20calculation:=20rho=20=3D=20?= =?UTF-8?q?=20model=20IO=20year=20=C3=B7=20year?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- R/AdjustPrice.R | 8 ++++---- R/BuildModel.R | 2 +- man/calculateModelIOYearbyYearPriceRatio.Rd | 17 +++++++++++++++++ man/calculateYearbyModelIOYearPriceRatio.Rd | 17 ----------------- 4 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 man/calculateModelIOYearbyYearPriceRatio.Rd delete mode 100644 man/calculateYearbyModelIOYearPriceRatio.Rd diff --git a/R/AdjustPrice.R b/R/AdjustPrice.R index 6f6bf69b..aa007e3b 100644 --- a/R/AdjustPrice.R +++ b/R/AdjustPrice.R @@ -28,12 +28,12 @@ adjustResultMatrixPrice <- function(matrix_name, currency_year, purchaser_price= return(mat) } -#' Calculate year by model IO year price ratio. +#' Calculate model IO year by year price ratio. #' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @return A dataframe of year by model IO year price ratio. -calculateYearbyModelIOYearPriceRatio <- function(model) { +#' @return A dataframe of model IO year by year price ratio. +calculateModelIOYearbyYearPriceRatio <- function(model) { CPI_df <- model[[paste0("MultiYear", model$specs$CommodityorIndustryType, "CPI")]] - CPI_ratio_matrix <- as.matrix(CPI_df/CPI_df[, as.character(model$specs$IOYear)]) + CPI_ratio_matrix <- as.matrix(CPI_df[, as.character(model$specs$IOYear)]/CPI_df) return(CPI_ratio_matrix) } diff --git a/R/BuildModel.R b/R/BuildModel.R index 2d355b13..c52a3e39 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -104,7 +104,7 @@ constructEEIOMatrices <- function(model) { # Calculate year over model IO year price ratio logging::loginfo("Calculating Rho matrix (price year ratio)...") - model$Rho <- calculateYearbyModelIOYearPriceRatio(model) + model$Rho <- calculateModelIOYearbyYearPriceRatio(model) # Calculate producer over purchaser price ratio. logging::loginfo("Calculating Phi matrix (producer over purchaser price ratio)...") diff --git a/man/calculateModelIOYearbyYearPriceRatio.Rd b/man/calculateModelIOYearbyYearPriceRatio.Rd new file mode 100644 index 00000000..3f8a6ad2 --- /dev/null +++ b/man/calculateModelIOYearbyYearPriceRatio.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AdjustPrice.R +\name{calculateModelIOYearbyYearPriceRatio} +\alias{calculateModelIOYearbyYearPriceRatio} +\title{Calculate model IO year by year price ratio.} +\usage{ +calculateModelIOYearbyYearPriceRatio(model) +} +\arguments{ +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} +} +\value{ +A dataframe of model IO year by year price ratio. +} +\description{ +Calculate model IO year by year price ratio. +} diff --git a/man/calculateYearbyModelIOYearPriceRatio.Rd b/man/calculateYearbyModelIOYearPriceRatio.Rd deleted file mode 100644 index 4e47802d..00000000 --- a/man/calculateYearbyModelIOYearPriceRatio.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/AdjustPrice.R -\name{calculateYearbyModelIOYearPriceRatio} -\alias{calculateYearbyModelIOYearPriceRatio} -\title{Calculate year by model IO year price ratio.} -\usage{ -calculateYearbyModelIOYearPriceRatio(model) -} -\arguments{ -\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} -} -\value{ -A dataframe of year by model IO year price ratio. -} -\description{ -Calculate year by model IO year price ratio. -} From 0a57f096470c0eed72d7813daff1edd1d2e01947 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 22 Nov 2021 15:37:59 -0500 Subject: [PATCH 185/319] incorporate validation into gh actions --- .github/workflows/R-CMD-check.yaml | 46 ++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index a429fb5d..4a72ade0 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -60,20 +60,48 @@ jobs: - uses: r-lib/actions/check-r-package@v1 - - name: Simple buildModel execution + - name: Build and validate models run: | require(devtools) devtools::load_all() - run1 <- useeior::buildModel("USEEIOv2.0") - run2 <- useeior::buildModel("USEEIOv2.0.1") - run3 <- useeior::buildModel("USEEIOv2.1") - exists("run1"); exists("run2"); exists("run3") + for modelname in c("USEEIOv2.0", "USEEIOv2.0.01", "USEEIOv2.1"){ + m <- useeior::buildModel(modelname) + + econval <- compareOutputandLeontiefXDemand(m, tolerance = 0.01) + paste("Number of sectors passing:",econval$N_Pass) + paste("Number of sectors failing:",econval$N_Fail) + paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")) + + econval <- compareOutputandLeontiefXDemand(m,use_domestic=TRUE, tolerance = 0.01) + paste("Number of sectors passing:",econval$N_Pass) + paste("Number of sectors failing:",econval$N_Fail) + paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")) + + modelval <- compareEandLCIResult(m, tolerance = 0.01) + paste("Number of flow totals by commodity passing:",modelval$N_Pass) + paste("Number of flow totals by commodity failing:",modelval$N_Fail) + + dom_val <- compareEandLCIResult(m, use_domestic=TRUE, tolerance = 0.01) + paste("Number of flow totals by commodity passing:",dom_val$N_Pass) + paste("Number of flow totals by commodity failing:",dom_val$N_Fail) + paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", ")) + + q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(m, tolerance = 0.01) + paste("Number of flow totals by commodity passing:",q_x_val$N_Pass) + paste("Number of flow totals by commodity failing:",q_x_val$N_Fail) + paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", ")) + + q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(m, tolerance = 0.01) + paste("Number of flow totals by commodity passing:",q_val$N_Pass) + paste("Number of flow totals by commodity failing:",q_val$N_Fail) + paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", ")) + } shell: Rscript {0} - - name: Show testthat output - if: always() # step will run even if previous steps fail - run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true - shell: bash + #- name: Show testthat output + # if: always() # step will run even if previous steps fail + # run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true + # shell: bash - name: Upload check results if: failure() # if any of the previous steps fail, export a log From 5a6c4159ed80b58287cf32cf0a832a5c413994f5 Mon Sep 17 00:00:00 2001 From: Ben Young <44471635+bl-young@users.noreply.github.com> Date: Mon, 22 Nov 2021 15:48:03 -0500 Subject: [PATCH 186/319] Update R-CMD-check.yaml syntax error --- .github/workflows/R-CMD-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 4a72ade0..2784f404 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -64,7 +64,7 @@ jobs: run: | require(devtools) devtools::load_all() - for modelname in c("USEEIOv2.0", "USEEIOv2.0.01", "USEEIOv2.1"){ + for (modelname in c("USEEIOv2.0", "USEEIOv2.0.01", "USEEIOv2.1")) { m <- useeior::buildModel(modelname) econval <- compareOutputandLeontiefXDemand(m, tolerance = 0.01) From 26eb74484b6a28fa76173e8e66cb2d440ca22f11 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 22 Nov 2021 16:02:27 -0500 Subject: [PATCH 187/319] syntax fixes --- .github/workflows/R-CMD-check.yaml | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 2784f404..ab1b67e7 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -64,37 +64,37 @@ jobs: run: | require(devtools) devtools::load_all() - for (modelname in c("USEEIOv2.0", "USEEIOv2.0.01", "USEEIOv2.1")) { + for (modelname in c("USEEIOv2.0", "USEEIOv2.0.1", "USEEIOv2.1")) { m <- useeior::buildModel(modelname) econval <- compareOutputandLeontiefXDemand(m, tolerance = 0.01) - paste("Number of sectors passing:",econval$N_Pass) - paste("Number of sectors failing:",econval$N_Fail) - paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")) + print(paste("Number of sectors passing:",econval$N_Pass)) + print(paste("Number of sectors failing:",econval$N_Fail)) + print(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) econval <- compareOutputandLeontiefXDemand(m,use_domestic=TRUE, tolerance = 0.01) - paste("Number of sectors passing:",econval$N_Pass) - paste("Number of sectors failing:",econval$N_Fail) - paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")) + print(paste("Number of sectors passing:",econval$N_Pass)) + print(paste("Number of sectors failing:",econval$N_Fail)) + print(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) modelval <- compareEandLCIResult(m, tolerance = 0.01) - paste("Number of flow totals by commodity passing:",modelval$N_Pass) - paste("Number of flow totals by commodity failing:",modelval$N_Fail) + print(paste("Number of flow totals by commodity passing:",modelval$N_Pass)) + print(paste("Number of flow totals by commodity failing:",modelval$N_Fail)) dom_val <- compareEandLCIResult(m, use_domestic=TRUE, tolerance = 0.01) - paste("Number of flow totals by commodity passing:",dom_val$N_Pass) - paste("Number of flow totals by commodity failing:",dom_val$N_Fail) - paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", ")) + print(paste("Number of flow totals by commodity passing:",dom_val$N_Pass)) + print(paste("Number of flow totals by commodity failing:",dom_val$N_Fail)) + print(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", "))) q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(m, tolerance = 0.01) - paste("Number of flow totals by commodity passing:",q_x_val$N_Pass) - paste("Number of flow totals by commodity failing:",q_x_val$N_Fail) - paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", ")) + print(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass)) + print(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) + print(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", "))) q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(m, tolerance = 0.01) - paste("Number of flow totals by commodity passing:",q_val$N_Pass) - paste("Number of flow totals by commodity failing:",q_val$N_Fail) - paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", ")) + print(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) + print(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) + print(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", "))) } shell: Rscript {0} From c3b552cbcde4e7b8f97a88c7c17adae43ca589f4 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 22 Nov 2021 16:57:54 -0500 Subject: [PATCH 188/319] add validation headers and only show unique errors --- .github/workflows/R-CMD-check.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index ab1b67e7..96604663 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -67,34 +67,40 @@ jobs: for (modelname in c("USEEIOv2.0", "USEEIOv2.0.1", "USEEIOv2.1")) { m <- useeior::buildModel(modelname) + print("Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production") econval <- compareOutputandLeontiefXDemand(m, tolerance = 0.01) print(paste("Number of sectors passing:",econval$N_Pass)) print(paste("Number of sectors failing:",econval$N_Fail)) - print(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) + print(paste("Sectors failing:", paste(unique(econval$Failure$rownames), collapse = ", "))) + print("Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production") econval <- compareOutputandLeontiefXDemand(m,use_domestic=TRUE, tolerance = 0.01) print(paste("Number of sectors passing:",econval$N_Pass)) print(paste("Number of sectors failing:",econval$N_Fail)) - print(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) + print(paste("Sectors failing:", paste(unique(econval$Failure$rownames), collapse = ", "))) + print("Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production") modelval <- compareEandLCIResult(m, tolerance = 0.01) print(paste("Number of flow totals by commodity passing:",modelval$N_Pass)) print(paste("Number of flow totals by commodity failing:",modelval$N_Fail)) + print("Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production") dom_val <- compareEandLCIResult(m, use_domestic=TRUE, tolerance = 0.01) print(paste("Number of flow totals by commodity passing:",dom_val$N_Pass)) print(paste("Number of flow totals by commodity failing:",dom_val$N_Fail)) - print(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", "))) + print(paste("Sectors with flow totals failing:", paste(unique(dom_val$Failure$variable), collapse = ", "))) + print("Validate that commodity output are properly transformed to industry output via MarketShare") q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(m, tolerance = 0.01) print(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass)) print(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) - print(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", "))) + print(paste("Sectors with flow totals failing:", paste(unique(q_x_val$Failure$rownames), collapse = ", "))) + print("Validate that commodity output equals to domestic use plus production demand") q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(m, tolerance = 0.01) print(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) print(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) - print(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", "))) + print(paste("Sectors with flow totals failing:", paste(unique(q_val$Failure$rownames), collapse = ", "))) } shell: Rscript {0} From 27a2d108f4549a97bc5d8c211f0f4ddfe690de23 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 22 Nov 2021 14:55:58 -0800 Subject: [PATCH 189/319] ImportCost -> InternationalTradeAdjustment --- R/BuildModel.R | 3 ++- R/IOFunctions.R | 18 +++++++++--------- R/LoadIOTables.R | 10 +++++----- man/generateImportCostVector.Rd | 19 ------------------- ...erateInternationalTradeAdjustmentVector.Rd | 19 +++++++++++++++++++ 5 files changed, 35 insertions(+), 34 deletions(-) delete mode 100644 man/generateImportCostVector.Rd create mode 100644 man/generateInternationalTradeAdjustmentVector.Rd diff --git a/R/BuildModel.R b/R/BuildModel.R index af17cb8f..dfc0ce79 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -116,7 +116,8 @@ constructEEIOMatrices <- function(model) { "U_n","U_d_n","W") if (model$specs$CommodityorIndustryType=="Industry") { mat_to_remove <- c(mat_to_remove, - c("FinalDemandbyCommodity", "DomesticFinalDemandbyCommodity", "ImportCostbyCommodity")) + c("FinalDemandbyCommodity", "DomesticFinalDemandbyCommodity", + "InternationalTradeAdjustmentbyCommodity")) } model <- within(model, rm(list=mat_to_remove)) diff --git a/R/IOFunctions.R b/R/IOFunctions.R index 4eb6d240..e2df7050 100644 --- a/R/IOFunctions.R +++ b/R/IOFunctions.R @@ -186,11 +186,11 @@ generateDomesticUse <- function(Use, specs) { return(DomesticUse) } -#' Generate import cost vector from Use and Import matrix. +#' Generate international trade adjustment vector from Use and Import matrix. #' @param Use, dataframe of a Use table #' @param specs, list of model specifications -#' @return An import cost vector with names as commodity codes -generateImportCostVector <- function(Use, specs) { +#' @return An international trade adjustment vector with names as commodity codes +generateInternationalTradeAdjustmentVector <- function(Use, specs) { # Load Import matrix if (specs$BaseIOLevel!="Sector") { Import <- get(paste(specs$BaseIOLevel, "Import", specs$IOYear, "BeforeRedef", sep = "_"))*1E6 @@ -202,14 +202,14 @@ generateImportCostVector <- function(Use, specs) { } # Define Import code ImportCode <- getVectorOfCodes(specs$BaseIOSchema, specs$BaseIOLevel, "Import") - # Calculate ImportCost. + # Calculate InternationalTradeAdjustment # In the Import matrix, the imports column is in domestic (US) port value. # But in the Use table, it is in foreign port value. # domestic port value = foreign port value + value of all transportation and insurance services to import + customs duties # See documentation of the Import matrix (https://apps.bea.gov/industry/xls/io-annual/ImportMatrices_Before_Redefinitions_DET_2007_2012.xlsx) - # So, ImportCost <- Use$Imports - Import$Imports - # ImportCost is essentially 'value of all transportation and insurance services to import' and 'customs duties' - ImportCost <- Use[, ImportCode] - Import[rownames(Use), ImportCode] - names(ImportCost) <- rownames(Use) - return(ImportCost) + # So, InternationalTradeAdjustment <- Use$Imports - Import$Imports + # InternationalTradeAdjustment is essentially 'value of all transportation and insurance services to import' and 'customs duties' + InternationalTradeAdjustment <- Use[, ImportCode] - Import[rownames(Use), ImportCode] + names(InternationalTradeAdjustment) <- rownames(Use) + return(InternationalTradeAdjustment) } diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index 0dd9a019..42854542 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -90,7 +90,7 @@ loadNationalIOData <- function(model) { model$UseValueAdded <- BEA$UseValueAdded model$FinalDemand <- BEA$UseFinalDemand model$DomesticFinalDemand <- BEA$DomesticFinalDemand - model$ImportCost <- BEA$ImportCost + model$InternationalTradeAdjustment <- BEA$InternationalTradeAdjustment ## Modify row and column names in the IO tables # Use model$Industries rownames(model$MakeTransactions) <- colnames(model$UseTransactions) <- colnames(model$DomesticUseTransactions) <- @@ -117,15 +117,15 @@ loadNationalIOData <- function(model) { } model$MultiYearCommodityOutput[, as.character(model$specs$IOYear)] <- model$CommodityOutput - # Transform model FinalDemand, DomesticFinalDemand, and ImportCost to by-industry form + # Transform model FinalDemand, DomesticFinalDemand, and InternationalTradeAdjustment to by-industry form if (model$specs$CommodityorIndustryType=="Industry") { # Keep the orignal FinalDemand (in by-commodity form) model$FinalDemandbyCommodity <- model$FinalDemand model$DomesticFinalDemandbyCommodity <- model$DomesticFinalDemand - model$ImportCostbyCommodity <- model$ImportCost + model$InternationalTradeAdjustmentbyCommodity <- model$InternationalTradeAdjustment model$FinalDemand <- transformFinalDemandwithMarketShares(model$FinalDemand, model) model$DomesticFinalDemand <- transformFinalDemandwithMarketShares(model$DomesticFinalDemand, model) - model$ImportCost <- transformFinalDemandwithMarketShares(model$ImportCost, model) + model$InternationalTradeAdjustment <- transformFinalDemandwithMarketShares(model$InternationalTradeAdjustment, model) } # Add Margins table @@ -175,7 +175,7 @@ loadBEAtables <- function(specs) { BEA$DomesticUseTransactions <- DomesticUse[, BEA$Industries] BEA$DomesticFinalDemand <- DomesticUse[, BEA$FinalDemandCodes] # Generate Import Cost vector - BEA$ImportCost <- generateImportCostVector(cbind(BEA$UseTransactions, BEA$UseFinalDemand), specs) + BEA$InternationalTradeAdjustment <- generateInternationalTradeAdjustmentVector(cbind(BEA$UseTransactions, BEA$UseFinalDemand), specs) # Replace NA with 0 in IO tables if(specs$BaseIOSchema==2007){ BEA$MakeTransactions[is.na(BEA$MakeTransactions)] <- 0 diff --git a/man/generateImportCostVector.Rd b/man/generateImportCostVector.Rd deleted file mode 100644 index 71223db5..00000000 --- a/man/generateImportCostVector.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/IOFunctions.R -\name{generateImportCostVector} -\alias{generateImportCostVector} -\title{Generate import cost vector from Use and Import matrix.} -\usage{ -generateImportCostVector(Use, specs) -} -\arguments{ -\item{Use, }{dataframe of a Use table} - -\item{specs, }{list of model specifications} -} -\value{ -An import cost vector with names as commodity codes -} -\description{ -Generate import cost vector from Use and Import matrix. -} diff --git a/man/generateInternationalTradeAdjustmentVector.Rd b/man/generateInternationalTradeAdjustmentVector.Rd new file mode 100644 index 00000000..14cb8f10 --- /dev/null +++ b/man/generateInternationalTradeAdjustmentVector.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/IOFunctions.R +\name{generateInternationalTradeAdjustmentVector} +\alias{generateInternationalTradeAdjustmentVector} +\title{Generate international trade adjustment vector from Use and Import matrix.} +\usage{ +generateInternationalTradeAdjustmentVector(Use, specs) +} +\arguments{ +\item{Use, }{dataframe of a Use table} + +\item{specs, }{list of model specifications} +} +\value{ +An international trade adjustment vector with names as commodity codes +} +\description{ +Generate international trade adjustment vector from Use and Import matrix. +} From ff683d9d336a76204ac6069125fa3b4a6b836b95 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 22 Nov 2021 15:05:21 -0800 Subject: [PATCH 190/319] Add InternationalTradeAdjustmentMeta as model component --- R/LoadIOTables.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index 42854542..b057ffce 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -70,6 +70,11 @@ loadNationalIOData <- function(model) { model$FinalDemandMeta$Code_Loc <- apply(cbind(model$FinalDemandMeta$Code, model$specs$ModelRegionAcronyms), 1, FUN = joinStringswithSlashes) + # model$InternationalTradeAdjustmentMeta + model$InternationalTradeAdjustment <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Import", ] + model$InternationalTradeAdjustment[, c("Code", "Code_Loc")] <- gsub("F050", "F051", model$InternationalTradeAdjustment[, c("Code", "Code_Loc")]) + model$InternationalTradeAdjustment[, "Name"] <- "International Trad Adjustment" + # model$MarginSectors model$MarginSectors <- utils::stack(BEA[c("TransportationCodes", "WholesaleCodes", "RetailCodes")]) model$MarginSectors[] <- lapply(model$MarginSectors, as.character) From 9d116d7ae0fb1f1ea390c99d49e34e2b0146636b Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 29 Nov 2021 12:07:04 -0800 Subject: [PATCH 191/319] model$InternationalTradeAdjustment -> model$InternationalTradeAdjustmentMeta --- R/LoadIOTables.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index b057ffce..9d47fc60 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -71,9 +71,9 @@ loadNationalIOData <- function(model) { 1, FUN = joinStringswithSlashes) # model$InternationalTradeAdjustmentMeta - model$InternationalTradeAdjustment <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Import", ] - model$InternationalTradeAdjustment[, c("Code", "Code_Loc")] <- gsub("F050", "F051", model$InternationalTradeAdjustment[, c("Code", "Code_Loc")]) - model$InternationalTradeAdjustment[, "Name"] <- "International Trad Adjustment" + model$InternationalTradeAdjustmentMeta <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Import", ] + model$InternationalTradeAdjustmentMeta[, c("Code", "Code_Loc")] <- gsub("F050", "F051", model$InternationalTradeAdjustmentMeta[, c("Code", "Code_Loc")]) + model$InternationalTradeAdjustmentMeta[, "Name"] <- "International Trad Adjustment" # model$MarginSectors model$MarginSectors <- utils::stack(BEA[c("TransportationCodes", "WholesaleCodes", "RetailCodes")]) From d9218c3182d503641c182d097a22699f7584f469 Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 29 Nov 2021 22:17:06 -0500 Subject: [PATCH 192/319] added disaggregateInternationalTradeAdjustment function --- R/AggregationFunctions.R | 1 + R/DisaggregateFunctions.R | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index 7ca29c1e..c3b4051c 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -43,6 +43,7 @@ aggregateModel <- function (model){ model$Commodities <- removeRowsFromList(model$Commodities, comIndecesToAggregate) model$MultiYearCommodityCPI <- aggregateMultiYearCPI(model, mainIndIndex, indIndecesToAggregate, "Commodity") model$MultiYearIndustryOutput <- aggregateMultiYearOutput(model$MultiYearIndustryOutput, mainComIndex, comIndecesToAggregate) + #model$ImportCosts <- aggregateImportCosts(model$Commodities, comIndecesToAggregate) #todo } model <- calculateIndustryCommodityOutput(model) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 834e65f2..5abe8e08 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -40,6 +40,7 @@ disaggregateModel <- function (model){ #Disaggregate Margins model$Margins <- disaggregateMargins(model, disagg) + model$InternationalTradeAdjustment <- disaggregateInternationalTradeAdjustment(model, disagg) } @@ -149,6 +150,42 @@ disaggregateSetup <- function (model, configpaths = NULL){ return(model) } +#' Disaggregate model$InternationalTradeAdjustments vector in the main model object +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param disagg Specifications for disaggregating the current Table +#' @return newInternationalTradeAdjustment A vector which contains the InternationalTradeAdjustment for the disaggregated sectors +disaggregateInternationalTradeAdjustment <- function(model, disagg, ratios = NULL){ + + originalInternationalTradeAdjustment <- model$InternationalTradeAdjustment + originalNameList <- names(model$InternationalTradeAdjustment) # Get names from named vector + codeLength <- nchar(gsub("/.*", "", disagg$DisaggregatedSectorCodes[1])) # Calculate code length (needed for summary vs. detail level code lengths) + originalIndex <- which(originalNameList == substr(disagg$OriginalSectorCode, 1, codeLength)) # Get row index of the original aggregate sector in the object + originalRow <- model$InternationalTradeAdjustment[originalIndex] # Copy row containing the Margins information for the original aggregate sector + disaggInternationalTradeAdjustment <- rep(originalRow,length(disagg$DisaggregatedSectorCodes)) # Replicate the original a number of times equal to the number of disaggregate sectors + + if(is.null(ratios)){# Use default ratios, i.e., commodity output ratios + disaggRatios <- unname(disaggregatedRatios(model, disagg, "Commodity"))#ratios needed to calculate the margins for the disaggregated sectors. Need to unname for compatibility with Rho matrix later in the model build process. + }else{ + #todo: need to discuss if other ratios are relevant/needed and where they would come from. + disaggRatios <- ratios + } + + disaggInternationalTradeAdjustment <- disaggInternationalTradeAdjustment * disaggRatios + + # Rename the rows of the vector + disaggRowNames <- unlist(disagg$DisaggregatedSectorCodes) + disaggRowNames <- sapply(strsplit(disaggRowNames, split = "/"), "[",1) + names(disaggInternationalTradeAdjustment) <- disaggRowNames + + # Combine elements in a new vector + part1 <- originalInternationalTradeAdjustment[1:(originalIndex-1)] + part3 <- originalInternationalTradeAdjustment[(originalIndex+1):length(originalInternationalTradeAdjustment)] + + newITA <- c(part1, disaggInternationalTradeAdjustment, part3) + + return(newITA) + +} #' Disaggregate model$Margins dataframe in the main model object #' @param model A complete EEIO model: a list with USEEIO model components and attributes. From a3d1558da04372984de692a11de115a60eee67cb Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 29 Nov 2021 22:40:19 -0500 Subject: [PATCH 193/319] Edited documentation for the disaggregateInternationalTradeAdjustment function --- R/DisaggregateFunctions.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index 5abe8e08..f2712492 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -153,6 +153,7 @@ disaggregateSetup <- function (model, configpaths = NULL){ #' Disaggregate model$InternationalTradeAdjustments vector in the main model object #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param disagg Specifications for disaggregating the current Table +#' @param ratios Specific ratios to be used for the disaggregation of the InternationalTradeAdjusment object in place of using economic totals to derive the ratios. #' @return newInternationalTradeAdjustment A vector which contains the InternationalTradeAdjustment for the disaggregated sectors disaggregateInternationalTradeAdjustment <- function(model, disagg, ratios = NULL){ From f4ef3952b5256585c8fb61209e116347d0e34a93 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 30 Nov 2021 09:13:44 -0800 Subject: [PATCH 194/319] Append InternationalTradeAdjustment as the last column to model$U and model$U_d --- R/BuildModel.R | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index dfc0ce79..112bb422 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -42,11 +42,15 @@ constructEEIOMatrices <- function(model) { DomesticFinalDemand_df <- model$DomesticFinalDemand } model$U <- as.matrix(dplyr::bind_rows(cbind(model$UseTransactions, - FinalDemand_df), + FinalDemand_df, + model$InternationalTradeAdjustment), model$UseValueAdded)) # Use model$U_d <- as.matrix(dplyr::bind_rows(cbind(model$DomesticUseTransactions, - DomesticFinalDemand_df), + DomesticFinalDemand_df, + model$InternationalTradeAdjustment), model$UseValueAdded)) # DomesticUse + colnames(model$U)[which(colnames(model$U)=="model$InternationalTradeAdjustment")] <- model$InternationalTradeAdjustmentMeta$Code_Loc + colnames(model$U_d) <- colnames(model$U) model[c("U", "U_d")] <- lapply(model[c("U", "U_d")], function(x) ifelse(is.na(x), 0, x)) model$U_n <- generateDirectRequirementsfromUse(model, domestic = FALSE) #normalized Use @@ -112,7 +116,8 @@ constructEEIOMatrices <- function(model) { #Clean up model elements not written out or used in further functions to reduce clutter mat_to_remove <- c("MakeTransactions", "UseTransactions", "DomesticUseTransactions", - "UseValueAdded", "FinalDemand", "DomesticFinalDemand","CommodityOutput", "IndustryOutput", + "UseValueAdded", "FinalDemand", "DomesticFinalDemand", + "InternationalTradeAdjustment", "CommodityOutput", "IndustryOutput", "U_n","U_d_n","W") if (model$specs$CommodityorIndustryType=="Industry") { mat_to_remove <- c(mat_to_remove, From f53e0c09a916e07d5571d5829626f10b259b57ea Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Tue, 30 Nov 2021 20:34:49 -0500 Subject: [PATCH 195/319] productionDemand -> y_p <- y_c + y_e + y_m + y_delta --- R/DemandFunctions.R | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index 43e60b59..0beb2020 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -41,16 +41,20 @@ sumforConsumption <- function(model, Y) { } #'Prepares a demand vector representing production -#'Formula for production vector: y_p <- y_dc + y_e + y_d_delta +#'Formula for production vector: y_p <- y_c + y_e + y_m + y_delta +#'where y_c = consumption, y_e = exports, y_m = imports, y_delta = change in inventories +#'y_m values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted) #'@param model, a model #'@return A named vector with demand prepareProductionDemand <- function(model) { - y_dc <- sumforConsumption(model, model$FinalDemand) export_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Export", "Code_Loc"] - y_e <- sumDemandCols(model$FinalDemand, export_code) changeinventories_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="ChangeInventories", "Code_Loc"] - y_d_delta <- sumDemandCols(model$FinalDemand, changeinventories_code) - y_p <- y_dc + y_e + y_d_delta + import_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Import", "Code_Loc"] + y_c <- sumforConsumption(model, model$FinalDemand) + y_e <- sumDemandCols(model$FinalDemand, export_code) + y_m <- sumDemandCols(model$FinalDemand, import_code) + y_delta <- sumDemandCols(model$FinalDemand, changeinventories_code) + y_p <- y_c + y_e + y_m + y_delta return(y_p) } From 256fb15c01d7f8384becd0ada21da8635e7b6ad8 Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Wed, 1 Dec 2021 06:38:35 -0500 Subject: [PATCH 196/319] Validate refactor - only use model production or domestic production demand vector in validation calculations - simplify calculations with common calculateProductofLeontiefAndProductionDemand function --- R/ValidateModel.R | 63 +++++++------------ ...ateProductofLeontiefAndProductionDemand.Rd | 19 ++++++ man/prepareProductionDemand.Rd | 8 ++- 3 files changed, 48 insertions(+), 42 deletions(-) create mode 100644 man/calculateProductofLeontiefAndProductionDemand.Rd diff --git a/R/ValidateModel.R b/R/ValidateModel.R index 5e705d84..870113cc 100644 --- a/R/ValidateModel.R +++ b/R/ValidateModel.R @@ -22,33 +22,16 @@ compareEandLCIResult <- function(model, use_domestic = FALSE, tolerance = 0.05) E <- as.matrix(E[rownames(B), colnames(B)]) # Adjust E and B_chi if model is commodity-based - # Calculate scaling factor c if (model$specs$CommodityorIndustryType=="Commodity") { #transform E with commodity mix to put in commodity form E <- t(model$C_m %*% t(E)) #Need to transform B_Chi to be in commodity form B_chi <- B_chi %*% model$V_n #Use L and FinalDemand unless use_domestic, in which case use L_d and DomesticFinalDemand - if (use_domestic) { - f <- model$U_d[model$Commodities$Code_Loc, model$FinalDemandMeta$Code_Loc] - y <- as.matrix(formatDemandVector(rowSums(f), model$L_d)) - c <- getScalingVector(model$L_d, y) - } else { - f <- model$U[model$Commodities$Code_Loc, model$FinalDemandMeta$Code_Loc] - y <- as.matrix(formatDemandVector(rowSums(f), model$L)) - c <- getScalingVector(model$L, y) - } - } else { - if (use_domestic) { - f <- model$DemandVectors$vectors$`2012_US_Production_Domestic` - y <- as.matrix(formatDemandVector(f, model$L_d)) - c <- getScalingVector(model$L_d, y) - } else { - f <- model$DemandVectors$vectors$`2012_US_Production_Complete` + model$DemandVectors$vectors$`2012_US_Import_Complete` - y <- as.matrix(formatDemandVector(f, model$L)) - c <- getScalingVector(model$L, y) - } } + + # Calculate scaling factor c=Ly + c <- calculateProductofLeontiefAndProductionDemand(model, use_domestic) #LCI = B dot Chi %*% c LCI <- t(calculateDirectPerspectiveLCI(B_chi, c)) @@ -63,6 +46,23 @@ compareEandLCIResult <- function(model, use_domestic = FALSE, tolerance = 0.05) return(validation) } +#' Calculate scaling vector with appropriate production demand vector +#'@param model, EEIOmodel object completely built +#'@param use_domestic, a logical value indicating whether to use domestic demand vector +#'@return c, a numeric vector with total $ values for each sector in model +calculateProductofLeontiefAndProductionDemand <- function (model, use_domestic) { + if (use_domestic) { + f <- model$DemandVectors$vectors$`2012_US_Production_Domestic` + y <- as.matrix(formatDemandVector(f, model$L_d)) + c <- getScalingVector(model$L_d, y) + } else { + f <- model$DemandVectors$vectors$`2012_US_Production_Complete` + y <- as.matrix(formatDemandVector(f, model$L)) + c <- getScalingVector(model$L, y) + } + return(c) +} + #'Compares the total sector output against the model result calculation with the demand vector. and direct perspective. #'Uses the model$FinalDemand and model$L #'Works for the domestic model with the equivalent tables @@ -75,29 +75,12 @@ compareOutputandLeontiefXDemand <- function(model, use_domestic=FALSE, tolerance # Generate output and scaling vector if(model$specs$CommodityorIndustryType == "Commodity") { x <- model$q - - if (use_domestic) { - f <- model$U_d[model$Commodities$Code_Loc, model$FinalDemandMeta$Code_Loc] - y <- as.matrix(formatDemandVector(rowSums(f), model$L_d)) - c <- getScalingVector(model$L_d, y) - } else { - f <- model$U[model$Commodities$Code_Loc, model$FinalDemandMeta$Code_Loc] - y <- as.matrix(formatDemandVector(rowSums(f), model$L)) - c <- getScalingVector(model$L, y) - } } else { x <- model$x - - if (use_domestic) { - f <- model$DemandVectors$vectors$`2012_US_Production_Domestic` - y <- as.matrix(formatDemandVector(f, model$L_d)) - c <- getScalingVector(model$L_d, y) - } else { - f <- model$DemandVectors$vectors$`2012_US_Production_Complete` + model$DemandVectors$vectors$`2012_US_Import_Complete` - y <- as.matrix(formatDemandVector(f, model$L)) - c <- getScalingVector(model$L, y) - } } + # Calculate scaling factor c=Ly + c <- calculateProductofLeontiefAndProductionDemand(model, use_domestic) + # Row names should be identical if (!identical(rownames(c), names(x))) { stop("Sectors not aligned in model ouput variable and calculation result") diff --git a/man/calculateProductofLeontiefAndProductionDemand.Rd b/man/calculateProductofLeontiefAndProductionDemand.Rd new file mode 100644 index 00000000..7f30f740 --- /dev/null +++ b/man/calculateProductofLeontiefAndProductionDemand.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ValidateModel.R +\name{calculateProductofLeontiefAndProductionDemand} +\alias{calculateProductofLeontiefAndProductionDemand} +\title{Calculate scaling vector with appropriate production demand vector} +\usage{ +calculateProductofLeontiefAndProductionDemand(model, use_domestic) +} +\arguments{ +\item{model, }{EEIOmodel object completely built} + +\item{use_domestic, }{a logical value indicating whether to use domestic demand vector} +} +\value{ +c, a numeric vector with total $ values for each sector in model +} +\description{ +Calculate scaling vector with appropriate production demand vector +} diff --git a/man/prepareProductionDemand.Rd b/man/prepareProductionDemand.Rd index 770ba937..1feb1d08 100644 --- a/man/prepareProductionDemand.Rd +++ b/man/prepareProductionDemand.Rd @@ -3,7 +3,9 @@ \name{prepareProductionDemand} \alias{prepareProductionDemand} \title{Prepares a demand vector representing production -Formula for production vector: y_p <- y_dc + y_e + y_d_delta} +Formula for production vector: y_p <- y_c + y_e + y_m + y_delta +where y_c = consumption, y_e = exports, y_m = imports, y_delta = change in inventories +y_m values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted)} \usage{ prepareProductionDemand(model) } @@ -15,5 +17,7 @@ A named vector with demand } \description{ Prepares a demand vector representing production -Formula for production vector: y_p <- y_dc + y_e + y_d_delta +Formula for production vector: y_p <- y_c + y_e + y_m + y_delta +where y_c = consumption, y_e = exports, y_m = imports, y_delta = change in inventories +y_m values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted) } From 8471eee9c7e79b8ea2d36582be5bd3f82bb47a4d Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 1 Dec 2021 09:56:25 -0500 Subject: [PATCH 197/319] remove html files --- inst/doc/ValidateModel_render.html | 230 -------------- inst/doc/output/ValidateUSEEIOv2.0.1.html | 351 --------------------- inst/doc/output/ValidateUSEEIOv2.0.html | 351 --------------------- inst/doc/output/ValidateUSEEIOv2.1.html | 354 ---------------------- 4 files changed, 1286 deletions(-) delete mode 100644 inst/doc/ValidateModel_render.html delete mode 100644 inst/doc/output/ValidateUSEEIOv2.0.1.html delete mode 100644 inst/doc/output/ValidateUSEEIOv2.0.html delete mode 100644 inst/doc/output/ValidateUSEEIOv2.1.html diff --git a/inst/doc/ValidateModel_render.html b/inst/doc/ValidateModel_render.html deleted file mode 100644 index 11c77a87..00000000 --- a/inst/doc/ValidateModel_render.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - -ValidateModel_render - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
-

Load the useeior package

-
devtools::load_all()
-
-
-

Validate model

-
for (modelname in params$modelname) {
-  rmarkdown::render("ValidateModel.Rmd", # "inst/doc/ValidateModel.Rmd", # 
-                    output_file = paste0("output/Validate", modelname, ".html"),
-                    quiet = TRUE)
-}
-
- - - - -
- - - - - - - - - - - - - - - diff --git a/inst/doc/output/ValidateUSEEIOv2.0.1.html b/inst/doc/output/ValidateUSEEIOv2.0.1.html deleted file mode 100644 index 78cc37f3..00000000 --- a/inst/doc/output/ValidateUSEEIOv2.0.1.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - - - - - - - - -Validating USEEIOv2.0.1 Model - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -

This document presents validation results of USEEIOv2.0.1 model.

-
-

Build and Calculate Model

-
model <- buildModel(modelname)
-#> 2021-11-05 13:54:36 INFO::Begin model initialization...
-#> 2021-11-05 13:54:36 INFO::Initializing IO tables...
-#> 2021-11-05 13:54:36 INFO::Initializing Gross Output tables...
-#> 2021-11-05 13:54:37 INFO::Initializing Chain Price Index tables...
-#> 2021-11-05 13:54:38 INFO::Loading disaggregation specification file for WasteDisaggregationDetail...
-#> 2021-11-05 13:54:38 INFO::Initializing Disaggregation of IO tables...
-#> 2021-11-05 13:54:39 INFO::Initializing model satellite tables...
-#> 2021-11-05 13:54:39 INFO::Loading Water withdrawals flows from DataCommons...
-#> 2021-11-05 13:54:39 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons...
-#> 2021-11-05 13:54:45 INFO::Loading Point source industrial releases to ground flows from DataCommons...
-#> 2021-11-05 13:54:45 INFO::Loading Point source releases to water flows from DataCommons...
-#> 2021-11-05 13:54:46 INFO::Loading Greenhouse Gases flows from DataCommons...
-#> 2021-11-05 13:54:46 INFO::Loading Land use flows from DataCommons...
-#> 2021-11-05 13:54:46 INFO::Loading Mineral extraction flows from DataCommons...
-#> 2021-11-05 13:54:46 INFO::Loading Energy extraction flows from DataCommons...
-#> 2021-11-05 13:54:46 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation
-#> 2021-11-05 13:54:46 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons...
-#> 2021-11-05 13:54:46 INFO::Loading Pesticide releases flows from DataCommons...
-#> 2021-11-05 13:54:46 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons...
-#> 2021-11-05 13:54:46 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation
-#> 2021-11-05 13:54:47 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons...
-#> 2021-11-05 13:54:47 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons...
-#> 2021-11-05 13:54:49 INFO::Loading Employment flows from DataCommons...
-#> 2021-11-05 13:54:49 INFO::Generating Value Added flows...
-#> 2021-11-05 13:54:49 INFO::Initializing model indicators...
-#> 2021-11-05 13:54:49 INFO::Getting Greenhouse Gases indicator from DataCommons...
-#> 2021-11-05 13:54:49 INFO::Getting Acidification Potential indicator from DataCommons...
-#> 2021-11-05 13:54:49 INFO::Getting Eutrophication Potential indicator from DataCommons...
-#> 2021-11-05 13:54:49 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons...
-#> 2021-11-05 13:54:53 INFO::Getting Human Health - Cancer indicator from DataCommons...
-#> 2021-11-05 13:54:54 INFO::Getting Human Health - Noncancer indicator from DataCommons...
-#> 2021-11-05 13:54:54 INFO::Getting Human Health Toxicity indicator from DataCommons...
-#> 2021-11-05 13:54:56 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons...
-#> 2021-11-05 13:54:56 INFO::Getting Ozone Depletion indicator from DataCommons...
-#> 2021-11-05 13:54:56 INFO::Getting Smog Formation Potential indicator from DataCommons...
-#> 2021-11-05 13:54:57 INFO::Getting Freshwater withdrawals indicator from DataCommons...
-#> 2021-11-05 13:54:57 INFO::Getting Land use indicator from DataCommons...
-#> 2021-11-05 13:54:57 INFO::Getting Hazardous Air Pollutants indicator from DataCommons...
-#> 2021-11-05 13:54:57 INFO::Getting Pesticides indicator from DataCommons...
-#> 2021-11-05 13:54:57 INFO::Getting Nonrenewable Energy Use indicator from DataCommons...
-#> 2021-11-05 13:54:57 INFO::Getting Renewable Energy Use indicator from DataCommons...
-#> 2021-11-05 13:54:58 INFO::Getting Energy Use indicator from DataCommons...
-#> 2021-11-05 13:54:58 INFO::Getting Minerals and Metals Use indicator from DataCommons...
-#> 2021-11-05 13:54:58 INFO::Getting Value Added indicator from useeior...
-#> 2021-11-05 13:54:58 INFO::Getting Jobs Supported indicator from useeior...
-#> 2021-11-05 13:54:58 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior...
-#> 2021-11-05 13:54:58 INFO::Getting Commercial Municipal Solid Waste indicator from useeior...
-#> 2021-11-05 13:54:58 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior...
-#> 2021-11-05 13:54:58 INFO::Loading demand vectors from model spec...
-#> 2021-11-05 13:54:58 INFO::Loading Consumption demand vector...
-#> 2021-11-05 13:54:58 INFO::Loading Production demand vector...
-#> 2021-11-05 13:54:58 INFO::Loading HouseholdConsumption demand vector...
-#> 2021-11-05 13:54:58 INFO::Loading DomesticConsumption demand vector...
-#> 2021-11-05 13:55:01 INFO::Building commodity-by-commodity A matrix (direct requirements)...
-#> 2021-11-05 13:55:01 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)...
-#> 2021-11-05 13:55:01 INFO::Calculating L matrix (total requirements)...
-#> 2021-11-05 13:55:01 INFO::Calculating L_d matrix (domestic total requirements)...
-#> 2021-11-05 13:55:01 INFO::Building B matrix (direct emissions and resource use per dollar)...
-#> 2021-11-05 13:55:03 INFO::Building C matrix (characterization factors for model indicators)...
-#> 2021-11-05 13:55:07 INFO::Calculating D matrix (direct environmental impacts per dollar)...
-#> 2021-11-05 13:55:07 INFO::Calculating M matrix (total emissions and resource use per dollar)...
-#> 2021-11-05 13:55:07 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)...
-#> 2021-11-05 13:55:07 INFO::Calculating N matrix (total environmental impacts per dollar)...
-#> 2021-11-05 13:55:07 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)...
-#> 2021-11-05 13:55:07 INFO::Calculating Rho matrix (price year ratio)...
-#> 2021-11-05 13:55:07 INFO::Calculating Phi matrix (producer over purchaser price ratio)...
-#> 2021-11-05 13:55:07 INFO::Model build complete.
-
-
-

Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production

-
econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01)
-cat(paste("Number of sectors passing:",econval$N_Pass))
-

Number of sectors passing: 409

-
cat(paste("Number of sectors failing:",econval$N_Fail))
-

Number of sectors failing: 2

-
cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")))
-

Sectors failing: S00402/US, S00300/US

-
-
-

Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production

-
econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01)
-cat(paste("Number of sectors passing:",econval$N_Pass))
-

Number of sectors passing: 408

-
cat(paste("Number of sectors failing:",econval$N_Fail))
-

Number of sectors failing: 3

-
cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")))
-

Sectors failing: 4200ID/US, S00402/US, S00300/US

-
-
-

Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production

-
modelval <- compareEandLCIResult(model, tolerance = 0.01)
-cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass))
-

Number of flow totals by commodity passing: 1119564

-
cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail))
-

Number of flow totals by commodity failing: 0

-
#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", ")))
-
-
-

Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production

-
dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01)
-cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass))
-

Number of flow totals by commodity passing: 1119501

-
cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail))
-

Number of flow totals by commodity failing: 63

-
cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", ")))
-

Sectors with flow totals failing: 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US

-
-
-

Validate that commodity output are properly transformed to industry output via MarketShare

-
q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01)
-cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass))
-

Number of flow totals by commodity passing: 409

-
cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail))
-

Number of flow totals by commodity failing: 2

-
cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", ")))
-

Sectors with flow totals failing: S00402/US, S00300/US

-
-
-

Validate that commodity output equals to domestic use plus production demand

-
q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01)
-cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass))
-

Number of flow totals by commodity passing: 409

-
cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail))
-

Number of flow totals by commodity failing: 2

-
cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", ")))
-

Sectors with flow totals failing: 4200ID/US, S00300/US

-
- - - - -
- - - - - - - - - - - - - - - diff --git a/inst/doc/output/ValidateUSEEIOv2.0.html b/inst/doc/output/ValidateUSEEIOv2.0.html deleted file mode 100644 index e2bbde12..00000000 --- a/inst/doc/output/ValidateUSEEIOv2.0.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - - - - - - - - -Validating USEEIOv2.0 Model - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -

This document presents validation results of USEEIOv2.0 model.

-
-

Build and Calculate Model

-
model <- buildModel(modelname)
-#> 2021-11-05 13:53:54 INFO::Begin model initialization...
-#> 2021-11-05 13:53:54 INFO::Initializing IO tables...
-#> 2021-11-05 13:53:54 INFO::Initializing Gross Output tables...
-#> 2021-11-05 13:53:55 INFO::Initializing Chain Price Index tables...
-#> 2021-11-05 13:53:56 INFO::Loading disaggregation specification file for WasteDisaggregationDetail...
-#> 2021-11-05 13:53:56 INFO::Initializing Disaggregation of IO tables...
-#> 2021-11-05 13:53:57 INFO::Initializing model satellite tables...
-#> 2021-11-05 13:53:57 INFO::Loading Water withdrawals flows from DataCommons...
-#> 2021-11-05 13:53:57 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons...
-#> 2021-11-05 13:54:03 INFO::Loading Point source industrial releases to ground flows from DataCommons...
-#> 2021-11-05 13:54:03 INFO::Loading Point source releases to water flows from DataCommons...
-#> 2021-11-05 13:54:04 INFO::Loading Greenhouse Gases flows from DataCommons...
-#> 2021-11-05 13:54:04 INFO::Loading Land use flows from DataCommons...
-#> 2021-11-05 13:54:04 INFO::Loading Mineral extraction flows from DataCommons...
-#> 2021-11-05 13:54:04 INFO::Loading Energy extraction flows from DataCommons...
-#> 2021-11-05 13:54:04 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation
-#> 2021-11-05 13:54:04 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons...
-#> 2021-11-05 13:54:04 INFO::Loading Pesticide releases flows from DataCommons...
-#> 2021-11-05 13:54:04 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons...
-#> 2021-11-05 13:54:05 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation
-#> 2021-11-05 13:54:05 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons...
-#> 2021-11-05 13:54:05 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons...
-#> 2021-11-05 13:54:07 INFO::Loading Employment flows from DataCommons...
-#> 2021-11-05 13:54:07 INFO::Generating Value Added flows...
-#> 2021-11-05 13:54:07 INFO::Initializing model indicators...
-#> 2021-11-05 13:54:07 INFO::Getting Greenhouse Gases indicator from DataCommons...
-#> 2021-11-05 13:54:07 INFO::Getting Acidification Potential indicator from DataCommons...
-#> 2021-11-05 13:54:07 INFO::Getting Eutrophication Potential indicator from DataCommons...
-#> 2021-11-05 13:54:07 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons...
-#> 2021-11-05 13:54:11 INFO::Getting Human Health - Cancer indicator from DataCommons...
-#> 2021-11-05 13:54:12 INFO::Getting Human Health - Noncancer indicator from DataCommons...
-#> 2021-11-05 13:54:12 INFO::Getting Human Health Toxicity indicator from DataCommons...
-#> 2021-11-05 13:54:14 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons...
-#> 2021-11-05 13:54:14 INFO::Getting Ozone Depletion indicator from DataCommons...
-#> 2021-11-05 13:54:14 INFO::Getting Smog Formation Potential indicator from DataCommons...
-#> 2021-11-05 13:54:15 INFO::Getting Freshwater withdrawals indicator from DataCommons...
-#> 2021-11-05 13:54:15 INFO::Getting Land use indicator from DataCommons...
-#> 2021-11-05 13:54:15 INFO::Getting Hazardous Air Pollutants indicator from DataCommons...
-#> 2021-11-05 13:54:15 INFO::Getting Pesticides indicator from DataCommons...
-#> 2021-11-05 13:54:15 INFO::Getting Nonrenewable Energy Use indicator from DataCommons...
-#> 2021-11-05 13:54:15 INFO::Getting Renewable Energy Use indicator from DataCommons...
-#> 2021-11-05 13:54:16 INFO::Getting Energy Use indicator from DataCommons...
-#> 2021-11-05 13:54:16 INFO::Getting Minerals and Metals Use indicator from DataCommons...
-#> 2021-11-05 13:54:16 INFO::Getting Value Added indicator from useeior...
-#> 2021-11-05 13:54:16 INFO::Getting Jobs Supported indicator from useeior...
-#> 2021-11-05 13:54:16 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior...
-#> 2021-11-05 13:54:16 INFO::Getting Commercial Municipal Solid Waste indicator from useeior...
-#> 2021-11-05 13:54:16 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior...
-#> 2021-11-05 13:54:16 INFO::Loading demand vectors from model spec...
-#> 2021-11-05 13:54:16 INFO::Loading Consumption demand vector...
-#> 2021-11-05 13:54:16 INFO::Loading Production demand vector...
-#> 2021-11-05 13:54:16 INFO::Loading HouseholdConsumption demand vector...
-#> 2021-11-05 13:54:16 INFO::Loading DomesticConsumption demand vector...
-#> 2021-11-05 13:54:19 INFO::Building commodity-by-commodity A matrix (direct requirements)...
-#> 2021-11-05 13:54:19 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)...
-#> 2021-11-05 13:54:19 INFO::Calculating L matrix (total requirements)...
-#> 2021-11-05 13:54:19 INFO::Calculating L_d matrix (domestic total requirements)...
-#> 2021-11-05 13:54:19 INFO::Building B matrix (direct emissions and resource use per dollar)...
-#> 2021-11-05 13:54:21 INFO::Building C matrix (characterization factors for model indicators)...
-#> 2021-11-05 13:54:24 INFO::Calculating D matrix (direct environmental impacts per dollar)...
-#> 2021-11-05 13:54:24 INFO::Calculating M matrix (total emissions and resource use per dollar)...
-#> 2021-11-05 13:54:25 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)...
-#> 2021-11-05 13:54:25 INFO::Calculating N matrix (total environmental impacts per dollar)...
-#> 2021-11-05 13:54:25 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)...
-#> 2021-11-05 13:54:25 INFO::Calculating Rho matrix (price year ratio)...
-#> 2021-11-05 13:54:25 INFO::Calculating Phi matrix (producer over purchaser price ratio)...
-#> 2021-11-05 13:54:25 INFO::Model build complete.
-
-
-

Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production

-
econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01)
-cat(paste("Number of sectors passing:",econval$N_Pass))
-

Number of sectors passing: 409

-
cat(paste("Number of sectors failing:",econval$N_Fail))
-

Number of sectors failing: 2

-
cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")))
-

Sectors failing: S00402/US, S00300/US

-
-
-

Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production

-
econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01)
-cat(paste("Number of sectors passing:",econval$N_Pass))
-

Number of sectors passing: 408

-
cat(paste("Number of sectors failing:",econval$N_Fail))
-

Number of sectors failing: 3

-
cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")))
-

Sectors failing: 4200ID/US, S00402/US, S00300/US

-
-
-

Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production

-
modelval <- compareEandLCIResult(model, tolerance = 0.01)
-cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass))
-

Number of flow totals by commodity passing: 1096548

-
cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail))
-

Number of flow totals by commodity failing: 0

-
#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", ")))
-
-
-

Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production

-
dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01)
-cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass))
-

Number of flow totals by commodity passing: 1096485

-
cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail))
-

Number of flow totals by commodity failing: 63

-
cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", ")))
-

Sectors with flow totals failing: 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US

-
-
-

Validate that commodity output are properly transformed to industry output via MarketShare

-
q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01)
-cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass))
-

Number of flow totals by commodity passing: 409

-
cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail))
-

Number of flow totals by commodity failing: 2

-
cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", ")))
-

Sectors with flow totals failing: S00402/US, S00300/US

-
-
-

Validate that commodity output equals to domestic use plus production demand

-
q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01)
-cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass))
-

Number of flow totals by commodity passing: 409

-
cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail))
-

Number of flow totals by commodity failing: 2

-
cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", ")))
-

Sectors with flow totals failing: 4200ID/US, S00300/US

-
- - - - -
- - - - - - - - - - - - - - - diff --git a/inst/doc/output/ValidateUSEEIOv2.1.html b/inst/doc/output/ValidateUSEEIOv2.1.html deleted file mode 100644 index 2621d374..00000000 --- a/inst/doc/output/ValidateUSEEIOv2.1.html +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - - - - - - - - - -Validating USEEIOv2.1 Model - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -

This document presents validation results of USEEIOv2.1 model.

-
-

Build and Calculate Model

-
model <- buildModel(modelname)
-#> 2021-11-05 13:55:19 INFO::Begin model initialization...
-#> 2021-11-05 13:55:19 INFO::Initializing IO tables...
-#> 2021-11-05 13:55:19 INFO::Initializing Gross Output tables...
-#> 2021-11-05 13:55:20 INFO::Initializing Chain Price Index tables...
-#> 2021-11-05 13:55:21 INFO::Loading aggregation specification file for ElectricityAggregationDetail...
-#> 2021-11-05 13:55:21 INFO::Initializing Aggregation of IO tables...
-#> 2021-11-05 13:55:21 INFO::Loading disaggregation specification file for ElectricityDisaggregationDetail...
-#> 2021-11-05 13:55:21 INFO::Loading disaggregation specification file for WasteDisaggregationDetail...
-#> 2021-11-05 13:55:21 INFO::Initializing Disaggregation of IO tables...
-#> 2021-11-05 13:55:22 INFO::Initializing model satellite tables...
-#> 2021-11-05 13:55:22 INFO::Loading Water withdrawals flows from DataCommons...
-#> 2021-11-05 13:55:22 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons...
-#> 2021-11-05 13:55:31 INFO::Loading Point source industrial releases to ground flows from DataCommons...
-#> 2021-11-05 13:55:32 INFO::Loading Point source releases to water flows from DataCommons...
-#> 2021-11-05 13:55:33 INFO::Loading Greenhouse Gases flows from DataCommons...
-#> 2021-11-05 13:55:33 INFO::Loading Land use flows from DataCommons...
-#> 2021-11-05 13:55:33 INFO::Loading Mineral extraction flows from DataCommons...
-#> 2021-11-05 13:55:33 INFO::Loading Energy extraction flows from DataCommons...
-#> 2021-11-05 13:55:33 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation
-#> 2021-11-05 13:55:33 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons...
-#> 2021-11-05 13:55:33 INFO::Loading Pesticide releases flows from DataCommons...
-#> 2021-11-05 13:55:34 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons...
-#> 2021-11-05 13:55:34 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation
-#> 2021-11-05 13:55:34 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons...
-#> 2021-11-05 13:55:34 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons...
-#> 2021-11-05 13:55:36 INFO::Loading Employment flows from DataCommons...
-#> 2021-11-05 13:55:36 INFO::Generating Value Added flows...
-#> 2021-11-05 13:55:36 INFO::Initializing model indicators...
-#> 2021-11-05 13:55:36 INFO::Getting Greenhouse Gases indicator from DataCommons...
-#> 2021-11-05 13:55:37 INFO::Getting Acidification Potential indicator from DataCommons...
-#> 2021-11-05 13:55:37 INFO::Getting Eutrophication Potential indicator from DataCommons...
-#> 2021-11-05 13:55:37 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons...
-#> 2021-11-05 13:55:40 INFO::Getting Human Health - Cancer indicator from DataCommons...
-#> 2021-11-05 13:55:41 INFO::Getting Human Health - Noncancer indicator from DataCommons...
-#> 2021-11-05 13:55:42 INFO::Getting Human Health Toxicity indicator from DataCommons...
-#> 2021-11-05 13:55:43 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons...
-#> 2021-11-05 13:55:43 INFO::Getting Ozone Depletion indicator from DataCommons...
-#> 2021-11-05 13:55:43 INFO::Getting Smog Formation Potential indicator from DataCommons...
-#> 2021-11-05 13:55:44 INFO::Getting Freshwater withdrawals indicator from DataCommons...
-#> 2021-11-05 13:55:44 INFO::Getting Land use indicator from DataCommons...
-#> 2021-11-05 13:55:44 INFO::Getting Hazardous Air Pollutants indicator from DataCommons...
-#> 2021-11-05 13:55:44 INFO::Getting Pesticides indicator from DataCommons...
-#> 2021-11-05 13:55:45 INFO::Getting Nonrenewable Energy Use indicator from DataCommons...
-#> 2021-11-05 13:55:45 INFO::Getting Renewable Energy Use indicator from DataCommons...
-#> 2021-11-05 13:55:45 INFO::Getting Energy Use indicator from DataCommons...
-#> 2021-11-05 13:55:45 INFO::Getting Minerals and Metals Use indicator from DataCommons...
-#> 2021-11-05 13:55:45 INFO::Getting Value Added indicator from useeior...
-#> 2021-11-05 13:55:45 INFO::Getting Jobs Supported indicator from useeior...
-#> 2021-11-05 13:55:45 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior...
-#> 2021-11-05 13:55:45 INFO::Getting Commercial Municipal Solid Waste indicator from useeior...
-#> 2021-11-05 13:55:45 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior...
-#> 2021-11-05 13:55:45 INFO::Loading demand vectors from model spec...
-#> 2021-11-05 13:55:45 INFO::Loading Consumption demand vector...
-#> 2021-11-05 13:55:45 INFO::Loading Production demand vector...
-#> 2021-11-05 13:55:45 INFO::Loading HouseholdConsumption demand vector...
-#> 2021-11-05 13:55:45 INFO::Loading DomesticConsumption demand vector...
-#> 2021-11-05 13:55:48 INFO::Building commodity-by-commodity A matrix (direct requirements)...
-#> 2021-11-05 13:55:48 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)...
-#> 2021-11-05 13:55:48 INFO::Calculating L matrix (total requirements)...
-#> 2021-11-05 13:55:48 INFO::Calculating L_d matrix (domestic total requirements)...
-#> 2021-11-05 13:55:48 INFO::Building B matrix (direct emissions and resource use per dollar)...
-#> 2021-11-05 13:55:50 INFO::Building C matrix (characterization factors for model indicators)...
-#> 2021-11-05 13:55:53 INFO::Calculating D matrix (direct environmental impacts per dollar)...
-#> 2021-11-05 13:55:53 INFO::Calculating M matrix (total emissions and resource use per dollar)...
-#> 2021-11-05 13:55:54 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)...
-#> 2021-11-05 13:55:54 INFO::Calculating N matrix (total environmental impacts per dollar)...
-#> 2021-11-05 13:55:54 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)...
-#> 2021-11-05 13:55:54 INFO::Calculating Rho matrix (price year ratio)...
-#> 2021-11-05 13:55:54 INFO::Calculating Phi matrix (producer over purchaser price ratio)...
-#> 2021-11-05 13:55:54 INFO::Model build complete.
-
-
-

Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production

-
econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01)
-cat(paste("Number of sectors passing:",econval$N_Pass))
-

Number of sectors passing: 420

-
cat(paste("Number of sectors failing:",econval$N_Fail))
-

Number of sectors failing: 2

-
cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")))
-

Sectors failing: S00402/US, S00300/US

-
-
-

Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production

-
econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01)
-cat(paste("Number of sectors passing:",econval$N_Pass))
-

Number of sectors passing: 419

-
cat(paste("Number of sectors failing:",econval$N_Fail))
-

Number of sectors failing: 3

-
cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", ")))
-

Sectors failing: 4200ID/US, S00402/US, S00300/US

-
-
-

Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production

-
modelval <- compareEandLCIResult(model, tolerance = 0.01)
-cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass))
-

Number of flow totals by commodity passing: 1149106

-
cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail))
-

Number of flow totals by commodity failing: 0

-
#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", ")))
-
-
-

Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production

-
dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01)
-cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass))
-

Number of flow totals by commodity passing: 1149043

-
cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail))
-

Number of flow totals by commodity failing: 63

-
cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", ")))
-

Sectors with flow totals failing: 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US

-
-
-

Validate that commodity output are properly transformed to industry output via MarketShare

-
q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01)
-cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass))
-

Number of flow totals by commodity passing: 417

-
cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail))
-

Number of flow totals by commodity failing: 5

-
cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", ")))
-

Sectors with flow totals failing: 562213/US, 562910/US, 562920/US, S00402/US, S00300/US

-
-
-

Validate that commodity output equals to domestic use plus production demand

-
q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01)
-cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass))
-

Number of flow totals by commodity passing: 420

-
cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail))
-

Number of flow totals by commodity failing: 2

-
cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", ")))
-

Sectors with flow totals failing: 4200ID/US, S00300/US

-
- - - - -
- - - - - - - - - - - - - - - From 8ba55e480e7b364c81243981124649f1c169bdd5 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 1 Dec 2021 10:15:15 -0500 Subject: [PATCH 198/319] revert path for rmd file --- inst/doc/ValidateModel_render.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/doc/ValidateModel_render.Rmd b/inst/doc/ValidateModel_render.Rmd index eb9cd1dd..0e491a62 100644 --- a/inst/doc/ValidateModel_render.Rmd +++ b/inst/doc/ValidateModel_render.Rmd @@ -31,7 +31,7 @@ devtools::load_all() # Validate model ```{r validate} for (modelname in params$modelname) { - rmarkdown::render("ValidateModel.Rmd", # "inst/doc/ValidateModel.Rmd", # + rmarkdown::render("inst/doc/ValidateModel.Rmd", output_file = paste0("output/Validate", modelname, ".html"), quiet = TRUE) } From 9a2fb004a03c667b6f4cc68be01f234959cb7a2d Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 1 Dec 2021 10:16:15 -0500 Subject: [PATCH 199/319] update formatting of print messages --- .github/workflows/R-CMD-check.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 96604663..e46a63fb 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -67,6 +67,8 @@ jobs: for (modelname in c("USEEIOv2.0", "USEEIOv2.0.1", "USEEIOv2.1")) { m <- useeior::buildModel(modelname) + print("-----") + print(paste("Validation for ", modelname)) print("Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production") econval <- compareOutputandLeontiefXDemand(m, tolerance = 0.01) print(paste("Number of sectors passing:",econval$N_Pass)) @@ -100,7 +102,8 @@ jobs: q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(m, tolerance = 0.01) print(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) print(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) - print(paste("Sectors with flow totals failing:", paste(unique(q_val$Failure$rownames), collapse = ", "))) + print(paste("Sectors with flow totals failing:", paste(unique(q_val$Failure$rownames), collapse = ", "))) + print("-----") } shell: Rscript {0} From 0f8e45f987f83ba9ecd51bef060a14b57d238c70 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 1 Dec 2021 10:20:34 -0500 Subject: [PATCH 200/319] ignore html files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9fe12737..1c1365c7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .RData .Ruserdata work +inst/doc/**/*.html From 566f85aa246536df077dac2d313dec4d5e7c8b28 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 1 Dec 2021 11:00:36 -0800 Subject: [PATCH 201/319] model$InternationalTradeAdjustment -> model$mu --- R/BuildModel.R | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 112bb422..69ecf005 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -42,12 +42,10 @@ constructEEIOMatrices <- function(model) { DomesticFinalDemand_df <- model$DomesticFinalDemand } model$U <- as.matrix(dplyr::bind_rows(cbind(model$UseTransactions, - FinalDemand_df, - model$InternationalTradeAdjustment), + FinalDemand_df), model$UseValueAdded)) # Use model$U_d <- as.matrix(dplyr::bind_rows(cbind(model$DomesticUseTransactions, - DomesticFinalDemand_df, - model$InternationalTradeAdjustment), + DomesticFinalDemand_df), model$UseValueAdded)) # DomesticUse colnames(model$U)[which(colnames(model$U)=="model$InternationalTradeAdjustment")] <- model$InternationalTradeAdjustmentMeta$Code_Loc colnames(model$U_d) <- colnames(model$U) @@ -58,6 +56,7 @@ constructEEIOMatrices <- function(model) { model$W <- as.matrix(model$UseValueAdded) model$q <- model$CommodityOutput model$x <- model$IndustryOutput + model$mu <- model$InternationalTradeAdjustment if(model$specs$CommodityorIndustryType == "Commodity") { logging::loginfo("Building commodity-by-commodity A matrix (direct requirements)...") model$A <- model$U_n %*% model$V_n From f7ddf6206d50689f1d9e7faf6da837cbb71e42be Mon Sep 17 00:00:00 2001 From: Ben Young <44471635+bl-young@users.noreply.github.com> Date: Wed, 1 Dec 2021 14:07:08 -0500 Subject: [PATCH 202/319] Update R-CMD-check.yaml only implement actions on pull request to develop or master --- .github/workflows/R-CMD-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index e46a63fb..5e3d525c 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -4,11 +4,11 @@ name: R CI/CD test #R-CMD-check on: push: - # branches: [main, master] + branches: [main, master] paths-ignore: - '**.md' # prevent md files (e.g., README.md) in any repo dir from trigering workflow - '**.bib' - #- '**.ya?ml' # captures both .yml and .yaml + - '**.ya?ml' # captures both .yml and .yaml - 'LICENSE' - '.gitignore' pull_request: From 9472cc51ff8d39026436ca2d889aab14d4b8e0b1 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Wed, 1 Dec 2021 11:32:23 -0800 Subject: [PATCH 203/319] Add international trade adjustment in Model.md --- format_specs/Model.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/format_specs/Model.md b/format_specs/Model.md index 42b99b10..d1548035 100644 --- a/format_specs/Model.md +++ b/format_specs/Model.md @@ -38,6 +38,7 @@ Items are listed in the order in which they appear in a built Model object in R. | U_d | matrix | component matrix | [The domestic Use matrix](#U) | | q | numeric vector | component matrix | [Total output by commodity](#output-vectors) | | x | numeric vector | component matrix | [Total output by industry](#output-vectors) | +| mu | numeric vector | component matrix | [International trade adjustment by commodity](#international-trade-adjustment-vector) | | A | matrix | component matrix | [The direct requirements matrix](#A) | | A_d | matrix | component matrix | [The domestic direct requirements matrix](#A) | | L | matrix | component matrix | [The Leontief inverse matrix](#L) | @@ -201,6 +202,13 @@ commodities +----q----+ industries +----x----+ ``` +#### International Trade Adjustment vector + +`mu` is an international trade adjustment vector containing value of all transportation and insurance services to import and customs duties in model year US dollars. + +``` +commodities +----mu----+ +``` #### V The Make matrix, `V`, is an `industry x commodity` matrix with amounts in commodities in year USD being made by industries. From bb5310c4379dc93759baa907db1fc13e74e3c0d0 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 1 Dec 2021 11:35:42 -0800 Subject: [PATCH 204/319] Add _d to vectors in prepareDomesticProductionDemand function --- R/DemandFunctions.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index 0beb2020..333c5f97 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -63,13 +63,13 @@ prepareProductionDemand <- function(model) { #'@param model, a model #'@return A named vector with demand prepareDomesticProductionDemand <- function(model) { - y_dc <- sumforConsumption(model, model$DomesticFinalDemand) export_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Export", "Code_Loc"] - y_e <- sumDemandCols(model$DomesticFinalDemand, export_code) changeinventories_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="ChangeInventories", "Code_Loc"] + y_d_c <- sumforConsumption(model, model$DomesticFinalDemand) + y_d_e <- sumDemandCols(model$DomesticFinalDemand, export_code) y_d_delta <- sumDemandCols(model$DomesticFinalDemand, changeinventories_code) - y_p <- y_dc + y_e + y_d_delta - return(y_p) + y_d_p <- y_d_c + y_d_e + y_d_delta + return(y_d_p) } #'Prepares a demand vector representing consumption From 3d174b0548dbe94a2d3720c2b85903fb6777604d Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 1 Dec 2021 11:36:10 -0800 Subject: [PATCH 205/319] Remove import demand vector registration --- R/DemandFunctions.R | 2 -- 1 file changed, 2 deletions(-) diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index 333c5f97..20faeabb 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -10,8 +10,6 @@ DemandVectorFunctionRegistry$Production$Domestic <- "prepareDomesticProductionDe DemandVectorFunctionRegistry$Consumption$Complete <- "prepareConsumptionDemand" DemandVectorFunctionRegistry$Consumption$Domestic <- "prepareDomesticConsumptionDemand" DemandVectorFunctionRegistry$Consumption$Household <- "prepareHouseholdDemand" -# Import -DemandVectorFunctionRegistry$Import$Complete <- "prepareImportDemand" #'Sums across sectors for a given set of codes/cols in a given final demand df #'@param Y, a model Demand df From 23bcaa7a89b1eba63f8d2c77e455b313c51980ce Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 1 Dec 2021 11:42:44 -0800 Subject: [PATCH 206/319] Dynamically select demand vectors in validation --- R/ValidateModel.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/ValidateModel.R b/R/ValidateModel.R index 870113cc..e50ab6bd 100644 --- a/R/ValidateModel.R +++ b/R/ValidateModel.R @@ -52,11 +52,11 @@ compareEandLCIResult <- function(model, use_domestic = FALSE, tolerance = 0.05) #'@return c, a numeric vector with total $ values for each sector in model calculateProductofLeontiefAndProductionDemand <- function (model, use_domestic) { if (use_domestic) { - f <- model$DemandVectors$vectors$`2012_US_Production_Domestic` + f <- model$DemandVectors$vectors[endsWith(names(model$DemandVectors$vectors),"Production_Domestic")] y <- as.matrix(formatDemandVector(f, model$L_d)) c <- getScalingVector(model$L_d, y) } else { - f <- model$DemandVectors$vectors$`2012_US_Production_Complete` + f <- model$DemandVectors$vectors[endsWith(names(model$DemandVectors$vectors),"Production_Complete")] y <- as.matrix(formatDemandVector(f, model$L)) c <- getScalingVector(model$L, y) } From e6894b07960192dc58bde7988472e8bf199e11e6 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 1 Dec 2021 12:18:19 -0800 Subject: [PATCH 207/319] Remove prepareImportDemand function --- R/DemandFunctions.R | 10 ---------- man/DemandVectorFunctionRegistry.Rd | 2 +- man/prepareImportDemand.Rd | 17 ----------------- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 man/prepareImportDemand.Rd diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index 20faeabb..73022266 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -96,16 +96,6 @@ prepareHouseholdDemand <- function(model) { return(y_h) } -#'Prepares a demand vector representing imports -#'@param model, a model -#'@return A named vector with demand -prepareImportDemand <- function(model) { - Y <- model$FinalDemand - import_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Import", "Code_Loc"] - y_i <- sumDemandCols(Y, import_code) - return(y_i) -} - #'A function to validate a user provided demand vector #' @param dv a user provided demand vector #' @param L, the L matrix for the given model, used as a reference diff --git a/man/DemandVectorFunctionRegistry.Rd b/man/DemandVectorFunctionRegistry.Rd index a003c467..516089d6 100644 --- a/man/DemandVectorFunctionRegistry.Rd +++ b/man/DemandVectorFunctionRegistry.Rd @@ -6,7 +6,7 @@ \title{Registry of functions that construct various demand vector in the form of as a named list with nested names as keys and function name as values} \format{ -An object of class \code{list} of length 3. +An object of class \code{list} of length 2. } \usage{ DemandVectorFunctionRegistry diff --git a/man/prepareImportDemand.Rd b/man/prepareImportDemand.Rd deleted file mode 100644 index a52125cc..00000000 --- a/man/prepareImportDemand.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/DemandFunctions.R -\name{prepareImportDemand} -\alias{prepareImportDemand} -\title{Prepares a demand vector representing imports} -\usage{ -prepareImportDemand(model) -} -\arguments{ -\item{model, }{a model} -} -\value{ -A named vector with demand -} -\description{ -Prepares a demand vector representing imports -} From 897f1203d12d9f82d8cf9df1a1ceb6bb04c4b638 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 1 Dec 2021 15:05:08 -0800 Subject: [PATCH 208/319] Make f a named numeric vector --- R/ValidateModel.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/ValidateModel.R b/R/ValidateModel.R index e50ab6bd..751fe1db 100644 --- a/R/ValidateModel.R +++ b/R/ValidateModel.R @@ -52,11 +52,11 @@ compareEandLCIResult <- function(model, use_domestic = FALSE, tolerance = 0.05) #'@return c, a numeric vector with total $ values for each sector in model calculateProductofLeontiefAndProductionDemand <- function (model, use_domestic) { if (use_domestic) { - f <- model$DemandVectors$vectors[endsWith(names(model$DemandVectors$vectors),"Production_Domestic")] + f <- model$DemandVectors$vectors[endsWith(names(model$DemandVectors$vectors), "Production_Domestic")][[1]] y <- as.matrix(formatDemandVector(f, model$L_d)) c <- getScalingVector(model$L_d, y) } else { - f <- model$DemandVectors$vectors[endsWith(names(model$DemandVectors$vectors),"Production_Complete")] + f <- model$DemandVectors$vectors[endsWith(names(model$DemandVectors$vectors), "Production_Complete")][[1]] y <- as.matrix(formatDemandVector(f, model$L)) c <- getScalingVector(model$L, y) } From cd3d34d3b9f187261c25b1d6461b8cf45d9ae486 Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Thu, 2 Dec 2021 13:43:36 -0500 Subject: [PATCH 209/319] Remove demand vectors from modelspecs - leave household consumption only in v2.0 and v2.1 --- .../modelspecs/USEEIOv2.0-GHG_nodisagg.yml | 21 +------------ inst/extdata/modelspecs/USEEIOv2.0.1.yml | 22 ++----------- inst/extdata/modelspecs/USEEIOv2.0.yml | 17 +--------- .../modelspecs/USEEIOv2.0_nodisagg.yml | 21 +------------ .../modelspecs/USEEIOv2.0i-GHG_nodisagg.yml | 21 +------------ .../modelspecs/USEEIOv2.0is-GHG_nodisagg.yml | 31 +------------------ inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml | 21 +------------ .../modelspecs/USEEIOv2.0s-GHG_nodisagg.yml | 21 +------------ inst/extdata/modelspecs/USEEIOv2.1.yml | 16 ---------- 9 files changed, 9 insertions(+), 182 deletions(-) diff --git a/inst/extdata/modelspecs/USEEIOv2.0-GHG_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0-GHG_nodisagg.yml index d70acb92..a6742b38 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0-GHG_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-GHG_nodisagg.yml @@ -55,23 +55,4 @@ Indicators: Primary: TRUE DemandVectors: - Consumption: - Type: "Consumption" - Year: 2012 - System: "Complete" - Location: "US" - Production: - Type: "Production" - Year: 2012 - System: "Complete" - Location: "US" - HouseholdConsumption: - Type: "Consumption" - Year: 2012 - System: "Household" - Location: "US" - DomesticConsumption: - Type: "Consumption" - Year: 2012 - System: "Domestic" - Location: "US" +# Additional demand vectors beyond useeior defaults diff --git a/inst/extdata/modelspecs/USEEIOv2.0.1.yml b/inst/extdata/modelspecs/USEEIOv2.0.1.yml index 33b6e581..3769e29f 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0.1.yml @@ -857,24 +857,6 @@ Indicators: Primary: TRUE DemandVectors: - Consumption: - Type: "Consumption" - Year: 2012 - System: "Complete" - Location: "US" - Production: - Type: "Production" - Year: 2012 - System: "Complete" - Location: "US" - HouseholdConsumption: - Type: "Consumption" - Year: 2012 - System: "Household" - Location: "US" - DomesticConsumption: - Type: "Consumption" - Year: 2012 - System: "Domestic" - Location: "US" +# Additional demand vectors beyond useeior defaults + diff --git a/inst/extdata/modelspecs/USEEIOv2.0.yml b/inst/extdata/modelspecs/USEEIOv2.0.yml index e57a675b..68d2765c 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0.yml @@ -857,24 +857,9 @@ Indicators: Primary: TRUE DemandVectors: - Consumption: - Type: "Consumption" - Year: 2012 - System: "Complete" - Location: "US" - Production: - Type: "Production" - Year: 2012 - System: "Complete" - Location: "US" +# Additional demand vectors beyond useeior defaults HouseholdConsumption: Type: "Consumption" Year: 2012 System: "Household" Location: "US" - DomesticConsumption: - Type: "Consumption" - Year: 2012 - System: "Domestic" - Location: "US" - diff --git a/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml index c108afb7..acfd9cd4 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml @@ -857,23 +857,4 @@ Indicators: Primary: TRUE DemandVectors: - Consumption: - Type: "Consumption" - Year: 2012 - System: "Complete" - Location: "US" - Production: - Type: "Production" - Year: 2012 - System: "Complete" - Location: "US" - HouseholdConsumption: - Type: "Consumption" - Year: 2012 - System: "Household" - Location: "US" - DomesticConsumption: - Type: "Consumption" - Year: 2012 - System: "Domestic" - Location: "US" +# Additional demand vectors beyond useeior defaults diff --git a/inst/extdata/modelspecs/USEEIOv2.0i-GHG_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0i-GHG_nodisagg.yml index fcdacbe0..122d9966 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0i-GHG_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0i-GHG_nodisagg.yml @@ -55,23 +55,4 @@ Indicators: Primary: TRUE DemandVectors: - Consumption: - Type: "Consumption" - Year: 2012 - System: "Complete" - Location: "US" - Production: - Type: "Production" - Year: 2012 - System: "Complete" - Location: "US" - HouseholdConsumption: - Type: "Consumption" - Year: 2012 - System: "Household" - Location: "US" - DomesticConsumption: - Type: "Consumption" - Year: 2012 - System: "Domestic" - Location: "US" +# Additional demand vectors beyond useeior defaults diff --git a/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml index 80cad76b..6e46ec6e 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml @@ -55,33 +55,4 @@ Indicators: Primary: TRUE DemandVectors: - Production: - Type: "Production" - Year: 2012 - System: "Complete" - Location: "US" - DomesticProduction: - Type: "Production" - Year: 2012 - System: "Domestic" - Location: "US" - Consumption: - Type: "Consumption" - Year: 2012 - System: "Complete" - Location: "US" - HouseholdConsumption: - Type: "Consumption" - Year: 2012 - System: "Household" - Location: "US" - DomesticConsumption: - Type: "Consumption" - Year: 2012 - System: "Domestic" - Location: "US" - Import: - Type: "Import" - Year: 2012 - System: "Complete" - Location: "US" +# Additional demand vectors beyond useeior defaults diff --git a/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml b/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml index 343a6092..03d5469a 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml @@ -55,23 +55,4 @@ Indicators: Primary: TRUE DemandVectors: - Consumption: - Type: "Consumption" - Year: 2012 - System: "Complete" - Location: "US" - Production: - Type: "Production" - Year: 2012 - System: "Complete" - Location: "US" - HouseholdConsumption: - Type: "Consumption" - Year: 2012 - System: "Household" - Location: "US" - DomesticConsumption: - Type: "Consumption" - Year: 2012 - System: "Domestic" - Location: "US" +# Additional demand vectors beyond useeior defaults diff --git a/inst/extdata/modelspecs/USEEIOv2.0s-GHG_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0s-GHG_nodisagg.yml index cb652847..88346944 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0s-GHG_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0s-GHG_nodisagg.yml @@ -55,23 +55,4 @@ Indicators: Primary: TRUE DemandVectors: - Consumption: - Type: "Consumption" - Year: 2012 - System: "Complete" - Location: "US" - Production: - Type: "Production" - Year: 2012 - System: "Complete" - Location: "US" - HouseholdConsumption: - Type: "Consumption" - Year: 2012 - System: "Household" - Location: "US" - DomesticConsumption: - Type: "Consumption" - Year: 2012 - System: "Domestic" - Location: "US" +# Additional demand vectors beyond useeior defaults diff --git a/inst/extdata/modelspecs/USEEIOv2.1.yml b/inst/extdata/modelspecs/USEEIOv2.1.yml index 9147f28a..65a9fb84 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1.yml @@ -858,24 +858,8 @@ Indicators: Primary: TRUE DemandVectors: - Consumption: - Type: "Consumption" - Year: 2012 - System: "Complete" - Location: "US" - Production: - Type: "Production" - Year: 2012 - System: "Complete" - Location: "US" HouseholdConsumption: Type: "Consumption" Year: 2012 System: "Household" Location: "US" - DomesticConsumption: - Type: "Consumption" - Year: 2012 - System: "Domestic" - Location: "US" - From 32df3e903b4d2bef9481e1189b027df3c2a5c07f Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Thu, 2 Dec 2021 14:03:32 -0500 Subject: [PATCH 210/319] Load default demand vectors; removes need to include these defaults in the model spec files -gets meta from new csv for demands to load by default - uses new function -moves ID generation to function to work for defaults and model specified demands --- R/LoadDemandVectors.R | 63 +++++++++++++++++++++---- inst/extdata/default_demand_vectors.csv | 5 ++ man/createDemandID.Rd | 18 +++++++ man/loadDefaultDemandVectorMeta.Rd | 19 ++++++++ man/loadDemandVectors.Rd | 6 +-- 5 files changed, 98 insertions(+), 13 deletions(-) create mode 100644 inst/extdata/default_demand_vectors.csv create mode 100644 man/createDemandID.Rd create mode 100644 man/loadDefaultDemandVectorMeta.Rd diff --git a/R/LoadDemandVectors.R b/R/LoadDemandVectors.R index a78e9a00..3ef0642e 100644 --- a/R/LoadDemandVectors.R +++ b/R/LoadDemandVectors.R @@ -1,32 +1,75 @@ -#' Adds demand vectors and metadata based on model specs to model object +#' Adds demand vectors and metadata based on useeior defaults and model specs to model object #' @param model A model list object with the specs object listed -#' @return model with a list of demand vectors and a meta file +#' @return model with a list of demand vectors and a meta file stored appended as model$DemandVectors loadDemandVectors <- function(model) { - logging::loginfo("Loading demand vectors from model spec...") + logging::loginfo("Loading demand vectors ...") model$DemandVectors <- list() - meta <- data.frame() model$DemandVectors$vectors <- list() + meta <- loadDefaultDemandVectorMeta(model) + specs <- model$specs$DemandVectors for (v in names(specs)) { - # Populate metadata i <- specs[[v]] i["Name"] <- v - i["ID"] <- paste(i$Year,i$Location,i$Type,i$System,sep="_") - meta <- rbind(meta,data.frame(i, stringsAsFactors = FALSE) ) + i["ID"] <- createDemandID(i) + #check to see that this id doesn't already exist + if (i["ID"] %in% meta$ID) { + logging::logwarn(paste("A demand vector with ID =", i["ID"], "already exists. A new one will not be created.")) + } else { + #add this to the df of demand vectors + meta <- rbind(meta,data.frame(i, stringsAsFactors = FALSE) ) + } + } + for (row in 1:nrow(meta)) { #Check if the demand is registered + i <- meta[row,] if (!is.null(DemandVectorFunctionRegistry[[i$Type]][[i$System]])) { - logging::loginfo(paste("Loading", v, "demand vector...")) + logging::loginfo(paste("Loading", i["Name"], "demand vector...")) func_to_eval <- DemandVectorFunctionRegistry[[i$Type]][[i$System]] demandFunction <- as.name(func_to_eval) dv <- do.call(eval(demandFunction), list(model)) model$DemandVectors$vectors[[i$ID]] <- dv } else { - stop(paste(v, "not found in registered demand vector functions. This vector must be registered or removed from the model spec.")) + stop(paste(i$Type,i$System,"not found in registered demand vector functions. This vector must be registered or removed from the model spec.")) } } + model$DemandVectors$meta <- meta return(model) } - \ No newline at end of file + +#' Loads a package stored csv of demand vector meta for vectors to be created for every model with type and system specified +#' This function adds additional year, location and IDs along with the type and system based on the model given +#' @param model An EEIO model that has been initialized +#' @return a data frame of metadata with cols Type, System, Name, Year, Location and ID with rows for each default +loadDefaultDemandVectorMeta <- function(model) { + meta <- data.frame(Type=character(), + System=character(), + Name=character(), + Year=character(), + Location=character(), + ID=character()) + demands <- utils::read.table(system.file("extdata", "default_demand_vectors.csv", package = "useeior"), + sep = ",", header = TRUE, stringsAsFactors = FALSE) + for (row in 1:nrow(demands)) { + i <- demands[row,] + i["Name"] <- paste0(i$Type,"_",i$System) + i["Year"] <- model$specs$IOYear + i["Location"] <- model$specs$ModelRegionAcronyms[1] + i["ID"] <- createDemandID(i) + meta <- rbind(meta,data.frame(i, stringsAsFactors = FALSE) ) + } + return(meta) +} + +#' Creates an ID for a demand vector based on user provided demandmeta data +#' @param demandmeta, a data frame of metadata with one row for a demand with +#' columns Type, System, Name, Year, Location and ID +#' @return character vector with a name +createDemandID <- function(demandmeta) { + i <- demandmeta + ID <- paste(i$Year,i$Location,i$Type,i$System,sep="_") + return(ID) +} diff --git a/inst/extdata/default_demand_vectors.csv b/inst/extdata/default_demand_vectors.csv new file mode 100644 index 00000000..ce4b089d --- /dev/null +++ b/inst/extdata/default_demand_vectors.csv @@ -0,0 +1,5 @@ +Type,System +Production,Complete +Production,Domestic +Consumption,Complete +Consumption,Domestic diff --git a/man/createDemandID.Rd b/man/createDemandID.Rd new file mode 100644 index 00000000..eacf3d6c --- /dev/null +++ b/man/createDemandID.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/LoadDemandVectors.R +\name{createDemandID} +\alias{createDemandID} +\title{Creates an ID for a demand vector based on user provided demandmeta data} +\usage{ +createDemandID(demandmeta) +} +\arguments{ +\item{demandmeta, }{a data frame of metadata with one row for a demand with +columns Type, System, Name, Year, Location and ID} +} +\value{ +character vector with a name +} +\description{ +Creates an ID for a demand vector based on user provided demandmeta data +} diff --git a/man/loadDefaultDemandVectorMeta.Rd b/man/loadDefaultDemandVectorMeta.Rd new file mode 100644 index 00000000..9fb53e20 --- /dev/null +++ b/man/loadDefaultDemandVectorMeta.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/LoadDemandVectors.R +\name{loadDefaultDemandVectorMeta} +\alias{loadDefaultDemandVectorMeta} +\title{Loads a package stored csv of demand vector meta for vectors to be created for every model with type and system specified +This function adds additional year, location and IDs along with the type and system based on the model given} +\usage{ +loadDefaultDemandVectorMeta(model) +} +\arguments{ +\item{model}{An EEIO model that has been initialized} +} +\value{ +a data frame of metadata with cols Type, System, Name, Year, Location and ID with rows for each default +} +\description{ +Loads a package stored csv of demand vector meta for vectors to be created for every model with type and system specified +This function adds additional year, location and IDs along with the type and system based on the model given +} diff --git a/man/loadDemandVectors.Rd b/man/loadDemandVectors.Rd index a4a19e41..e23e6896 100644 --- a/man/loadDemandVectors.Rd +++ b/man/loadDemandVectors.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/LoadDemandVectors.R \name{loadDemandVectors} \alias{loadDemandVectors} -\title{Adds demand vectors and metadata based on model specs to model object} +\title{Adds demand vectors and metadata based on useeior defaults and model specs to model object} \usage{ loadDemandVectors(model) } @@ -10,8 +10,8 @@ loadDemandVectors(model) \item{model}{A model list object with the specs object listed} } \value{ -model with a list of demand vectors and a meta file +model with a list of demand vectors and a meta file stored appended as model$DemandVectors } \description{ -Adds demand vectors and metadata based on model specs to model object +Adds demand vectors and metadata based on useeior defaults and model specs to model object } From 3cc129680e326ebab9c434523d95775ff2c100b3 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 2 Dec 2021 11:18:29 -0800 Subject: [PATCH 211/319] Update selection of demand vector in compareCommodityOutputandDomesticUseplusProductionDemand function --- R/ValidateModel.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/ValidateModel.R b/R/ValidateModel.R index 751fe1db..4bc6c769 100644 --- a/R/ValidateModel.R +++ b/R/ValidateModel.R @@ -103,8 +103,7 @@ compareOutputandLeontiefXDemand <- function(model, use_domestic=FALSE, tolerance compareCommodityOutputandDomesticUseplusProductionDemand <- function(model, tolerance=0.05) { q <- model$q x <- rowSums(model$U_d[model$Commodities$Code_Loc, model$Industries$Code_Loc]) + - model$DemandVectors$vectors[[paste(model$specs$DemandVectors$Production[c("Year", "Location", "Type", "System")], - collapse = "_")]] + model$DemandVectors$vectors[endsWith(names(model$DemandVectors$vectors), "Production_Domestic")][[1]] # Row names should be identical if (!identical(names(q), names(x))) { stop("Sectors not aligned in model ouput variable and calculation result") From 00743646408bfeedeca0d2a4da26d3d0f51c4054 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Thu, 2 Dec 2021 11:42:15 -0800 Subject: [PATCH 212/319] Update Model.md Move B to under Model Result Matrices --- format_specs/Model.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/format_specs/Model.md b/format_specs/Model.md index c3c4aec3..d61a338d 100644 --- a/format_specs/Model.md +++ b/format_specs/Model.md @@ -259,19 +259,6 @@ sectors | | The related `L_d` matrix provides direct + indirect sector inputs per dollar output that are only from the US. -#### B -The satellite matrix `B` is a `flow x sector` matrix and contains in -each column `i` the amount of a flow given in the reference -units of the respective flow per 1 USD output from sector `i`: - -``` - sectors - +-------+ -flows | | - | B | - +-------+ -``` - #### C In the matrix `C`, each column `k` contains the characterization factors of the different indicators related to one reference unit of flow `k`: @@ -310,6 +297,19 @@ flows | | ### Model Result Matrices +#### B +The satellite matrix `B` is a `flow x sector` matrix and contains in +each column `i` the amount of a flow given in the reference +units of the respective flow per 1 USD output from sector `i`: + +``` + sectors + +-------+ +flows | | + | B | + +-------+ +``` + #### D The matrix `D` contains in each column `i` the direct impact result per USD output from sector `i`: From 52edfe1ae1d4403c479ed645f1f457f4651d1266 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 2 Dec 2021 12:15:41 -0800 Subject: [PATCH 213/319] default_demand_vectors.csv -> DefaultDemandVectors.yml --- inst/extdata/default_demand_vectors.csv | 5 ----- inst/extdata/demandspecs/DefaultDemandVectors.yml | 12 ++++++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) delete mode 100644 inst/extdata/default_demand_vectors.csv create mode 100644 inst/extdata/demandspecs/DefaultDemandVectors.yml diff --git a/inst/extdata/default_demand_vectors.csv b/inst/extdata/default_demand_vectors.csv deleted file mode 100644 index ce4b089d..00000000 --- a/inst/extdata/default_demand_vectors.csv +++ /dev/null @@ -1,5 +0,0 @@ -Type,System -Production,Complete -Production,Domestic -Consumption,Complete -Consumption,Domestic diff --git a/inst/extdata/demandspecs/DefaultDemandVectors.yml b/inst/extdata/demandspecs/DefaultDemandVectors.yml new file mode 100644 index 00000000..3cd15dde --- /dev/null +++ b/inst/extdata/demandspecs/DefaultDemandVectors.yml @@ -0,0 +1,12 @@ +CompleteProduction: + Type: "Production" + System: "Complete" +DomesticProduction: + Type: "Production" + System: "Domestic" +CompleteConsumption: + Type: "Consumption" + System: "Complete" +DomesticConsumption: + Type: "Consumption" + System: "Domestic" From a2516d679d5ddb6a0d8765f8fefec5847ea37980 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 2 Dec 2021 12:18:37 -0800 Subject: [PATCH 214/319] Modify loadDefaultDemandVectorMeta function to load DefaultDemandVectors.yml --- R/LoadDemandVectors.R | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/R/LoadDemandVectors.R b/R/LoadDemandVectors.R index 3ef0642e..06c099b0 100644 --- a/R/LoadDemandVectors.R +++ b/R/LoadDemandVectors.R @@ -8,7 +8,7 @@ loadDemandVectors <- function(model) { meta <- loadDefaultDemandVectorMeta(model) specs <- model$specs$DemandVectors - for (v in names(specs)) { + for (v in setdiff(names(specs), "DefaultDemand")) { # Populate metadata i <- specs[[v]] i["Name"] <- v @@ -45,21 +45,16 @@ loadDemandVectors <- function(model) { #' @param model An EEIO model that has been initialized #' @return a data frame of metadata with cols Type, System, Name, Year, Location and ID with rows for each default loadDefaultDemandVectorMeta <- function(model) { - meta <- data.frame(Type=character(), - System=character(), - Name=character(), - Year=character(), - Location=character(), - ID=character()) - demands <- utils::read.table(system.file("extdata", "default_demand_vectors.csv", package = "useeior"), - sep = ",", header = TRUE, stringsAsFactors = FALSE) - for (row in 1:nrow(demands)) { - i <- demands[row,] - i["Name"] <- paste0(i$Type,"_",i$System) + meta <- data.frame() + specs <- getConfiguration("DefaultDemandVectors", "demand") + for (v in names(specs)) { + # Populate metadata + i <- specs[[v]] + i["Name"] <- v i["Year"] <- model$specs$IOYear i["Location"] <- model$specs$ModelRegionAcronyms[1] i["ID"] <- createDemandID(i) - meta <- rbind(meta,data.frame(i, stringsAsFactors = FALSE) ) + meta <- rbind(meta, as.data.frame(i, stringsAsFactors = FALSE)) } return(meta) } From a42524b4885704625822cc00838aac67ca06ae4d Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 2 Dec 2021 12:19:07 -0800 Subject: [PATCH 215/319] Add DefaultDemand in model specs --- inst/extdata/modelspecs/USEEIOv2.0-GHG_nodisagg.yml | 1 + inst/extdata/modelspecs/USEEIOv2.0.1.yml | 1 + inst/extdata/modelspecs/USEEIOv2.0.yml | 1 + inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml | 1 + inst/extdata/modelspecs/USEEIOv2.0i-GHG_nodisagg.yml | 1 + inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml | 1 + inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml | 1 + inst/extdata/modelspecs/USEEIOv2.0s-GHG_nodisagg.yml | 1 + inst/extdata/modelspecs/USEEIOv2.1.yml | 2 ++ 9 files changed, 10 insertions(+) diff --git a/inst/extdata/modelspecs/USEEIOv2.0-GHG_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0-GHG_nodisagg.yml index a6742b38..a1c92a85 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0-GHG_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-GHG_nodisagg.yml @@ -55,4 +55,5 @@ Indicators: Primary: TRUE DemandVectors: + DefaultDemand: "DefaultDemandVectors" # Name of default demand vectors yml file # Additional demand vectors beyond useeior defaults diff --git a/inst/extdata/modelspecs/USEEIOv2.0.1.yml b/inst/extdata/modelspecs/USEEIOv2.0.1.yml index 3769e29f..ca9b45b4 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0.1.yml @@ -857,6 +857,7 @@ Indicators: Primary: TRUE DemandVectors: + DefaultDemand: "DefaultDemandVectors" # Name of default demand vectors yml file # Additional demand vectors beyond useeior defaults diff --git a/inst/extdata/modelspecs/USEEIOv2.0.yml b/inst/extdata/modelspecs/USEEIOv2.0.yml index 68d2765c..a7d34e5f 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0.yml @@ -857,6 +857,7 @@ Indicators: Primary: TRUE DemandVectors: + DefaultDemand: "DefaultDemandVectors" # Name of default demand vectors yml file # Additional demand vectors beyond useeior defaults HouseholdConsumption: Type: "Consumption" diff --git a/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml index acfd9cd4..037f177d 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml @@ -857,4 +857,5 @@ Indicators: Primary: TRUE DemandVectors: + DefaultDemand: "DefaultDemandVectors" # Name of default demand vectors yml file # Additional demand vectors beyond useeior defaults diff --git a/inst/extdata/modelspecs/USEEIOv2.0i-GHG_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0i-GHG_nodisagg.yml index 122d9966..161b59cf 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0i-GHG_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0i-GHG_nodisagg.yml @@ -55,4 +55,5 @@ Indicators: Primary: TRUE DemandVectors: + DefaultDemand: "DefaultDemandVectors" # Name of default demand vectors yml file # Additional demand vectors beyond useeior defaults diff --git a/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml index 6e46ec6e..d8e18a9c 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml @@ -55,4 +55,5 @@ Indicators: Primary: TRUE DemandVectors: + DefaultDemand: "DefaultDemandVectors" # Name of default demand vectors yml file # Additional demand vectors beyond useeior defaults diff --git a/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml b/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml index 03d5469a..e43cd95a 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml @@ -55,4 +55,5 @@ Indicators: Primary: TRUE DemandVectors: + DefaultDemand: "DefaultDemandVectors" # Name of default demand vectors yml file # Additional demand vectors beyond useeior defaults diff --git a/inst/extdata/modelspecs/USEEIOv2.0s-GHG_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0s-GHG_nodisagg.yml index 88346944..cd7ba9c5 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0s-GHG_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0s-GHG_nodisagg.yml @@ -55,4 +55,5 @@ Indicators: Primary: TRUE DemandVectors: + DefaultDemand: "DefaultDemandVectors" # Name of default demand vectors yml file # Additional demand vectors beyond useeior defaults diff --git a/inst/extdata/modelspecs/USEEIOv2.1.yml b/inst/extdata/modelspecs/USEEIOv2.1.yml index 65a9fb84..41d05423 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1.yml @@ -858,6 +858,8 @@ Indicators: Primary: TRUE DemandVectors: + DefaultDemand: "DefaultDemandVectors" # Name of default demand vectors yml file +# Additional demand vectors beyond useeior defaults HouseholdConsumption: Type: "Consumption" Year: 2012 From 8eaaf75dd4d6ad3aa769029bd06f89d03bc43768 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 2 Dec 2021 14:51:34 -0800 Subject: [PATCH 216/319] Remove unused model component --- R/BuildModel.R | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 206dfc61..b7ef7840 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -53,7 +53,6 @@ constructEEIOMatrices <- function(model) { function(x) ifelse(is.na(x), 0, x)) model$U_n <- generateDirectRequirementsfromUse(model, domestic = FALSE) #normalized Use model$U_d_n <- generateDirectRequirementsfromUse(model, domestic = TRUE) #normalized DomesticUse - model$W <- as.matrix(model$UseValueAdded) model$q <- model$CommodityOutput model$x <- model$IndustryOutput model$mu <- model$InternationalTradeAdjustment @@ -117,13 +116,13 @@ constructEEIOMatrices <- function(model) { mat_to_remove <- c("MakeTransactions", "UseTransactions", "DomesticUseTransactions", "UseValueAdded", "FinalDemand", "DomesticFinalDemand", "InternationalTradeAdjustment", "CommodityOutput", "IndustryOutput", - "U_n","U_d_n","W") + "U_n", "U_d_n") if (model$specs$CommodityorIndustryType=="Industry") { mat_to_remove <- c(mat_to_remove, c("FinalDemandbyCommodity", "DomesticFinalDemandbyCommodity", "InternationalTradeAdjustmentbyCommodity")) } - model <- within(model, rm(list=mat_to_remove)) + model <- within(model, rm(list = mat_to_remove)) logging::loginfo("Model build complete.") return(model) From 7415fe957153e0c6ca734616ee6015a22dc22376 Mon Sep 17 00:00:00 2001 From: Wesley Ingwersen Date: Fri, 3 Dec 2021 08:34:49 -0500 Subject: [PATCH 217/319] beta->stable and Grammar/style updates to README --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 48406ced..18c50c64 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ `useeior` is an R package for building and using [USEEIO models](https://www.epa.gov/land-research/us-environmentally-extended-input-output-useeio-models). The [model object](format_specs/Model.md) is the primary output that is built according to a given [model specification](format_specs/ModelSpecification.md) and optional [disaggregation specification](format_specs/DisaggregationSpecification.md). [Model specifications](inst/extdata/modelspecs) and associated [disaggregation specifications](inst/extdata/disaggspecs) for EPA-validated models are included in the package. The package offers various functions for validating, calculating, visualizing, and writing out models and/or their components. `useeior` is a core component of the [USEEIO Modeling Framework](https://github.com/USEPA/useeio). -`useeior` is in a beta development state. See [Releases](https://github.com/USEPA/useeior/releases) for working and tested versions. +`useeior` is in a stable development state. Users intending to use the package for production purposes and applications should use [Releases](https://github.com/USEPA/useeior/releases). See the following sections for installation and basic usage of `useeior`. See [Wiki](https://github.com/USEPA/useeior/wiki) for advanced uses, details about built-in data and metadata and how to contribute to `useeior`. @@ -43,7 +43,7 @@ This generates a complete USEEIO model with components described in the [Model]( ### Adjust Price Year and Type of Model Results -Adjust model results (e.g. `N` matrix) to user-specified price year (e.g. `2018`) and type (producer's or purchaser's) +Adjust model results (e.g. `N` matrix) to user-specified price year (e.g. `2018`) and type (producer's or purchaser's). ``` N_adj <- useeior::adjustResultMatrixPrice("N", @@ -54,7 +54,7 @@ N_adj <- useeior::adjustResultMatrixPrice("N", ### Calculate Model LCI and LCIA -Calculate model life cycle inventory (LCI) and life cycle impact assessment (LCIA) results under user-specified perspective, demand vector and direct requirements +Calculate model life cycle inventory (LCI) and life cycle impact assessment (LCIA) results under user-specified perspective, demand vector (from DemandVectors in the model object or a user-provided vector) and a selected direct requirements matrix (complete or domestic). ``` result <- useeior::calculateEEIOModel(model, @@ -65,12 +65,12 @@ result <- useeior::calculateEEIOModel(model, ### Write Model Results to File -Write selected model matrices, demand vectors, and metadata as one `.xlsx` file to output folder +Write selected model matrices, demand vectors, and metadata as one `.xlsx` file to a given output folder. ``` useeior::writeModeltoXLSX(model, outputfolder) ``` -Write model matrices as `.csv` files to output folder +Write model matrices as `.csv` files to a given output folder. ``` useeior::writeModelMatrices(model, to_format = "csv", outputfolder) ``` @@ -79,7 +79,7 @@ useeior::writeModelMatrices(model, to_format = "csv", outputfolder) Once a model is built, model results can be validated, exported, and visualized for further applications. -Complete list of available functions for calculating, validating, exporting and visualizing model can be found [here](https://github.com/USEPA/useeior/wiki/Using-useeior#calculate-validate-export-visualize-model) in Wiki. +A complete list of available functions for calculating, validating, exporting and visualizing model can be found [here](https://github.com/USEPA/useeior/wiki/Using-useeior#calculate-validate-export-visualize-model) in the Wiki. ## Disclaimer From 373429ab951e9b8023ad25541f5d1a7236f1f623 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 3 Dec 2021 09:36:30 -0800 Subject: [PATCH 218/319] Update calculateEEIOModel default parameter: demand = "Production" -> "CompleteProduction"; give example in function doc --- R/CalculationFunctions.R | 4 ++-- man/calculateEEIOModel.Rd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 2236bf82..cb59519a 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -4,13 +4,13 @@ #' for a given perspective and demand vector. #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param perspective Perspective of the model, can be "DIRECT", "INTERMEDIATE", or "FINAL". -#' @param demand A demand vector, can be name of a built-in model demand vector +#' @param demand A demand vector, can be name of a built-in model demand vector, e.g. "CompleteProduction", #' or an actual demand vector with names as one or more model sectors and #' numeric values in USD with the same dollar year as model. #' @param use_domestic_requirements A logical value: if TRUE, use domestic A_d; if FALSE, use A matrices. #' @export #' @return A list with LCI and LCIA results (in data.frame format) of the EEIO model. -calculateEEIOModel <- function(model, perspective, demand = "Production", use_domestic_requirements = FALSE) { +calculateEEIOModel <- function(model, perspective, demand = "CompleteProduction", use_domestic_requirements = FALSE) { result <- list() # Generate Total Requirements (L or L_d) matrix based on whether "use_domestic" if (use_domestic_requirements) { diff --git a/man/calculateEEIOModel.Rd b/man/calculateEEIOModel.Rd index 2933619b..02cfd653 100644 --- a/man/calculateEEIOModel.Rd +++ b/man/calculateEEIOModel.Rd @@ -8,7 +8,7 @@ for a given perspective and demand vector.} calculateEEIOModel( model, perspective, - demand = "Production", + demand = "CompleteProduction", use_domestic_requirements = FALSE ) } @@ -17,7 +17,7 @@ calculateEEIOModel( \item{perspective}{Perspective of the model, can be "DIRECT", "INTERMEDIATE", or "FINAL".} -\item{demand}{A demand vector, can be name of a built-in model demand vector +\item{demand}{A demand vector, can be name of a built-in model demand vector, e.g. "CompleteProduction", or an actual demand vector with names as one or more model sectors and numeric values in USD with the same dollar year as model.} From 1921db9f40b9818b435c32f9e5e0731d069b5c96 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 3 Dec 2021 11:25:05 -0800 Subject: [PATCH 219/319] Clean up calculation functions code --- R/CalculationFunctions.R | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index cb59519a..a6105dba 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -87,9 +87,8 @@ getScalingVector <- function(L, demand) { #' Journal of Cleaner Production 158 (August): 308–18. https://doi.org/10.1016/j.jclepro.2017.04.150. #' SI1, Equation 8. calculateDirectPerspectiveLCI <- function(B, c) { - m_d <- B %*% diag(as.vector(c), nrow(c)) + m_d <- t(B %*% diag(as.vector(c), nrow(c))) colnames(m_d) <- rownames(c) - m_d <- t(m_d) return(m_d) } @@ -103,8 +102,7 @@ calculateDirectPerspectiveLCI <- function(B, c) { #' Journal of Cleaner Production 158 (August): 308–18. https://doi.org/10.1016/j.jclepro.2017.04.150. #' SI1, Equation 8. calculateFinalPerspectiveLCI <- function(M, y) { - lci_f <- M %*% diag(as.vector(y)) - lci_f <- t(lci_f) + lci_f <- t(M %*% diag(as.vector(y))) colnames(lci_f) <- rownames(M) rownames(lci_f) <- colnames(M) return(lci_f) @@ -120,9 +118,8 @@ calculateFinalPerspectiveLCI <- function(M, y) { #' Journal of Cleaner Production 158 (August): 308–18. https://doi.org/10.1016/j.jclepro.2017.04.150. #' SI1, Equation 8. calculateDirectPerspectiveLCIA <- function(B, C, c) { - lcia_d <- C %*% (B %*% diag(as.vector(c), nrow(c))) + lcia_d <- t(C %*% (B %*% diag(as.vector(c), nrow(c)))) colnames(lcia_d) <- rownames(c) - lcia_d <- t(lcia_d) return(lcia_d) } @@ -136,8 +133,7 @@ calculateDirectPerspectiveLCIA <- function(B, C, c) { #' Journal of Cleaner Production 158 (August): 308–18. https://doi.org/10.1016/j.jclepro.2017.04.150. #' SI1, Equation 8. calculateFinalPerspectiveLCIA <- function(N, y) { - lcia_f <- N %*% diag(as.vector(y)) - lcia_f <- t(lcia_f) + lcia_f <- t(N %*% diag(as.vector(y))) colnames(lcia_f) <- rownames(N) rownames(lcia_f) <- colnames(N) return(lcia_f) From cdf443a7a3497f5c4e94abed2a66e7e1e1ffd7e3 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 3 Dec 2021 11:40:36 -0800 Subject: [PATCH 220/319] Correct row and column name assignments --- R/CalculationFunctions.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index a6105dba..2061318d 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -88,7 +88,7 @@ getScalingVector <- function(L, demand) { #' SI1, Equation 8. calculateDirectPerspectiveLCI <- function(B, c) { m_d <- t(B %*% diag(as.vector(c), nrow(c))) - colnames(m_d) <- rownames(c) + rownames(m_d) <- rownames(c) return(m_d) } @@ -119,7 +119,7 @@ calculateFinalPerspectiveLCI <- function(M, y) { #' SI1, Equation 8. calculateDirectPerspectiveLCIA <- function(B, C, c) { lcia_d <- t(C %*% (B %*% diag(as.vector(c), nrow(c)))) - colnames(lcia_d) <- rownames(c) + rownames(lcia_d) <- rownames(c) return(lcia_d) } From 5a83c7b539fcad883bfcc97d0cb72b3fd9de8e4b Mon Sep 17 00:00:00 2001 From: Mo Li Date: Fri, 3 Dec 2021 12:44:29 -0800 Subject: [PATCH 221/319] Update README.md demand = "Production" -> demand = "CompleteProduction" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 18c50c64..05d3b3d8 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Calculate model life cycle inventory (LCI) and life cycle impact assessment (LCI ``` result <- useeior::calculateEEIOModel(model, perspective = "DIRECT", - demand = "Production", + demand = "CompleteProduction", use_domestic_requirements = FALSE) ``` From 80de29c58666e1ddd20a6712ec4b947dd3b403fa Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 3 Dec 2021 16:49:58 -0500 Subject: [PATCH 222/319] update env disaggregation for electricity to account for changes in gen mix between 2016 and 2012 (see USEEIO-1213) --- .../ElectricityDisaggregation_Env.csv | 2484 ++++++++--------- 1 file changed, 1242 insertions(+), 1242 deletions(-) diff --git a/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv b/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv index dfb476fc..8749faef 100644 --- a/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv +++ b/inst/extdata/disaggspecs/ElectricityDisaggregation_Env.csv @@ -1,1402 +1,1402 @@ "Flowable","Context","FlowUUID","Sector","FlowRatio" "1-Butanol","emission/air","4d774f37-eb69-3045-80c4-6b3f57c6fddd","22111B",1 "1-Butanol","emission/ground","518c3bcc-ac29-3302-9159-20a1350e0c86","22111B",1 -"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","221111",0.00530866998637146 -"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","221113",0.000705206334189522 -"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","221115",0.000166941758575884 -"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","22111A",8.81507917736903e-05 -"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","22111B",0.993731031129089 -"1,1-Dichloroethane","emission/air","ad60660d-a560-3357-b658-773a915bfb92","221117",0.954932954683608 -"1,1-Dichloroethane","emission/air","ad60660d-a560-3357-b658-773a915bfb92","22111A",0.0450670453163923 -"1,1-Dichloroethylene","emission/air","af1f4d83-5b7d-3b3f-b9a9-a95e80daf466","221117",0.649196061827387 -"1,1-Dichloroethylene","emission/air","af1f4d83-5b7d-3b3f-b9a9-a95e80daf466","22111A",0.350803938172613 -"1,1-Dichloroethylene","emission/water","7a2c7e46-dbf6-34ff-8b7d-a434506535b2","22111A",0.551781551781552 -"1,1-Dichloroethylene","emission/water","7a2c7e46-dbf6-34ff-8b7d-a434506535b2","22111B",0.448218448218448 +"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","221115",0.000115278548857363 +"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","22111B",0.992821198743229 +"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","221113",0.00075637935187089 +"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","221111",0.0061861738147165 +"1-Methylnaphthalene","emission/air","194ca21a-3be0-3c2b-b788-e5e24cfc988d","22111A",0.000120969541326469 +"1,1-Dichloroethane","emission/air","ad60660d-a560-3357-b658-773a915bfb92","221117",0.935467467146318 +"1,1-Dichloroethane","emission/air","ad60660d-a560-3357-b658-773a915bfb92","22111A",0.0645325328536824 +"1,1-Dichloroethylene","emission/air","af1f4d83-5b7d-3b3f-b9a9-a95e80daf466","221117",0.558701620645749 +"1,1-Dichloroethylene","emission/air","af1f4d83-5b7d-3b3f-b9a9-a95e80daf466","22111A",0.441298379354251 +"1,1-Dichloroethylene","emission/water","7a2c7e46-dbf6-34ff-8b7d-a434506535b2","22111B",0.371619032090075 +"1,1-Dichloroethylene","emission/water","7a2c7e46-dbf6-34ff-8b7d-a434506535b2","22111A",0.628380967909925 "1,1-Dimethylhydrazine","emission/air","d5124a15-fd4d-3dfa-a02c-a9a32d8c336c","22111B",1 -"1,1,1-Trichloroethane","emission/air","0c56aee4-7e22-3e85-8e83-34829f3e8304","221117",0.665956229790924 -"1,1,1-Trichloroethane","emission/air","0c56aee4-7e22-3e85-8e83-34829f3e8304","22111A",0.257683461923826 -"1,1,1-Trichloroethane","emission/air","0c56aee4-7e22-3e85-8e83-34829f3e8304","22111B",0.0762365414738291 -"1,1,1-Trichloroethane","emission/air","0c56aee4-7e22-3e85-8e83-34829f3e8304","22111C",0.000123766811421117 +"1,1,1-Trichloroethane","emission/air","0c56aee4-7e22-3e85-8e83-34829f3e8304","22111C",0.000150454408717952 +"1,1,1-Trichloroethane","emission/air","0c56aee4-7e22-3e85-8e83-34829f3e8304","221117",0.592532197443817 +"1,1,1-Trichloroethane","emission/air","0c56aee4-7e22-3e85-8e83-34829f3e8304","22111B",0.0721847814174067 +"1,1,1-Trichloroethane","emission/air","0c56aee4-7e22-3e85-8e83-34829f3e8304","22111A",0.335132566730059 "1,1,1-Trichloroethane","emission/water","23bc29c9-5fa5-3269-b560-1d4b7a20842d","22111B",1 -"1,1,2-Trichloroethane","emission/air","2e6af10c-ada7-3e44-9243-3fc7dd9f580d","221117",0.629025250651619 -"1,1,2-Trichloroethane","emission/air","2e6af10c-ada7-3e44-9243-3fc7dd9f580d","22111A",0.363733532881317 -"1,1,2-Trichloroethane","emission/air","2e6af10c-ada7-3e44-9243-3fc7dd9f580d","22111B",0.00724121646706408 -"1,1,2,2-Tetrachloroethane","emission/air","93c46787-fe26-3ebd-84b1-25ae486ef58d","221114",0.0129274449691907 -"1,1,2,2-Tetrachloroethane","emission/air","93c46787-fe26-3ebd-84b1-25ae486ef58d","221117",0.935338945720704 -"1,1,2,2-Tetrachloroethane","emission/air","93c46787-fe26-3ebd-84b1-25ae486ef58d","22111A",0.0508581218365174 -"1,1,2,2-Tetrachloroethane","emission/air","93c46787-fe26-3ebd-84b1-25ae486ef58d","22111B",0.000875487473587575 +"1,1,2-Trichloroethane","emission/air","2e6af10c-ada7-3e44-9243-3fc7dd9f580d","221117",0.538361256533088 +"1,1,2-Trichloroethane","emission/air","2e6af10c-ada7-3e44-9243-3fc7dd9f580d","22111B",0.00659528307174184 +"1,1,2-Trichloroethane","emission/air","2e6af10c-ada7-3e44-9243-3fc7dd9f580d","22111A",0.45504346039517 +"1,1,2,2-Tetrachloroethane","emission/air","93c46787-fe26-3ebd-84b1-25ae486ef58d","221117",0.923923533077993 +"1,1,2,2-Tetrachloroethane","emission/air","93c46787-fe26-3ebd-84b1-25ae486ef58d","22111B",0.000920307876834599 +"1,1,2,2-Tetrachloroethane","emission/air","93c46787-fe26-3ebd-84b1-25ae486ef58d","221114",0.00172318003829087 +"1,1,2,2-Tetrachloroethane","emission/air","93c46787-fe26-3ebd-84b1-25ae486ef58d","22111A",0.073432979006882 "1,2-Dibromo-3-chloropropane","emission/air","707d6cd3-d2d2-383e-9852-bf063efcd75c","22111A",1 -"1,2-Dichloroethane","emission/air","c2d517e6-4c5d-3002-8a0d-54434c5a3bae","221117",0.0958901468219984 -"1,2-Dichloroethane","emission/air","c2d517e6-4c5d-3002-8a0d-54434c5a3bae","22111A",0.887215829553104 -"1,2-Dichloroethane","emission/air","c2d517e6-4c5d-3002-8a0d-54434c5a3bae","22111B",0.0159948796717226 -"1,2-Dichloroethane","emission/air","c2d517e6-4c5d-3002-8a0d-54434c5a3bae","22111C",0.000899143953175124 -"1,2-Dichloroethane","emission/water","b7503034-5946-3ef9-8fa9-ec016ce41da9","22111A",0.787783298994061 -"1,2-Dichloroethane","emission/water","b7503034-5946-3ef9-8fa9-ec016ce41da9","22111B",0.212216701005939 -"1,2-Dichloropropane","emission/air","3e75730b-5d6d-3dc1-8911-c7fdfe0e5190","221117",0.526030999557496 -"1,2-Dichloropropane","emission/air","3e75730b-5d6d-3dc1-8911-c7fdfe0e5190","22111A",0.0106016836798425 -"1,2-Dichloropropane","emission/air","3e75730b-5d6d-3dc1-8911-c7fdfe0e5190","22111B",0.463367316762661 +"1,2-Dichloroethane","emission/air","c2d517e6-4c5d-3002-8a0d-54434c5a3bae","22111C",0.000870636018896458 +"1,2-Dichloroethane","emission/air","c2d517e6-4c5d-3002-8a0d-54434c5a3bae","22111A",0.919106959453886 +"1,2-Dichloroethane","emission/air","c2d517e6-4c5d-3002-8a0d-54434c5a3bae","22111B",0.0120634109738734 +"1,2-Dichloroethane","emission/air","c2d517e6-4c5d-3002-8a0d-54434c5a3bae","221117",0.0679589935533443 +"1,2-Dichloroethane","emission/water","b7503034-5946-3ef9-8fa9-ec016ce41da9","22111A",0.836035483298359 +"1,2-Dichloroethane","emission/water","b7503034-5946-3ef9-8fa9-ec016ce41da9","22111B",0.163964516701641 +"1,2-Dichloropropane","emission/air","3e75730b-5d6d-3dc1-8911-c7fdfe0e5190","221117",0.508421732494574 +"1,2-Dichloropropane","emission/air","3e75730b-5d6d-3dc1-8911-c7fdfe0e5190","22111A",0.0149779172839489 +"1,2-Dichloropropane","emission/air","3e75730b-5d6d-3dc1-8911-c7fdfe0e5190","22111B",0.476600350221477 "1,2-Dichloropropane","emission/water","a26535d8-fd0d-3629-99de-7864c5dc78d0","22111B",1 "1,2,3-Trichloropropane","emission/air","27280e4a-ec1a-339d-990e-bb5a8a225663","22111B",1 -"1,2,4-Trichlorobenzene","emission/air","2b548673-879c-3885-afe9-2439ce6a47f1","22111A",0.805842475150833 -"1,2,4-Trichlorobenzene","emission/air","2b548673-879c-3885-afe9-2439ce6a47f1","22111B",0.194157524849167 -"1,2,4-Trimethylbenzene","emission/air","37ea99ef-1be1-38e3-b5f4-8bbe233b6843","22111A",0.0305492286441796 -"1,2,4-Trimethylbenzene","emission/air","37ea99ef-1be1-38e3-b5f4-8bbe233b6843","22111B",0.96305269533616 -"1,2,4-Trimethylbenzene","emission/air","37ea99ef-1be1-38e3-b5f4-8bbe233b6843","22111C",0.0063980760196605 +"1,2,4-Trichlorobenzene","emission/air","2b548673-879c-3885-afe9-2439ce6a47f1","22111B",0.149233646611557 +"1,2,4-Trichlorobenzene","emission/air","2b548673-879c-3885-afe9-2439ce6a47f1","22111A",0.850766353388443 +"1,2,4-Trimethylbenzene","emission/air","37ea99ef-1be1-38e3-b5f4-8bbe233b6843","22111C",0.0081070044249219 +"1,2,4-Trimethylbenzene","emission/air","37ea99ef-1be1-38e3-b5f4-8bbe233b6843","22111B",0.950479619757141 +"1,2,4-Trimethylbenzene","emission/air","37ea99ef-1be1-38e3-b5f4-8bbe233b6843","22111A",0.0414133758179374 "1,2,4-Trimethylbenzene","emission/ground","c128dfdb-e9be-3ea3-b64e-a27ba8d81d23","22111C",1 "1,2,4-Trimethylbenzene","emission/water","a451a5f6-30e6-37d5-ac4b-ab75b81e79e3","22111C",1 -"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221111",0.00214463899505005 -"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221113",0.000161513207115927 -"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221114",0.000867932832742862 -"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221115",3.29468163420496e-05 -"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221117",0.00187371882040241 -"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","22111A",0.00046355316206781 -"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","22111B",0.973991867309676 -"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","22111C",0.0204638288566029 -"1,3-Dichloropropene","emission/air","1cb3814f-067b-3f04-af78-4f6ad4c132b7","221117",0.0184082635690203 -"1,3-Dichloropropene","emission/air","1cb3814f-067b-3f04-af78-4f6ad4c132b7","22111A",0.981560641391167 -"1,3-Dichloropropene","emission/air","1cb3814f-067b-3f04-af78-4f6ad4c132b7","22111B",3.10950398125342e-05 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221117",0.00175113347673302 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","22111C",0.0261298053200315 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221113",0.000172448862485466 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","22111A",0.000633254372669175 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221111",0.0024878226721986 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221115",2.26477887131931e-05 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","221114",0.000109459105598797 +"1,3-Butadiene","emission/air","457411b2-4dac-3eb2-965d-97b60660afa2","22111B",0.96869342840157 +"1,3-Dichloropropene","emission/air","1cb3814f-067b-3f04-af78-4f6ad4c132b7","22111A",0.987309891137247 +"1,3-Dichloropropene","emission/air","1cb3814f-067b-3f04-af78-4f6ad4c132b7","22111B",2.27708814818935e-05 +"1,3-Dichloropropene","emission/air","1cb3814f-067b-3f04-af78-4f6ad4c132b7","221117",0.0126673379812714 "1,4-Dioxane","emission/air","f5fa456c-34ed-39a3-868a-377e30ed76c6","22111B",1 "1,4-Dioxane","emission/water","b51f43e4-5a5f-3eb7-921f-6d3746d33fb6","22111B",1 -"2-Chloroacetophenone","emission/air","0bf913b1-486a-3ce1-991b-d1e8687b67e0","221117",0.000753963449830042 -"2-Chloroacetophenone","emission/air","0bf913b1-486a-3ce1-991b-d1e8687b67e0","22111A",0.983780690791678 -"2-Chloroacetophenone","emission/air","0bf913b1-486a-3ce1-991b-d1e8687b67e0","22111B",0.0144974612747079 -"2-Chloroacetophenone","emission/air","0bf913b1-486a-3ce1-991b-d1e8687b67e0","22111C",0.000967884483784369 +"2-Chloroacetophenone","emission/air","0bf913b1-486a-3ce1-991b-d1e8687b67e0","221117",0.000518004597287465 +"2-Chloroacetophenone","emission/air","0bf913b1-486a-3ce1-991b-d1e8687b67e0","22111C",0.000908534233930755 +"2-Chloroacetophenone","emission/air","0bf913b1-486a-3ce1-991b-d1e8687b67e0","22111A",0.987973812516503 +"2-Chloroacetophenone","emission/air","0bf913b1-486a-3ce1-991b-d1e8687b67e0","22111B",0.0105996486522791 "2-Chloronaphthalene","emission/air","3471d156-1b5e-34c1-b47f-73403c7eeda9","221117",1 -"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221111",0.001457734537172 -"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221113",0.000195312087233833 -"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221115",4.58411569361317e-05 -"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221117",0.000509746183120315 -"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221118",8.29410393056795e-07 -"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","22111A",0.000180604247619911 -"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","22111B",0.997563893491301 -"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","22111C",4.60388862233757e-05 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","22111A",0.000247998231520614 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221111",0.00169975231221045 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221117",0.00047886245568645 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221118",7.93072895616319e-07 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","22111B",0.997272213638939 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221115",3.16745091711959e-05 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","221113",0.000209615497683787 +"2-Methylnaphthalene","emission/air","5f3bb2ec-d153-3cb5-9bc1-3eef8f44bf67","22111C",5.90902818928872e-05 "2-Propen-1-ol","emission/air","cf98105a-0886-3a36-a4c4-3a951da54e52","22111B",1 -"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","221111",0.000126113934881314 -"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","221113",1.17095610365998e-05 -"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","221115",4.05090363251701e-06 -"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","221117",0.00985099062574706 -"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","22111A",0.00245020249865305 -"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","22111B",0.987553972236979 -"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","22111C",2.96023907003241e-06 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","221111",0.000147044407999974 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","221117",0.00925369010103868 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","221115",2.79888126729985e-06 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","22111B",0.987215753452018 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","221113",1.25664648768852e-05 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","22111C",3.7992360640999e-06 +"2,2,4-Trimethylpentane","emission/air","3b981d82-2f3d-3ac0-89b5-5e38b91ef0f3","22111A",0.00336434745673499 "2,3,7,8-Tetrachlorodibenzo-p-dioxin","emission/water","c7e05642-0ebb-3835-8654-21192725df17","22111B",1 "2,4-Dimethylphenol","emission/water","c979ddf8-5576-36eb-bc76-040e01f99cc6","22111C",1 -"2,4-Dinitrophenol","emission/air","aa1aac60-dfbe-32b9-9203-81a6c58a340b","221117",0.0135660543697092 -"2,4-Dinitrophenol","emission/air","aa1aac60-dfbe-32b9-9203-81a6c58a340b","22111A",0.986121560659601 -"2,4-Dinitrophenol","emission/air","aa1aac60-dfbe-32b9-9203-81a6c58a340b","22111B",0.000312384970690011 -"2,4-Dinitrotoluene","emission/air","7fdbc046-29ad-3377-a9c1-a45031e0cd53","221117",5.95036350704371e-05 -"2,4-Dinitrotoluene","emission/air","7fdbc046-29ad-3377-a9c1-a45031e0cd53","22111A",0.998718279781412 -"2,4-Dinitrotoluene","emission/air","7fdbc046-29ad-3377-a9c1-a45031e0cd53","22111B",0.00114583003688043 -"2,4-Dinitrotoluene","emission/air","7fdbc046-29ad-3377-a9c1-a45031e0cd53","22111C",7.6386546637354e-05 +"2,4-Dinitrophenol","emission/air","aa1aac60-dfbe-32b9-9203-81a6c58a340b","22111B",0.000228425499217095 +"2,4-Dinitrophenol","emission/air","aa1aac60-dfbe-32b9-9203-81a6c58a340b","22111A",0.990449945512575 +"2,4-Dinitrophenol","emission/air","aa1aac60-dfbe-32b9-9203-81a6c58a340b","221117",0.00932162898820832 +"2,4-Dinitrotoluene","emission/air","7fdbc046-29ad-3377-a9c1-a45031e0cd53","22111B",0.00083448448601287 +"2,4-Dinitrotoluene","emission/air","7fdbc046-29ad-3377-a9c1-a45031e0cd53","22111C",7.14221956201063e-05 +"2,4-Dinitrotoluene","emission/air","7fdbc046-29ad-3377-a9c1-a45031e0cd53","22111A",0.999053371668019 +"2,4-Dinitrotoluene","emission/air","7fdbc046-29ad-3377-a9c1-a45031e0cd53","221117",4.07216503482822e-05 "2,4-Toluenediamine","emission/air","e6301ab3-57fe-3b52-b315-9870d45055ab","22111A",1 "2,4,5-Trichlorophenol","emission/air","dfe2fcba-feff-3e93-be27-4f46cca1e887","22111A",1 -"2,4,6-Trichlorophenol","emission/air","b6e5d387-9d6a-304d-9438-db81eb4da4f3","221117",0.000945012808948242 -"2,4,6-Trichlorophenol","emission/air","b6e5d387-9d6a-304d-9438-db81eb4da4f3","22111A",0.999054987191052 -"3-Methylcholanthrene","emission/air","9a75a979-3c99-3b02-9944-baa838fe12ac","221117",0.00799862172066787 -"3-Methylcholanthrene","emission/air","9a75a979-3c99-3b02-9944-baa838fe12ac","22111A",0.0236777503448967 -"3-Methylcholanthrene","emission/air","9a75a979-3c99-3b02-9944-baa838fe12ac","22111B",0.959646858018995 -"3-Methylcholanthrene","emission/air","9a75a979-3c99-3b02-9944-baa838fe12ac","22111C",0.00867676991544018 +"2,4,6-Trichlorophenol","emission/air","b6e5d387-9d6a-304d-9438-db81eb4da4f3","22111A",0.999353298995389 +"2,4,6-Trichlorophenol","emission/air","b6e5d387-9d6a-304d-9438-db81eb4da4f3","221117",0.000646701004610851 +"3-Methylcholanthrene","emission/air","9a75a979-3c99-3b02-9944-baa838fe12ac","22111B",0.949369316085375 +"3-Methylcholanthrene","emission/air","9a75a979-3c99-3b02-9944-baa838fe12ac","22111C",0.0110204691386622 +"3-Methylcholanthrene","emission/air","9a75a979-3c99-3b02-9944-baa838fe12ac","221117",0.00743571459955626 +"3-Methylcholanthrene","emission/air","9a75a979-3c99-3b02-9944-baa838fe12ac","22111A",0.0321745001764061 "3,3'-Dichlorobenzidine","emission/air","62f3e781-d884-3080-9344-dded2766ff3b","22111A",1 -"5-Methylchrysene","emission/air","647cac25-44c0-35e5-88c8-8935f2660071","221117",0.00419277804834081 -"5-Methylchrysene","emission/air","647cac25-44c0-35e5-88c8-8935f2660071","22111A",0.914224247356286 -"5-Methylchrysene","emission/air","647cac25-44c0-35e5-88c8-8935f2660071","22111B",0.0761986249777486 -"5-Methylchrysene","emission/air","647cac25-44c0-35e5-88c8-8935f2660071","22111C",0.00538434961762502 -"7,12-Dimethylbenz[a]anthracene","emission/air","675d27f1-91b6-3a26-b747-2d8f5fdfa02f","221117",0.00816477107683903 -"7,12-Dimethylbenz[a]anthracene","emission/air","675d27f1-91b6-3a26-b747-2d8f5fdfa02f","22111A",0.0228879691833641 -"7,12-Dimethylbenz[a]anthracene","emission/air","675d27f1-91b6-3a26-b747-2d8f5fdfa02f","22111B",0.960103042498736 -"7,12-Dimethylbenz[a]anthracene","emission/air","675d27f1-91b6-3a26-b747-2d8f5fdfa02f","22111C",0.00884421724106069 -"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","221111",0.00118538806017473 -"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","221113",0.000552947543353144 -"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","221115",3.89094290831571e-05 -"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","221117",0.00745535033047092 -"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","22111A",0.908926485612338 -"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","22111B",0.0808723583068929 -"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","22111C",0.000968560717686878 -"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","221111",0.00467728478857293 -"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","221113",0.000859679458886931 -"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","221115",0.000154624026690903 -"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","221117",0.0279568161985466 -"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","22111A",0.0260075686406769 -"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","22111B",0.937826193693977 -"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","22111C",0.00251783319264907 -"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221111",0.00590881192999846 -"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221113",0.000116857700749712 -"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221114",1.45632626879984e-05 -"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221115",3.32620511089553e-06 -"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221117",0.029259065301036 -"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","22111A",0.379687850412972 -"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","22111B",0.584285557728713 -"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","22111C",0.000723967458731521 +"5-Methylchrysene","emission/air","647cac25-44c0-35e5-88c8-8935f2660071","22111C",0.00514804577373705 +"5-Methylchrysene","emission/air","647cac25-44c0-35e5-88c8-8935f2660071","22111B",0.0567463622774219 +"5-Methylchrysene","emission/air","647cac25-44c0-35e5-88c8-8935f2660071","221117",0.00293411122882763 +"5-Methylchrysene","emission/air","647cac25-44c0-35e5-88c8-8935f2660071","22111A",0.935171480720014 +"7,12-Dimethylbenz[a]anthracene","emission/air","675d27f1-91b6-3a26-b747-2d8f5fdfa02f","221117",0.007592105285651 +"7,12-Dimethylbenz[a]anthracene","emission/air","675d27f1-91b6-3a26-b747-2d8f5fdfa02f","22111C",0.0112360084903415 +"7,12-Dimethylbenz[a]anthracene","emission/air","675d27f1-91b6-3a26-b747-2d8f5fdfa02f","22111B",0.950062654380403 +"7,12-Dimethylbenz[a]anthracene","emission/air","675d27f1-91b6-3a26-b747-2d8f5fdfa02f","22111A",0.0311092318436045 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","221111",0.00103210278034278 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","22111A",0.931975690787486 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","22111B",0.0603709912955792 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","221113",0.000443132295417993 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","221117",0.00522973958839827 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","221115",2.00754081987387e-05 +"Acenaphthene","emission/air","43aed9d7-5a9b-3f3e-8d51-cc8bebd9a9a1","22111C",0.000928267844577072 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","221115",0.00010586095629879 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","22111A",0.0353854633689959 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","22111C",0.00320201024976265 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","221113",0.000914187602100847 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","221111",0.00540387781910776 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","22111B",0.928966099417335 +"Acenaphthylene","emission/air","34b07e52-3833-3665-aeec-01aed3f78362","221117",0.0260225005863992 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","22111A",0.456974193631936 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","22111B",0.51196762647943 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221115",2.01440922502255e-06 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","22111C",0.000814431663923094 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221111",0.00603881486640621 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221113",0.000109924868691153 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221114",1.61812022539558e-06 +"Acetaldehyde","emission/air","09dc3fe9-7e57-321f-9e04-34375bf2a0b7","221117",0.0240913759601631 "Acetaldehyde","emission/water","3f8a34ba-763d-3596-84fc-736361389987","22111B",1 -"Acetonitrile","emission/air","c8105d36-b64a-3b20-92bb-0208703c96a4","22111A",0.210473313192346 -"Acetonitrile","emission/air","c8105d36-b64a-3b20-92bb-0208703c96a4","22111B",0.789526686807654 -"Acetophenone","emission/air","8384736f-93e4-3edc-af93-47bdc7ef9fc7","221117",0.00034551812856489 -"Acetophenone","emission/air","8384736f-93e4-3edc-af93-47bdc7ef9fc7","22111A",0.985709425603557 -"Acetophenone","emission/air","8384736f-93e4-3edc-af93-47bdc7ef9fc7","22111B",0.0130713649801835 -"Acetophenone","emission/air","8384736f-93e4-3edc-af93-47bdc7ef9fc7","22111C",0.000873691287695105 -"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221111",0.00268784200339014 -"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221113",6.38647476228946e-05 -"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221114",0.00211413323003005 -"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221115",4.80526879120865e-06 -"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221117",0.219361126604094 -"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","22111A",0.537716182233147 -"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","22111B",0.237380702851223 -"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","22111C",0.000671343061701401 -"Acrylonitrile","emission/air","f5bb2d1e-1a7a-3587-8922-d711ec7e6ea4","221114",0.00717570414603722 -"Acrylonitrile","emission/air","f5bb2d1e-1a7a-3587-8922-d711ec7e6ea4","221117",0.644444521252188 -"Acrylonitrile","emission/air","f5bb2d1e-1a7a-3587-8922-d711ec7e6ea4","22111A",0.32335794689378 -"Acrylonitrile","emission/air","f5bb2d1e-1a7a-3587-8922-d711ec7e6ea4","22111B",0.025021827707995 +"Acetonitrile","emission/air","c8105d36-b64a-3b20-92bb-0208703c96a4","22111B",0.731975544983626 +"Acetonitrile","emission/air","c8105d36-b64a-3b20-92bb-0208703c96a4","22111A",0.268024455016374 +"Acetophenone","emission/air","8384736f-93e4-3edc-af93-47bdc7ef9fc7","22111C",0.000819686386452492 +"Acetophenone","emission/air","8384736f-93e4-3edc-af93-47bdc7ef9fc7","221117",0.000237260864558527 +"Acetophenone","emission/air","8384736f-93e4-3edc-af93-47bdc7ef9fc7","22111A",0.989391094787821 +"Acetophenone","emission/air","8384736f-93e4-3edc-af93-47bdc7ef9fc7","22111B",0.00955195796116829 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221114",0.000225955799179046 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221113",5.77881584917171e-05 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221115",2.7993383717905e-06 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","22111A",0.622525459743515 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","22111C",0.000726472444034936 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221117",0.173740017638277 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","22111B",0.200079132672023 +"Acrolein","emission/air","ba9cee15-a144-3c38-9a3b-36931d4e64e9","221111",0.00264237420610812 +"Acrylonitrile","emission/air","f5bb2d1e-1a7a-3587-8922-d711ec7e6ea4","221117",0.562981639080389 +"Acrylonitrile","emission/air","f5bb2d1e-1a7a-3587-8922-d711ec7e6ea4","22111A",0.412910618848305 +"Acrylonitrile","emission/air","f5bb2d1e-1a7a-3587-8922-d711ec7e6ea4","221114",0.000845910013269314 +"Acrylonitrile","emission/air","f5bb2d1e-1a7a-3587-8922-d711ec7e6ea4","22111B",0.0232618320580375 "Adsorbable organic halides","emission/water","22db4f89-a507-39e6-9ef5-8e2e673bdcf9","22111B",1 "Allyl chloride","emission/air","932a90ce-237d-3fcf-a438-713df66eee60","22111A",1 "Aluminum","emission/air","314e4cef-5385-3262-bdb6-a756c7817579","221118",1 -"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","221113",0.00219341756296497 -"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","221114",0.000891281661270903 -"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","221117",0.000104293257080058 -"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","22111A",0.603041874015321 -"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","22111B",0.393769133503363 -"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221111",0.00205786571437508 -"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221113",4.96342335176807e-05 -"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221114",0.000599196706303874 -"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221116",0.000632200677264249 -"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221117",0.0252549246864441 -"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221118",0.00495896105953707 -"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","22111A",0.257384713942108 -"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","22111B",0.701593029720258 -"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","22111C",0.00746947326019165 +"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","221113",0.00192278589951786 +"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","22111B",0.321536301368837 +"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","221117",8.00254972067848e-05 +"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","22111A",0.676368600757434 +"Aluminum","emission/water","2b8613fe-c7db-355d-9754-baebbc92512f","221114",9.22864770047949e-05 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221117",0.0216450080586036 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221111",0.00218916802970491 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221114",6.92998090110315e-05 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221118",0.00432602675194767 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221116",0.000626930269165883 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","221113",4.85993493918965e-05 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","22111B",0.639901504353218 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","22111C",0.00874653620993577 +"Ammonia","emission/air","65b5d5dd-95b5-36b2-8cb0-7c5501ff1e32","22111A",0.322446927169021 "Ammonia","emission/ground","1633cea3-311a-3667-a428-419522a8065d","22111A",1 -"Ammonia","emission/water","2d117fdd-370d-331c-b07c-b0172c4a10ef","22111A",0.544184943460225 -"Ammonia","emission/water","2d117fdd-370d-331c-b07c-b0172c4a10ef","22111B",0.455815056539775 +"Ammonia","emission/water","2d117fdd-370d-331c-b07c-b0172c4a10ef","22111B",0.378808666734971 +"Ammonia","emission/water","2d117fdd-370d-331c-b07c-b0172c4a10ef","22111A",0.621191333265029 "Aniline","emission/air","8cd61983-018e-388a-88f1-dd026900572a","22111A",1 -"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","221111",0.00844155208097653 -"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","221113",0.00133754750216408 -"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","221115",0.000279175730807095 -"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","221117",0.146972613119343 -"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","22111A",0.212875871094173 -"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","22111B",0.626146489022281 -"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","22111C",0.00394675145025531 -"Anthracene","emission/ground","a6317c2a-8158-37db-bb2c-5ae4b1219d44","22111A",0.722222222222222 -"Anthracene","emission/ground","a6317c2a-8158-37db-bb2c-5ae4b1219d44","22111B",0.277777777777778 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","221115",0.000179796201941902 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","221111",0.00917440756116525 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","221117",0.128689095766606 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","22111B",0.583441711507085 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","22111C",0.00472149526114054 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","22111A",0.272455506344934 +"Anthracene","emission/air","5aaca76f-ed8b-3dc6-9cb3-597421c567ac","221113",0.00133798735712737 +"Anthracene","emission/ground","a6317c2a-8158-37db-bb2c-5ae4b1219d44","22111B",0.218758261496915 +"Anthracene","emission/ground","a6317c2a-8158-37db-bb2c-5ae4b1219d44","22111A",0.781241738503085 "Anthracene","emission/water","627ef3a5-9a70-3fb9-8bb7-2792eddec502","22111C",1 -"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","221117",0.00902630849358238 -"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","221118",0.00108215580071407 -"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","22111A",0.817148888152601 -"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","22111B",0.147405393011013 -"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","22111C",0.0253372545420892 -"Antimony","emission/water","dde20124-511b-3e0d-8834-5ddd88e15cba","221117",3.60235305701684e-06 -"Antimony","emission/water","dde20124-511b-3e0d-8834-5ddd88e15cba","22111A",0.580074424614158 -"Antimony","emission/water","dde20124-511b-3e0d-8834-5ddd88e15cba","22111B",0.419921973032785 -"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221111",4.68910844884048e-06 -"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221113",6.88249874491178e-05 -"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221114",2.40323406691013e-06 -"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221116",3.51685827005052e-05 -"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221117",0.00867216678082411 -"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221118",4.36730104395758e-05 -"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","22111A",0.93796544771784 -"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","22111B",0.0515264264616952 -"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","22111C",0.00168120011653568 -"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","221113",0.0611270928718908 -"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","221114",0.000386571644392111 -"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","221117",0.000137734559796674 -"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","22111A",0.82906976884918 -"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","22111B",0.109270329443928 -"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","22111C",8.50263081249218e-06 +"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","22111B",0.112364098916093 +"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","22111A",0.855584722263303 +"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","221118",0.000788995687482714 +"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","221117",0.00646559029791879 +"Antimony","emission/air","9de688f4-2302-3557-b50c-0f1d304977f4","22111C",0.024796592835202 +"Antimony","emission/water","dde20124-511b-3e0d-8834-5ddd88e15cba","22111A",0.654863161143728 +"Antimony","emission/water","dde20124-511b-3e0d-8834-5ddd88e15cba","221117",2.78220610360529e-06 +"Antimony","emission/water","dde20124-511b-3e0d-8834-5ddd88e15cba","22111B",0.345134056650169 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","22111A",0.954090519128314 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","22111C",0.0015984269044183 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221113",5.47170310488225e-05 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221117",0.00603485088442668 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","22111B",0.0381579590020763 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221114",2.25676293242321e-07 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221111",4.05022910941964e-06 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221116",2.83169449465316e-05 +"Arsenic","emission/air","2b16d0b5-4713-3bb8-be5b-905382f0e8a8","221118",3.09341993662479e-05 +"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","22111B",0.0831674336493258 +"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","22111A",0.866741824289946 +"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","221114",3.73091880271416e-05 +"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","221113",0.0499466149481554 +"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","221117",9.85094245064488e-05 +"Arsenic","emission/water","e3955c32-e6a0-3b4b-baad-5055042a8dbb","22111C",8.30850003943382e-06 "Asbestos","emission/air","5c8e293a-4009-30d8-a003-43add9e779f7","22111B",1 "Atrazine","emission/water","fb555654-c1ae-3a4c-be73-4e52bd420d80","22111A",1 "Barium","emission/air","2c5aef1c-7cf7-30ee-8a87-ba4682327767","22111A",1 -"Barium","emission/water","a1e9b66c-ac46-35e8-bba3-318f6556a90f","221111",1.78119362085015e-06 -"Barium","emission/water","a1e9b66c-ac46-35e8-bba3-318f6556a90f","221117",6.01774962949311e-05 -"Barium","emission/water","a1e9b66c-ac46-35e8-bba3-318f6556a90f","22111A",0.999810006867451 -"Barium","emission/water","a1e9b66c-ac46-35e8-bba3-318f6556a90f","22111B",0.000128034442632883 -"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221111",0.000148962672150322 -"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221113",6.81840861670877e-05 -"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221114",3.26219051098731e-08 -"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221115",2.61273085082454e-06 -"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221117",0.000295471807918473 -"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","22111A",0.18609985610727 -"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","22111B",0.787002063148568 -"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","22111C",0.02638281682517 -"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221111",0.00169919442190644 -"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221113",0.000630187373076082 -"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221114",0.00427220067266338 -"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221115",2.9509146524868e-06 -"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221116",0.0168902691619712 -"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221117",0.0974099451114942 -"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221118",2.52803832102564e-05 -"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","22111A",0.633955183870327 -"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","22111B",0.240716609080789 -"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","22111C",0.00439817900990965 +"Barium","emission/water","a1e9b66c-ac46-35e8-bba3-318f6556a90f","22111A",0.999864097561703 +"Barium","emission/water","a1e9b66c-ac46-35e8-bba3-318f6556a90f","221111",1.51258991277922e-06 +"Barium","emission/water","a1e9b66c-ac46-35e8-bba3-318f6556a90f","22111B",9.32186231017471e-05 +"Barium","emission/water","a1e9b66c-ac46-35e8-bba3-318f6556a90f","221117",4.11712252825909e-05 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221117",0.000257796028750304 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221115",1.67668842040255e-06 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221113",6.79642704282971e-05 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","22111B",0.730722088674422 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","22111A",0.237339502999872 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221111",0.000161319927865615 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","221114",3.84078891624747e-09 +"Benz[a]anthracene","emission/air","248c35a7-7964-3f7b-aff8-9f29e983835e","22111C",0.0314496475694529 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221113",0.000549911165433393 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","22111C",0.00458978907698605 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221117",0.0744026968735642 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221118",1.96542221530834e-05 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221115",1.65782828897483e-06 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221114",0.000440339828844925 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221116",0.014927069588608 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","22111A",0.707795430221008 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","221111",0.00161093806735724 +"Benzene","emission/air","565c5d1a-1e0e-35f3-82a0-4845c43d3dcf","22111B",0.195662513127757 "Benzene","emission/ground","2d8e739c-9364-34bd-871d-3fcbd081a024","22111B",1 -"Benzene","emission/water","67999cea-e58a-3044-95a9-4b45269260fd","22111B",0.978762779822855 -"Benzene","emission/water","67999cea-e58a-3044-95a9-4b45269260fd","22111C",0.0212372201771449 +"Benzene","emission/water","67999cea-e58a-3044-95a9-4b45269260fd","22111C",0.0271022701531338 +"Benzene","emission/water","67999cea-e58a-3044-95a9-4b45269260fd","22111B",0.972897729846866 "Benzidine","emission/air","dba08d49-f7e0-3dc0-b270-769f70847da3","22111A",1 -"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","221111",0.0101316463893375 -"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","221113",0.00659001247146526 -"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","221115",0.000330967114807845 -"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","221117",0.0441431528123294 -"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","22111A",0.130115340844559 -"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","22111B",0.675990550732514 -"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","22111C",0.132698329634987 -"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","221111",5.95740632699292e-05 -"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","221113",5.42683197134088e-06 -"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","221115",1.96831156998317e-06 -"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","221117",0.00821498744802333 -"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","22111A",0.233983846064895 -"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","22111B",0.751229929777679 -"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","22111C",0.00650426750259054 -"Benzo[e]pyrene","emission/air","70fedc48-3895-3b66-9a00-e2e5958d51b8","221117",0.000705649385436802 -"Benzo[e]pyrene","emission/air","70fedc48-3895-3b66-9a00-e2e5958d51b8","22111A",0.000914831273912315 -"Benzo[e]pyrene","emission/air","70fedc48-3895-3b66-9a00-e2e5958d51b8","22111B",0.998379519340651 -"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221111",0.00121179983359312 -"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221113",9.44335615049588e-05 -"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221115",4.00675339649889e-05 -"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221117",0.00212735606154973 -"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221118",0.0179791281181664 -"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","22111A",0.895993015360432 -"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","22111B",0.0821042302964809 -"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","22111C",0.0004499692343084 -"Benzo[ghi]perylene","emission/ground","b0e46dc9-3a43-3b7a-a6df-d62308d7275e","22111A",0.0156888272958831 -"Benzo[ghi]perylene","emission/ground","b0e46dc9-3a43-3b7a-a6df-d62308d7275e","22111B",0.984311172704117 -"Benzo[ghi]perylene","emission/water","5f75a7a8-003b-30a7-8f41-f83791efd349","22111A",0.0816912186722786 -"Benzo[ghi]perylene","emission/water","5f75a7a8-003b-30a7-8f41-f83791efd349","22111B",0.0191314329443275 -"Benzo[ghi]perylene","emission/water","5f75a7a8-003b-30a7-8f41-f83791efd349","22111C",0.899177348383394 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","22111C",0.156921361147628 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","221117",0.03820722635512 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","221111",0.0108846026213918 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","221113",0.00651637188267684 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","22111A",0.164616924871632 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","221115",0.000210699994967687 +"Benzo(b)fluoranthene","emission/air","920c61f8-5c4a-3900-b070-9a437d2738b8","22111B",0.622642813126583 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","22111C",0.00766975480573833 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","22111A",0.29518775064546 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","22111B",0.689981922199125 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","221117",0.00709015194988278 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","221113",5.35096949329375e-06 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","221115",1.24951076480782e-06 +"Benzo[a]pyrene","emission/air","76bd7eb9-a592-319f-9234-9a469de5bd59","221111",6.38199195355772e-05 +"Benzo[e]pyrene","emission/air","70fedc48-3895-3b66-9a00-e2e5958d51b8","22111B",0.998080908089709 +"Benzo[e]pyrene","emission/air","70fedc48-3895-3b66-9a00-e2e5958d51b8","22111A",0.00125619978314346 +"Benzo[e]pyrene","emission/air","70fedc48-3895-3b66-9a00-e2e5958d51b8","221117",0.000662892127147625 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221111",0.00105942489370194 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","22111B",0.061541860138511 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221113",7.59893490529925e-05 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221117",0.00149840453425929 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","22111A",0.922480799481639 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221115",2.0757690173528e-05 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","221118",0.0128897457013233 +"Benzo[ghi]perylene","emission/air","c19f72d2-41a0-3218-ba4f-61fa392accd6","22111C",0.00043301821133941 +"Benzo[ghi]perylene","emission/ground","b0e46dc9-3a43-3b7a-a6df-d62308d7275e","22111A",0.0214239852613682 +"Benzo[ghi]perylene","emission/ground","b0e46dc9-3a43-3b7a-a6df-d62308d7275e","22111B",0.978576014738632 +"Benzo[ghi]perylene","emission/water","5f75a7a8-003b-30a7-8f41-f83791efd349","22111A",0.0872697152159601 +"Benzo[ghi]perylene","emission/water","5f75a7a8-003b-30a7-8f41-f83791efd349","22111B",0.014879490389386 +"Benzo[ghi]perylene","emission/water","5f75a7a8-003b-30a7-8f41-f83791efd349","22111C",0.897850794394654 "Benzo[j]fluoranthene","emission/air","2720872f-5354-349c-b2bb-3ef19cc88733","22111A",1 -"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","221111",0.0513089360848572 -"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","221113",0.00356731605141768 -"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","221115",0.00169743229064968 -"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","221117",0.0841353682253754 -"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","22111A",0.036060340884101 -"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","22111B",0.806339353155823 -"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","22111C",0.0168912533077763 -"Benzofluoranthene","emission/air","24cfa2d1-ba72-371f-9d3f-cc121bc063f1","221113",7.43615794993349e-05 -"Benzofluoranthene","emission/air","24cfa2d1-ba72-371f-9d3f-cc121bc063f1","22111A",0.999891481647521 -"Benzofluoranthene","emission/air","24cfa2d1-ba72-371f-9d3f-cc121bc063f1","22111B",3.41567729792325e-05 -"Benzyl chloride","emission/air","f0616d3c-8ad2-364a-aaae-42f0651f32e8","221117",0.000825527319384365 -"Benzyl chloride","emission/air","f0616d3c-8ad2-364a-aaae-42f0651f32e8","22111A",0.982241204323591 -"Benzyl chloride","emission/air","f0616d3c-8ad2-364a-aaae-42f0651f32e8","22111B",0.0158735152833816 -"Benzyl chloride","emission/air","f0616d3c-8ad2-364a-aaae-42f0651f32e8","22111C",0.00105975307364348 -"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","221113",0.000215204702832989 -"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","221116",1.83137717554675e-06 -"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","221117",0.00431766761888397 -"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","22111A",0.966897009683047 -"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","22111B",0.027748358411903 -"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","22111C",0.000819928206157186 -"Beryllium","emission/water","c00fa432-1dcc-3bf3-870f-4043c05cc887","221113",0.0951945777168532 -"Beryllium","emission/water","c00fa432-1dcc-3bf3-870f-4043c05cc887","22111A",0.852448404538877 -"Beryllium","emission/water","c00fa432-1dcc-3bf3-870f-4043c05cc887","22111B",0.0523570177442693 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","221117",0.0773996175026467 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","22111B",0.789394801323762 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","221111",0.0585873177564335 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","22111A",0.0484901871600179 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","22111C",0.0212303198377698 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","221113",0.00374920566214293 +"Benzo[k]fluoranthene","emission/air","fcf65d36-ae15-3066-80c2-b624e04c6380","221115",0.00114855075722734 +"Benzofluoranthene","emission/air","24cfa2d1-ba72-371f-9d3f-cc121bc063f1","22111B",2.48679677248625e-05 +"Benzofluoranthene","emission/air","24cfa2d1-ba72-371f-9d3f-cc121bc063f1","22111A",0.99991701099747 +"Benzofluoranthene","emission/air","24cfa2d1-ba72-371f-9d3f-cc121bc063f1","221113",5.81210348050683e-05 +"Benzyl chloride","emission/air","f0616d3c-8ad2-364a-aaae-42f0651f32e8","221117",0.000567401533061549 +"Benzyl chloride","emission/air","f0616d3c-8ad2-364a-aaae-42f0651f32e8","22111B",0.0116104315033315 +"Benzyl chloride","emission/air","f0616d3c-8ad2-364a-aaae-42f0651f32e8","22111C",0.000995172088955677 +"Benzyl chloride","emission/air","f0616d3c-8ad2-364a-aaae-42f0651f32e8","22111A",0.986826994874651 +"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","22111B",0.0203854821072846 +"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","221116",1.46284363085408e-06 +"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","221113",0.000169729260581293 +"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","22111C",0.00077335299921898 +"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","22111A",0.975689283502921 +"Beryllium","emission/air","0346d063-4db1-3f52-a695-892c4c98d443","221117",0.00298068928636361 +"Beryllium","emission/water","c00fa432-1dcc-3bf3-870f-4043c05cc887","22111B",0.039501555416329 +"Beryllium","emission/water","c00fa432-1dcc-3bf3-870f-4043c05cc887","22111A",0.883395178070336 +"Beryllium","emission/water","c00fa432-1dcc-3bf3-870f-4043c05cc887","221113",0.0771032665133349 "Bicarbonate","emission/water","14019299-4013-3351-af2d-287fee154b97","22111A",1 -"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","221111",0.000328045718150876 -"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","221113",0.00630554199009605 -"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","221117",0.86215122968388 -"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","22111A",0.0330368045167025 -"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","22111B",0.0844218730049369 -"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","22111C",0.0137565050862332 -"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","221114",0.455686184174478 -"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","221117",0.0132005508304943 -"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","22111A",0.385111084765863 -"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","22111B",0.145821920965572 -"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","22111C",0.000180259263592806 +"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","22111A",0.0470352400431094 +"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","22111C",0.0183064474747984 +"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","221117",0.839740240837242 +"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","221111",0.00039659412669632 +"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","221113",0.0070165140154428 +"Biological Oxygen Demand","emission/water","27b840cc-1f41-3943-8ea8-6d68b44b7f81","22111B",0.0875049635027113 +"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","221114",0.0775388963002916 +"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","221117",0.0166454239541353 +"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","22111C",0.000310552369461253 +"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","22111A",0.709827211723536 +"Biphenyl","emission/air","52e6476c-bc9d-3aa2-bfb8-6597393b87d1","22111B",0.195677915652576 "Bis(2-chloro-1-methylethyl) ether","emission/air","45bc39bd-b2b3-313a-a0b2-1374b42fdd76","22111B",1 -"Boron","emission/water","57152560-592a-383f-89b1-a77d7d432ad8","221113",0.0167355288202495 -"Boron","emission/water","57152560-592a-383f-89b1-a77d7d432ad8","221117",1.05518588072987e-05 -"Boron","emission/water","57152560-592a-383f-89b1-a77d7d432ad8","22111A",0.98324964814078 -"Boron","emission/water","57152560-592a-383f-89b1-a77d7d432ad8","22111B",4.27118016300689e-06 -"Bromide","emission/water","7d2d94b8-a7a3-3670-b74d-1fc75b7ed55e","221113",0.0214253961602676 -"Bromide","emission/water","7d2d94b8-a7a3-3670-b74d-1fc75b7ed55e","22111A",0.184641476277436 -"Bromide","emission/water","7d2d94b8-a7a3-3670-b74d-1fc75b7ed55e","22111B",0.210446299037539 -"Bromide","emission/water","7d2d94b8-a7a3-3670-b74d-1fc75b7ed55e","22111C",0.583486828524757 +"Boron","emission/water","57152560-592a-383f-89b1-a77d7d432ad8","22111B",3.12099187607027e-06 +"Boron","emission/water","57152560-592a-383f-89b1-a77d7d432ad8","221117",7.24531926434708e-06 +"Boron","emission/water","57152560-592a-383f-89b1-a77d7d432ad8","22111A",0.986861425426182 +"Boron","emission/water","57152560-592a-383f-89b1-a77d7d432ad8","221113",0.0131282082626771 +"Bromide","emission/water","7d2d94b8-a7a3-3670-b74d-1fc75b7ed55e","22111C",0.605992972479531 +"Bromide","emission/water","7d2d94b8-a7a3-3670-b74d-1fc75b7ed55e","221113",0.0186066593215744 +"Bromide","emission/water","7d2d94b8-a7a3-3670-b74d-1fc75b7ed55e","22111A",0.205161169110198 +"Bromide","emission/water","7d2d94b8-a7a3-3670-b74d-1fc75b7ed55e","22111B",0.170239199088696 "Bromine chloride","emission/water","22f3666b-f55a-32d8-931f-efab6ec3cf6b","22111B",1 "Bromine","emission/air","b3c70893-3c45-341e-903a-3dd226382175","22111A",1 "Butyraldehyde","emission/air","8478ff8e-de38-3935-9d16-d1bad2ae179c","22111B",1 "Butyraldehyde","emission/ground","57a7f9c6-ddd5-309f-a649-76b6ee2ee698","22111B",1 -"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221111",2.70960434552523e-05 -"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221113",0.000279680029908436 -"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221114",1.99977424816819e-06 -"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221116",8.15794856717273e-07 -"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221117",0.0101834128599021 -"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221118",0.00874933351530136 -"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","22111A",0.507239845492535 -"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","22111B",0.456648061156291 -"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","22111C",0.0168697553335021 -"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","221113",0.191973059282297 -"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","221117",0.000714827654746219 -"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","22111A",0.641923883120178 -"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","22111B",0.165358012611144 -"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","22111C",3.02173316347454e-05 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221118",0.00701286390369014 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221113",0.000251612683382345 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221116",7.43305217431783e-07 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","22111B",0.38267617099431 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","22111C",0.0181500088774075 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221114",2.12503226310407e-07 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221111",2.64843843593305e-05 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","221117",0.00801912460633148 +"Cadmium","emission/air","d5a296be-7219-3921-a430-cff172ac7911","22111A",0.583862778742075 +"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","22111B",0.131876887563999 +"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","22111C",3.09398220718894e-05 +"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","221113",0.164363356262277 +"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","221117",0.00053570857642673 +"Cadmium","emission/water","b7ae3e81-d9ce-345f-bd73-d91acbddcd5f","22111A",0.703193107775225 "Calcium cyanamide","emission/air","f560910e-8f3f-3684-b860-f9b9d880962d","22111A",1 -"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221111",1.06608877822941e-05 -"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221113",5.25357011266205e-06 -"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221114",5.61219889796574e-05 -"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221115",3.01034810663653e-07 -"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221116",0.000668326663345179 -"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221117",0.0162539418625371 -"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221118",0.000294223289338801 -"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","22111A",0.6453392460556 -"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","22111B",0.335823326994212 -"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","22111C",0.00154859765328227 -"Carbon disulfide","emission/air","5fe16b97-3332-38eb-8030-b62db19473eb","221117",0.0224695187952311 -"Carbon disulfide","emission/air","5fe16b97-3332-38eb-8030-b62db19473eb","22111A",0.943723692145847 -"Carbon disulfide","emission/air","5fe16b97-3332-38eb-8030-b62db19473eb","22111B",0.0150295103944279 -"Carbon disulfide","emission/air","5fe16b97-3332-38eb-8030-b62db19473eb","22111C",0.0187772786644938 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221116",0.000585757236615529 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","22111C",0.00160268920272435 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221117",0.0123121803625173 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221118",0.000226850709554299 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221113",4.54640646978301e-06 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221111",1.00235146692144e-05 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221114",5.7366752732943e-06 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","22111A",0.714542659520437 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","221115",1.67722182064303e-07 +"Carbon dioxide","emission/air","b6f010fb-a764-3063-af2d-bcb8309a97b7","22111B",0.270709388649557 +"Carbon disulfide","emission/air","5fe16b97-3332-38eb-8030-b62db19473eb","22111C",0.0177716253171273 +"Carbon disulfide","emission/air","5fe16b97-3332-38eb-8030-b62db19473eb","22111A",0.955583683104858 +"Carbon disulfide","emission/air","5fe16b97-3332-38eb-8030-b62db19473eb","221117",0.0155651683092741 +"Carbon disulfide","emission/air","5fe16b97-3332-38eb-8030-b62db19473eb","22111B",0.0110795232687402 "Carbon disulfide","emission/water","ea1403e6-a4ce-3fe0-9d94-7df7ae84136e","221111",1 -"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221111",0.000790871482826981 -"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221113",0.000385035070894547 -"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221114",6.77487332015084e-05 -"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221115",2.34478998171224e-05 -"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221117",0.0395387659761018 -"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221118",0.104379702705686 -"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","22111A",0.643523401894455 -"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","22111B",0.208155002291108 -"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","22111C",0.00313602394590931 -"Carbon tetrachloride","emission/air","f7467352-e7d9-3924-b763-f26bb26ce4cc","221117",0.14658645269949 -"Carbon tetrachloride","emission/air","f7467352-e7d9-3924-b763-f26bb26ce4cc","22111A",0.00643347790732735 -"Carbon tetrachloride","emission/air","f7467352-e7d9-3924-b763-f26bb26ce4cc","22111B",0.846980069393182 -"Carbon tetrachloride","emission/water","134672e2-bb82-3ecb-8cd8-e8adcc51c1fa","221111",0.725560538116592 -"Carbon tetrachloride","emission/water","134672e2-bb82-3ecb-8cd8-e8adcc51c1fa","22111A",0.274439461883408 -"Carbonyl sulfide","emission/air","217a8343-2afd-3588-a873-cd15e89d07a1","221117",0.57965709614457 -"Carbonyl sulfide","emission/air","217a8343-2afd-3588-a873-cd15e89d07a1","22111A",0.0651868638000563 -"Carbonyl sulfide","emission/air","217a8343-2afd-3588-a873-cd15e89d07a1","22111C",0.355156040055373 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221114",6.95925094049529e-06 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221118",0.08087480674658 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221111",0.00074725129996186 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","22111C",0.0032615511160013 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","22111B",0.168621681259013 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221117",0.0300977120102241 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","22111A",0.716042061597689 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221115",1.31284011880262e-05 +"Carbon monoxide","emission/air","187c525c-3715-388c-b303-a0671524a615","221113",0.000334848318402466 +"Carbon tetrachloride","emission/air","f7467352-e7d9-3924-b763-f26bb26ce4cc","22111A",0.00889402383467205 +"Carbon tetrachloride","emission/air","f7467352-e7d9-3924-b763-f26bb26ce4cc","22111B",0.852467909796506 +"Carbon tetrachloride","emission/air","f7467352-e7d9-3924-b763-f26bb26ce4cc","221117",0.138638066368821 +"Carbon tetrachloride","emission/water","134672e2-bb82-3ecb-8cd8-e8adcc51c1fa","22111A",0.308167723825966 +"Carbon tetrachloride","emission/water","134672e2-bb82-3ecb-8cd8-e8adcc51c1fa","221111",0.691832276174034 +"Carbonyl sulfide","emission/air","217a8343-2afd-3588-a873-cd15e89d07a1","22111A",0.082129471511168 +"Carbonyl sulfide","emission/air","217a8343-2afd-3588-a873-cd15e89d07a1","221117",0.499627437447369 +"Carbonyl sulfide","emission/air","217a8343-2afd-3588-a873-cd15e89d07a1","22111C",0.418243091041463 "Catechol","emission/air","c4ca45c2-8a21-3a9e-b43f-913c1fe716f4","22111A",1 "Catechol","emission/water","3d945f59-07c2-3209-9421-0ed57a7e33a1","22111B",1 "CFC-113","emission/air","73a8e096-9a30-38da-9f1a-e47d7cd86630","22111B",1 "CFC-12","emission/water","5c12bffd-a02e-30b3-baf7-7d3d9e2dfa3b","221113",1 -"Chemical Oxygen Demand","emission/water","924cc8cf-ddf6-3b1a-9fbe-489c095c1f01","221117",0.00665396188132882 -"Chemical Oxygen Demand","emission/water","924cc8cf-ddf6-3b1a-9fbe-489c095c1f01","22111A",0.270063870045 -"Chemical Oxygen Demand","emission/water","924cc8cf-ddf6-3b1a-9fbe-489c095c1f01","22111B",0.723282168073671 -"Chloride","emission/water","b415204e-1506-3fc6-8e4b-97f8e64403b8","221113",0.00351648489855944 -"Chloride","emission/water","b415204e-1506-3fc6-8e4b-97f8e64403b8","221117",3.1312889063898e-05 -"Chloride","emission/water","b415204e-1506-3fc6-8e4b-97f8e64403b8","22111A",0.511022082910833 -"Chloride","emission/water","b415204e-1506-3fc6-8e4b-97f8e64403b8","22111B",0.485430119301543 +"Chemical Oxygen Demand","emission/water","924cc8cf-ddf6-3b1a-9fbe-489c095c1f01","22111B",0.657240213318752 +"Chemical Oxygen Demand","emission/water","924cc8cf-ddf6-3b1a-9fbe-489c095c1f01","221117",0.00568172862935609 +"Chemical Oxygen Demand","emission/water","924cc8cf-ddf6-3b1a-9fbe-489c095c1f01","22111A",0.337078058051892 +"Chloride","emission/water","b415204e-1506-3fc6-8e4b-97f8e64403b8","22111A",0.589276784051659 +"Chloride","emission/water","b415204e-1506-3fc6-8e4b-97f8e64403b8","221113",0.00316929061062196 +"Chloride","emission/water","b415204e-1506-3fc6-8e4b-97f8e64403b8","22111B",0.407529222947091 +"Chloride","emission/water","b415204e-1506-3fc6-8e4b-97f8e64403b8","221117",2.4702390627879e-05 "Chlorides and sulfates, total","emission/water","1fd6ca1f-26bf-3d26-8170-55746d2e2522","221117",1 "Chlorinated phenols","emission/water","1c90831d-9f61-3b97-8ac9-79ef57fb40ee","22111B",1 "Chlorine dioxide","emission/air","ffbf17ac-259f-3767-a03f-e0545b860282","22111B",1 -"Chlorine","emission/air","c4da1480-4f19-3d01-8f04-8432c38991b1","221117",0.0984069661503501 -"Chlorine","emission/air","c4da1480-4f19-3d01-8f04-8432c38991b1","221118",2.12512842512547e-05 -"Chlorine","emission/air","c4da1480-4f19-3d01-8f04-8432c38991b1","22111A",0.82424683539134 -"Chlorine","emission/air","c4da1480-4f19-3d01-8f04-8432c38991b1","22111B",0.0773249471740588 -"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","221111",0.000262582395718067 -"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","221113",0.310307263989541 -"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","221117",8.34172964989349e-06 -"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","221118",7.04693139324188e-05 -"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","22111A",0.401318610717546 -"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","22111B",0.128467751425335 -"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","22111C",0.159564980428278 -"Chlorobenzene","emission/air","0fe64d97-61d5-3366-9778-8c39d00edd73","221117",0.140469084190322 -"Chlorobenzene","emission/air","0fe64d97-61d5-3366-9778-8c39d00edd73","22111A",0.845376242294748 -"Chlorobenzene","emission/air","0fe64d97-61d5-3366-9778-8c39d00edd73","22111B",0.0133434876119634 -"Chlorobenzene","emission/air","0fe64d97-61d5-3366-9778-8c39d00edd73","22111C",0.000811185902966863 +"Chlorine","emission/air","c4da1480-4f19-3d01-8f04-8432c38991b1","221117",0.0710246014527805 +"Chlorine","emission/air","c4da1480-4f19-3d01-8f04-8432c38991b1","22111A",0.869569039933809 +"Chlorine","emission/air","c4da1480-4f19-3d01-8f04-8432c38991b1","221118",1.56118716273359e-05 +"Chlorine","emission/air","c4da1480-4f19-3d01-8f04-8432c38991b1","22111B",0.0593907467417837 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","22111B",0.10546798829377 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","221111",0.000251435355660048 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","221117",6.43526534384906e-06 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","22111C",0.168183109950487 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","22111A",0.452546766581767 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","221113",0.273488929896225 +"Chlorine","emission/water","d94f94d7-2d65-3f80-8254-1c8129263b01","221118",5.5334656747448e-05 +"Chlorobenzene","emission/air","0fe64d97-61d5-3366-9778-8c39d00edd73","22111A",0.88804917624343 +"Chlorobenzene","emission/air","0fe64d97-61d5-3366-9778-8c39d00edd73","22111B",0.0102048989204642 +"Chlorobenzene","emission/air","0fe64d97-61d5-3366-9778-8c39d00edd73","22111C",0.00079648573394413 +"Chlorobenzene","emission/air","0fe64d97-61d5-3366-9778-8c39d00edd73","221117",0.100949439102161 "Chlorobenzene","emission/water","eec36aa7-2df6-36c3-9a07-500c4bbf62a9","221113",1 "Chlorodibromomethane","emission/water","5b1ea5c2-bc10-35bc-a7ab-5d9b51796ddf","22111B",1 -"Chloroethane","emission/air","a48770cd-a7a2-3e86-9e1b-083d68ba4351","221117",0.127715394245553 -"Chloroethane","emission/air","a48770cd-a7a2-3e86-9e1b-083d68ba4351","22111A",0.321061637344256 -"Chloroethane","emission/air","a48770cd-a7a2-3e86-9e1b-083d68ba4351","22111B",0.550896051860757 -"Chloroethane","emission/air","a48770cd-a7a2-3e86-9e1b-083d68ba4351","22111C",0.000326916549434148 -"Chloroform","emission/air","9fc17701-9417-3281-b9a3-d7ab3ecc1c57","221117",0.00483873546808519 -"Chloroform","emission/air","9fc17701-9417-3281-b9a3-d7ab3ecc1c57","22111A",0.516964926961435 -"Chloroform","emission/air","9fc17701-9417-3281-b9a3-d7ab3ecc1c57","22111B",0.477989762233524 -"Chloroform","emission/air","9fc17701-9417-3281-b9a3-d7ab3ecc1c57","22111C",0.000206575336955199 +"Chloroethane","emission/air","a48770cd-a7a2-3e86-9e1b-083d68ba4351","22111B",0.495264995203818 +"Chloroethane","emission/air","a48770cd-a7a2-3e86-9e1b-083d68ba4351","221117",0.107893437671788 +"Chloroethane","emission/air","a48770cd-a7a2-3e86-9e1b-083d68ba4351","22111C",0.00037733156436424 +"Chloroethane","emission/air","a48770cd-a7a2-3e86-9e1b-083d68ba4351","22111A",0.39646423556003 +"Chloroform","emission/air","9fc17701-9417-3281-b9a3-d7ab3ecc1c57","22111A",0.595265093491017 +"Chloroform","emission/air","9fc17701-9417-3281-b9a3-d7ab3ecc1c57","22111B",0.400700887849588 +"Chloroform","emission/air","9fc17701-9417-3281-b9a3-d7ab3ecc1c57","22111C",0.000222330188293661 +"Chloroform","emission/air","9fc17701-9417-3281-b9a3-d7ab3ecc1c57","221117",0.00381168847110079 "Chloroform","emission/ground","3cfa00b4-c6b8-39c3-b00f-f61dca013704","22111B",1 -"Chloroform","emission/water","f54d9588-ffe1-3ebb-922d-d7ec19c625a9","221111",0.0138772536102141 -"Chloroform","emission/water","f54d9588-ffe1-3ebb-922d-d7ec19c625a9","22111A",0.13907731240982 -"Chloroform","emission/water","f54d9588-ffe1-3ebb-922d-d7ec19c625a9","22111B",0.847045433979966 -"Chloromethane","emission/air","3e771661-38c3-332b-b4cb-8e2421b045ce","221117",0.00431664441575404 -"Chloromethane","emission/air","3e771661-38c3-332b-b4cb-8e2421b045ce","22111A",0.49936917121977 -"Chloromethane","emission/air","3e771661-38c3-332b-b4cb-8e2421b045ce","22111B",0.495804483465399 -"Chloromethane","emission/air","3e771661-38c3-332b-b4cb-8e2421b045ce","22111C",0.000509700899076701 +"Chloroform","emission/water","f54d9588-ffe1-3ebb-922d-d7ec19c625a9","221111",0.0153528500845295 +"Chloroform","emission/water","f54d9588-ffe1-3ebb-922d-d7ec19c625a9","22111B",0.803448398830314 +"Chloroform","emission/water","f54d9588-ffe1-3ebb-922d-d7ec19c625a9","22111A",0.181198751085157 +"Chloromethane","emission/air","3e771661-38c3-332b-b4cb-8e2421b045ce","22111B",0.41789657833676 +"Chloromethane","emission/air","3e771661-38c3-332b-b4cb-8e2421b045ce","221117",0.00341891614626377 +"Chloromethane","emission/air","3e771661-38c3-332b-b4cb-8e2421b045ce","22111A",0.578132946458888 +"Chloromethane","emission/air","3e771661-38c3-332b-b4cb-8e2421b045ce","22111C",0.000551559058088291 "Chloromethane","emission/ground","0d9af69a-fe2a-30a4-bc1e-eba7dd002449","22111B",1 "Chloromethane","emission/water","57facb29-666b-34eb-96a3-670f6d995798","22111B",1 -"Chromic(VI) acid","emission/air","4717a8b5-2466-3dd1-b856-f639e8442e75","22111A",0.576843641643228 -"Chromic(VI) acid","emission/air","4717a8b5-2466-3dd1-b856-f639e8442e75","22111B",0.423156358356772 -"Chromium","emission/air","98bd36e1-fbe4-32ee-ba78-3b6726917c9b","221111",0.0155074823602388 -"Chromium","emission/air","98bd36e1-fbe4-32ee-ba78-3b6726917c9b","22111A",0.984492517639761 +"Chromic(VI) acid","emission/air","4717a8b5-2466-3dd1-b856-f639e8442e75","22111B",0.348137670439135 +"Chromic(VI) acid","emission/air","4717a8b5-2466-3dd1-b856-f639e8442e75","22111A",0.651862329560865 +"Chromium","emission/air","98bd36e1-fbe4-32ee-ba78-3b6726917c9b","221111",0.0131991200160424 +"Chromium","emission/air","98bd36e1-fbe4-32ee-ba78-3b6726917c9b","22111A",0.986800879983958 "Chromium","emission/ground","979f30f5-f17e-3091-907f-af1921e7e637","221111",1 -"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","221113",0.0137513695680843 -"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","221117",2.54635748439216e-05 -"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","22111A",0.979766872679347 -"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","22111B",0.00588519456232118 -"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","22111C",0.000571099615403631 -"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221111",4.79378380643129e-05 -"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221113",3.6542228741778e-05 -"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221116",6.76692108173804e-07 -"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221117",0.00144065619102804 -"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221118",0.00310044750313217 -"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","22111A",0.868550196872271 -"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","22111B",0.124124137842355 -"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","22111C",0.00269940483229919 -"Chromium(III)","emission/water","5905f568-b472-3e56-9f96-d41c33f34ef7","221117",0.00820564264022346 -"Chromium(III)","emission/water","5905f568-b472-3e56-9f96-d41c33f34ef7","22111A",0.00153837786528339 -"Chromium(III)","emission/water","5905f568-b472-3e56-9f96-d41c33f34ef7","22111B",0.990023739940043 -"Chromium(III)","emission/water","5905f568-b472-3e56-9f96-d41c33f34ef7","22111C",0.000232239554449623 -"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221111",0.000121684581799243 -"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221113",4.2241345553349e-05 -"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221114",1.33259627410858e-07 -"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221116",8.177609841849e-07 -"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221117",0.00622267325689476 -"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221118",0.00384126331246397 -"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","22111A",0.928974019867414 -"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","22111B",0.0596126975751581 -"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","22111C",0.00118446904010469 -"Chromium(VI)","emission/water","53ebe715-1465-358f-9e31-ae55956903d1","221117",0.000431137574982759 -"Chromium(VI)","emission/water","53ebe715-1465-358f-9e31-ae55956903d1","22111A",0.973796652537118 -"Chromium(VI)","emission/water","53ebe715-1465-358f-9e31-ae55956903d1","22111B",0.0252715756704762 -"Chromium(VI)","emission/water","53ebe715-1465-358f-9e31-ae55956903d1","22111C",0.000500634217422857 -"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221111",8.97824058389898e-05 -"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221113",0.000103817969328817 -"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221114",3.25497138505535e-07 -"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221115",2.89656126487624e-06 -"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221117",0.000209560831565214 -"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","22111A",0.389043243502912 -"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","22111B",0.604484836632653 -"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","22111C",0.00606553659929887 +"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","221117",1.7501670603839e-05 +"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","221113",0.0107980055624528 +"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","22111B",0.00430464308056584 +"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","22111A",0.984343551354024 +"Chromium","emission/water","8a7ef355-2f16-3368-afc8-cf40ed441619","22111C",0.000536298332353145 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221118",0.0022380801239371 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221113",2.96071710542389e-05 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221116",5.55275023185078e-07 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","22111B",0.0936778372773647 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","22111C",0.00261557325449701 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221117",0.00102170323695538 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","22111A",0.90037444552639 +"Chromium(III)","emission/air","d9ed8839-5d20-3904-af9c-5807284712e0","221111",4.219813477796e-05 +"Chromium(III)","emission/water","5905f568-b472-3e56-9f96-d41c33f34ef7","22111A",0.00211274642361481 +"Chromium(III)","emission/water","5905f568-b472-3e56-9f96-d41c33f34ef7","22111C",0.000298120040757524 +"Chromium(III)","emission/water","5905f568-b472-3e56-9f96-d41c33f34ef7","221117",0.00770962286817987 +"Chromium(III)","emission/water","5905f568-b472-3e56-9f96-d41c33f34ef7","22111B",0.989879510667448 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221114",1.25463062550789e-08 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221118",0.00272789249319188 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","22111B",0.0442610089683231 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","22111C",0.00112907945408864 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221116",6.60154119656443e-07 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221111",0.000105378567124661 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221113",3.36698784808321e-05 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","221117",0.00434153534561459 +"Chromium(VI)","emission/air","ac249128-5489-3eb8-bfb8-61c0b93d2e07","22111A",0.94740076259275 +"Chromium(VI)","emission/water","53ebe715-1465-358f-9e31-ae55956903d1","221117",0.000297044226247923 +"Chromium(VI)","emission/water","53ebe715-1465-358f-9e31-ae55956903d1","22111A",0.98070262058569 +"Chromium(VI)","emission/water","53ebe715-1465-358f-9e31-ae55956903d1","22111B",0.0185290755801501 +"Chromium(VI)","emission/water","53ebe715-1465-358f-9e31-ae55956903d1","22111C",0.000471259607911434 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221117",0.000171675062439823 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221114",3.59828221297209e-08 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","22111A",0.465863618977532 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221113",9.71643819111511e-05 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","22111C",0.00678892132730862 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","22111B",0.526985545675599 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221115",1.7453291320843e-06 +"Chrysene","emission/air","993fb955-f686-37f7-96e1-22b8c2a35ced","221111",9.12932632551962e-05 "Chrysene","emission/water","18b5a96b-f01a-3b11-8077-16777ce57763","22111B",1 -"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","221113",8.00293022844756e-07 -"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","221117",0.00525905230305557 -"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","221118",4.7037149108416e-05 -"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","22111A",0.949552334858303 -"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","22111B",0.0420629335568934 -"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","22111C",0.0030778418396173 +"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","221118",3.31960219214767e-05 +"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","221117",0.00364641179401608 +"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","22111B",0.0310365880501849 +"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","221113",6.33934977454657e-07 +"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","22111A",0.962367496166205 +"Cobalt","emission/air","e0d81f05-0407-3fc9-9f11-e2d22a6edebd","22111C",0.00291567403269524 "Cobalt","emission/ground","cb8f8925-a811-38ff-b19f-85377dc28de0","22111A",1 -"Cobalt","emission/water","7cbf7556-2b17-3cc2-97cf-5c9e24e50d65","221117",0.000509257105316605 -"Cobalt","emission/water","7cbf7556-2b17-3cc2-97cf-5c9e24e50d65","22111A",0.154386526000982 -"Cobalt","emission/water","7cbf7556-2b17-3cc2-97cf-5c9e24e50d65","22111C",0.845104216893701 -"Copper","emission/air","b15117ec-3b8e-35de-bef2-00aec1b9636e","221111",0.0108499095840868 -"Copper","emission/air","b15117ec-3b8e-35de-bef2-00aec1b9636e","22111A",0.989150090415913 +"Cobalt","emission/water","7cbf7556-2b17-3cc2-97cf-5c9e24e50d65","221117",0.000368809361966244 +"Cobalt","emission/water","7cbf7556-2b17-3cc2-97cf-5c9e24e50d65","22111C",0.836198830530801 +"Cobalt","emission/water","7cbf7556-2b17-3cc2-97cf-5c9e24e50d65","22111A",0.163432360107233 +"Copper","emission/air","b15117ec-3b8e-35de-bef2-00aec1b9636e","22111A",0.990771649760784 +"Copper","emission/air","b15117ec-3b8e-35de-bef2-00aec1b9636e","221111",0.00922835023921618 "Copper","emission/ground","ec1ff388-9bbb-367f-828c-f7b4f7ceaa47","221111",1 -"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","221111",4.27006871910041e-06 -"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","221113",0.101597499583333 -"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","221114",0.000941388947235539 -"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","221117",0.00015746895337093 -"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","22111A",0.414753939767835 -"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","22111B",0.411172544133085 -"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","22111C",0.0713728885464211 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","221113",0.0922883175139131 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","22111C",0.0775343174858668 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","221111",4.21416468198918e-06 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","22111A",0.482037233458615 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","22111B",0.347909706722208 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","221117",0.00012520486037038 +"Copper","emission/water","965958b3-8368-3395-a55d-f6f819e40587","221114",0.000101005794345054 "Creosote","emission/air","c8ac25be-c7a1-3b64-9de6-d81049847f6e","22111C",1 "Creosote","emission/ground","8cc76385-07e7-340f-b8c8-fd56ae0193a2","22111C",1 -"Cresol","emission/air","8ec7f708-9411-37a7-80df-4096d397c513","22111A",0.00329231010425649 -"Cresol","emission/air","8ec7f708-9411-37a7-80df-4096d397c513","22111B",0.996707689895744 +"Cresol","emission/air","8ec7f708-9411-37a7-80df-4096d397c513","22111A",0.00451663048540724 +"Cresol","emission/air","8ec7f708-9411-37a7-80df-4096d397c513","22111B",0.995483369514593 "Cresol","emission/water","dce9617d-7a15-32be-adcb-f01854016ebc","22111C",1 "Crotonaldehyde","emission/air","77f7f5d5-a234-3f37-aec1-9b63847ef396","22111B",1 -"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","221111",7.09131373201434e-06 -"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","221113",9.4128250677781e-07 -"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","221115",2.22999741667813e-07 -"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","221117",0.000323501216563846 -"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","22111A",0.407361686806868 -"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","22111B",0.050275029896869 -"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","22111C",0.542031526483719 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","221113",7.73734914568659e-07 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","22111A",0.428428885043014 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","221115",1.18014840464674e-07 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","22111B",0.0384949069665385 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","221111",6.33303424926469e-06 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","221117",0.000232761240831305 +"Cumene","emission/air","8f6e0975-9a80-3709-8ee7-1e4c0a9c9e1c","22111C",0.532836221965612 "Cumene","emission/water","ebc24f2b-e653-3fc7-be59-82175940b17b","22111C",1 -"Cyanide","emission/air","37037bee-9867-3769-999c-c4d891b9975b","221117",0.000768070796673517 -"Cyanide","emission/air","37037bee-9867-3769-999c-c4d891b9975b","22111A",0.981902254276292 -"Cyanide","emission/air","37037bee-9867-3769-999c-c4d891b9975b","22111B",0.0163435226233169 -"Cyanide","emission/air","37037bee-9867-3769-999c-c4d891b9975b","22111C",0.000986152303717198 -"Cyanide","emission/water","3b66fd84-6bf2-3a57-bd4c-f779d71fee69","221113",9.55933439672715e-07 -"Cyanide","emission/water","3b66fd84-6bf2-3a57-bd4c-f779d71fee69","221118",0.0168030536290297 -"Cyanide","emission/water","3b66fd84-6bf2-3a57-bd4c-f779d71fee69","22111A",0.982678242636664 -"Cyanide","emission/water","3b66fd84-6bf2-3a57-bd4c-f779d71fee69","22111B",0.000517747800866216 -"Cyclohexane","emission/air","12b39b80-c5cb-3410-9968-c6e41304f7d0","22111B",0.566467341306348 -"Cyclohexane","emission/air","12b39b80-c5cb-3410-9968-c6e41304f7d0","22111C",0.433532658693652 +"Cyanide","emission/air","37037bee-9867-3769-999c-c4d891b9975b","221117",0.000527966135531142 +"Cyanide","emission/air","37037bee-9867-3769-999c-c4d891b9975b","22111C",0.000926154103701205 +"Cyanide","emission/air","37037bee-9867-3769-999c-c4d891b9975b","22111A",0.98659040920371 +"Cyanide","emission/air","37037bee-9867-3769-999c-c4d891b9975b","22111B",0.011955470557058 +"Cyanide","emission/water","3b66fd84-6bf2-3a57-bd4c-f779d71fee69","221113",7.51077000751235e-07 +"Cyanide","emission/water","3b66fd84-6bf2-3a57-bd4c-f779d71fee69","22111A",0.987857965545883 +"Cyanide","emission/water","3b66fd84-6bf2-3a57-bd4c-f779d71fee69","221118",0.0117623579035744 +"Cyanide","emission/water","3b66fd84-6bf2-3a57-bd4c-f779d71fee69","22111B",0.000378925473541643 +"Cyclohexane","emission/air","12b39b80-c5cb-3410-9968-c6e41304f7d0","22111C",0.495605168314162 +"Cyclohexane","emission/air","12b39b80-c5cb-3410-9968-c6e41304f7d0","22111B",0.504394831685838 "Cyclohexane","emission/water","76b9697a-54d4-3747-acb5-7618be47ca19","22111C",1 -"Di(2-ethylhexyl) phthalate","emission/air","3600a034-449c-3066-9960-6a13903c310d","221117",0.000403673420823186 -"Di(2-ethylhexyl) phthalate","emission/air","3600a034-449c-3066-9960-6a13903c310d","22111A",0.983918241123936 -"Di(2-ethylhexyl) phthalate","emission/air","3600a034-449c-3066-9960-6a13903c310d","22111B",0.0146949361354833 -"Di(2-ethylhexyl) phthalate","emission/air","3600a034-449c-3066-9960-6a13903c310d","22111C",0.000983149319757489 -"Di(2-ethylhexyl) phthalate","emission/water","08ae3c52-dabf-369c-aeb4-d5359def8f25","221113",0.00262403846619723 -"Di(2-ethylhexyl) phthalate","emission/water","08ae3c52-dabf-369c-aeb4-d5359def8f25","22111B",0.997346084913021 -"Di(2-ethylhexyl) phthalate","emission/water","08ae3c52-dabf-369c-aeb4-d5359def8f25","22111C",2.98766207814924e-05 -"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","221111",0.000302279269398699 -"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","221113",0.00427465501773841 -"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","221117",0.0226657360961726 -"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","22111A",0.0684559094169097 -"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","22111B",0.882063574799489 -"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","22111C",0.0222378454002918 +"Di(2-ethylhexyl) phthalate","emission/air","3600a034-449c-3066-9960-6a13903c310d","22111A",0.988056437291388 +"Di(2-ethylhexyl) phthalate","emission/air","3600a034-449c-3066-9960-6a13903c310d","22111B",0.0107434264825719 +"Di(2-ethylhexyl) phthalate","emission/air","3600a034-449c-3066-9960-6a13903c310d","221117",0.00027732503531562 +"Di(2-ethylhexyl) phthalate","emission/air","3600a034-449c-3066-9960-6a13903c310d","22111C",0.000922811190724119 +"Di(2-ethylhexyl) phthalate","emission/water","08ae3c52-dabf-369c-aeb4-d5359def8f25","22111B",0.997145187745636 +"Di(2-ethylhexyl) phthalate","emission/water","08ae3c52-dabf-369c-aeb4-d5359def8f25","22111C",3.8349723872757e-05 +"Di(2-ethylhexyl) phthalate","emission/water","08ae3c52-dabf-369c-aeb4-d5359def8f25","221113",0.00281646253049087 +"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","22111B",0.855639269217454 +"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","221111",0.00034200573135513 +"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","221117",0.0206606726404651 +"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","221113",0.00445156953322173 +"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","22111C",0.0276950263560935 +"Dibenz[a,h]anthracene","emission/air","e51f946b-179b-3580-9ba3-37299516be47","22111A",0.0912114565214104 "Dibenzo[a,h]pyrene","emission/air","0f6267c8-58a9-31ca-8e2f-be97e07d7eaf","22111B",1 -"Dibenzofuran","emission/air","f995b27d-3062-3c33-9170-d4e0a396375d","22111A",0.952431739546249 -"Dibenzofuran","emission/air","f995b27d-3062-3c33-9170-d4e0a396375d","22111B",0.0475682604537511 -"Dibutyl phthalate","emission/air","35b3842d-4a7b-305b-afe8-b908715b39d6","221117",9.47057050525314e-08 -"Dibutyl phthalate","emission/air","35b3842d-4a7b-305b-afe8-b908715b39d6","22111A",0.833205975805153 -"Dibutyl phthalate","emission/air","35b3842d-4a7b-305b-afe8-b908715b39d6","22111B",0.166793929489142 +"Dibenzofuran","emission/air","f995b27d-3062-3c33-9170-d4e0a396375d","22111A",0.964914738046808 +"Dibenzofuran","emission/air","f995b27d-3062-3c33-9170-d4e0a396375d","22111B",0.0350852619531915 +"Dibutyl phthalate","emission/air","35b3842d-4a7b-305b-afe8-b908715b39d6","22111B",0.127202001685418 +"Dibutyl phthalate","emission/air","35b3842d-4a7b-305b-afe8-b908715b39d6","221117",6.78693446234534e-08 +"Dibutyl phthalate","emission/air","35b3842d-4a7b-305b-afe8-b908715b39d6","22111A",0.872797930445238 "Dibutyl phthalate","emission/water","34d6173b-16bf-35f7-a4c5-96ed874cb618","22111B",1 "Dichlorobenzene","emission/water","83b8990a-c69c-3123-9668-ad74f2533b7f","22111B",1 -"Dichlorobromomethane","emission/water","f4d33a6b-347e-3057-89b1-a7b8ecf1030e","22111A",0.148649498710456 -"Dichlorobromomethane","emission/water","f4d33a6b-347e-3057-89b1-a7b8ecf1030e","22111B",0.851350501289544 +"Dichlorobromomethane","emission/water","f4d33a6b-347e-3057-89b1-a7b8ecf1030e","22111A",0.193437512542638 +"Dichlorobromomethane","emission/water","f4d33a6b-347e-3057-89b1-a7b8ecf1030e","22111B",0.806562487457362 "Dicyclopentadiene","emission/air","60971e7f-03ce-37c1-b95b-b51f4d2a49e1","22111B",1 "Dicyclopentadiene","emission/ground","39bce74f-bbd2-33d5-92a3-cd73554c481b","22111B",1 "Dicyclopentadiene","emission/water","62ad4abc-7465-3350-9177-ea28dc083149","22111B",1 "Diethanolamine","emission/air","f8188722-8d99-32de-97c3-dee774c3a503","22111B",1 "Diethanolamine","emission/water","e200edf4-9f8c-32d1-857b-83015bf29b09","221118",1 -"Dimethyl phthalate","emission/air","4784dde7-fce7-3d68-9667-820dc31df78e","22111A",0.94395480857016 -"Dimethyl phthalate","emission/air","4784dde7-fce7-3d68-9667-820dc31df78e","22111B",0.0560451914298396 -"Dimethyl sulfate","emission/air","a8bac6c7-4db5-34b1-8069-f47644edba5f","221117",0.000752570171449135 -"Dimethyl sulfate","emission/air","a8bac6c7-4db5-34b1-8069-f47644edba5f","22111A",0.983826338516161 -"Dimethyl sulfate","emission/air","a8bac6c7-4db5-34b1-8069-f47644edba5f","22111B",0.0144574106211006 -"Dimethyl sulfate","emission/air","a8bac6c7-4db5-34b1-8069-f47644edba5f","22111C",0.000963680691289324 +"Dimethyl phthalate","emission/air","4784dde7-fce7-3d68-9667-820dc31df78e","22111A",0.958565571433622 +"Dimethyl phthalate","emission/air","4784dde7-fce7-3d68-9667-820dc31df78e","22111B",0.0414344285663782 +"Dimethyl sulfate","emission/air","a8bac6c7-4db5-34b1-8069-f47644edba5f","22111B",0.0105702428753326 +"Dimethyl sulfate","emission/air","a8bac6c7-4db5-34b1-8069-f47644edba5f","221117",0.000517041329573755 +"Dimethyl sulfate","emission/air","a8bac6c7-4db5-34b1-8069-f47644edba5f","22111C",0.000904577671962394 +"Dimethyl sulfate","emission/air","a8bac6c7-4db5-34b1-8069-f47644edba5f","22111A",0.988008138123131 "Dipotassium endothall","emission/water","6a051858-29f7-32c8-a472-03c419775a2b","221111",1 "Endosulfan","emission/water","c5687d4c-d0e3-3e3c-b9e4-662e2f852e9b","22111B",1 "Epichlorohydrin","emission/air","9c75fe3f-354c-33b4-b5d4-b88198daa2d1","22111B",1 "Epichlorohydrin","emission/water","6b9f80f5-e697-3f89-8914-e6fe87a6169c","22111B",1 "Ethanolamine","emission/water","d9e1be63-768f-3baf-8187-311121fd13ed","221113",1 -"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221111",0.010490890438746 -"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221113",0.00016379433248317 -"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221115",1.91928539184379e-06 -"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221116",0.00010558580733131 -"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221117",0.0939666654771042 -"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","22111A",0.145713296698367 -"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","22111B",0.748944120181069 -"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","22111C",0.000613727779507152 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","22111C",0.000749916672753093 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221116",0.000109259933861251 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","22111A",0.190487193072065 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221113",0.000167355161980654 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221117",0.0840381718102116 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221111",0.0116456979935172 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","22111B",0.71280114283099 +"Ethylbenzene","emission/air","7b2a26ef-86ec-39e1-82e6-016b31800e2b","221115",1.26252462153645e-06 "Ethylbenzene","emission/ground","2355ef0f-9d76-3aff-95c1-96c81478f8b9","22111B",1 -"Ethylbenzene","emission/water","6c82f4d1-4fa8-3b7e-816d-c4153c0eba6d","22111B",0.719294358077194 -"Ethylbenzene","emission/water","6c82f4d1-4fa8-3b7e-816d-c4153c0eba6d","22111C",0.280705641922806 -"Ethylene dibromide","emission/air","a8ead97e-1f5f-3c0c-aa72-c7b25050864e","221117",0.0513672333888786 -"Ethylene dibromide","emission/air","a8ead97e-1f5f-3c0c-aa72-c7b25050864e","22111A",0.943626572565781 -"Ethylene dibromide","emission/air","a8ead97e-1f5f-3c0c-aa72-c7b25050864e","22111B",0.00469291711336469 -"Ethylene dibromide","emission/air","a8ead97e-1f5f-3c0c-aa72-c7b25050864e","22111C",0.000313276931975782 +"Ethylbenzene","emission/water","6c82f4d1-4fa8-3b7e-816d-c4153c0eba6d","22111B",0.666209708329207 +"Ethylbenzene","emission/water","6c82f4d1-4fa8-3b7e-816d-c4153c0eba6d","22111C",0.333790291670793 +"Ethylene dibromide","emission/air","a8ead97e-1f5f-3c0c-aa72-c7b25050864e","22111A",0.960456002349997 +"Ethylene dibromide","emission/air","a8ead97e-1f5f-3c0c-aa72-c7b25050864e","22111B",0.00347754349112505 +"Ethylene dibromide","emission/air","a8ead97e-1f5f-3c0c-aa72-c7b25050864e","221117",0.0357684129203981 +"Ethylene dibromide","emission/air","a8ead97e-1f5f-3c0c-aa72-c7b25050864e","22111C",0.000298041238480316 "Ethylene dibromide","emission/water","941c13f5-f858-3032-a780-cb76cbdf0f54","22111A",1 -"Ethylene glycol","emission/air","f6696716-3d44-38fe-8ef2-8f4284367cd1","22111A",0.0243388978746863 -"Ethylene glycol","emission/air","f6696716-3d44-38fe-8ef2-8f4284367cd1","22111B",0.974634617324899 -"Ethylene glycol","emission/air","f6696716-3d44-38fe-8ef2-8f4284367cd1","22111C",0.00102648480041453 +"Ethylene glycol","emission/air","f6696716-3d44-38fe-8ef2-8f4284367cd1","22111B",0.965574230909242 +"Ethylene glycol","emission/air","f6696716-3d44-38fe-8ef2-8f4284367cd1","22111A",0.0331201556473135 +"Ethylene glycol","emission/air","f6696716-3d44-38fe-8ef2-8f4284367cd1","22111C",0.00130561344344479 "Ethylene glycol","emission/ground","9c91d89c-c446-3a94-b208-12c8adc10f6f","22111B",1 "Ethylene glycol","emission/water","41520962-0f73-3a5a-a396-c1c2d52bb55f","22111B",1 "Ethylene oxide","emission/air","d5670f7b-8a81-3d00-92b1-8c9e12e0ef69","22111B",1 "Ethylene oxide","emission/ground","1cd6cefc-6be4-3c59-82ca-feb83a4e0747","22111B",1 "Ethylene oxide","emission/water","1a2c0ee2-520a-3971-a68e-81982d8236fc","22111B",1 -"Ethylene","emission/air","3378c02d-6828-36dc-a9fe-9948b59a8bd6","22111A",0.0142974266865937 -"Ethylene","emission/air","3378c02d-6828-36dc-a9fe-9948b59a8bd6","22111B",0.981413345307428 -"Ethylene","emission/air","3378c02d-6828-36dc-a9fe-9948b59a8bd6","22111C",0.00428922800597811 -"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221111",0.000219287513438597 -"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221113",0.00012090783628747 -"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221114",8.93246094994563e-07 -"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221115",6.92669718593427e-06 -"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221117",0.000242768184202665 -"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221118",4.09452567451119e-08 -"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","22111A",0.0871964246574737 -"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","22111B",0.904312603669969 -"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","22111C",0.00790014725009105 -"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221111",0.00442375244319328 -"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221113",0.00379143398231053 -"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221115",0.000143505537559896 -"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221117",0.0489735267801402 -"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221118",4.79459329380619e-07 -"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","22111A",0.316887402257871 -"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","22111B",0.619616717996498 -"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","22111C",0.0061631815430977 +"Ethylene","emission/air","3378c02d-6828-36dc-a9fe-9948b59a8bd6","22111B",0.975018691031649 +"Ethylene","emission/air","3378c02d-6828-36dc-a9fe-9948b59a8bd6","22111C",0.00547089489074612 +"Ethylene","emission/air","3378c02d-6828-36dc-a9fe-9948b59a8bd6","22111A",0.0195104140776049 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","22111B",0.873864157320718 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","22111A",0.115736847078175 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221115",4.62629019726876e-06 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","22111C",0.00980118947530252 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221113",0.000125429896040401 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221118",3.78442217665904e-08 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221114",1.09453895749501e-07 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221111",0.000247157302088327 +"Fluoranthene","emission/air","c89c263a-b0b7-34c9-a27c-d9ebf851c3cc","221117",0.000220445339360213 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","22111B",0.554148144827185 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","22111C",0.00707662159220899 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221117",0.0411574013307993 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221115",8.87059483592914e-05 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","22111A",0.389273963887261 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221113",0.0036402191093228 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221118",4.10133427579412e-07 +"Fluorene","emission/air","c5697dcb-8fd3-3046-b499-f34e33495b61","221111",0.00461453317143575 "Fluorene","emission/water","d83e2d8e-93e4-37c2-be41-b7b7d9f93a11","22111B",1 -"Fluoride","emission/water","e8a4d121-c284-3073-ba8f-37f9253ff20a","221117",6.12508951470939e-05 -"Fluoride","emission/water","e8a4d121-c284-3073-ba8f-37f9253ff20a","22111A",0.997194689253196 -"Fluoride","emission/water","e8a4d121-c284-3073-ba8f-37f9253ff20a","22111B",0.00274405985165732 +"Fluoride","emission/water","e8a4d121-c284-3073-ba8f-37f9253ff20a","221117",4.19354454644878e-05 +"Fluoride","emission/water","e8a4d121-c284-3073-ba8f-37f9253ff20a","22111B",0.00199930288056987 +"Fluoride","emission/water","e8a4d121-c284-3073-ba8f-37f9253ff20a","22111A",0.997958761673966 "Fluorine","emission/air","2e40d2b0-30ad-3c0c-ba94-5172209277b9","22111A",1 -"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221111",0.0147641059374141 -"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221113",0.000597483116010992 -"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221114",0.00114022148060771 -"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221115",2.85593746358286e-05 -"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221117",0.145917417754448 -"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221118",0.00013998997206484 -"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","22111A",0.0222521322460114 -"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","22111B",0.80740112678708 -"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","22111C",0.0077589633317266 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","22111B",0.804822427254881 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221118",0.000133468347371886 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221114",0.000144123464062527 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","22111A",0.0304670199975247 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","22111C",0.00992962104399412 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221113",0.000639377908008678 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221111",0.0171653266250013 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221115",1.96761778360295e-05 +"Formaldehyde","emission/air","a257b8d3-62dd-37ad-b429-73d96c97165c","221117",0.136678959181319 "Formaldehyde","emission/water","c4629bd9-6185-3901-816a-96cee29a19c9","22111B",1 -"Formic acid","emission/air","9f9ccf8f-0135-34ae-8c01-4e41813a9311","22111A",0.448279538367227 -"Formic acid","emission/air","9f9ccf8f-0135-34ae-8c01-4e41813a9311","22111B",0.551720461632773 +"Formic acid","emission/air","9f9ccf8f-0135-34ae-8c01-4e41813a9311","22111A",0.527417816348427 +"Formic acid","emission/air","9f9ccf8f-0135-34ae-8c01-4e41813a9311","22111B",0.472582183651573 "Formic acid","emission/water","8b67e596-b3af-30d7-84d5-c710373ed376","22111A",1 "Glycidol","emission/air","7da836fc-1250-3c81-8061-4ae278a39c3b","22111B",1 "Glycol ethers","emission/air","ea0a3ada-c97c-3f2a-a88a-6553b146c818","22111B",1 "HCFC-22","emission/air","76cf7898-8461-3265-a3a4-14dd2682779e","22111B",1 "HCFC-22","emission/water","da5e6f64-ea17-3366-a340-c5ed2147713c","221113",1 -"Hexachlorobenzene","emission/air","28c8bbdf-1a2b-3c96-baf8-d965df47c0c6","22111A",0.999914204798579 -"Hexachlorobenzene","emission/air","28c8bbdf-1a2b-3c96-baf8-d965df47c0c6","22111B",8.57952014212842e-05 +"Hexachlorobenzene","emission/air","28c8bbdf-1a2b-3c96-baf8-d965df47c0c6","22111B",6.24633835028794e-05 +"Hexachlorobenzene","emission/air","28c8bbdf-1a2b-3c96-baf8-d965df47c0c6","22111A",0.999937536616497 "Hexachlorobenzene","emission/water","949be795-cf00-3338-acea-9a0f0a3f087a","22111B",1 -"Hexachlorobutadiene","emission/air","4a90ef9a-bcb0-3e9d-80da-1a48dfd8ae6f","221117",0.00794245466806534 -"Hexachlorobutadiene","emission/air","4a90ef9a-bcb0-3e9d-80da-1a48dfd8ae6f","22111A",0.992057545331935 +"Hexachlorobutadiene","emission/air","4a90ef9a-bcb0-3e9d-80da-1a48dfd8ae6f","22111A",0.994552692900033 +"Hexachlorobutadiene","emission/air","4a90ef9a-bcb0-3e9d-80da-1a48dfd8ae6f","221117",0.0054473070999674 "Hexachlorocyclohexane","emission/water","509cda9a-927f-38d9-b3cb-5bbb5fb2d063","22111B",1 "Hexachlorocyclopentadiene","emission/air","37749376-d759-3afe-b5eb-ccc6b8ec1868","22111A",1 "Hexachloroethane","emission/air","f8348707-b585-36c3-bce1-dd8d43710a95","22111A",1 -"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221111",4.05885065900615e-06 -"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221113",0.000102715703985136 -"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221115",1.34696338039626e-07 -"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221117",0.0178934192092659 -"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221118",0.0213791734046052 -"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","22111A",0.0504608131294664 -"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","22111B",0.904826357567997 -"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","22111C",0.00533332743768299 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221113",0.000108281873110941 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221117",0.0165110536257265 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221115",9.14186404248406e-08 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","22111A",0.0680611861410935 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221118",0.0200797910697585 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","22111C",0.00672379008564061 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","221111",4.64873633627153e-06 +"Hexane","emission/air","7955b6e2-3ae6-315c-94f1-028d7faada34","22111B",0.888511157049693 "Hexane","emission/water","14622b86-6d9a-3b6c-bc4b-84251899a991","22111C",1 "Hydrazine","emission/air","44e7dac5-7299-3a7a-9480-4152ba299a12","22111A",1 -"Hydrazine","emission/water","f5faeb2b-d0e0-346b-8b49-fb45c4e35bfb","221113",0.99386273118701 -"Hydrazine","emission/water","f5faeb2b-d0e0-346b-8b49-fb45c4e35bfb","22111A",0.00519246990561924 -"Hydrazine","emission/water","f5faeb2b-d0e0-346b-8b49-fb45c4e35bfb","22111B",0.000944798907370551 -"Hydrocarbons","emission/water","42983b7d-3999-3fa9-b172-a0fc678236fe","22111A",0.0220014073314 -"Hydrocarbons","emission/water","42983b7d-3999-3fa9-b172-a0fc678236fe","22111B",0.9779985926686 -"Hydrocarbons, halogenated","emission/water","4203cce1-1793-33d9-8de1-046aae0a373e","22111A",0.999506633344226 -"Hydrocarbons, halogenated","emission/water","4203cce1-1793-33d9-8de1-046aae0a373e","22111B",0.000493366655774471 -"Hydrocarbons, petroleum","emission/water","4141409a-7f36-324a-a7f8-b5f2d3cef6fc","221113",0.0662740744316262 -"Hydrocarbons, petroleum","emission/water","4141409a-7f36-324a-a7f8-b5f2d3cef6fc","221117",0.47825457353864 -"Hydrocarbons, petroleum","emission/water","4141409a-7f36-324a-a7f8-b5f2d3cef6fc","22111B",0.455471352029734 -"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","221117",0.0382356488306846 -"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","221118",0.00471017329344218 -"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","22111A",0.795075523615756 -"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","22111B",0.155973424727216 -"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","22111C",0.00600522953290143 -"Hydrofluoric acid","emission/air","1c288388-0f32-30f1-8267-19b8d72c80df","221117",0.00132331278546039 -"Hydrofluoric acid","emission/air","1c288388-0f32-30f1-8267-19b8d72c80df","22111A",0.948566450518881 -"Hydrofluoric acid","emission/air","1c288388-0f32-30f1-8267-19b8d72c80df","22111B",0.0498737153605416 -"Hydrofluoric acid","emission/air","1c288388-0f32-30f1-8267-19b8d72c80df","22111C",0.000236521335116727 -"Hydrogen cyanide","emission/air","aa7539ee-9aeb-3cb5-9d64-2a0bd94ebb0f","22111A",0.786205583155949 -"Hydrogen cyanide","emission/air","aa7539ee-9aeb-3cb5-9d64-2a0bd94ebb0f","22111B",0.00211758621832808 -"Hydrogen cyanide","emission/air","aa7539ee-9aeb-3cb5-9d64-2a0bd94ebb0f","22111C",0.211676830625723 +"Hydrazine","emission/water","f5faeb2b-d0e0-346b-8b49-fb45c4e35bfb","221113",0.99248679207168 +"Hydrazine","emission/water","f5faeb2b-d0e0-346b-8b49-fb45c4e35bfb","22111B",0.000878853411162894 +"Hydrazine","emission/water","f5faeb2b-d0e0-346b-8b49-fb45c4e35bfb","22111A",0.00663435451715725 +"Hydrocarbons","emission/water","42983b7d-3999-3fa9-b172-a0fc678236fe","22111B",0.970026098397365 +"Hydrocarbons","emission/water","42983b7d-3999-3fa9-b172-a0fc678236fe","22111A",0.0299739016026348 +"Hydrocarbons, halogenated","emission/water","4203cce1-1793-33d9-8de1-046aae0a373e","22111A",0.999640763509764 +"Hydrocarbons, halogenated","emission/water","4203cce1-1793-33d9-8de1-046aae0a373e","22111B",0.000359236490235675 +"Hydrocarbons, petroleum","emission/water","4141409a-7f36-324a-a7f8-b5f2d3cef6fc","221113",0.0728956819720174 +"Hydrocarbons, petroleum","emission/water","4141409a-7f36-324a-a7f8-b5f2d3cef6fc","22111B",0.466657153993156 +"Hydrocarbons, petroleum","emission/water","4141409a-7f36-324a-a7f8-b5f2d3cef6fc","221117",0.460447164034827 +"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","221117",0.0277191305249951 +"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","22111C",0.0059480580507192 +"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","22111A",0.842526056503174 +"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","22111B",0.120331114385933 +"Hydrochloric acid","emission/air","e2230ed6-8d5e-3315-8bc9-ce337d1283ce","221118",0.00347564053517841 +"Hydrofluoric acid","emission/air","1c288388-0f32-30f1-8267-19b8d72c80df","22111A",0.962032345268739 +"Hydrofluoric acid","emission/air","1c288388-0f32-30f1-8267-19b8d72c80df","221117",0.00091816472705457 +"Hydrofluoric acid","emission/air","1c288388-0f32-30f1-8267-19b8d72c80df","22111C",0.000224214071591514 +"Hydrofluoric acid","emission/air","1c288388-0f32-30f1-8267-19b8d72c80df","22111B",0.036825275932615 +"Hydrogen cyanide","emission/air","aa7539ee-9aeb-3cb5-9d64-2a0bd94ebb0f","22111C",0.20074414186664 +"Hydrogen cyanide","emission/air","aa7539ee-9aeb-3cb5-9d64-2a0bd94ebb0f","22111A",0.797691657699768 +"Hydrogen cyanide","emission/air","aa7539ee-9aeb-3cb5-9d64-2a0bd94ebb0f","22111B",0.00156420043359217 "Hydrogen cyanide","emission/water","db989bb6-a79a-35b1-aee9-2db77f60875a","22111C",1 -"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","221116",0.37997914535896 -"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","221117",0.146313182620089 -"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","221118",0.214625045378387 -"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","22111A",0.0811224225980879 -"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","22111B",0.114377940223001 -"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","22111C",0.0635822638214761 -"Hydrogen sulfide","emission/water","448fcd9d-49f8-3144-bb84-df0fd1f8ab08","22111B",0.98876404494382 -"Hydrogen sulfide","emission/water","448fcd9d-49f8-3144-bb84-df0fd1f8ab08","22111C",0.0112359550561798 -"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","221111",0.010989730447583 -"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","221113",0.00160866874177159 -"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","221115",0.000361489453603231 -"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","221117",0.0668399811458166 -"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","22111A",0.698531791553229 -"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","22111B",0.209702301996665 -"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","22111C",0.0119660366613319 -"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","221111",8.29078453455296e-05 -"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","221113",0.13879724431969 -"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","221114",0.000752293757149623 -"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","221117",0.00105956931800569 -"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","22111A",0.779131411777943 -"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","22111B",0.0801721809416747 -"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","22111C",4.39204019095332e-06 +"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","221117",0.129298360332383 +"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","22111A",0.104788660739734 +"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","221118",0.193053104054719 +"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","221116",0.388527648643897 +"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","22111C",0.0767679590176725 +"Hydrogen sulfide","emission/air","f8cbcd43-8201-3b05-b19a-82d305414af4","22111B",0.107564267211595 +"Hydrogen sulfide","emission/water","448fcd9d-49f8-3144-bb84-df0fd1f8ab08","22111C",0.0143795498198163 +"Hydrogen sulfide","emission/water","448fcd9d-49f8-3144-bb84-df0fd1f8ab08","22111B",0.985620450180184 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","22111B",0.16614768972311 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","22111A",0.760194830310537 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","221117",0.0497635364822383 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","221111",0.0101557581341147 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","22111C",0.0121719369491754 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","221113",0.00136829267549221 +"Indeno[1,2,3-cd]pyrene","emission/air","e962ef47-cedd-36b6-b962-abacbab62a02","221115",0.000197955725332406 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","221111",7.43534618010932e-05 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","22111B",0.0616446033891819 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","22111A",0.822867112382469 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","221113",0.11457067683748 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","221114",7.33488953148757e-05 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","221117",0.000765569366678249 +"Iron","emission/water","2b61d376-c8c2-31ae-9c19-9b8b958c74dd","22111C",4.33566707561182e-06 "Isobutyraldehyde","emission/air","1ed39c7d-b21c-3a99-9059-6a8d14a73489","22111B",1 "Isobutyraldehyde","emission/ground","a5009aff-1086-3c29-9b67-380ce207558e","22111B",1 -"Isophorone","emission/air","9aa7fac7-87ac-35ac-9cfb-639180846bee","221117",0.000793518775399637 -"Isophorone","emission/air","9aa7fac7-87ac-35ac-9cfb-639180846bee","22111A",0.98294129501566 -"Isophorone","emission/air","9aa7fac7-87ac-35ac-9cfb-639180846bee","22111B",0.0152472259705572 -"Isophorone","emission/air","9aa7fac7-87ac-35ac-9cfb-639180846bee","22111C",0.00101796023838345 +"Isophorone","emission/air","9aa7fac7-87ac-35ac-9cfb-639180846bee","22111C",0.00095575021389684 +"Isophorone","emission/air","9aa7fac7-87ac-35ac-9cfb-639180846bee","221117",0.000545301068576209 +"Isophorone","emission/air","9aa7fac7-87ac-35ac-9cfb-639180846bee","22111A",0.987348658536522 +"Isophorone","emission/air","9aa7fac7-87ac-35ac-9cfb-639180846bee","22111B",0.0111502901810049 "Isoprene","emission/air","df9ed90d-0e23-3c52-85f7-a4f333b5dea3","22111B",1 -"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221111",0.00221760983320083 -"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221113",0.000286675937165634 -"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221115",4.95901348987923e-05 -"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221116",1.39815426373479e-07 -"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221117",0.0203250985888215 -"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221118",0.053898842472777 -"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","22111A",0.869703600853836 -"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","22111B",0.0503547111646986 -"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","22111C",0.00316373119917542 -"Lead","emission/ground","a58c8e84-1ff1-3a64-bf26-567e9bdeb994","221111",0.228277146718288 -"Lead","emission/ground","a58c8e84-1ff1-3a64-bf26-567e9bdeb994","221113",0.771722853281712 -"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","221111",7.25351258600312e-05 -"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","221113",0.00555017984038333 -"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","221117",0.000117702603337506 -"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","221118",0.000903390134895935 -"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","22111A",0.963273679952945 -"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","22111B",0.0300822365513369 -"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","22111C",2.75791241797374e-07 -"Lithium","emission/water","224e47eb-4483-3a1c-b0ec-83d8a39d6041","221113",0.121234752302713 -"Lithium","emission/water","224e47eb-4483-3a1c-b0ec-83d8a39d6041","22111A",0.878765247697287 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","22111B",0.0380728889177055 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221111",0.00195566769257252 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","22111A",0.903222228703701 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221115",2.5915067183873e-05 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221116",1.14938951346656e-07 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221113",0.000232695633392459 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221118",0.038978560672308 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","221117",0.0144408312173911 +"Lead","emission/air","fe829136-3042-36e6-b4cb-7ff591e8db98","22111C",0.00307109715679474 +"Lead","emission/ground","a58c8e84-1ff1-3a64-bf26-567e9bdeb994","221113",0.756786625945548 +"Lead","emission/ground","a58c8e84-1ff1-3a64-bf26-567e9bdeb994","221111",0.243213374054452 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","221113",0.00438047245407329 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","221111",6.21978248311719e-05 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","22111B",0.0221158048887469 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","22111C",2.60310300923175e-07 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","221117",8.13134719499772e-05 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","221118",0.000635241128870072 +"Lead","emission/water","f8204689-71e9-3275-85f4-66c4112e5511","22111A",0.972724709921228 +"Lithium","emission/water","224e47eb-4483-3a1c-b0ec-83d8a39d6041","22111A",0.902667939531574 +"Lithium","emission/water","224e47eb-4483-3a1c-b0ec-83d8a39d6041","221113",0.0973320604684262 "m-Cresol","emission/air","2e1b0e71-eec1-3f93-bbd9-80a2f20615cf","22111A",1 -"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","221111",0.00450827614875838 -"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","221113",0.000524077583651637 -"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","221115",0.000141771603411531 -"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","221117",8.83679704060584e-05 -"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","22111A",0.144260521997483 -"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","22111B",0.85047698469629 -"m-Xylene","emission/water","a975efda-5fb3-38a9-8d3f-212606aa853f","22111B",0.996770938446014 -"m-Xylene","emission/water","a975efda-5fb3-38a9-8d3f-212606aa853f","22111C",0.00322906155398587 -"Magnesium","emission/water","1345e5a3-e4c5-3cc1-b896-988ae1796d8e","221117",0.00726990679269591 -"Magnesium","emission/water","1345e5a3-e4c5-3cc1-b896-988ae1796d8e","22111A",0.992730093207304 -"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","221111",8.02605506253131e-05 -"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","221113",0.0012866896677402 -"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","221117",0.119518653915219 -"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","221118",0.0202875553222923 -"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","22111A",0.617156177709701 -"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","22111B",0.231056899207197 -"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","22111C",0.0106137636272255 -"Manganese","emission/water","8f023abc-b8fc-3ef7-9571-f4cf6c2b6820","221117",1.55385245436573e-05 -"Manganese","emission/water","8f023abc-b8fc-3ef7-9571-f4cf6c2b6820","22111A",0.999934068743368 -"Manganese","emission/water","8f023abc-b8fc-3ef7-9571-f4cf6c2b6820","22111B",5.03148074798522e-05 -"Manganese","emission/water","8f023abc-b8fc-3ef7-9571-f4cf6c2b6820","22111C",7.79246087622165e-08 -"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221111",2.27728668398306e-05 -"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221113",0.000108676169305612 -"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221114",2.22056339968165e-06 -"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221116",0.00336887864820634 -"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221117",0.00498125459117253 -"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221118",0.00782107834579958 -"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","22111A",0.840680380289928 -"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","22111B",0.133723525647032 -"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","22111C",0.00929121287831623 +"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","22111A",0.187886358963816 +"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","221117",7.87369909560859e-05 +"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","221113",0.000533478570520407 +"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","221111",0.00498591459387386 +"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","221115",9.29117633537022e-05 +"m-Xylene","emission/air","a20f692f-5cab-3036-b3aa-821fb758a39c","22111B",0.80642259911748 +"m-Xylene","emission/water","a975efda-5fb3-38a9-8d3f-212606aa853f","22111B",0.99585812789037 +"m-Xylene","emission/water","a975efda-5fb3-38a9-8d3f-212606aa853f","22111C",0.00414187210963053 +"Magnesium","emission/water","1345e5a3-e4c5-3cc1-b896-988ae1796d8e","22111A",0.995015019380957 +"Magnesium","emission/water","1345e5a3-e4c5-3cc1-b896-988ae1796d8e","221117",0.0049849806190427 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","221113",0.0011270819452072 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","221111",7.63830057092172e-05 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","22111A",0.691676652266692 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","221118",0.0158329107444802 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","221117",0.0916389091839857 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","22111C",0.0111185480341676 +"Manganese","emission/air","9a474c27-63f9-3d0d-a74c-465fd97400e7","22111B",0.188529514819758 +"Manganese","emission/water","8f023abc-b8fc-3ef7-9571-f4cf6c2b6820","22111C",7.28372158383226e-08 +"Manganese","emission/water","8f023abc-b8fc-3ef7-9571-f4cf6c2b6820","221117",1.0630508448667e-05 +"Manganese","emission/water","8f023abc-b8fc-3ef7-9571-f4cf6c2b6820","22111B",3.66316318200171e-05 +"Manganese","emission/water","8f023abc-b8fc-3ef7-9571-f4cf6c2b6820","22111A",0.999952665022515 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","22111B",0.101586996860822 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","22111A",0.877220640814406 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221118",0.00568286811299422 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221111",2.01781901489927e-05 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221117",0.00355592711811871 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221116",0.00278260837140427 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","22111C",0.00906193557330049 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221114",2.13908595186091e-07 +"Mercury","emission/air","e2c65e04-f613-33db-9a6e-4cb4577b0005","221113",8.86310502107129e-05 "Mercury","emission/ground","2ae8f50e-97b7-33b5-b936-e1d199425695","22111A",1 -"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","221113",0.00170798113977818 -"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","221114",4.3671725926746e-05 -"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","221117",2.02711189119524e-06 -"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","221118",3.5801556236767e-05 -"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","22111A",0.426110380651609 -"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","22111B",0.572074829817908 -"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","22111C",2.53079966501284e-05 -"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221111",3.14741312548001e-06 -"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221113",2.98352474728592e-06 -"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221114",1.48253576150256e-05 -"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221115",1.16767462484681e-07 -"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221116",5.03726415365625e-22 -"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221117",0.0525054435712145 -"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221118",7.77092196881272e-05 -"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","22111A",0.857777182069568 -"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","22111B",0.0889263299707816 -"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","22111C",0.000692262105797596 -"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","221111",3.96997220229721e-05 -"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","221113",5.27438374287534e-06 -"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","221115",1.24842982033212e-06 -"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","221117",0.00107228688184685 -"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","22111A",0.386364627459295 -"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","22111B",0.603736709609768 -"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","22111C",0.00878015351350457 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","221113",0.00158168303186637 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","22111A",0.504876150085784 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","22111B",0.493478180405339 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","221117",1.64314785619462e-06 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","22111C",2.80279374110905e-05 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","221118",2.95384469169473e-05 +"Mercury","emission/water","687b7004-d26d-3dfc-b8f2-81e092bc4bca","221114",4.77694482615535e-06 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221116",4.15717697074495e-22 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221118",5.64170736780797e-05 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","22111C",0.000674615298521184 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221111",2.78647609846071e-06 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221114",1.42694522781502e-06 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","22111B",0.0674990622937155 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221115",6.12590898140009e-08 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221117",0.0374503180968616 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","221113",2.43118655415168e-06 +"Methane","emission/air","aab83476-ec6c-3742-af85-15d320b7ce80","22111A",0.894312881370253 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","221115",7.52438771327545e-07 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","22111C",0.00982983143018911 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","22111B",0.526469587543577 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","221111",4.03782386853355e-05 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","221117",0.000878659292804331 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","221113",4.93763177622438e-06 +"Methanol","emission/air","ad362da4-86b8-3519-b904-d7f3be4328fe","22111A",0.462775853424197 "Methanol","emission/ground","a788bade-3e5a-31d7-82d6-10d0b4d359ae","22111B",1 -"Methanol","emission/water","7306a222-cbbc-391d-bbc8-346904e41235","22111B",0.999949466875537 -"Methanol","emission/water","7306a222-cbbc-391d-bbc8-346904e41235","22111C",5.05331244630856e-05 +"Methanol","emission/water","7306a222-cbbc-391d-bbc8-346904e41235","22111C",6.4876614380624e-05 +"Methanol","emission/water","7306a222-cbbc-391d-bbc8-346904e41235","22111B",0.999935123385619 "Methyl acrylate","emission/air","b95121cf-ac27-306d-88e4-94a160ab28c9","22111B",1 -"Methyl bromide","emission/air","18281313-4dde-31e9-a1ac-c210254d7130","221117",0.00384380137157636 -"Methyl bromide","emission/air","18281313-4dde-31e9-a1ac-c210254d7130","22111A",0.98016266045827 -"Methyl bromide","emission/air","18281313-4dde-31e9-a1ac-c210254d7130","22111B",0.0149979213429662 -"Methyl bromide","emission/air","18281313-4dde-31e9-a1ac-c210254d7130","22111C",0.000995616827186925 -"Methyl hydrazine","emission/air","f0267c81-ff66-36f6-ba35-11b522316310","221117",0.000750201615591703 -"Methyl hydrazine","emission/air","f0267c81-ff66-36f6-ba35-11b522316310","22111A",0.98386751499954 -"Methyl hydrazine","emission/air","f0267c81-ff66-36f6-ba35-11b522316310","22111B",0.0144194546293781 -"Methyl hydrazine","emission/air","f0267c81-ff66-36f6-ba35-11b522316310","22111C",0.000962828755490067 -"Methyl iodide","emission/air","eb7eba2b-7b6f-37a2-8aa1-ae0ec89db7ca","22111A",0.982035404228886 -"Methyl iodide","emission/air","eb7eba2b-7b6f-37a2-8aa1-ae0ec89db7ca","22111B",0.0179645957711143 -"Methyl isobutyl ketone","emission/air","16e9aaa4-b307-3860-a1af-e82f5a1dbd64","221117",0.340374055370878 -"Methyl isobutyl ketone","emission/air","16e9aaa4-b307-3860-a1af-e82f5a1dbd64","22111A",0.328018170739099 -"Methyl isobutyl ketone","emission/air","16e9aaa4-b307-3860-a1af-e82f5a1dbd64","22111B",0.322536270545948 -"Methyl isobutyl ketone","emission/air","16e9aaa4-b307-3860-a1af-e82f5a1dbd64","22111C",0.00907150334407539 -"Methyl methacrylate","emission/air","02f393d6-bc1c-370e-9144-a022ddca1d0a","221117",0.000750561102164313 -"Methyl methacrylate","emission/air","02f393d6-bc1c-370e-9144-a022ddca1d0a","22111A",0.983830273531348 -"Methyl methacrylate","emission/air","02f393d6-bc1c-370e-9144-a022ddca1d0a","22111B",0.0144560339810157 -"Methyl methacrylate","emission/air","02f393d6-bc1c-370e-9144-a022ddca1d0a","22111C",0.000963131385471774 -"Methyl tert-butyl ether","emission/air","806ce2b4-1a8c-3844-8372-dd0fa3797c21","221117",0.000920968680643265 -"Methyl tert-butyl ether","emission/air","806ce2b4-1a8c-3844-8372-dd0fa3797c21","22111A",0.983655265555109 -"Methyl tert-butyl ether","emission/air","806ce2b4-1a8c-3844-8372-dd0fa3797c21","22111B",0.0144621286434776 -"Methyl tert-butyl ether","emission/air","806ce2b4-1a8c-3844-8372-dd0fa3797c21","22111C",0.000961637120769689 +"Methyl bromide","emission/air","18281313-4dde-31e9-a1ac-c210254d7130","22111A",0.985442741909895 +"Methyl bromide","emission/air","18281313-4dde-31e9-a1ac-c210254d7130","221117",0.00264381072943108 +"Methyl bromide","emission/air","18281313-4dde-31e9-a1ac-c210254d7130","22111B",0.0109778346808921 +"Methyl bromide","emission/air","18281313-4dde-31e9-a1ac-c210254d7130","22111C",0.00093561267978166 +"Methyl hydrazine","emission/air","f0267c81-ff66-36f6-ba35-11b522316310","221117",0.000515408291998106 +"Methyl hydrazine","emission/air","f0267c81-ff66-36f6-ba35-11b522316310","22111B",0.0105423743227111 +"Methyl hydrazine","emission/air","f0267c81-ff66-36f6-ba35-11b522316310","22111C",0.000903767887302508 +"Methyl hydrazine","emission/air","f0267c81-ff66-36f6-ba35-11b522316310","22111A",0.988038449497988 +"Methyl iodide","emission/air","eb7eba2b-7b6f-37a2-8aa1-ae0ec89db7ca","22111B",0.0131430715516455 +"Methyl iodide","emission/air","eb7eba2b-7b6f-37a2-8aa1-ae0ec89db7ca","22111A",0.986856928448354 +"Methyl isobutyl ketone","emission/air","16e9aaa4-b307-3860-a1af-e82f5a1dbd64","22111A",0.407894616761427 +"Methyl isobutyl ketone","emission/air","16e9aaa4-b307-3860-a1af-e82f5a1dbd64","22111B",0.291998758393595 +"Methyl isobutyl ketone","emission/air","16e9aaa4-b307-3860-a1af-e82f5a1dbd64","221117",0.289562756708227 +"Methyl isobutyl ketone","emission/air","16e9aaa4-b307-3860-a1af-e82f5a1dbd64","22111C",0.0105438681367501 +"Methyl methacrylate","emission/air","02f393d6-bc1c-370e-9144-a022ddca1d0a","221117",0.000515660489480459 +"Methyl methacrylate","emission/air","02f393d6-bc1c-370e-9144-a022ddca1d0a","22111A",0.988011053121533 +"Methyl methacrylate","emission/air","02f393d6-bc1c-370e-9144-a022ddca1d0a","22111C",0.000904061106693543 +"Methyl methacrylate","emission/air","02f393d6-bc1c-370e-9144-a022ddca1d0a","22111B",0.0105692252822932 +"Methyl tert-butyl ether","emission/air","806ce2b4-1a8c-3844-8372-dd0fa3797c21","22111B",0.0105742694351833 +"Methyl tert-butyl ether","emission/air","806ce2b4-1a8c-3844-8372-dd0fa3797c21","22111C",0.00090270869848951 +"Methyl tert-butyl ether","emission/air","806ce2b4-1a8c-3844-8372-dd0fa3797c21","22111A",0.987890250495232 +"Methyl tert-butyl ether","emission/air","806ce2b4-1a8c-3844-8372-dd0fa3797c21","221117",0.000632771371095023 "Methylchrysene","emission/air","93484dfb-d8ea-3c44-a9d6-b05a5216a6a9","22111A",1 -"Methylene chloride","emission/air","f9fd0074-f765-3f38-a150-2ca0a82c37be","221117",0.15345341016868 -"Methylene chloride","emission/air","f9fd0074-f765-3f38-a150-2ca0a82c37be","22111A",0.791469537071729 -"Methylene chloride","emission/air","f9fd0074-f765-3f38-a150-2ca0a82c37be","22111B",0.0546919701586815 -"Methylene chloride","emission/air","f9fd0074-f765-3f38-a150-2ca0a82c37be","22111C",0.000385082600909392 -"Methylene chloride","emission/water","af9a1ea0-92aa-3f85-8563-5c21c65b1252","221111",0.306882571132613 -"Methylene chloride","emission/water","af9a1ea0-92aa-3f85-8563-5c21c65b1252","221117",0.122627256907499 -"Methylene chloride","emission/water","af9a1ea0-92aa-3f85-8563-5c21c65b1252","22111B",0.570490171959888 +"Methylene chloride","emission/air","f9fd0074-f765-3f38-a150-2ca0a82c37be","22111B",0.0425117035189708 +"Methylene chloride","emission/air","f9fd0074-f765-3f38-a150-2ca0a82c37be","22111C",0.000384288238446477 +"Methylene chloride","emission/air","f9fd0074-f765-3f38-a150-2ca0a82c37be","22111A",0.845019576875929 +"Methylene chloride","emission/air","f9fd0074-f765-3f38-a150-2ca0a82c37be","221117",0.112084431366653 +"Methylene chloride","emission/water","af9a1ea0-92aa-3f85-8563-5c21c65b1252","221111",0.342963608294276 +"Methylene chloride","emission/water","af9a1ea0-92aa-3f85-8563-5c21c65b1252","221117",0.110411023962353 +"Methylene chloride","emission/water","af9a1ea0-92aa-3f85-8563-5c21c65b1252","22111B",0.546625367743371 "Methylmercury(I)","emission/water","a70d9916-0381-3a01-ab8e-4332ed191d64","22111B",1 -"Molybdenum trioxide","emission/air","30be6ad3-0af0-32bd-a83d-b040d9790aa7","22111A",0.9675 -"Molybdenum trioxide","emission/air","30be6ad3-0af0-32bd-a83d-b040d9790aa7","22111C",0.0325 -"Molybdenum","emission/water","f95a65ae-f63c-39be-a86a-cb9b547b781b","221113",0.945221354529574 -"Molybdenum","emission/water","f95a65ae-f63c-39be-a86a-cb9b547b781b","22111A",0.0547786454704263 +"Molybdenum trioxide","emission/air","30be6ad3-0af0-32bd-a83d-b040d9790aa7","22111A",0.969557753339966 +"Molybdenum trioxide","emission/air","30be6ad3-0af0-32bd-a83d-b040d9790aa7","22111C",0.0304422466600342 +"Molybdenum","emission/water","f95a65ae-f63c-39be-a86a-cb9b547b781b","22111A",0.0690302861254358 +"Molybdenum","emission/water","f95a65ae-f63c-39be-a86a-cb9b547b781b","221113",0.930969713874564 "N-Methyl-2-pyrrolidone","emission/air","97579b43-89d0-3857-9911-d6dd6d28b024","22111B",1 -"N-Nitrosodimethylamine","emission/air","3a17ea66-85b2-3d3b-a1fb-5d58f274890c","22111A",0.999336864478286 -"N-Nitrosodimethylamine","emission/air","3a17ea66-85b2-3d3b-a1fb-5d58f274890c","22111B",0.000663135521714307 +"N-Nitrosodimethylamine","emission/air","3a17ea66-85b2-3d3b-a1fb-5d58f274890c","22111B",0.000482873083485288 +"N-Nitrosodimethylamine","emission/air","3a17ea66-85b2-3d3b-a1fb-5d58f274890c","22111A",0.999517126916515 "N-Nitrosodimethylamine","emission/water","ddb2a184-058b-3306-b9ea-7881c8e8c894","22111B",1 "N-Nitrosomorpholine","emission/air","a3aa8c30-da3c-3c8d-8693-6fdeb1860fff","22111B",1 -"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221111",0.00147979309070483 -"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221113",0.000895010192541969 -"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221115",2.44184339966028e-05 -"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221117",0.0183298503911536 -"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221118",3.11552903250555e-05 -"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","22111A",0.0525679632616345 -"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","22111B",0.920407663895365 -"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","22111C",0.00626414544427853 -"Naphthalene","emission/ground","b6604aac-5823-3882-be88-720da587ffb7","22111A",0.148936170212766 -"Naphthalene","emission/ground","b6604aac-5823-3882-be88-720da587ffb7","22111B",0.851063829787234 -"Naphthalene","emission/water","6db1dc8d-facf-347f-9885-53936a44286b","22111B",0.89043589202011 -"Naphthalene","emission/water","6db1dc8d-facf-347f-9885-53936a44286b","22111C",0.10956410797989 -"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221111",7.78985651536027e-05 -"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221113",1.2220838094579e-05 -"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221114",3.52831467546434e-07 -"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221116",5.53593864035755e-08 -"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221117",0.00277195954607319 -"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221118",0.00166078159210727 -"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","22111A",0.504757073620865 -"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","22111B",0.468431741455482 -"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","22111C",0.0222879161913707 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221117",0.0168764700652105 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","22111A",0.0707469402452033 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221113",0.000941430221785521 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221115",1.65362877034748e-05 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","22111B",0.901818438756621 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221118",2.91972080469056e-05 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","22111C",0.00787986856227278 +"Naphthalene","emission/air","ebf3aeb4-7a46-3029-a8f8-83d68f4d4ce5","221111",0.00169111865315612 +"Naphthalene","emission/ground","b6604aac-5823-3882-be88-720da587ffb7","22111B",0.80620910308782 +"Naphthalene","emission/ground","b6604aac-5823-3882-be88-720da587ffb7","22111A",0.19379089691218 +"Naphthalene","emission/water","6db1dc8d-facf-347f-9885-53936a44286b","22111B",0.863577711434341 +"Naphthalene","emission/water","6db1dc8d-facf-347f-9885-53936a44286b","22111C",0.136422288565659 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221113",1.09819316619614e-05 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221117",0.00218035481222923 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","22111A",0.580345359978958 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221111",7.6053662756597e-05 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","22111C",0.0239521332055541 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221116",5.03830158927204e-08 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221118",0.00132965703596578 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","221114",3.74505794821263e-08 +"Nickel","emission/air","50f56ea3-e292-3c09-89d2-74466af5f11e","22111B",0.392105371539279 "Nickel","emission/ground","ade872db-a289-3467-bca5-112f4b96e874","221111",1 -"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","221111",1.4991470467667e-05 -"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","221113",3.43064529860694e-06 -"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","221117",0.000496055445922847 -"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","22111A",0.852130717029683 -"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","22111B",0.147343538482016 -"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","22111C",1.12669266117062e-05 +"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","221111",1.32637050445753e-05 +"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","221117",0.000353590389435949 +"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","221113",2.7937240720369e-06 +"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","22111A",0.887851369905213 +"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","22111B",0.111768009661178 +"Nickel","emission/water","5a0f4337-3cdb-3484-84b4-67f1f5d0c113","22111C",1.09726150564799e-05 "Nitric acid","emission/air","53ba40b0-e966-32ba-9a31-d50049e5f77a","22111B",1 "Nitrobenzene","emission/air","30a189e8-c3c0-3560-9e7c-4fd3c1b98d34","22111A",1 -"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221111",3.35097885682699e-05 -"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221113",3.63500203864185e-05 -"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221114",7.82354813735511e-05 -"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221115",7.95234277365237e-06 -"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221116",4.56962922712412e-23 -"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221117",0.0988097117581696 -"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221118",0.00271691025166238 -"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","22111A",0.632249146495727 -"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","22111B",0.260238364083901 -"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","22111C",0.00582981977743792 -"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221111",0.0109135128292095 -"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221113",0.538850483164418 -"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221114",0.0291973636982592 -"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221117",0.198671724956017 -"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221118",0.00115326791890664 -"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","22111A",0.110542790129182 -"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","22111B",0.109452629678194 -"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","22111C",0.0012182276258135 -"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221111",2.27022474815098e-06 -"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221113",3.59409585932996e-06 -"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221114",8.94613582144042e-06 -"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221115",1.12328344289174e-07 -"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221116",3.03866109676198e-21 -"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221117",0.0418565393456065 -"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221118",4.68770299756164e-05 -"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","22111A",0.903240978330822 -"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","22111B",0.0540104266000953 -"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","22111C",0.000830255908727626 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221118",0.00210980255474651 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221114",8.05442233040117e-06 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","22111B",0.211284288976342 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221116",4.03378980580842e-23 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221115",4.46243910065843e-06 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221111",3.17323160991262e-05 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221113",3.16826728605171e-05 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","22111C",0.00607672061216998 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","22111A",0.705069230490915 +"Nitrogen oxides","emission/air","4382ba18-dd21-3837-80b2-94283ef5490e","221117",0.0753840255154357 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","22111B",0.104683314630863 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","22111C",0.00149588416551709 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221117",0.17855463831455 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221113",0.553274700813606 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221114",0.00354103043617887 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221118",0.00105499915956002 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","221111",0.0121744690120442 +"Nitrogen","emission/water","d4625608-6ef8-3ce6-bfa4-0f96f3535e23","22111A",0.145220963467681 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221115",5.81502339657204e-08 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221113",2.88995918007242e-06 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","22111A",0.929248868845048 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221114",8.49671447369925e-07 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221116",2.47456840945785e-21 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221117",0.0294596721423396 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221111",1.98327910311708e-06 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","221118",3.35823827708771e-05 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","22111B",0.0404537130619551 +"Nitrous oxide","emission/air","cfee0524-7ad6-300b-b050-6249135a2492","22111C",0.000798382507922247 "o-Cresol","emission/air","0b9668f1-074d-326e-889c-8e803fc651bd","22111A",1 -"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","221111",0.000300939212774127 -"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","221113",3.4975541939467e-05 -"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","221115",9.46364920818892e-06 -"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","221117",0.0376741212299707 -"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","22111A",0.00869596954329443 -"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","22111B",0.953143614014527 -"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","22111C",0.000140916808285932 -"o-Xylene","emission/water","371dd7d6-178e-37c8-a648-b69256b742e8","22111B",0.995967285246799 -"o-Xylene","emission/water","371dd7d6-178e-37c8-a648-b69256b742e8","22111C",0.00403271475320098 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","22111B",0.952128653408388 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","221113",3.75079229602978e-05 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","221115",6.53397176130696e-06 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","22111C",0.000180725047115156 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","221117",0.0353642320924108 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","221111",0.000350630970075173 +"o-Xylene","emission/air","e99ddeb5-25be-3571-9b7a-2668d9531e8a","22111A",0.011931716587289 +"o-Xylene","emission/water","371dd7d6-178e-37c8-a648-b69256b742e8","22111C",0.00517152815066935 +"o-Xylene","emission/water","371dd7d6-178e-37c8-a648-b69256b742e8","22111B",0.994828471849331 "Organics, purgeables","emission/water","03b4c1b2-3cb4-36f3-9269-5fb1b9d3e5a7","221111",1 "Oxygen","emission/water","2c6400e9-7d62-3168-959b-4628a3e14756","22111B",1 "p-Cresol","emission/air","7ca58e58-ada7-36c9-bdc6-1eea26d32abb","22111A",1 -"p-Dichlorobenzene","emission/air","981f397a-bee2-3519-b316-02a7756bf22a","221117",0.233304155540684 -"p-Dichlorobenzene","emission/air","981f397a-bee2-3519-b316-02a7756bf22a","22111A",0.230979983117691 -"p-Dichlorobenzene","emission/air","981f397a-bee2-3519-b316-02a7756bf22a","22111B",0.535715861341624 +"p-Dichlorobenzene","emission/air","981f397a-bee2-3519-b316-02a7756bf22a","22111B",0.499635251032947 +"p-Dichlorobenzene","emission/air","981f397a-bee2-3519-b316-02a7756bf22a","221117",0.204467764979424 +"p-Dichlorobenzene","emission/air","981f397a-bee2-3519-b316-02a7756bf22a","22111A",0.295896983987628 "p-Dichlorobenzene","emission/water","d7992b6b-6bb4-3abc-bf17-f5a66aefd8a2","221117",1 -"p-Nitrophenol","emission/air","8f9d27d7-e27c-3baa-a1e5-4ad61a38d900","221117",0.0112540901414944 -"p-Nitrophenol","emission/air","8f9d27d7-e27c-3baa-a1e5-4ad61a38d900","22111A",0.988555033911986 -"p-Nitrophenol","emission/air","8f9d27d7-e27c-3baa-a1e5-4ad61a38d900","22111B",0.00019087594651979 +"p-Nitrophenol","emission/air","8f9d27d7-e27c-3baa-a1e5-4ad61a38d900","22111B",0.000139467435550999 +"p-Nitrophenol","emission/air","8f9d27d7-e27c-3baa-a1e5-4ad61a38d900","221117",0.00772708713792966 +"p-Nitrophenol","emission/air","8f9d27d7-e27c-3baa-a1e5-4ad61a38d900","22111A",0.992133445426519 "p-Xylene","emission/air","3a41e87c-065d-3ab8-bc14-73ff717163c6","22111A",1 -"PAH/POM, unspecified","emission/air","02493f33-ffee-3fb6-8508-42de1592015e","221113",2.47740378827181e-05 -"PAH/POM, unspecified","emission/air","02493f33-ffee-3fb6-8508-42de1592015e","221117",0.815346895898174 -"PAH/POM, unspecified","emission/air","02493f33-ffee-3fb6-8508-42de1592015e","22111A",0.149126318631671 -"PAH/POM, unspecified","emission/air","02493f33-ffee-3fb6-8508-42de1592015e","22111B",0.035502011432272 +"PAH/POM, unspecified","emission/air","02493f33-ffee-3fb6-8508-42de1592015e","22111A",0.203504150601634 +"PAH/POM, unspecified","emission/air","02493f33-ffee-3fb6-8508-42de1592015e","221113",2.64234435848315e-05 +"PAH/POM, unspecified","emission/air","02493f33-ffee-3fb6-8508-42de1592015e","221117",0.761197895248628 +"PAH/POM, unspecified","emission/air","02493f33-ffee-3fb6-8508-42de1592015e","22111B",0.035271530706153 "Paraldehyde","emission/air","2001d79b-2107-37cb-a6f5-98b04254fc5c","22111B",1 -"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221111",0.00134428425273987 -"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221113",0.00217821513966219 -"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221114",1.46402900036777e-05 -"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221115",3.34349459273331e-05 -"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221116",4.71496551988292e-05 -"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221117",0.0151659324182888 -"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221118",0.0156623942582203 -"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","22111A",0.732822914010874 -"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","22111B",0.22655235628949 -"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","22111C",0.00617867873959471 -"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221111",0.0012073140881469 -"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221113",0.00277392279734982 -"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221114",0.000246003186847743 -"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221115",2.09674705370301e-07 -"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221116",2.07164920987811e-05 -"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221117",0.0434545541805345 -"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221118",0.0290722630674484 -"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","22111A",0.862369116966505 -"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","22111B",0.0559026037155824 -"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","22111C",0.00495329583078128 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221113",0.00183509558710443 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","22111C",0.00622516001253476 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221114",1.45687094719219e-06 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","22111A",0.78992037364858 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221116",4.02301439004859e-05 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","22111B",0.177789141087145 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221115",1.81350434466738e-05 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221117",0.0111838046711839 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221118",0.0117561586324359 +"Particulate matter, = 2.5µm","emission/air","49a9c581-7c83-36b0-b1bd-455ea4c665a6","221111",0.00123044430272108 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","22111B",0.0423550118741849 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221117",0.0309379746391718 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221111",0.00106690866025675 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","22111A",0.897456884711144 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221115",1.09799443780374e-07 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221118",0.0210679485414624 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","22111C",0.00481820522729214 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221116",1.70657510907682e-05 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221113",0.00225625619577665 +"Particulate matter, > 2.5µm and = 10µm","emission/air","a320e284-d276-3167-89b3-19d790081c08","221114",2.36346001770467e-05 "Pentachlorobenzene","emission/air","74ec13f4-2492-3099-949c-26ec4e15f0e1","22111B",1 "Pentachlorobenzene","emission/water","80d946f2-befc-3447-809d-a483a6e35d37","22111B",1 -"Pentachlorophenol","emission/air","1b92a28f-209f-3380-b8fe-1354a50fa03d","221117",0.00434227686670077 -"Pentachlorophenol","emission/air","1b92a28f-209f-3380-b8fe-1354a50fa03d","22111A",0.99555741086216 -"Pentachlorophenol","emission/air","1b92a28f-209f-3380-b8fe-1354a50fa03d","22111B",0.000100312271138801 -"Pentachlorophenol","emission/water","31d47305-ae02-3929-8998-463bf1803af6","22111A",0.994459440261401 -"Pentachlorophenol","emission/water","31d47305-ae02-3929-8998-463bf1803af6","22111B",0.00554055973859923 +"Pentachlorophenol","emission/air","1b92a28f-209f-3380-b8fe-1354a50fa03d","221117",0.0029748265577861 +"Pentachlorophenol","emission/air","1b92a28f-209f-3380-b8fe-1354a50fa03d","22111B",7.31331691731896e-05 +"Pentachlorophenol","emission/air","1b92a28f-209f-3380-b8fe-1354a50fa03d","22111A",0.996952040273041 +"Pentachlorophenol","emission/water","31d47305-ae02-3929-8998-463bf1803af6","22111A",0.995960190185279 +"Pentachlorophenol","emission/water","31d47305-ae02-3929-8998-463bf1803af6","22111B",0.00403980981472114 "Perylene","emission/air","0a0026f6-bebf-332e-8dd3-616a6d4e9e1b","221117",1 -"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221111",0.00272020582663716 -"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221113",0.00338190869750355 -"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221115",8.74175088353232e-05 -"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221117",0.0370325670297374 -"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221118",1.02955851081221e-06 -"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","22111A",0.437600529867138 -"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","22111B",0.514068627398301 -"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","22111C",0.0051077141133372 -"Phenanthrene","emission/ground","c9949a1d-90fd-3ffc-84dc-13cb5185f0d1","22111A",0.75609756097561 -"Phenanthrene","emission/ground","c9949a1d-90fd-3ffc-84dc-13cb5185f0d1","22111B",0.24390243902439 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","22111C",0.00563677192408805 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221113",0.00312082038671691 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221117",0.0299125371993854 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","22111A",0.516667437231013 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221111",0.00272722891091553 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","22111B",0.441882422259291 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221118",8.46461667898955e-07 +"Phenanthrene","emission/air","12ae4a71-1402-36e9-ada8-fe6cb98c56ee","221115",5.19356269223891e-05 +"Phenanthrene","emission/ground","c9949a1d-90fd-3ffc-84dc-13cb5185f0d1","22111A",0.809814916447659 +"Phenanthrene","emission/ground","c9949a1d-90fd-3ffc-84dc-13cb5185f0d1","22111B",0.190185083552341 "Phenanthrene","emission/water","f4d494d1-6e82-3f63-a2d5-610f40dc08b4","22111C",1 -"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221111",0.000196234589545951 -"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221113",2.49941172894982e-05 -"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221114",0.0221340735351918 -"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221115",5.91950277007846e-06 -"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221117",0.0179824592298265 -"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","22111A",0.425089647994039 -"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","22111B",0.533306440226556 -"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","22111C",0.00126023080478087 -"Phenol","emission/water","82fcc18d-8502-385b-8749-17b8f19fd177","221118",0.457565565566404 -"Phenol","emission/water","82fcc18d-8502-385b-8749-17b8f19fd177","22111A",0.152414261879375 -"Phenol","emission/water","82fcc18d-8502-385b-8749-17b8f19fd177","22111B",0.0305043710377603 -"Phenol","emission/water","82fcc18d-8502-385b-8749-17b8f19fd177","22111C",0.35951580151646 -"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","221117",0.000980527568987576 -"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","221118",0.024045597506684 -"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","22111A",0.972766615609131 -"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","22111B",6.77206135774371e-05 -"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","22111C",0.00213953870162 -"Phosphorus","emission/air","95df3205-7c00-3edd-af6e-92ff90f42999","221117",0.00883360127070853 -"Phosphorus","emission/air","95df3205-7c00-3edd-af6e-92ff90f42999","22111A",0.927839215629291 -"Phosphorus","emission/air","95df3205-7c00-3edd-af6e-92ff90f42999","22111B",0.0415875418285452 -"Phosphorus","emission/air","95df3205-7c00-3edd-af6e-92ff90f42999","22111C",0.0217396412714549 -"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","221111",0.000217449803147052 -"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","221113",0.280955310345598 -"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","221114",0.127742951669377 -"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","221117",0.000793493690418363 -"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","22111A",0.102725646738371 -"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","22111B",0.48743466334307 -"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","22111C",0.000130484410019392 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221111",0.000200988801378031 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221113",2.35624894208647e-05 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221115",3.5927636973577e-06 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","22111A",0.512731800851943 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221117",0.0148386705203577 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","22111B",0.468315926032997 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","22111C",0.00142079181361758 +"Phenol","emission/air","45880be9-788f-387b-8b1b-c38615cc48e2","221114",0.00246466672658868 +"Phenol","emission/water","82fcc18d-8502-385b-8749-17b8f19fd177","22111B",0.0267800648080459 +"Phenol","emission/water","82fcc18d-8502-385b-8749-17b8f19fd177","221118",0.384214295835851 +"Phenol","emission/water","82fcc18d-8502-385b-8749-17b8f19fd177","22111C",0.405215256450535 +"Phenol","emission/water","82fcc18d-8502-385b-8749-17b8f19fd177","22111A",0.183790382905567 +"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","22111A",0.980383688841027 +"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","221118",0.0168750863394662 +"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","22111B",4.96890481331223e-05 +"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","22111C",0.00201547862087045 +"Phenols","emission/water","12812f0a-dd3e-3a55-b1fc-9fc7d5ea994f","221117",0.000676057150503621 +"Phosphorus","emission/air","95df3205-7c00-3edd-af6e-92ff90f42999","221117",0.00613857010898026 +"Phosphorus","emission/air","95df3205-7c00-3edd-af6e-92ff90f42999","22111C",0.0206403115774587 +"Phosphorus","emission/air","95df3205-7c00-3edd-af6e-92ff90f42999","22111B",0.0307545141155585 +"Phosphorus","emission/air","95df3205-7c00-3edd-af6e-92ff90f42999","22111A",0.942466604198002 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","22111C",0.000176802810078285 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","221113",0.318325035635886 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","22111A",0.148915118587318 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","22111B",0.514432847481519 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","221111",0.000267673575407234 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","221114",0.0170955856308287 +"Phosphorus","emission/water","1733622b-b54a-3202-8e58-4670a96ef6b3","221117",0.000786936278961692 "Phthalic anhydride","emission/air","0a4b7ff7-c3d9-37c0-8f0d-4459730d70ae","22111A",1 -"Polychlorinated biphenyls","emission/air","18819e98-6dd1-3a8f-a27a-67ca826f3381","221117",0.0651365423083301 -"Polychlorinated biphenyls","emission/air","18819e98-6dd1-3a8f-a27a-67ca826f3381","22111A",0.253039266460181 -"Polychlorinated biphenyls","emission/air","18819e98-6dd1-3a8f-a27a-67ca826f3381","22111B",0.681824191231489 -"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","221113",0.999988866624986 -"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","221117",4.26170323353036e-06 -"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","22111A",4.00040249830766e-06 -"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","22111B",8.37066527761822e-08 -"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","22111C",2.78756262952448e-06 -"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","221113",0.000888959876242495 -"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","221117",0.0191138695259425 -"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","22111A",0.17718290365446 -"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","22111B",0.795964399748295 -"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","22111C",0.00684986719505992 +"Polychlorinated biphenyls","emission/air","18819e98-6dd1-3a8f-a27a-67ca826f3381","22111B",0.625184452659205 +"Polychlorinated biphenyls","emission/air","18819e98-6dd1-3a8f-a27a-67ca826f3381","221117",0.0561234387324724 +"Polychlorinated biphenyls","emission/air","18819e98-6dd1-3a8f-a27a-67ca826f3381","22111A",0.318692108608323 +"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","22111A",5.11834500817431e-06 +"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","22111C",3.33365866469536e-06 +"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","221113",0.999987739711587 +"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","221117",3.73031282213824e-06 +"Polychlorinated biphenyls","emission/water","4e6eb42f-d04e-3e26-b651-e86a17605220","22111B",7.79719177963593e-08 +"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","221117",0.0168325343354661 +"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","221113",0.000894376774446909 +"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","22111B",0.745951732920804 +"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","22111C",0.00824171307103646 +"Polycyclic aromatic hydrocarbons","emission/air","3bf6bb55-a2d2-36a1-988c-3caf0d73baf9","22111A",0.228079642898247 "Polycyclic aromatic hydrocarbons","emission/water","3675e6f7-8453-3486-a889-a30ff2ef9bcd","22111B",1 -"Potassium","emission/water","48c481d2-a5da-3974-9695-ab588b961a2c","221117",0.99482599932908 -"Potassium","emission/water","48c481d2-a5da-3974-9695-ab588b961a2c","22111A",0.00517400067091971 -"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","221111",5.58149461683104e-05 -"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","221113",7.1156360423889e-06 -"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","221115",1.76027469065067e-06 -"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","221117",0.00605870065704816 -"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","22111A",0.840207307283871 -"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","22111B",0.152750748659672 -"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","22111C",0.000918552542507843 -"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","221111",0.0162506962684761 -"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","221117",6.90466630857815e-06 -"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","22111A",0.0054299862353732 -"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","22111B",0.977831366108366 -"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","22111C",0.000481046721475845 -"Propylene","emission/air","2014edbf-fd15-3674-8927-701264cb597f","22111A",0.0510051971213172 -"Propylene","emission/air","2014edbf-fd15-3674-8927-701264cb597f","22111B",0.937832701332156 -"Propylene","emission/air","2014edbf-fd15-3674-8927-701264cb597f","22111C",0.0111621015465264 -"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221111",0.0117878444323896 -"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221113",0.0033675877693842 -"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221115",0.000388533574433309 -"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221117",0.173355775155351 -"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221118",2.7390180641982e-06 -"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","22111A",0.273877986732102 -"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","22111B",0.525704935202816 -"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","22111C",0.0115145981154586 +"Potassium","emission/water","48c481d2-a5da-3974-9695-ab588b961a2c","221117",0.992455090491035 +"Potassium","emission/water","48c481d2-a5da-3974-9695-ab588b961a2c","22111A",0.00754490950896538 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","221111",4.95523860314604e-05 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","22111A",0.878443718722531 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","22111C",0.000897639842132223 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","221113",5.81453323851655e-06 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","221117",0.00433354355064555 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","221115",9.26065345229626e-07 +"Propionaldehyde","emission/air","592fa548-20aa-36e9-b703-68be0ff6f30a","22111B",0.116268804900076 +"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","221117",6.45680166093215e-06 +"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","221111",0.0188624071981352 +"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","22111C",0.000614605521961065 +"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","22111A",0.00742227938693949 +"Propylene oxide","emission/air","4925db0d-7f56-3efa-ada9-eb799c3edd5b","22111B",0.973094251091303 +"Propylene","emission/air","2014edbf-fd15-3674-8927-701264cb597f","22111C",0.0140190635504107 +"Propylene","emission/air","2014edbf-fd15-3674-8927-701264cb597f","22111A",0.0685356973476658 +"Propylene","emission/air","2014edbf-fd15-3674-8927-701264cb597f","22111B",0.917445239101923 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","22111A",0.342858039835726 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221111",0.0125307821713929 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221117",0.148467606643662 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","22111B",0.479128096220015 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221118",2.38767448477272e-06 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221113",0.00329495720588335 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","22111C",0.0134733820721763 +"Pyrene","emission/air","b51b5cbd-b0cb-3104-b03b-4fbc12829a9e","221115",0.000244748176659069 "Pyrene","emission/water","97b592e9-1214-3b29-80e9-904c963da937","22111B",1 "Pyridine","emission/air","67b9cc0b-261c-3b14-ae73-b88855d26a0f","22111A",1 "Quinoline","emission/air","e0d00d88-a941-35d2-89e8-6fa28198f906","22111A",1 -"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","221113",2.90789353311929e-05 -"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","221116",3.32279542862122e-08 -"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","221117",0.000224239355491044 -"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","22111A",0.984117058906931 -"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","22111B",0.0155082552434486 -"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","22111C",0.000121334330844268 -"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","221113",1.12256072535743e-07 -"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","221114",0.00104117507276902 -"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","221115",0.000189151482222727 -"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","221117",5.58473960865321e-06 -"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","22111A",0.976421919747112 -"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","22111B",0.0223394018460994 -"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","22111C",2.65485611547032e-06 -"Silver","emission/water","f3c908b3-a355-388d-aa06-adbfb8ce12dc","221117",9.42422155883817e-06 -"Silver","emission/water","f3c908b3-a355-388d-aa06-adbfb8ce12dc","22111A",0.974749725595623 -"Silver","emission/water","f3c908b3-a355-388d-aa06-adbfb8ce12dc","22111B",0.0252266677437206 -"Silver","emission/water","f3c908b3-a355-388d-aa06-adbfb8ce12dc","22111C",1.41824390973514e-05 -"Sodium","emission/water","ba614600-af03-39a6-a0f5-897debdf159c","221117",4.2255034162879e-05 -"Sodium","emission/water","ba614600-af03-39a6-a0f5-897debdf159c","22111A",0.999870014472486 -"Sodium","emission/water","ba614600-af03-39a6-a0f5-897debdf159c","22111B",8.77304933514101e-05 +"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","22111C",0.000113900871933446 +"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","22111A",0.988369829343337 +"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","221113",2.282573995101e-05 +"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","221117",0.000154070942191765 +"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","221116",2.64158818896874e-08 +"Selenium","emission/air","b6db14bd-73e9-3f02-852a-e8b5e60bbc61","22111B",0.0113393466867049 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","221115",9.58617084505382e-05 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","22111A",0.983420451806725 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","221114",9.68083026734496e-05 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","22111B",0.0163804424941798 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","221117",3.84805106294215e-06 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","221113",8.8366001296698e-08 +"Selenium","emission/water","215fdef5-4bee-3402-b597-d0ae5c449b3b","22111C",2.49927090734907e-06 +"Silver","emission/water","f3c908b3-a355-388d-aa06-adbfb8ce12dc","22111C",1.33479055373692e-05 +"Silver","emission/water","f3c908b3-a355-388d-aa06-adbfb8ce12dc","22111A",0.981487310967147 +"Silver","emission/water","f3c908b3-a355-388d-aa06-adbfb8ce12dc","22111B",0.0184928492061489 +"Silver","emission/water","f3c908b3-a355-388d-aa06-adbfb8ce12dc","221117",6.49192116657615e-06 +"Sodium","emission/water","ba614600-af03-39a6-a0f5-897debdf159c","22111B",6.38732631855107e-05 +"Sodium","emission/water","ba614600-af03-39a6-a0f5-897debdf159c","22111A",0.999907217887969 +"Sodium","emission/water","ba614600-af03-39a6-a0f5-897debdf159c","221117",2.89088488458119e-05 "Strontium","emission/water","42904b8f-ac78-3e54-8774-2d117b505a09","22111A",1 -"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","221111",0.000144490465730057 -"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","221113",1.28793580299856e-05 -"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","221115",4.65015895158344e-06 -"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","221117",0.515327452868444 -"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","22111A",0.215169211921494 -"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","22111B",0.268939688089618 -"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","22111C",0.000401627137732586 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","22111A",0.281625418244764 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","22111B",0.256270721051919 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","22111C",0.000491343709427085 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","221111",0.000160589625394772 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","221113",1.3175271713535e-05 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","221115",3.062620738506e-06 +"Styrene","emission/air","69bc8b47-09b5-3a09-b7f4-3e4d2925ce5a","221117",0.461435689476043 "Styrene","emission/ground","0f727b42-dc04-3f8b-aeb5-751c21ab7818","22111B",1 -"Styrene","emission/water","ae949cd2-45b1-39fb-9c52-943019cdba9b","22111B",0.166666666666667 -"Styrene","emission/water","ae949cd2-45b1-39fb-9c52-943019cdba9b","22111C",0.833333333333333 -"Sulfate","emission/water","0c241f3e-aa86-3804-8bd8-6082e2ad201f","221113",0.0376752959927924 -"Sulfate","emission/water","0c241f3e-aa86-3804-8bd8-6082e2ad201f","221117",0.000217845917317343 -"Sulfate","emission/water","0c241f3e-aa86-3804-8bd8-6082e2ad201f","22111A",0.943560550156399 -"Sulfate","emission/water","0c241f3e-aa86-3804-8bd8-6082e2ad201f","22111B",0.0185463079334909 +"Styrene","emission/water","ae949cd2-45b1-39fb-9c52-943019cdba9b","22111B",0.13478344705758 +"Styrene","emission/water","ae949cd2-45b1-39fb-9c52-943019cdba9b","22111C",0.865216552942421 +"Sulfate","emission/water","0c241f3e-aa86-3804-8bd8-6082e2ad201f","221113",0.029844449874288 +"Sulfate","emission/water","0c241f3e-aa86-3804-8bd8-6082e2ad201f","22111B",0.0136849464077745 +"Sulfate","emission/water","0c241f3e-aa86-3804-8bd8-6082e2ad201f","221117",0.000151049352696013 +"Sulfate","emission/water","0c241f3e-aa86-3804-8bd8-6082e2ad201f","22111A",0.956319554365242 "Sulfide","emission/water","caa29242-717c-37bd-b57b-de22a122d579","22111C",1 -"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221111",3.24689763595753e-06 -"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221113",2.35973844499764e-05 -"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221114",4.25133677491676e-07 -"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221115",3.17569032667252e-07 -"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221116",5.21481649786361e-23 -"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221117",0.00524046979008137 -"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221118",5.8026227826933e-06 -"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","22111A",0.979181349275087 -"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","22111B",0.0062320776531874 -"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","22111C",0.00931271367406588 -"Sulfuric acid","emission/air","0838fbf7-0add-3353-ba9a-b187edeb85d6","22111A",0.993511356388627 -"Sulfuric acid","emission/air","0838fbf7-0add-3353-ba9a-b187edeb85d6","22111B",0.00213520097898038 -"Sulfuric acid","emission/air","0838fbf7-0add-3353-ba9a-b187edeb85d6","22111C",0.00435344263239262 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221114",3.94038466774968e-08 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221115",1.60434523684708e-07 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","22111B",0.00455523946452487 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","22111A",0.983080576519874 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221118",4.05670411304073e-06 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221113",1.85166959175397e-05 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221117",0.00359941884926539 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","22111C",0.00873922383189947 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221111",2.76809603546457e-06 +"Sulfur dioxide","emission/air","f4973035-59f5-3bdc-b257-b274dcc04e0f","221116",4.14432498021082e-23 +"Sulfuric acid","emission/air","0838fbf7-0add-3353-ba9a-b187edeb85d6","22111A",0.9943714821922 +"Sulfuric acid","emission/air","0838fbf7-0add-3353-ba9a-b187edeb85d6","22111B",0.00155584725611011 +"Sulfuric acid","emission/air","0838fbf7-0add-3353-ba9a-b187edeb85d6","22111C",0.00407267055168962 "Surfactants","emission/water","ed34465d-dcb1-3926-a995-ee361882cb1e","221113",1 -"Tetrachloroethylene","emission/air","984f3962-1a35-3813-bbf1-e3887be06b6f","221117",0.347927218668211 -"Tetrachloroethylene","emission/air","984f3962-1a35-3813-bbf1-e3887be06b6f","22111A",0.256602061356388 -"Tetrachloroethylene","emission/air","984f3962-1a35-3813-bbf1-e3887be06b6f","22111B",0.395139302873752 -"Tetrachloroethylene","emission/air","984f3962-1a35-3813-bbf1-e3887be06b6f","22111C",0.000331417101649533 -"Tetrachloroethylene","emission/water","5bd7af62-1b05-3694-a723-336cb58e345f","22111A",0.381774628206408 -"Tetrachloroethylene","emission/water","5bd7af62-1b05-3694-a723-336cb58e345f","22111B",0.618225371793592 +"Tetrachloroethylene","emission/air","984f3962-1a35-3813-bbf1-e3887be06b6f","22111A",0.327878500292816 +"Tetrachloroethylene","emission/air","984f3962-1a35-3813-bbf1-e3887be06b6f","22111B",0.367582986467293 +"Tetrachloroethylene","emission/air","984f3962-1a35-3813-bbf1-e3887be06b6f","22111C",0.000395820555199209 +"Tetrachloroethylene","emission/air","984f3962-1a35-3813-bbf1-e3887be06b6f","221117",0.304142692684691 +"Tetrachloroethylene","emission/water","5bd7af62-1b05-3694-a723-336cb58e345f","22111B",0.541061496966929 +"Tetrachloroethylene","emission/water","5bd7af62-1b05-3694-a723-336cb58e345f","22111A",0.458938503033071 "Thallium","emission/air","9afdd2c1-9b05-3de5-a6ba-eb95948a71fa","22111B",1 -"Thallium","emission/water","6051a1f6-90e3-3231-b4e6-fdd69c961129","221117",1.96194336185957e-05 -"Thallium","emission/water","6051a1f6-90e3-3231-b4e6-fdd69c961129","22111A",0.581119396278383 -"Thallium","emission/water","6051a1f6-90e3-3231-b4e6-fdd69c961129","22111B",0.418791472423726 -"Thallium","emission/water","6051a1f6-90e3-3231-b4e6-fdd69c961129","22111C",6.95118642723363e-05 +"Thallium","emission/water","6051a1f6-90e3-3231-b4e6-fdd69c961129","221117",1.51475878121291e-05 +"Thallium","emission/water","6051a1f6-90e3-3231-b4e6-fdd69c961129","22111B",0.344089194164299 +"Thallium","emission/water","6051a1f6-90e3-3231-b4e6-fdd69c961129","22111C",7.33247171946776e-05 +"Thallium","emission/water","6051a1f6-90e3-3231-b4e6-fdd69c961129","22111A",0.655822333530694 "Titanium","emission/water","0f2dc726-d62a-3a67-bf97-af90ef81af0a","22111A",1 -"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221111",0.00999353763615256 -"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221113",0.000177418950041015 -"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221114",0.000215737299318718 -"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221115",2.95365216349018e-06 -"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221116",0.000113784274940868 -"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221117",0.171992465042792 -"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221118",2.33168183971295e-05 -"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","22111A",0.099657635088593 -"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","22111B",0.717203932547931 -"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","22111C",0.000619218689670039 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","22111B",0.697312431789921 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","22111A",0.133089241280657 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221115",1.98483962680611e-06 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221118",2.16832647872185e-05 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221114",2.65977401187167e-05 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","22111C",0.000772942269251731 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221116",0.000120282766610721 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221111",0.0113328254107587 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221117",0.157136825546649 +"Toluene","emission/air","3f72fe9c-b003-38ee-b8d2-13a84f60506c","221113",0.000185185091618858 "Toluene","emission/ground","123df42b-1658-3f80-ad31-fffbb8559d43","22111B",1 -"Toluene","emission/water","f7ebc6df-b3ee-30de-b6e8-c70e155854b3","221111",0.0706688359083419 -"Toluene","emission/water","f7ebc6df-b3ee-30de-b6e8-c70e155854b3","22111B",0.82385490527093 -"Toluene","emission/water","f7ebc6df-b3ee-30de-b6e8-c70e155854b3","22111C",0.105476258820729 -"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","221111",1.6980342849505e-07 -"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","221113",0.0129829742485999 -"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","221117",0.000201645014455251 -"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","22111A",0.530241861196527 -"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","22111B",0.45657334973699 -"Total metals","emission/water","1a257bae-badb-3b35-8482-59970c05b432","22111A",0.99812894782323 -"Total metals","emission/water","1a257bae-badb-3b35-8482-59970c05b432","22111B",0.00187105217677004 -"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221111",0.545067178446224 -"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221113",0.05038166872144 -"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221114",0.0136187862087597 -"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221117",1.03389949977841e-05 -"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221118",0.000612936554495355 -"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","22111A",0.382940231866133 -"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","22111B",0.00278610071255433 -"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","22111C",0.00458275849539523 -"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","221113",0.241713855459982 -"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","221117",0.00448843182676894 -"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","22111A",0.00283866792175651 -"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","22111B",0.374912372700714 -"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","22111C",0.376046672090779 -"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221111",0.00186267814780121 -"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221113",0.00597004968120264 -"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221114",0.00628932918040765 -"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221117",0.00524163541304955 -"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221118",0.000460383195800793 -"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","22111A",0.159099541615919 -"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","22111B",0.811535989539579 -"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","22111C",0.00954039322623938 -"Tribromomethane","emission/air","53effec4-058b-3ab7-b7d5-005d39dd0eb9","221117",0.000756265599582975 -"Tribromomethane","emission/air","53effec4-058b-3ab7-b7d5-005d39dd0eb9","22111A",0.983751930794746 -"Tribromomethane","emission/air","53effec4-058b-3ab7-b7d5-005d39dd0eb9","22111B",0.0145229553266273 -"Tribromomethane","emission/air","53effec4-058b-3ab7-b7d5-005d39dd0eb9","22111C",0.000968848279043279 -"Tribromomethane","emission/water","bf5315db-0443-3c49-b072-c37824b4808d","22111A",0.0519228633524006 -"Tribromomethane","emission/water","bf5315db-0443-3c49-b072-c37824b4808d","22111B",0.948077136647599 +"Toluene","emission/water","f7ebc6df-b3ee-30de-b6e8-c70e155854b3","22111B",0.790877343045049 +"Toluene","emission/water","f7ebc6df-b3ee-30de-b6e8-c70e155854b3","221111",0.0791262419788178 +"Toluene","emission/water","f7ebc6df-b3ee-30de-b6e8-c70e155854b3","22111C",0.129996414976133 +"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","221111",1.65178788185827e-07 +"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","221113",0.0116243609435036 +"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","22111B",0.380788811036016 +"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","22111A",0.607428630884726 +"Total dissolved solids","emission/water","61a45604-2ff4-384b-8d90-bae7206c2540","221117",0.000158031956966135 +"Total metals","emission/water","1a257bae-badb-3b35-8482-59970c05b432","22111A",0.998637114649013 +"Total metals","emission/water","1a257bae-badb-3b35-8482-59970c05b432","22111B",0.00136288535098735 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221111",0.51820798183372 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221114",0.00140764461567765 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221113",0.044087318479663 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","22111C",0.00479584450568801 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","22111B",0.00227099761299921 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221118",0.000477865884143738 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","221117",7.91921256387251e-06 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","3349b083-3e67-3533-8b77-ffb62f9f22d4","22111A",0.428744427855544 +"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","22111B",0.333162920093545 +"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","22111C",0.429029240529065 +"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","221113",0.230594902562047 +"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","221117",0.00374804959320822 +"Total Organic Carbon","emission/water","cbf6df8e-c4a2-3920-a97a-2238ccb7bc6c","22111A",0.00346488722213486 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221114",0.000754463919944219 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221111",0.0020552819804343 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","22111B",0.767727644908475 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221118",0.000416571443757509 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221113",0.00606315415572197 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","22111C",0.0115873446939411 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","221117",0.0046596147718849 +"Total suspended solids","emission/water","786e8081-5f2e-3bab-9585-d0dba98ec7c3","22111A",0.206735924125841 +"Tribromomethane","emission/air","53effec4-058b-3ab7-b7d5-005d39dd0eb9","22111B",0.0106183706908554 +"Tribromomethane","emission/air","53effec4-058b-3ab7-b7d5-005d39dd0eb9","22111C",0.000909445983837076 +"Tribromomethane","emission/air","53effec4-058b-3ab7-b7d5-005d39dd0eb9","22111A",0.987952593024106 +"Tribromomethane","emission/air","53effec4-058b-3ab7-b7d5-005d39dd0eb9","221117",0.00051959030120189 +"Tribromomethane","emission/water","bf5315db-0443-3c49-b072-c37824b4808d","22111A",0.0699621595047558 +"Tribromomethane","emission/water","bf5315db-0443-3c49-b072-c37824b4808d","22111B",0.930037840495244 "Tributlytin","emission/water","b93a1e2f-23b5-34ac-8b22-9ad0fd9f4dd9","22111B",1 "Trichloroethane","emission/water","c6238bd5-a51a-3d3d-a5d3-c616b46f60da","22111A",1 -"Trichloroethylene","emission/air","2a38b77f-5e72-3a0e-b331-7ce360ac47a1","221117",0.996043589028748 -"Trichloroethylene","emission/air","2a38b77f-5e72-3a0e-b331-7ce360ac47a1","22111A",0.00220192964811788 -"Trichloroethylene","emission/air","2a38b77f-5e72-3a0e-b331-7ce360ac47a1","22111B",0.00175448132313393 -"Trichloroethylene","emission/water","8d6b93c6-3692-33f8-8747-3ae783d298f3","22111A",0.792105793112707 -"Trichloroethylene","emission/water","8d6b93c6-3692-33f8-8747-3ae783d298f3","22111B",0.207894206887293 +"Trichloroethylene","emission/air","2a38b77f-5e72-3a0e-b331-7ce360ac47a1","22111A",0.00321497125157987 +"Trichloroethylene","emission/air","2a38b77f-5e72-3a0e-b331-7ce360ac47a1","22111B",0.00186498257139656 +"Trichloroethylene","emission/air","2a38b77f-5e72-3a0e-b331-7ce360ac47a1","221117",0.994920046177023 +"Trichloroethylene","emission/water","8d6b93c6-3692-33f8-8747-3ae783d298f3","22111A",0.839575303397299 +"Trichloroethylene","emission/water","8d6b93c6-3692-33f8-8747-3ae783d298f3","22111B",0.160424696602701 "Triethylene glycol monomethyl ether","emission/air","82338eb0-39be-318d-8af3-d555ec1aaacc","22111B",1 "Uranium","emission/water","a63a9c73-2fe4-3679-93c2-28b6f7fb8915","221115",1 "Vanadium","emission/air","7e3145d3-a1a3-36d0-ae11-d380127cde8b","22111A",1 "Vanadium","emission/ground","58a54834-bb23-31a6-9919-7baf655fe7d9","22111A",1 -"Vanadium","emission/water","f5d6980f-0bab-38e7-a203-95da64eb6091","221117",0.0065960262224871 -"Vanadium","emission/water","f5d6980f-0bab-38e7-a203-95da64eb6091","22111A",0.265305710158688 -"Vanadium","emission/water","f5d6980f-0bab-38e7-a203-95da64eb6091","22111B",0.728098263618824 -"Vinyl acetate","emission/air","ca50de59-971c-3414-8f6b-3a1b0062aba8","221117",0.000734819342095433 -"Vinyl acetate","emission/air","ca50de59-971c-3414-8f6b-3a1b0062aba8","22111A",0.984201671905206 -"Vinyl acetate","emission/air","ca50de59-971c-3414-8f6b-3a1b0062aba8","22111B",0.0141216893693981 -"Vinyl acetate","emission/air","ca50de59-971c-3414-8f6b-3a1b0062aba8","22111C",0.000941819383300414 -"Vinyl chloride","emission/air","b5c72fb3-6445-33b7-aec4-ba41e30b8d14","221114",0.00969135170783608 -"Vinyl chloride","emission/air","b5c72fb3-6445-33b7-aec4-ba41e30b8d14","221117",0.958920840431839 -"Vinyl chloride","emission/air","b5c72fb3-6445-33b7-aec4-ba41e30b8d14","22111A",0.028744165922489 -"Vinyl chloride","emission/air","b5c72fb3-6445-33b7-aec4-ba41e30b8d14","22111B",0.00264364193783574 -"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221111",0.00207653044431615 -"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221113",0.00128290143971519 -"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221114",0.000188071996709162 -"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221115",4.09321521444535e-05 -"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221116",0.00262473780432478 -"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221117",0.0723281587449984 -"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221118",0.044356229231667 -"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","22111A",0.503284464679958 -"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","22111B",0.356068120325337 -"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","22111C",0.0177498531808297 +"Vanadium","emission/water","f5d6980f-0bab-38e7-a203-95da64eb6091","22111B",0.662684795748872 +"Vanadium","emission/water","f5d6980f-0bab-38e7-a203-95da64eb6091","221117",0.00564135192660126 +"Vanadium","emission/water","f5d6980f-0bab-38e7-a203-95da64eb6091","22111A",0.331673852324527 +"Vinyl acetate","emission/air","ca50de59-971c-3414-8f6b-3a1b0062aba8","22111B",0.010323767539369 +"Vinyl acetate","emission/air","ca50de59-971c-3414-8f6b-3a1b0062aba8","221117",0.000504796053323111 +"Vinyl acetate","emission/air","ca50de59-971c-3414-8f6b-3a1b0062aba8","22111A",0.98828746657658 +"Vinyl acetate","emission/air","ca50de59-971c-3414-8f6b-3a1b0062aba8","22111C",0.00088396983072813 +"Vinyl chloride","emission/air","b5c72fb3-6445-33b7-aec4-ba41e30b8d14","22111B",0.00279916032749731 +"Vinyl chloride","emission/air","b5c72fb3-6445-33b7-aec4-ba41e30b8d14","22111A",0.0418044466421156 +"Vinyl chloride","emission/air","b5c72fb3-6445-33b7-aec4-ba41e30b8d14","221114",0.00130120058869746 +"Vinyl chloride","emission/air","b5c72fb3-6445-33b7-aec4-ba41e30b8d14","221117",0.95409519244169 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","22111B",0.299911415275794 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","22111A",0.582265496422453 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221113",0.0011600440131326 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221111",0.00204001052084247 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221115",2.38289996501828e-05 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","22111C",0.0191943286004435 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221117",0.057246787745493 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221114",2.00871718231931e-05 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221118",0.0357342902701832 +"Volatile organic compounds","emission/air","6f861846-1c4c-3fc9-a198-56b2d9abd83b","221116",0.0024037109801852 "Volatile organic compounds","emission/water","e6cafce7-a60f-316b-b264-3127bdc946d0","221117",1 -"Water","emission/water","96054103-8509-3049-a638-c4d13cc707cc","22111A",0.000239555280845553 -"Water","emission/water","96054103-8509-3049-a638-c4d13cc707cc","22111B",0.999760444719154 -"Water","resource/water","e2eb491c-78ff-3123-9e42-494c7d199b44","22111A",0.00271028168881853 -"Water","resource/water","e2eb491c-78ff-3123-9e42-494c7d199b44","22111B",0.997289718311181 -"Water, brackish","emission/water","f96e52c2-2c7e-35c0-8c7d-91877eb37725","221113",0.00267124506635632 -"Water, brackish","emission/water","f96e52c2-2c7e-35c0-8c7d-91877eb37725","22111A",0.0567701416375029 -"Water, brackish","emission/water","f96e52c2-2c7e-35c0-8c7d-91877eb37725","22111B",0.940558613296141 -"Water, brackish","emission/water","f96e52c2-2c7e-35c0-8c7d-91877eb37725","22111C",7.74682590936607e-29 -"Water, brackish","resource/water","a95bae36-325b-3da7-8a47-00ba98b61cfe","221113",0.00354317797954464 -"Water, brackish","resource/water","a95bae36-325b-3da7-8a47-00ba98b61cfe","22111A",0.0579198645299166 -"Water, brackish","resource/water","a95bae36-325b-3da7-8a47-00ba98b61cfe","22111B",0.938536948478006 -"Water, brackish","resource/water","a95bae36-325b-3da7-8a47-00ba98b61cfe","22111C",9.01253276731976e-09 -"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","221113",0.230821513599384 -"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","221114",1.24978990421236e-29 -"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","221117",3.73701063951962e-07 -"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","22111A",0.44704152388281 -"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","22111B",0.322136588816743 -"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","221113",0.230395931895793 -"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","221114",1.21962438262634e-29 -"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","221117",3.71440103394613e-06 -"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","22111A",0.448568094869307 -"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","22111B",0.321032258833866 -"Water, reclaimed","",NA,"221113",0.097331431443412 -"Water, reclaimed","",NA,"22111A",0.752249823965151 -"Water, reclaimed","",NA,"22111B",0.150418744591437 -"Water, saline","emission/water","55222571-f94b-36fd-b74a-4e32219dfe2f","221113",0.380918397067676 -"Water, saline","emission/water","55222571-f94b-36fd-b74a-4e32219dfe2f","22111A",0.0139607147397116 -"Water, saline","emission/water","55222571-f94b-36fd-b74a-4e32219dfe2f","22111B",0.599361703713616 -"Water, saline","emission/water","55222571-f94b-36fd-b74a-4e32219dfe2f","22111C",0.00575918447899592 -"Water, saline","resource/water","67297f72-511b-3e86-b7e4-676437a75dbf","221113",0.379748786979834 -"Water, saline","resource/water","67297f72-511b-3e86-b7e4-676437a75dbf","22111A",0.0161601149204466 -"Water, saline","resource/water","67297f72-511b-3e86-b7e4-676437a75dbf","22111B",0.598351010648577 -"Water, saline","resource/water","67297f72-511b-3e86-b7e4-676437a75dbf","22111C",0.00574008745114206 -"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221111",0.0111274013364794 -"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221113",0.000203179698634139 -"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221115",3.45950389064905e-06 -"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221116",0.000277123072026199 -"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221117",0.129956098672212 -"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","22111A",0.0930450307180925 -"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","22111B",0.764160296429279 -"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","22111C",0.0012274105693863 -"Xylene","emission/ground","c05b7f1c-b8b3-35a6-990b-d71f591b7511","22111A",0.296428571428571 -"Xylene","emission/ground","c05b7f1c-b8b3-35a6-990b-d71f591b7511","22111B",0.7 -"Xylene","emission/ground","c05b7f1c-b8b3-35a6-990b-d71f591b7511","22111C",0.00357142857142857 -"Xylene","emission/water","11b4481a-d297-349a-89fc-102009c1410c","221111",0.112025562459099 -"Xylene","emission/water","11b4481a-d297-349a-89fc-102009c1410c","22111B",0.720572555841545 -"Xylene","emission/water","11b4481a-d297-349a-89fc-102009c1410c","22111C",0.167401881699356 +"Water","emission/water","96054103-8509-3049-a638-c4d13cc707cc","22111A",0.000329014102163832 +"Water","emission/water","96054103-8509-3049-a638-c4d13cc707cc","22111B",0.999670985897836 +"Water","resource/water","e2eb491c-78ff-3123-9e42-494c7d199b44","22111A",0.00371896916245627 +"Water","resource/water","e2eb491c-78ff-3123-9e42-494c7d199b44","22111B",0.996281030837544 +"Water, brackish","emission/water","f96e52c2-2c7e-35c0-8c7d-91877eb37725","22111A",0.0763431816975988 +"Water, brackish","emission/water","f96e52c2-2c7e-35c0-8c7d-91877eb37725","22111C",9.73743796638342e-29 +"Water, brackish","emission/water","f96e52c2-2c7e-35c0-8c7d-91877eb37725","22111B",0.920849202650954 +"Water, brackish","emission/water","f96e52c2-2c7e-35c0-8c7d-91877eb37725","221113",0.00280761565144675 +"Water, brackish","resource/water","a95bae36-325b-3da7-8a47-00ba98b61cfe","22111A",0.0778516786410396 +"Water, brackish","resource/water","a95bae36-325b-3da7-8a47-00ba98b61cfe","221113",0.0037222630037054 +"Water, brackish","resource/water","a95bae36-325b-3da7-8a47-00ba98b61cfe","22111B",0.918426047032348 +"Water, brackish","resource/water","a95bae36-325b-3da7-8a47-00ba98b61cfe","22111C",1.13229067363025e-08 +"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","221117",2.96596683883272e-07 +"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","22111A",0.518625228840108 +"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","221113",0.209293481769679 +"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","22111B",0.272080992793529 +"Water, fresh","emission/water","a1c1753e-5b37-3aa2-a929-552eb0d6d351","221114",1.33853556530192e-30 +"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","221113",0.208812573187327 +"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","221114",1.30563391110269e-30 +"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","22111B",0.271024931323571 +"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","22111A",0.52015954880779 +"Water, fresh","resource/water","8ba7dd57-b502-397b-944a-f63c6615f754","221117",2.94668131130827e-06 +"Water, reclaimed","",NA,"221113",0.0811150738697274 +"Water, reclaimed","",NA,"22111A",0.802115499707036 +"Water, reclaimed","",NA,"22111B",0.116769426423237 +"Water, saline","emission/water","55222571-f94b-36fd-b74a-4e32219dfe2f","22111C",0.0071448860197357 +"Water, saline","emission/water","55222571-f94b-36fd-b74a-4e32219dfe2f","221113",0.395156633780185 +"Water, saline","emission/water","55222571-f94b-36fd-b74a-4e32219dfe2f","22111A",0.0185298258854937 +"Water, saline","emission/water","55222571-f94b-36fd-b74a-4e32219dfe2f","22111B",0.579168654314586 +"Water, saline","resource/water","67297f72-511b-3e86-b7e4-676437a75dbf","22111B",0.577784347956361 +"Water, saline","resource/water","67297f72-511b-3e86-b7e4-676437a75dbf","22111C",0.00711617318501902 +"Water, saline","resource/water","67297f72-511b-3e86-b7e4-676437a75dbf","22111A",0.0214339303530843 +"Water, saline","resource/water","67297f72-511b-3e86-b7e4-676437a75dbf","221113",0.393665548505536 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","22111B",0.74251040211265 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221113",0.000211943281910642 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","22111C",0.00153117978844044 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","22111A",0.124182066633312 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221111",0.0126108983568749 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221116",0.000292770405487139 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221117",0.118658416078898 +"Xylene","emission/air","aef9d0ff-6482-3b1d-a53e-4d738bdcd9b1","221115",2.32334242676636e-06 +"Xylene","emission/ground","c05b7f1c-b8b3-35a6-990b-d71f591b7511","22111B",0.629639294176568 +"Xylene","emission/ground","c05b7f1c-b8b3-35a6-990b-d71f591b7511","22111A",0.36623637011673 +"Xylene","emission/ground","c05b7f1c-b8b3-35a6-990b-d71f591b7511","22111C",0.00412433570670226 +"Xylene","emission/water","11b4481a-d297-349a-89fc-102009c1410c","22111C",0.201584817925745 +"Xylene","emission/water","11b4481a-d297-349a-89fc-102009c1410c","22111B",0.675860315222873 +"Xylene","emission/water","11b4481a-d297-349a-89fc-102009c1410c","221111",0.122554866851382 "Zinc","emission/air","435bfa52-d2d3-3760-abf4-27de892972ac","22111A",1 -"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221111",0.0100271001251767 -"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221113",0.090068910663191 -"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221114",0.000689164936262362 -"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221117",0.00012478429839769 -"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221118",0.00342584888605783 -"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111A",0.808855207362032 -"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111B",0.0867986402620995 -"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111C",1.03434667825116e-05 -"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","221117",0.00902630849358238 -"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","221118",0.00108215580071407 -"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","22111A",0.817148888152601 -"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","22111B",0.147405393011013 -"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","22111C",0.0253372545420892 -"Antimony compounds","emission/water","a0eb7d41-1d2e-37b2-9969-1758504bd806","221117",3.60235305701684e-06 -"Antimony compounds","emission/water","a0eb7d41-1d2e-37b2-9969-1758504bd806","22111A",0.580074424614158 -"Antimony compounds","emission/water","a0eb7d41-1d2e-37b2-9969-1758504bd806","22111B",0.419921973032785 -"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221111",4.68910844884048e-06 -"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221113",6.88249874491178e-05 -"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221114",2.40323406691013e-06 -"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221116",3.51685827005052e-05 -"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221117",0.00867216678082411 -"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221118",4.36730104395758e-05 -"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","22111A",0.93796544771784 -"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","22111B",0.0515264264616952 -"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","22111C",0.00168120011653568 -"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","221113",0.0611270928718908 -"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","221114",0.000386571644392111 -"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","221117",0.000137734559796674 -"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","22111A",0.82906976884918 -"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","22111B",0.109270329443928 -"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","22111C",8.50263081249218e-06 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221118",0.00250189660442748 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221113",0.0738289511158173 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221111",0.00892976581851225 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111A",0.848298951720929 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221114",6.67249790141838e-05 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","221117",8.95311717071106e-05 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111C",1.01394616787114e-05 +"Zinc","emission/water","41f104ab-8f49-3924-9b57-98ed81cd54a0","22111B",0.0662740391279142 +"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","22111B",0.112364098916093 +"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","22111A",0.855584722263303 +"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","221118",0.000788995687482714 +"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","221117",0.00646559029791879 +"Antimony compounds","emission/air","30aff867-8f13-32d1-88d6-4edc0ba5752a","22111C",0.024796592835202 +"Antimony compounds","emission/water","a0eb7d41-1d2e-37b2-9969-1758504bd806","22111A",0.654863161143728 +"Antimony compounds","emission/water","a0eb7d41-1d2e-37b2-9969-1758504bd806","221117",2.78220610360529e-06 +"Antimony compounds","emission/water","a0eb7d41-1d2e-37b2-9969-1758504bd806","22111B",0.345134056650169 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","22111A",0.954090519128314 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","22111C",0.0015984269044183 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221113",5.47170310488225e-05 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221117",0.00603485088442668 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","22111B",0.0381579590020763 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221114",2.25676293242321e-07 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221111",4.05022910941964e-06 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221116",2.83169449465316e-05 +"Arsenic compounds","emission/air","65d56a65-e766-3e57-8da8-f2accb61e9fc","221118",3.09341993662479e-05 +"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","22111B",0.0831674336493258 +"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","22111A",0.866741824289946 +"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","221114",3.73091880271416e-05 +"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","221113",0.0499466149481554 +"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","221117",9.85094245064488e-05 +"Arsenic compounds","emission/water","50d1ebdd-a4f0-3dc4-99a9-db27d31d4802","22111C",8.30850003943382e-06 "Barium compounds","emission/air","ac1eb121-e94a-3198-a613-528dbb56c2d2","22111A",1 -"Barium compounds","emission/water","d97a56c9-1cfd-3886-aa9f-e8f4960dff04","221111",1.78119362085015e-06 -"Barium compounds","emission/water","d97a56c9-1cfd-3886-aa9f-e8f4960dff04","221117",6.01774962949311e-05 -"Barium compounds","emission/water","d97a56c9-1cfd-3886-aa9f-e8f4960dff04","22111A",0.999810006867451 -"Barium compounds","emission/water","d97a56c9-1cfd-3886-aa9f-e8f4960dff04","22111B",0.000128034442632883 -"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","221113",0.000215204702832989 -"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","221116",1.83137717554675e-06 -"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","221117",0.00431766761888397 -"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","22111A",0.966897009683047 -"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","22111B",0.027748358411903 -"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","22111C",0.000819928206157186 -"Beryllium compounds","emission/water","b9b2f179-18a6-36d1-8155-e3f43b903829","221113",0.0951945777168532 -"Beryllium compounds","emission/water","b9b2f179-18a6-36d1-8155-e3f43b903829","22111A",0.852448404538877 -"Beryllium compounds","emission/water","b9b2f179-18a6-36d1-8155-e3f43b903829","22111B",0.0523570177442693 +"Barium compounds","emission/water","d97a56c9-1cfd-3886-aa9f-e8f4960dff04","22111A",0.999864097561703 +"Barium compounds","emission/water","d97a56c9-1cfd-3886-aa9f-e8f4960dff04","221111",1.51258991277922e-06 +"Barium compounds","emission/water","d97a56c9-1cfd-3886-aa9f-e8f4960dff04","22111B",9.32186231017471e-05 +"Barium compounds","emission/water","d97a56c9-1cfd-3886-aa9f-e8f4960dff04","221117",4.11712252825909e-05 +"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","22111B",0.0203854821072846 +"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","221116",1.46284363085408e-06 +"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","221113",0.000169729260581293 +"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","22111C",0.00077335299921898 +"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","22111A",0.975689283502921 +"Beryllium compounds","emission/air","ff2db099-eda7-3d5c-904f-397643bb2fc9","221117",0.00298068928636361 +"Beryllium compounds","emission/water","b9b2f179-18a6-36d1-8155-e3f43b903829","22111B",0.039501555416329 +"Beryllium compounds","emission/water","b9b2f179-18a6-36d1-8155-e3f43b903829","22111A",0.883395178070336 +"Beryllium compounds","emission/water","b9b2f179-18a6-36d1-8155-e3f43b903829","221113",0.0771032665133349 "Biomass","resource/biotic","7feeb363-fbeb-37ad-937f-080834b9dc35","221117",1 -"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221111",2.70960434552523e-05 -"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221113",0.000279680029908436 -"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221114",1.99977424816819e-06 -"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221116",8.15794856717273e-07 -"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221117",0.0101834128599021 -"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221118",0.00874933351530136 -"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","22111A",0.507239845492535 -"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","22111B",0.456648061156291 -"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","22111C",0.0168697553335021 -"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","221113",0.191973059282297 -"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","221117",0.000714827654746219 -"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","22111A",0.641923883120178 -"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","22111B",0.165358012611144 -"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","22111C",3.02173316347454e-05 -"Chromium compounds","emission/air","04d6d3dd-ddba-389c-83f6-e5f4a8638828","221111",0.0155074823602388 -"Chromium compounds","emission/air","04d6d3dd-ddba-389c-83f6-e5f4a8638828","22111A",0.984492517639761 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221118",0.00701286390369014 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221113",0.000251612683382345 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221116",7.43305217431783e-07 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","22111B",0.38267617099431 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","22111C",0.0181500088774075 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221114",2.12503226310407e-07 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221111",2.64843843593305e-05 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","221117",0.00801912460633148 +"Cadmium compounds","emission/air","8f9a0368-97e3-37f6-902d-325916697da4","22111A",0.583862778742075 +"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","22111B",0.131876887563999 +"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","22111C",3.09398220718894e-05 +"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","221113",0.164363356262277 +"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","221117",0.00053570857642673 +"Cadmium compounds","emission/water","d6499c68-fb53-3ad8-ba19-1e40834b4fc7","22111A",0.703193107775225 +"Chromium compounds","emission/air","04d6d3dd-ddba-389c-83f6-e5f4a8638828","221111",0.0131991200160424 +"Chromium compounds","emission/air","04d6d3dd-ddba-389c-83f6-e5f4a8638828","22111A",0.986800879983958 "Chromium compounds","emission/ground","3e9e5cb3-0f07-3618-ac5c-5d89626970b1","221111",1 -"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","221113",0.0137513695680843 -"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","221117",2.54635748439216e-05 -"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","22111A",0.979766872679347 -"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","22111B",0.00588519456232118 -"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","22111C",0.000571099615403631 -"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","221113",8.00293022844756e-07 -"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","221117",0.00525905230305557 -"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","221118",4.7037149108416e-05 -"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","22111A",0.949552334858303 -"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","22111B",0.0420629335568934 -"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","22111C",0.0030778418396173 +"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","221117",1.7501670603839e-05 +"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","221113",0.0107980055624528 +"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","22111B",0.00430464308056584 +"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","22111A",0.984343551354024 +"Chromium compounds","emission/water","1f2d2829-029a-3a77-824c-e43f2f386f41","22111C",0.000536298332353145 +"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","221118",3.31960219214767e-05 +"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","221117",0.00364641179401608 +"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","22111B",0.0310365880501849 +"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","221113",6.33934977454657e-07 +"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","22111A",0.962367496166205 +"Cobalt compounds","emission/air","5ba5aa71-2d33-3b9c-9bd4-37c19b1b4506","22111C",0.00291567403269524 "Cobalt compounds","emission/ground","98b4a1e7-bda4-31ef-a1ae-45edc475eb5a","22111A",1 -"Cobalt compounds","emission/water","71a07160-4ecc-3056-8e1a-2598a62db1a5","221117",0.000509257105316605 -"Cobalt compounds","emission/water","71a07160-4ecc-3056-8e1a-2598a62db1a5","22111A",0.154386526000982 -"Cobalt compounds","emission/water","71a07160-4ecc-3056-8e1a-2598a62db1a5","22111C",0.845104216893701 -"Copper compounds","emission/air","233fa408-5db8-3c9a-aa2f-60dcb6d587e6","221111",0.0108499095840868 -"Copper compounds","emission/air","233fa408-5db8-3c9a-aa2f-60dcb6d587e6","22111A",0.989150090415913 +"Cobalt compounds","emission/water","71a07160-4ecc-3056-8e1a-2598a62db1a5","221117",0.000368809361966244 +"Cobalt compounds","emission/water","71a07160-4ecc-3056-8e1a-2598a62db1a5","22111C",0.836198830530801 +"Cobalt compounds","emission/water","71a07160-4ecc-3056-8e1a-2598a62db1a5","22111A",0.163432360107233 +"Copper compounds","emission/air","233fa408-5db8-3c9a-aa2f-60dcb6d587e6","22111A",0.990771649760784 +"Copper compounds","emission/air","233fa408-5db8-3c9a-aa2f-60dcb6d587e6","221111",0.00922835023921618 "Copper compounds","emission/ground","eda80ec2-392d-31ab-8116-70aad9d8d157","221111",1 -"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","221111",4.27006871910041e-06 -"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","221113",0.101597499583333 -"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","221114",0.000941388947235539 -"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","221117",0.00015746895337093 -"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","22111A",0.414753939767835 -"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","22111B",0.411172544133085 -"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","22111C",0.0713728885464211 -"Cyanide compounds","emission/air","87345046-bc9a-3701-b002-69fa7045c16d","221117",0.000768070796673517 -"Cyanide compounds","emission/air","87345046-bc9a-3701-b002-69fa7045c16d","22111A",0.981902254276292 -"Cyanide compounds","emission/air","87345046-bc9a-3701-b002-69fa7045c16d","22111B",0.0163435226233169 -"Cyanide compounds","emission/air","87345046-bc9a-3701-b002-69fa7045c16d","22111C",0.000986152303717198 -"Cyanide compounds","emission/water","1df3147c-9485-3401-b2b5-b403b8f2d52f","221113",9.55933439672715e-07 -"Cyanide compounds","emission/water","1df3147c-9485-3401-b2b5-b403b8f2d52f","221118",0.0168030536290297 -"Cyanide compounds","emission/water","1df3147c-9485-3401-b2b5-b403b8f2d52f","22111A",0.982678242636664 -"Cyanide compounds","emission/water","1df3147c-9485-3401-b2b5-b403b8f2d52f","22111B",0.000517747800866216 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","221113",0.0922883175139131 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","22111C",0.0775343174858668 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","221111",4.21416468198918e-06 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","22111A",0.482037233458615 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","22111B",0.347909706722208 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","221117",0.00012520486037038 +"Copper compounds","emission/water","4177b053-26a1-36e1-baa8-43af1249eb56","221114",0.000101005794345054 +"Cyanide compounds","emission/air","87345046-bc9a-3701-b002-69fa7045c16d","221117",0.000527966135531142 +"Cyanide compounds","emission/air","87345046-bc9a-3701-b002-69fa7045c16d","22111C",0.000926154103701205 +"Cyanide compounds","emission/air","87345046-bc9a-3701-b002-69fa7045c16d","22111A",0.98659040920371 +"Cyanide compounds","emission/air","87345046-bc9a-3701-b002-69fa7045c16d","22111B",0.011955470557058 +"Cyanide compounds","emission/water","1df3147c-9485-3401-b2b5-b403b8f2d52f","221113",7.51077000751235e-07 +"Cyanide compounds","emission/water","1df3147c-9485-3401-b2b5-b403b8f2d52f","22111A",0.987857965545883 +"Cyanide compounds","emission/water","1df3147c-9485-3401-b2b5-b403b8f2d52f","221118",0.0117623579035744 +"Cyanide compounds","emission/water","1df3147c-9485-3401-b2b5-b403b8f2d52f","22111B",0.000378925473541643 "Energy, geothermal","resource/ground","d2792697-9e22-3380-974f-54b92a3549a9","221116",1 "Energy, hydro","resource/water","5af7a834-bf92-32eb-a0b2-2f2dcdc9f3d9","221111",1 "Energy, solar","resource/air","4d1571a6-ffff-3a36-82df-224ed975a094","221114",1 "Energy, wind","resource/air","35962866-662b-3817-a2a7-39375c7e6a3c","221115",1 -"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221111",0.00221760983320083 -"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221113",0.000286675937165634 -"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221115",4.95901348987923e-05 -"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221116",1.39815426373479e-07 -"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221117",0.0203250985888215 -"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221118",0.053898842472777 -"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","22111A",0.869703600853836 -"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","22111B",0.0503547111646986 -"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","22111C",0.00316373119917542 -"Lead compounds","emission/ground","b6686ba5-0857-310b-a88c-04516ee2dc16","221111",0.228277146718288 -"Lead compounds","emission/ground","b6686ba5-0857-310b-a88c-04516ee2dc16","221113",0.771722853281712 -"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","221111",7.25351258600312e-05 -"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","221113",0.00555017984038333 -"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","221117",0.000117702603337506 -"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","221118",0.000903390134895935 -"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","22111A",0.963273679952945 -"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","22111B",0.0300822365513369 -"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","22111C",2.75791241797374e-07 -"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","221111",8.02605506253131e-05 -"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","221113",0.0012866896677402 -"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","221117",0.119518653915219 -"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","221118",0.0202875553222923 -"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","22111A",0.617156177709701 -"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","22111B",0.231056899207197 -"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","22111C",0.0106137636272255 -"Manganese compounds","emission/water","a59ee0ff-0f7a-3f04-95d6-9f0620010da0","221117",1.55385245436573e-05 -"Manganese compounds","emission/water","a59ee0ff-0f7a-3f04-95d6-9f0620010da0","22111A",0.999934068743368 -"Manganese compounds","emission/water","a59ee0ff-0f7a-3f04-95d6-9f0620010da0","22111B",5.03148074798522e-05 -"Manganese compounds","emission/water","a59ee0ff-0f7a-3f04-95d6-9f0620010da0","22111C",7.79246087622165e-08 -"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221111",2.27728668398306e-05 -"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221113",0.000108676169305612 -"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221114",2.22056339968165e-06 -"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221116",0.00336887864820634 -"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221117",0.00498125459117253 -"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221118",0.00782107834579958 -"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","22111A",0.840680380289928 -"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","22111B",0.133723525647032 -"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","22111C",0.00929121287831623 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","22111B",0.0380728889177055 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221111",0.00195566769257252 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","22111A",0.903222228703701 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221115",2.5915067183873e-05 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221116",1.14938951346656e-07 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221113",0.000232695633392459 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221118",0.038978560672308 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","221117",0.0144408312173911 +"Lead compounds","emission/air","e7e53ff6-c201-3e33-a8c0-00c7ea0ced99","22111C",0.00307109715679474 +"Lead compounds","emission/ground","b6686ba5-0857-310b-a88c-04516ee2dc16","221113",0.756786625945548 +"Lead compounds","emission/ground","b6686ba5-0857-310b-a88c-04516ee2dc16","221111",0.243213374054452 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","221113",0.00438047245407329 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","221111",6.21978248311719e-05 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","22111B",0.0221158048887469 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","22111C",2.60310300923175e-07 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","221117",8.13134719499772e-05 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","221118",0.000635241128870072 +"Lead compounds","emission/water","587e4238-31d8-3674-94e9-d20186f55839","22111A",0.972724709921228 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","221113",0.0011270819452072 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","221111",7.63830057092172e-05 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","22111A",0.691676652266692 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","221118",0.0158329107444802 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","221117",0.0916389091839857 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","22111C",0.0111185480341676 +"Manganese compounds","emission/air","c33548d3-5ccc-39da-b434-3c558a178cfd","22111B",0.188529514819758 +"Manganese compounds","emission/water","a59ee0ff-0f7a-3f04-95d6-9f0620010da0","22111C",7.28372158383226e-08 +"Manganese compounds","emission/water","a59ee0ff-0f7a-3f04-95d6-9f0620010da0","221117",1.0630508448667e-05 +"Manganese compounds","emission/water","a59ee0ff-0f7a-3f04-95d6-9f0620010da0","22111B",3.66316318200171e-05 +"Manganese compounds","emission/water","a59ee0ff-0f7a-3f04-95d6-9f0620010da0","22111A",0.999952665022515 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","22111B",0.101586996860822 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","22111A",0.877220640814406 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221118",0.00568286811299422 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221111",2.01781901489927e-05 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221117",0.00355592711811871 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221116",0.00278260837140427 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","22111C",0.00906193557330049 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221114",2.13908595186091e-07 +"Mercury compounds","emission/air","b13d5170-0f62-30e2-9c10-ddde89b2d2b1","221113",8.86310502107129e-05 "Mercury compounds","emission/ground","88e61068-63be-3194-a36f-24f4e632fc66","22111A",1 -"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","221113",0.00170798113977818 -"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","221114",4.3671725926746e-05 -"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","221117",2.02711189119524e-06 -"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","221118",3.5801556236767e-05 -"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","22111A",0.426110380651609 -"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","22111B",0.572074829817908 -"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","22111C",2.53079966501284e-05 -"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221111",7.78985651536027e-05 -"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221113",1.2220838094579e-05 -"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221114",3.52831467546434e-07 -"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221116",5.53593864035755e-08 -"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221117",0.00277195954607319 -"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221118",0.00166078159210727 -"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","22111A",0.504757073620865 -"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","22111B",0.468431741455482 -"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","22111C",0.0222879161913707 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","221113",0.00158168303186637 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","22111A",0.504876150085784 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","22111B",0.493478180405339 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","221117",1.64314785619462e-06 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","22111C",2.80279374110905e-05 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","221118",2.95384469169473e-05 +"Mercury compounds","emission/water","71f2d986-ed4b-3342-8ca7-15dd2dc30239","221114",4.77694482615535e-06 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221113",1.09819316619614e-05 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221117",0.00218035481222923 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","22111A",0.580345359978958 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221111",7.6053662756597e-05 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","22111C",0.0239521332055541 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221116",5.03830158927204e-08 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221118",0.00132965703596578 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","221114",3.74505794821263e-08 +"Nickel compounds","emission/air","d9d3dec9-f636-377d-a044-6b21d995c978","22111B",0.392105371539279 "Nickel compounds","emission/ground","80e4b266-b196-35a4-aa89-7f45a3ad5472","221111",1 -"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","221111",1.4991470467667e-05 -"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","221113",3.43064529860694e-06 -"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","221117",0.000496055445922847 -"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","22111A",0.852130717029683 -"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","22111B",0.147343538482016 -"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","22111C",1.12669266117062e-05 -"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221111",3.35097885682699e-05 -"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221113",3.63500203864185e-05 -"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221114",7.82354813735511e-05 -"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221115",7.95234277365237e-06 -"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221116",4.56962922712412e-23 -"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221117",0.0988097117581696 -"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221118",0.00271691025166238 -"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","22111A",0.632249146495727 -"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","22111B",0.260238364083901 -"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","22111C",0.00582981977743792 -"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","221113",2.90789353311929e-05 -"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","221116",3.32279542862122e-08 -"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","221117",0.000224239355491044 -"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","22111A",0.984117058906931 -"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","22111B",0.0155082552434486 -"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","22111C",0.000121334330844268 -"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","221113",1.12256072535743e-07 -"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","221114",0.00104117507276902 -"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","221115",0.000189151482222727 -"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","221117",5.58473960865321e-06 -"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","22111A",0.976421919747112 -"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","22111B",0.0223394018460994 -"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","22111C",2.65485611547032e-06 -"Silver compounds","emission/water","ef4acec0-54d2-30f5-9a5f-a3ed67ac49c0","221117",9.42422155883817e-06 -"Silver compounds","emission/water","ef4acec0-54d2-30f5-9a5f-a3ed67ac49c0","22111A",0.974749725595623 -"Silver compounds","emission/water","ef4acec0-54d2-30f5-9a5f-a3ed67ac49c0","22111B",0.0252266677437206 -"Silver compounds","emission/water","ef4acec0-54d2-30f5-9a5f-a3ed67ac49c0","22111C",1.41824390973514e-05 +"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","221111",1.32637050445753e-05 +"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","221117",0.000353590389435949 +"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","221113",2.7937240720369e-06 +"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","22111A",0.887851369905213 +"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","22111B",0.111768009661178 +"Nickel compounds","emission/water","862e1bfb-5191-34ef-97ba-42b5b56aabd3","22111C",1.09726150564799e-05 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221118",0.00210980255474651 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221114",8.05442233040117e-06 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","22111B",0.211284288976342 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221116",4.03378980580842e-23 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221115",4.46243910065843e-06 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221111",3.17323160991262e-05 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221113",3.16826728605171e-05 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","22111C",0.00607672061216998 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","22111A",0.705069230490915 +"Nitrogen dioxide","emission/air","a742c00e-7148-3f99-9ecc-16bb46bd2f4f","221117",0.0753840255154357 +"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","22111C",0.000113900871933446 +"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","22111A",0.988369829343337 +"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","221113",2.282573995101e-05 +"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","221117",0.000154070942191765 +"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","221116",2.64158818896874e-08 +"Selenium compounds","emission/air","d240a362-1f01-3b10-a506-6f544c61df57","22111B",0.0113393466867049 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","221115",9.58617084505382e-05 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","22111A",0.983420451806725 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","221114",9.68083026734496e-05 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","22111B",0.0163804424941798 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","221117",3.84805106294215e-06 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","221113",8.8366001296698e-08 +"Selenium compounds","emission/water","a2eb3172-ce81-3a6b-9cb0-f93bfbb8f3d3","22111C",2.49927090734907e-06 +"Silver compounds","emission/water","ef4acec0-54d2-30f5-9a5f-a3ed67ac49c0","22111C",1.33479055373692e-05 +"Silver compounds","emission/water","ef4acec0-54d2-30f5-9a5f-a3ed67ac49c0","22111A",0.981487310967147 +"Silver compounds","emission/water","ef4acec0-54d2-30f5-9a5f-a3ed67ac49c0","22111B",0.0184928492061489 +"Silver compounds","emission/water","ef4acec0-54d2-30f5-9a5f-a3ed67ac49c0","221117",6.49192116657615e-06 "Sulfur hexafluoride","emission/air","8334c424-1603-3274-bec1-15a7bd5c8e86","221121",1 "Thallium compounds","emission/air","fadad103-b2f4-3cfd-944d-d36126854972","22111B",1 -"Thallium compounds","emission/water","9daa2e85-d57f-39ad-afbd-93645948a896","221117",1.96194336185957e-05 -"Thallium compounds","emission/water","9daa2e85-d57f-39ad-afbd-93645948a896","22111A",0.581119396278383 -"Thallium compounds","emission/water","9daa2e85-d57f-39ad-afbd-93645948a896","22111B",0.418791472423726 -"Thallium compounds","emission/water","9daa2e85-d57f-39ad-afbd-93645948a896","22111C",6.95118642723363e-05 +"Thallium compounds","emission/water","9daa2e85-d57f-39ad-afbd-93645948a896","221117",1.51475878121291e-05 +"Thallium compounds","emission/water","9daa2e85-d57f-39ad-afbd-93645948a896","22111B",0.344089194164299 +"Thallium compounds","emission/water","9daa2e85-d57f-39ad-afbd-93645948a896","22111C",7.33247171946776e-05 +"Thallium compounds","emission/water","9daa2e85-d57f-39ad-afbd-93645948a896","22111A",0.655822333530694 "Uranium","resource/ground","af4664da-60f0-31e5-83ba-0d2518959c5b","221113",1 "Vanadium compounds","emission/air","769dbca1-f841-3aea-a60d-bbefd9bf412e","22111A",1 "Vanadium compounds","emission/ground","cd004848-4775-3235-aa5b-07c8116958e4","22111A",1 -"Vanadium compounds","emission/water","52284d66-6c39-3e5c-a406-bcd75379fc85","221117",0.0065960262224871 -"Vanadium compounds","emission/water","52284d66-6c39-3e5c-a406-bcd75379fc85","22111A",0.265305710158688 -"Vanadium compounds","emission/water","52284d66-6c39-3e5c-a406-bcd75379fc85","22111B",0.728098263618824 -"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","221113",0.230395931895793 -"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","221114",1.21962438262634e-29 -"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","221117",3.71440103394613e-06 -"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","22111A",0.448568094869307 -"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","22111B",0.321032258833866 -"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","221113",0.230395931895793 -"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","221114",1.21962438262634e-29 -"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","221117",3.71440103394613e-06 -"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","22111A",0.448568094869307 -"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","22111B",0.321032258833866 -"Water, saline","resource/water/saline water body","272e60cf-1e1f-3997-a93d-17f7698571e6","221113",0.379748786979834 -"Water, saline","resource/water/saline water body","272e60cf-1e1f-3997-a93d-17f7698571e6","22111A",0.0161601149204466 -"Water, saline","resource/water/saline water body","272e60cf-1e1f-3997-a93d-17f7698571e6","22111B",0.598351010648577 -"Water, saline","resource/water/saline water body","272e60cf-1e1f-3997-a93d-17f7698571e6","22111C",0.00574008745114206 -"Water, saline","resource/water/subterranean/saline water body","dcffa66d-c69a-3b45-956c-915dcfe19995","221113",0.379748786979834 -"Water, saline","resource/water/subterranean/saline water body","dcffa66d-c69a-3b45-956c-915dcfe19995","22111A",0.0161601149204466 -"Water, saline","resource/water/subterranean/saline water body","dcffa66d-c69a-3b45-956c-915dcfe19995","22111B",0.598351010648577 -"Water, saline","resource/water/subterranean/saline water body","dcffa66d-c69a-3b45-956c-915dcfe19995","22111C",0.00574008745114206 +"Vanadium compounds","emission/water","52284d66-6c39-3e5c-a406-bcd75379fc85","22111B",0.662684795748872 +"Vanadium compounds","emission/water","52284d66-6c39-3e5c-a406-bcd75379fc85","221117",0.00564135192660126 +"Vanadium compounds","emission/water","52284d66-6c39-3e5c-a406-bcd75379fc85","22111A",0.331673852324527 +"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","221113",0.208812573187327 +"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","221114",1.30563391110269e-30 +"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","22111B",0.271024931323571 +"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","22111A",0.52015954880779 +"Water, fresh","resource/water/fresh water body","3a10ad4e-2c19-3be8-b199-249d7020bba1","221117",2.94668131130827e-06 +"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","221113",0.208812573187327 +"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","221114",1.30563391110269e-30 +"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","22111B",0.271024931323571 +"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","22111A",0.52015954880779 +"Water, fresh","resource/water/subterranean/fresh water body","5d717594-2c5c-394c-8eaf-9e9d2fd553fd","221117",2.94668131130827e-06 +"Water, saline","resource/water/saline water body","272e60cf-1e1f-3997-a93d-17f7698571e6","22111B",0.577784347956361 +"Water, saline","resource/water/saline water body","272e60cf-1e1f-3997-a93d-17f7698571e6","22111C",0.00711617318501902 +"Water, saline","resource/water/saline water body","272e60cf-1e1f-3997-a93d-17f7698571e6","22111A",0.0214339303530843 +"Water, saline","resource/water/saline water body","272e60cf-1e1f-3997-a93d-17f7698571e6","221113",0.393665548505536 +"Water, saline","resource/water/subterranean/saline water body","dcffa66d-c69a-3b45-956c-915dcfe19995","22111B",0.577784347956361 +"Water, saline","resource/water/subterranean/saline water body","dcffa66d-c69a-3b45-956c-915dcfe19995","22111C",0.00711617318501902 +"Water, saline","resource/water/subterranean/saline water body","dcffa66d-c69a-3b45-956c-915dcfe19995","22111A",0.0214339303530843 +"Water, saline","resource/water/subterranean/saline water body","dcffa66d-c69a-3b45-956c-915dcfe19995","221113",0.393665548505536 "Zinc compounds","emission/air","f654e940-5737-3bc7-9492-f163c47bfbd5","22111A",1 -"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221111",0.0100271001251767 -"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221113",0.090068910663191 -"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221114",0.000689164936262362 -"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221117",0.00012478429839769 -"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221118",0.00342584888605783 -"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","22111A",0.808855207362032 -"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","22111B",0.0867986402620995 -"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","22111C",1.03434667825116e-05 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221118",0.00250189660442748 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221113",0.0738289511158173 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221111",0.00892976581851225 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","22111A",0.848298951720929 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221114",6.67249790141838e-05 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","221117",8.95311717071106e-05 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","22111C",1.01394616787114e-05 +"Zinc compounds","emission/water","6e8f5792-945d-35a1-a558-663397d47b5b","22111B",0.0662740391279142 From 657dbc98afb352f9a264557ea422ccc15d21654f Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 3 Dec 2021 14:12:37 -0800 Subject: [PATCH 223/319] Modify calculateEEIOModel: use 'demand' and 'use_domestic_requirements' together to determine which default demand vector to use --- R/CalculationFunctions.R | 14 +++++++++----- man/calculateEEIOModel.Rd | 7 ++++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 2061318d..673c16ac 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -4,13 +4,14 @@ #' for a given perspective and demand vector. #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param perspective Perspective of the model, can be "DIRECT", "INTERMEDIATE", or "FINAL". -#' @param demand A demand vector, can be name of a built-in model demand vector, e.g. "CompleteProduction", +#' @param demand A demand vector, can be name of a built-in model demand vector, e.g. "Production", #' or an actual demand vector with names as one or more model sectors and #' numeric values in USD with the same dollar year as model. -#' @param use_domestic_requirements A logical value: if TRUE, use domestic A_d; if FALSE, use A matrices. +#' @param use_domestic_requirements A logical value: if TRUE, use domestic demand and L_d matrix; +#' if FALSE, use complete demand and L matrix. #' @export #' @return A list with LCI and LCIA results (in data.frame format) of the EEIO model. -calculateEEIOModel <- function(model, perspective, demand = "CompleteProduction", use_domestic_requirements = FALSE) { +calculateEEIOModel <- function(model, perspective, demand = "Production", use_domestic_requirements = FALSE) { result <- list() # Generate Total Requirements (L or L_d) matrix based on whether "use_domestic" if (use_domestic_requirements) { @@ -24,9 +25,12 @@ calculateEEIOModel <- function(model, perspective, demand = "CompleteProduction" #assume this is a model build-in demand #try to load the model vector meta <- model$DemandVectors$meta - if (demand %in% meta$Name) { + if (demand %in% meta$Type) { + demand_name <- ifelse(use_domestic_requirements, + paste0("Domestic", demand), + paste0("Complete", demand)) # Get vector name (ID) from the meta table - id <- meta[which(meta$Name==demand),"ID"] + id <- meta[which(meta$Name==demand_name),"ID"] d <- model$DemandVectors$vectors[[id]] } else { stop(paste0("'", demand, "' is not a valid demand vector name in model.")) diff --git a/man/calculateEEIOModel.Rd b/man/calculateEEIOModel.Rd index 02cfd653..142f7e39 100644 --- a/man/calculateEEIOModel.Rd +++ b/man/calculateEEIOModel.Rd @@ -8,7 +8,7 @@ for a given perspective and demand vector.} calculateEEIOModel( model, perspective, - demand = "CompleteProduction", + demand = "Production", use_domestic_requirements = FALSE ) } @@ -17,11 +17,12 @@ calculateEEIOModel( \item{perspective}{Perspective of the model, can be "DIRECT", "INTERMEDIATE", or "FINAL".} -\item{demand}{A demand vector, can be name of a built-in model demand vector, e.g. "CompleteProduction", +\item{demand}{A demand vector, can be name of a built-in model demand vector, e.g. "Production", or an actual demand vector with names as one or more model sectors and numeric values in USD with the same dollar year as model.} -\item{use_domestic_requirements}{A logical value: if TRUE, use domestic A_d; if FALSE, use A matrices.} +\item{use_domestic_requirements}{A logical value: if TRUE, use domestic demand and L_d matrix; +if FALSE, use complete demand and L matrix.} } \value{ A list with LCI and LCIA results (in data.frame format) of the EEIO model. From 5e77dc31e2fc9108ba920f1dfde8eb239f3f2dd9 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Fri, 3 Dec 2021 14:15:49 -0800 Subject: [PATCH 224/319] Update Model.md Mark B as a component matrix --- format_specs/Model.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/format_specs/Model.md b/format_specs/Model.md index 4e3533c7..a24b0bf7 100644 --- a/format_specs/Model.md +++ b/format_specs/Model.md @@ -43,7 +43,7 @@ Items are listed in the order in which they appear in a built Model object in R. | A_d | matrix | component matrix | [The domestic direct requirements matrix](#A) | | L | matrix | component matrix | [The Leontief inverse matrix](#L) | | L_d | matrix | component matrix | [The domestic Leontief inverse matrix](#L) | -| B | matrix | result matrix | [The direct emissions and resource use matrix](#B) | +| B | matrix | component matrix | [The direct emissions and resource use matrix](#B) | | C | matrix | component matrix | [The characterization factor matrix](#C) | | D | matrix | result matrix | [The direct impact matrix](#D) | | M | matrix | result matrix | [The total emissions and resource use matrix](#M) | @@ -267,6 +267,19 @@ sectors | | The related `L_d` matrix provides direct + indirect sector inputs per dollar output that are only from the US. +#### B +The satellite matrix `B` is a `flow x sector` matrix and contains in +each column `i` the amount of a flow given in the reference +units of the respective flow per 1 USD output from sector `i`: + +``` + sectors + +-------+ +flows | | + | B | + +-------+ +``` + #### C In the matrix `C`, each column `k` contains the characterization factors of the different indicators related to one reference unit of flow `k`: @@ -305,19 +318,6 @@ flows | | ### Model Result Matrices -#### B -The satellite matrix `B` is a `flow x sector` matrix and contains in -each column `i` the amount of a flow given in the reference -units of the respective flow per 1 USD output from sector `i`: - -``` - sectors - +-------+ -flows | | - | B | - +-------+ -``` - #### D The matrix `D` contains in each column `i` the direct impact result per USD output from sector `i`: From e453b4b5e8aec257f90e9089a8115a15b81b706f Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 3 Dec 2021 15:53:58 -0800 Subject: [PATCH 225/319] Simplify parameters in calculateDirectPerspectiveLCIA function --- R/CalculationFunctions.R | 9 ++++----- man/calculateDirectPerspectiveLCIA.Rd | 6 ++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 673c16ac..386bc5d0 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -54,7 +54,7 @@ calculateEEIOModel <- function(model, perspective, demand = "Production", use_do result$LCI_d <- calculateDirectPerspectiveLCI(model$B, c) # Calculate DirectPerspectiveLCIA (transposed u_d with total impacts in form of sectorximpact categories) logging::loginfo("Calculating Direct Perspective LCIA...") - result$LCIA_d <- calculateDirectPerspectiveLCIA(model$B, model$C, c) + result$LCIA_d <- calculateDirectPerspectiveLCIA(model$D, c) } else if (perspective=="FINAL") { # Calculate FinalPerspectiveLCI logging::loginfo("Calculating Final Perspective LCI...") @@ -113,16 +113,15 @@ calculateFinalPerspectiveLCI <- function(M, y) { } #' Multiply the C matrix and the product of B matrix and scaling vector c. -#' @param B Marginal impact per unit of the environmental flows. -#' @param C LCIA indicators. +#' @param D Direct impact per unit of the environmental flows. #' @param c Scaling vector. #' @return A transposed matrix with total impacts in form of sector x impact categories. #' @references Yang, Yi, Wesley W. Ingwersen, Troy R. Hawkins, Michael Srocka, and David E. Meyer. #' 2017. “USEEIO: A New and Transparent United States Environmentally-Extended Input-Output Model.†#' Journal of Cleaner Production 158 (August): 308–18. https://doi.org/10.1016/j.jclepro.2017.04.150. #' SI1, Equation 8. -calculateDirectPerspectiveLCIA <- function(B, C, c) { - lcia_d <- t(C %*% (B %*% diag(as.vector(c), nrow(c)))) +calculateDirectPerspectiveLCIA <- function(D, c) { + lcia_d <- t(D %*% diag(as.vector(c), nrow(c))) rownames(lcia_d) <- rownames(c) return(lcia_d) } diff --git a/man/calculateDirectPerspectiveLCIA.Rd b/man/calculateDirectPerspectiveLCIA.Rd index 57a694c8..038832b1 100644 --- a/man/calculateDirectPerspectiveLCIA.Rd +++ b/man/calculateDirectPerspectiveLCIA.Rd @@ -4,12 +4,10 @@ \alias{calculateDirectPerspectiveLCIA} \title{Multiply the C matrix and the product of B matrix and scaling vector c.} \usage{ -calculateDirectPerspectiveLCIA(B, C, c) +calculateDirectPerspectiveLCIA(D, c) } \arguments{ -\item{B}{Marginal impact per unit of the environmental flows.} - -\item{C}{LCIA indicators.} +\item{D}{Direct impact per unit of the environmental flows.} \item{c}{Scaling vector.} } From dc3f4116674527b78f8b03b80835b8b3048fb049 Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Sun, 5 Dec 2021 09:34:12 -0500 Subject: [PATCH 226/319] Update version and name in DESCRIPTION --- DESCRIPTION | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d83b6291..09a555be 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: useeior Type: Package -Title: USEEIO modeling software -Version: 0.4.1 -Date: 2021-09-10 +Title: USEEIO R modeling software +Version: 1.0.0 +Date: 2021-12-03 Authors@R: c( person("Mo","Li", email="mo.li@gdit.com", role="aut"), person("Wesley","Ingwersen", email="ingwersen.wesley@epa.gov", role= c("aut", "cre")), From 7068d932f285df409e7550972f7e8f7c5efa694a Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 6 Dec 2021 11:33:09 -0800 Subject: [PATCH 227/319] Add mu in calculating domestic production demand --- R/DemandFunctions.R | 6 +++--- man/prepareDomesticProductionDemand.Rd | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index 73022266..964510a6 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -33,7 +33,7 @@ sumDemandCols <- function(Y,codes) { #'@return A named vector with model sectors and demand amounts sumforConsumption <- function(model, Y) { codes <- model$FinalDemandMeta[model$FinalDemandMeta$Group%in%c("Household", "Investment", "Government"), - "Code_Loc"] + "Code_Loc"] y_c <- sumDemandCols(Y, codes) return (y_c) } @@ -57,7 +57,7 @@ prepareProductionDemand <- function(model) { } #'Prepares a demand vector representing domestic production -#'Formula for production vector: y_p <- y_dc + y_e + y_d_delta +#'Formula for production vector: y_p <- y_dc + y_e + y_d_delta + mu #'@param model, a model #'@return A named vector with demand prepareDomesticProductionDemand <- function(model) { @@ -66,7 +66,7 @@ prepareDomesticProductionDemand <- function(model) { y_d_c <- sumforConsumption(model, model$DomesticFinalDemand) y_d_e <- sumDemandCols(model$DomesticFinalDemand, export_code) y_d_delta <- sumDemandCols(model$DomesticFinalDemand, changeinventories_code) - y_d_p <- y_d_c + y_d_e + y_d_delta + y_d_p <- y_d_c + y_d_e + y_d_delta + model$InternationalTradeAdjustment return(y_d_p) } diff --git a/man/prepareDomesticProductionDemand.Rd b/man/prepareDomesticProductionDemand.Rd index 50f8a7f4..94d26fe3 100644 --- a/man/prepareDomesticProductionDemand.Rd +++ b/man/prepareDomesticProductionDemand.Rd @@ -3,7 +3,7 @@ \name{prepareDomesticProductionDemand} \alias{prepareDomesticProductionDemand} \title{Prepares a demand vector representing domestic production -Formula for production vector: y_p <- y_dc + y_e + y_d_delta} +Formula for production vector: y_p <- y_dc + y_e + y_d_delta + mu} \usage{ prepareDomesticProductionDemand(model) } @@ -15,5 +15,5 @@ A named vector with demand } \description{ Prepares a demand vector representing domestic production -Formula for production vector: y_p <- y_dc + y_e + y_d_delta +Formula for production vector: y_p <- y_dc + y_e + y_d_delta + mu } From 41877129302597c5c165e1eac491446b18ea7048 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 6 Dec 2021 11:33:27 -0800 Subject: [PATCH 228/319] Delete unused comment --- R/ValidateModel.R | 1 - 1 file changed, 1 deletion(-) diff --git a/R/ValidateModel.R b/R/ValidateModel.R index 4bc6c769..2ab8917f 100644 --- a/R/ValidateModel.R +++ b/R/ValidateModel.R @@ -27,7 +27,6 @@ compareEandLCIResult <- function(model, use_domestic = FALSE, tolerance = 0.05) E <- t(model$C_m %*% t(E)) #Need to transform B_Chi to be in commodity form B_chi <- B_chi %*% model$V_n - #Use L and FinalDemand unless use_domestic, in which case use L_d and DomesticFinalDemand } # Calculate scaling factor c=Ly From 23e0e8b410e3a7fa478331e2ec84f64804fbd9ae Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 6 Dec 2021 11:36:01 -0800 Subject: [PATCH 229/319] Add doc of disaggregateInternationalTradeAdjustment --- ...isaggregateInternationalTradeAdjustment.Rd | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 man/disaggregateInternationalTradeAdjustment.Rd diff --git a/man/disaggregateInternationalTradeAdjustment.Rd b/man/disaggregateInternationalTradeAdjustment.Rd new file mode 100644 index 00000000..fafb2d5d --- /dev/null +++ b/man/disaggregateInternationalTradeAdjustment.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/DisaggregateFunctions.R +\name{disaggregateInternationalTradeAdjustment} +\alias{disaggregateInternationalTradeAdjustment} +\title{Disaggregate model$InternationalTradeAdjustments vector in the main model object} +\usage{ +disaggregateInternationalTradeAdjustment(model, disagg, ratios = NULL) +} +\arguments{ +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} + +\item{disagg}{Specifications for disaggregating the current Table} + +\item{ratios}{Specific ratios to be used for the disaggregation of the InternationalTradeAdjusment object in place of using economic totals to derive the ratios.} +} +\value{ +newInternationalTradeAdjustment A vector which contains the InternationalTradeAdjustment for the disaggregated sectors +} +\description{ +Disaggregate model$InternationalTradeAdjustments vector in the main model object +} From c1707d000bf593e6d2ee5aa815b5477059bfacef Mon Sep 17 00:00:00 2001 From: Wesley Ingwersen Date: Tue, 7 Dec 2021 16:47:41 -0500 Subject: [PATCH 230/319] minor style updates and definitions - Provide definitions of the values in the Rho and Phi matrices. - Add 'see' before external refs - Change refs to FEDEFL to be to the FlowList format --- format_specs/Model.md | 48 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/format_specs/Model.md b/format_specs/Model.md index a24b0bf7..19fbabf8 100644 --- a/format_specs/Model.md +++ b/format_specs/Model.md @@ -69,7 +69,7 @@ Items are listed in the order in which they appear in a built Model object in R. | BEA_Sector | str | Code used at the BEA Sector level | | BEA_Summary | str | Code used at the BEA Summary level | | BEA_Detail | str | Code used at the BEA Detail level | -| USEEIO | str | Code used at the model level of detail | +| USEEIO | str | Codes used by the model | 2 7-10 digit NAICS code exists for manufacturing and mining industries. @@ -131,14 +131,14 @@ Year | int | Year of data, e.g. `2010` MetaSources | str | The major data source(s) value is based on. #### flows -The unique flows found across all satellite tables with fields sourced from the [Federal LCA Commons Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) +The unique flows found across all satellite tables with fields sourced from the [FlowList](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) format of the Federal LCA Commons Elementary Flow List. | Item | Type | Description | | --- | --- | --------- | -| Flowable | str | [Federal Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | -| Context | str | [Federal Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | -| Unit | str | [Federal Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | -| FlowUUID | str | [Federal Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | +| Flowable | str | See [FlowList](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | +| Context | str | See [FlowList](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | +| Unit | str | See [FlowList](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | +| FlowUUID | str | See [FlowList](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | ### Indicators The Indicators object contains meta and factors dataframes. @@ -148,12 +148,12 @@ The Indicators object contains meta and factors dataframes. | Item | Type | Description | | --- | --- | --------- | -| Name | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | -| Code | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | -| Group | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | -| Unit | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | -| SimpleUnit | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | -| SimpleName | str | [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| Name | str | See [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| Code | str | See [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| Group | str | See [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| Unit | str | See [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| SimpleUnit | str | See [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | +| SimpleName | str | See [Indicator Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) | #### factors A data table of the characterization factors for indicators included in the model @@ -161,9 +161,9 @@ The Indicators object contains meta and factors dataframes. | Item | Type | Description | | --- | --- | --------- | | Indicator | str | Matches the [Name](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#indicator-specifications) of the indicator | -| Flowable | str | [Federal Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | -| Context | str | [Federal Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | -| Unit | str | [Federal Elementary Flow List](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | +| Flowable | str | See [FlowList](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | +| Context | str | See [FlowList](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | +| Unit | str | See [FlowList](https://github.com/USEPA/Federal-LCA-Commons-Elementary-Flow-List/blob/master/format%20specs/FlowList.md) | | Amount | numeric | Characterization factor linking one unit of the flow to the indicator | ## DemandVectors @@ -178,12 +178,12 @@ The DemandVector object contains the demand vectors and a metadata table. | Item | Type | Description | | --- | --- | --------- | -| Type | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | -| Year | int | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | -| System | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | -| Location | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | -| Name | str | [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | -| ID | str | Year_Location_Type_System | +| Type | str | See [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | +| Year | int | See [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | +| System | str | See [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | +| Location | str | See [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | +| Name | str | See [Demand Vector Specifications](https://github.com/USEPA/useeior/tree/master/format_specs/ModelSpecification.md#demand-vector-specifications) | +| ID | str | A unique ID for that demand vector| ### Model Component Matrices @@ -292,8 +292,8 @@ indicators | | +-------+ ``` -#### Rho -`Rho` is a `sector x year` matrix and contains in each column `y` the price year ratios. +#### Rho, +`Rho` is a `sector x year` matrix and contains in each column `y` the price year ratios. Rho ratios are in the form of model IO_year/year (where year is the column). ``` years @@ -305,7 +305,7 @@ flows | | #### Phi -`Phi` is also a `sector x year` matrix and contains in each column `y` producer-to-purchaser price ratios. +`Phi` is also a `sector x year` matrix and contains in each column `y` producer-to-purchaser price ratios. Phi ratios are year-specific ratios in the form of value in producer price/value in purchaser price. ``` years From 10f688efdfbf8b0a0efc691e1de8e7176fc324e7 Mon Sep 17 00:00:00 2001 From: Wesley Ingwersen Date: Tue, 7 Dec 2021 16:57:54 -0500 Subject: [PATCH 231/319] Add table of additional fields for commodity sector meta --- format_specs/Model.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/format_specs/Model.md b/format_specs/Model.md index 19fbabf8..11e547d6 100644 --- a/format_specs/Model.md +++ b/format_specs/Model.md @@ -81,6 +81,14 @@ Items are listed in the order in which they appear in a built Model object in R. | Name | str | Name of sector or component | | Code_Loc | str | Code joined with a location acronym by a forward slash (e.g. `1111A0/US`) | +Commodity sector meta may also have the following fields: + +| Item | Type | Description | +| --- | --- | --------- | +| Category | str | A 2 digit NAICS code and name | +| Subcategory | str | A 4 digit NAICS code and name | +| Description | str | A description of the sector | + ### Sector Meta with Group A [sector meta table](#sector-meta) with an additional group field. From fd471bbff932cbff704b9d823d88896c5f46705d Mon Sep 17 00:00:00 2001 From: Wesley Ingwersen Date: Tue, 7 Dec 2021 16:59:27 -0500 Subject: [PATCH 232/319] Add row for aggregation specs in main table --- format_specs/Model.md | 1 + 1 file changed, 1 insertion(+) diff --git a/format_specs/Model.md b/format_specs/Model.md index 11e547d6..8a3d94f1 100644 --- a/format_specs/Model.md +++ b/format_specs/Model.md @@ -25,6 +25,7 @@ Items are listed in the order in which they appear in a built Model object in R. | Margins | data.frame | supporting data | [The final consumer margins table](#margins) | | MultiYearIndustryCPI | data.frame | supporting data | Multi-year industry CPI1 in [sector-by-year format](#sector-by-year) | | MultiYearCommodityCPI | data.frame | supporting data | Multi-year commodity CPI1 in [sector-by-year format](#sector-by-year) | +| AggregationSpecs | list | metadata | Specifications for one or more aggregations | DisaggregationSpecs | list | metadata | Specifications for one or more [disaggregation](https://github.com/USEPA/useeior/tree/master/format_specs/DisaggregationSpecification.md) | | SatelliteTables | list | component data | [Satellite tables](#satellitetables) | | Indicators | list | component data | [Indicators](#indicators) | From b16197f937ef5947ff4ac56b5ab210fb68108fa7 Mon Sep 17 00:00:00 2001 From: Wesley Ingwersen Date: Tue, 7 Dec 2021 16:59:50 -0500 Subject: [PATCH 233/319] Add row for aggregation specs in main table From 7899ce8fcd3b333e3fc0ed3741b634a4db4bb5d1 Mon Sep 17 00:00:00 2001 From: Wesley Ingwersen Date: Tue, 7 Dec 2021 17:05:15 -0500 Subject: [PATCH 234/319] Add InternationalTradeAdjustmentMeta to model table --- format_specs/Model.md | 1 + 1 file changed, 1 insertion(+) diff --git a/format_specs/Model.md b/format_specs/Model.md index 8a3d94f1..c9b4d446 100644 --- a/format_specs/Model.md +++ b/format_specs/Model.md @@ -18,6 +18,7 @@ Items are listed in the order in which they appear in a built Model object in R. | Commodities | data.frame | metadata | Commodity metadata in [sector meta format](#sector-meta) | | Industries | data.frame | metadata | Industry metadata in [sector meta format](#sector-meta) | | FinalDemandMeta | data.frame | metadata | Final demand metadata in [sector meta with group format](#Sector-Meta-with-Group) | +| InternationalTradeAdjustmentMeta | data.frame | metadata | Metadata for international trade adjusment in [sector meta with group format](#Sector-Meta-with-Group) | | MarginSectors | data.frame | metadata | Margin sector metadata in [sector meta format](#sector-meta) | | ValueAddedMeta | data.frame | metadata | Value added metadata in [sector meta format](#sector-meta) | | MultiYearIndustryOutput | data.frame | supporting data | Multi-year industry output in [sector-by-year format](#sector-by-year) | From 995252b4f6c70e0d49d29bfc80c3a1ad4367d375 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 7 Dec 2021 14:33:37 -0800 Subject: [PATCH 235/319] Clean up docs of @param model in functions --- R/AggregationFunctions.R | 12 ++-- R/BuildModel.R | 18 +++--- R/CalculationFunctions.R | 6 +- R/CompareModels.R | 4 +- R/DemandFunctions.R | 60 ++++++++--------- R/DisaggregateFunctions.R | 6 +- R/LoadDemandVectors.R | 10 +-- R/LoadIOTables.R | 4 +- R/LoadIndicators.R | 4 +- R/LoadSatellites.R | 6 +- R/SatelliteFunctions.R | 6 +- R/UtilityFunctions.R | 6 +- R/ValidateModel.R | 64 +++++++++---------- R/VisualizationFunctions.R | 6 +- R/WriteModel.R | 10 +-- man/aggregateMakeTable.Rd | 2 +- man/aggregateModel.Rd | 2 +- man/aggregateMultiYearCPI.Rd | 2 +- man/aggregateSector.Rd | 2 +- man/aggregateUseTable.Rd | 2 +- ...alculateConsumptionContributiontoImpact.Rd | 2 +- man/calculateFlowContributiontoImpact.Rd | 2 +- ...lculateIndicatorScoresforTotalsBySector.Rd | 2 +- man/calculateIndustryCommodityOutput.Rd | 2 +- ...ateProductofLeontiefAndProductionDemand.Rd | 2 +- man/calculateSectorContributiontoImpact.Rd | 2 +- man/collapseTBS.Rd | 2 +- ...eandIndustryOutputwithCPITransformation.Rd | 2 +- ...utputandDomesticUseplusProductionDemand.Rd | 2 +- man/compareEandLCIResult.Rd | 2 +- man/compareFlowTotals.Rd | 4 +- man/compareIndustryOutputinMakeandUse.Rd | 2 +- man/compareOutputandLeontiefXDemand.Rd | 2 +- man/constructEEIOMatrices.Rd | 4 +- man/disaggregateModel.Rd | 2 +- man/disaggregateSetup.Rd | 2 +- man/generateCbSfromTbSandModel.Rd | 2 +- man/generateChiMatrix.Rd | 2 +- man/generateModelIdentifier.Rd | 2 +- man/generateModelSectorSchema.Rd | 2 +- man/generateTbSfromSatSpec.Rd | 2 +- man/getAggregationSpecs.Rd | 2 +- man/getBEASectorColorMapping.Rd | 2 +- man/getDisaggregationSpecs.Rd | 2 +- man/getValueAddedTotalsbySector.Rd | 2 +- man/heatmapSatelliteTableCoverage.Rd | 2 +- man/heatmapSectorRanking.Rd | 2 +- man/loadDefaultDemandVectorMeta.Rd | 12 ++-- man/loadDemandVectors.Rd | 2 +- man/loadIOData.Rd | 2 +- man/loadIndicators.Rd | 2 +- man/loadSatTables.Rd | 2 +- man/loadandbuildIndicators.Rd | 2 +- man/loadandbuildSatelliteTables.Rd | 2 +- man/prepareConsumptionDemand.Rd | 2 +- man/prepareDomesticConsumptionDemand.Rd | 2 +- man/prepareDomesticProductionDemand.Rd | 2 +- man/prepareEfromtbs.Rd | 2 +- man/prepareHouseholdDemand.Rd | 2 +- man/prepareModelSectorCrosswalk.Rd | 2 +- man/prepareProductionDemand.Rd | 2 +- man/standardizeandcastSatelliteTable.Rd | 2 +- man/sumforConsumption.Rd | 2 +- man/writeModeltoXLSX.Rd | 2 +- 64 files changed, 167 insertions(+), 167 deletions(-) diff --git a/R/AggregationFunctions.R b/R/AggregationFunctions.R index c3b4051c..2353ecad 100644 --- a/R/AggregationFunctions.R +++ b/R/AggregationFunctions.R @@ -1,5 +1,5 @@ #' Aggregate a model based on specified source file -#' @param model Model file loaded with IO tables +#' @param model An EEIO model object with model specs and IO tables loaded #' @return An aggregated model. aggregateModel <- function (model){ @@ -55,7 +55,7 @@ aggregateModel <- function (model){ #' Obtain aggregation specs from input files -#' @param model Model file loaded with IO tables +#' @param model An EEIO model object with model specs and IO tables loaded #' @param configpaths str vector, paths (including file name) of agg configuration file(s). #' If NULL, built-in config files are used. #' @return A model with the specified aggregation and disaggregation specs. @@ -99,7 +99,7 @@ aggregateSectorsinTBS <- function (model, aggregationSpecs, sattable, sat){ } #' Aggregate MultiYear CPI model objects -#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param model An EEIO model object with model specs and IO tables loaded. #' @param mainIndex Index to aggregate the others to. #' @param indecesToAggregate List of indeces to aggregate. #' @param type String to designate either commodity or industry @@ -137,7 +137,7 @@ aggregateMultiYearCPI <- function(model, mainIndex, indecesToAggregate, type){ #TODO: rewrite this function to use matrix calculations when possible #' Aggregate the MakeTable based on specified source file -#' @param model Model file loaded with IO tables +#' @param model An EEIO model object with model specs and IO tables loaded. #' @param aggregationSpecs Specifications for aggregation #' @return An aggregated MakeTable. aggregateMakeTable <- function(model, aggregationSpecs){ @@ -170,7 +170,7 @@ aggregateMakeTable <- function(model, aggregationSpecs){ #TODO: rewrite this function to use matrix calculations when possible #' Aggregate the UseTable based on specified source file -#' @param model Model file loaded with IO tables +#' @param model An EEIO model object with model specs and IO tables loaded #' @param aggregationSpecs Specifications for aggregation #' @param domestic Boolean to indicate whether to aggregate the UseTransactions or DomesticUseTransactions table #' @return An aggregated UseTransactions or DomesticUseTransactions Table. @@ -249,7 +249,7 @@ aggregateVA <- function(model, aggregationSpecs){ #' Aggregate a sector in a table -#' @param model Model file loaded with IO tables +#' @param model An EEIO model object with model specs and IO tables loaded #' @param mainSector Sector to aggregate to (string) #' @param sectorToRemove Sector to be aggregated into mainSector, then removed from table (string) #' @param tableType String to designate either Make or Use table diff --git a/R/BuildModel.R b/R/BuildModel.R index b7ef7840..b7f0f0bb 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -16,8 +16,8 @@ buildModel <- function(modelname, configpaths = NULL) { #' Construct EEIO matrices based on loaded IO tables, built satellite tables, #' and indicator tables. -#' @param model Model file loaded with IO tables, satellite tables, and indicator tables. -#' @return A list with EEIO matrices.. +#' @param model An EEIO model object with model specs, IO tables, satellite tables, and indicators loaded +#' @return A list with EEIO matrices. constructEEIOMatrices <- function(model) { if(model$specs$ModelRegionAcronyms!="US"){ stop("This function needs to be revised before it is suitable for multi-regional models") @@ -143,9 +143,9 @@ createBfromFlowDataandOutput <- function(model) { return(B) } -#'Prepare coefficients (x unit/$) from the totals by flow and sector (x unit) -#'@param model, a model with econ and flow data loaded -#'@return A dataframe of Coefficients-by-Sector (CbS) table +#' Prepare coefficients (x unit/$) from the totals by flow and sector (x unit) +#' @param model An EEIO model object with model specs, IO tables, satellite tables, and indicators loaded +#' @return A dataframe of Coefficients-by-Sector (CbS) table generateCbSfromTbSandModel <- function(model) { CbS <- data.frame() @@ -171,10 +171,10 @@ generateCbSfromTbSandModel <- function(model) { return(CbS) } -#'Converts flows table into flows x sector matrix-like format -#'@param df a dataframe of flowables, contexts, units, sectors and locations -#'@param model an EEIO model with IO tables loaded -#'@return A matrix-like dataframe of flows x sector +#' Converts flows table into flows x sector matrix-like format +#' @param df a dataframe of flowables, contexts, units, sectors and locations +#' @param model An EEIO model object with model specs, IO tables, satellite tables, and indicators loaded +#' @return A matrix-like dataframe of flows x sector standardizeandcastSatelliteTable <- function(df,model) { # Add fields for sector as combinations of existing fields df[, "Sector"] <- apply(df[, c("Sector", "Location")], diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 386bc5d0..38874062 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -166,7 +166,7 @@ calculatePercentContributiontoImpact <- function (x,y) { #' Calculate the percent contribution of sectors to an N indicator result #' Uses model L matrix for total requirements and D matrix for direct indicator result -#' @param model, A complete EEIO Model object +#' @param model A complete EEIO model: a list with USEEIO model components and attributes #' @param sector, str, index of a model sector for use in the M matrix, e.g. "221100/us" #' @param indicator, str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential" #' @param domestic, boolean, sets model to use domestic flow matrix. Default is FALSE. @@ -184,7 +184,7 @@ calculateSectorContributiontoImpact <- function (model, sector, indicator, domes #' Calculate the percent contribution of M flows to an N indicator result #' Uses model M matrix for flows and C matrix for indicator -#' @param model, A complete EEIO Model object +#' @param model A complete EEIO model: a list with USEEIO model components and attributes #' @param sector, str, index of a model sector for use in the M matrix, e.g. "221100/us" #' @param indicator, str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential" #' @param domestic, boolean, sets model to use domestic flow matrix. Default is FALSE. @@ -241,7 +241,7 @@ aggregateResultMatrix <- function (matrix, to_level, crosswalk) { #' Calculates the result matrix by sector for a specified indciator #' @param y, a model demand vector -#' @param model, A complete EEIO Model object +#' @param model A complete EEIO model: a list with USEEIO model components and attributes #' @param indicator, str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential" #' @return A matrix of impacts sector purchased x sector sourced #' @export diff --git a/R/CompareModels.R b/R/CompareModels.R index c6385b43..a41f307d 100644 --- a/R/CompareModels.R +++ b/R/CompareModels.R @@ -1,8 +1,8 @@ # Functions for comparing models #' Compare flow totals for two models -#' @param modelA a useeior model -#' @param modelB a useeior model +#' @param modelA A complete EEIO model: a list with USEEIO model components and attributes. +#' @param modelB A complete EEIO model: a list with USEEIO model components and attributes. #' @return a list with pass/fail comparison results #' @export compareFlowTotals <- function(modelA, modelB) { diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index 964510a6..f12d518f 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -11,10 +11,10 @@ DemandVectorFunctionRegistry$Consumption$Complete <- "prepareConsumptionDemand" DemandVectorFunctionRegistry$Consumption$Domestic <- "prepareDomesticConsumptionDemand" DemandVectorFunctionRegistry$Consumption$Household <- "prepareHouseholdDemand" -#'Sums across sectors for a given set of codes/cols in a given final demand df -#'@param Y, a model Demand df -#'@param codes, sector code(s) for a subset of Final Demand cols -#'@return A named vector with model sectors and demand amounts +#' Sums across sectors for a given set of codes/cols in a given final demand df +#' @param Y, a model Demand df +#' @param codes, sector code(s) for a subset of Final Demand cols +#' @return A named vector with model sectors and demand amounts sumDemandCols <- function(Y,codes) { if (length(codes)>1) { y <- rowSums(Y[,codes]) @@ -25,12 +25,12 @@ sumDemandCols <- function(Y,codes) { return(y) } -#'Sums the demand cols representing final consumption, i.e. household, investment, and government -#'Complete national consumption formula: y_c <- Y_h + Y_v + Y_g -#'Domestic portion of national consumption: y_dc <- Y_dh + Y_dv + Y_dg -#'@param model, a model -#'@param Y, a model Demand df. -#'@return A named vector with model sectors and demand amounts +#' Sums the demand cols representing final consumption, i.e. household, investment, and government +#' Complete national consumption formula: y_c <- Y_h + Y_v + Y_g +#' Domestic portion of national consumption: y_dc <- Y_dh + Y_dv + Y_dg +#' @param model An EEIO model object with model specs and IO tables loaded +#' @param Y, a model Demand df. +#' @return A named vector with model sectors and demand amounts sumforConsumption <- function(model, Y) { codes <- model$FinalDemandMeta[model$FinalDemandMeta$Group%in%c("Household", "Investment", "Government"), "Code_Loc"] @@ -38,12 +38,12 @@ sumforConsumption <- function(model, Y) { return (y_c) } -#'Prepares a demand vector representing production -#'Formula for production vector: y_p <- y_c + y_e + y_m + y_delta -#'where y_c = consumption, y_e = exports, y_m = imports, y_delta = change in inventories -#'y_m values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted) -#'@param model, a model -#'@return A named vector with demand +#' Prepares a demand vector representing production +#' Formula for production vector: y_p <- y_c + y_e + y_m + y_delta +#' where y_c = consumption, y_e = exports, y_m = imports, y_delta = change in inventories +#' y_m values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted) +#' @param model An EEIO model object with model specs and IO tables loaded +#' @return A named vector with demand prepareProductionDemand <- function(model) { export_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Export", "Code_Loc"] changeinventories_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="ChangeInventories", "Code_Loc"] @@ -56,10 +56,10 @@ prepareProductionDemand <- function(model) { return(y_p) } -#'Prepares a demand vector representing domestic production -#'Formula for production vector: y_p <- y_dc + y_e + y_d_delta + mu -#'@param model, a model -#'@return A named vector with demand +#' Prepares a demand vector representing domestic production +#' Formula for production vector: y_p <- y_dc + y_e + y_d_delta + mu +#' @param model An EEIO model object with model specs and IO tables loaded +#' @return A named vector with demand prepareDomesticProductionDemand <- function(model) { export_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Export", "Code_Loc"] changeinventories_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="ChangeInventories", "Code_Loc"] @@ -70,25 +70,25 @@ prepareDomesticProductionDemand <- function(model) { return(y_d_p) } -#'Prepares a demand vector representing consumption -#'@param model, a model -#'@return a named vector with demand +#' Prepares a demand vector representing consumption +#' @param model An EEIO model object with model specs and IO tables loaded +#' @return a named vector with demand prepareConsumptionDemand <- function(model) { y_c <- sumforConsumption(model, model$FinalDemand) return(y_c) } -#'Prepares a demand vector representing domestic consumption -#'@param model, a model -#'@return A named vector with demand +#' Prepares a demand vector representing domestic consumption +#' @param model An EEIO model object with model specs and IO tables loaded +#' @return A named vector with demand prepareDomesticConsumptionDemand <- function(model) { y_c_d <- sumforConsumption(model, model$DomesticFinalDemand) return(y_c_d) } -#'Prepares a demand vector representing household consumption -#'@param model, a model -#'@return A named vector with demand +#' Prepares a demand vector representing household consumption +#' @param model An EEIO model object with model specs and IO tables loaded +#' @return A named vector with demand prepareHouseholdDemand <- function(model) { Y <- model$FinalDemand household_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Household", "Code_Loc"] @@ -96,7 +96,7 @@ prepareHouseholdDemand <- function(model) { return(y_h) } -#'A function to validate a user provided demand vector +#' A function to validate a user provided demand vector #' @param dv a user provided demand vector #' @param L, the L matrix for the given model, used as a reference #' @return A logical value indicating demand vector is valid or not. diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index f2712492..e6ecb38c 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -1,5 +1,5 @@ #' Disaggregate a model based on specified source file -#' @param model Model file loaded with IO tables +#' @param model An EEIO model object with model specs and IO tables loaded #' @return A disaggregated model. disaggregateModel <- function (model){ @@ -49,7 +49,7 @@ disaggregateModel <- function (model){ } #' Obtain aggregation and disaggregation specs from input files -#' @param model Model file loaded with IO tables +#' @param model An EEIO model object with model specs and IO tables loaded #' @param configpaths str vector, paths (including file name) of disagg configuration file(s). #' If NULL, built-in config files are used. #' @return A model with the specified aggregation and disaggregation specs. @@ -71,7 +71,7 @@ getDisaggregationSpecs <- function (model, configpaths = NULL){ } #' Setup the configuration specs based on the input files -#' @param model Model file loaded with IO tables +#' @param model An EEIO model object with model specs and IO tables loaded #' @param configpaths str vector, paths (including file name) of disagg configuration file(s). #' If NULL, built-in config files are used. #' @return A model object with the correct disaggregation specs. diff --git a/R/LoadDemandVectors.R b/R/LoadDemandVectors.R index 06c099b0..7a1fbd76 100644 --- a/R/LoadDemandVectors.R +++ b/R/LoadDemandVectors.R @@ -1,5 +1,5 @@ #' Adds demand vectors and metadata based on useeior defaults and model specs to model object -#' @param model A model list object with the specs object listed +#' @param model An EEIO model object with model specs and IO tables loaded #' @return model with a list of demand vectors and a meta file stored appended as model$DemandVectors loadDemandVectors <- function(model) { logging::loginfo("Loading demand vectors ...") @@ -40,10 +40,10 @@ loadDemandVectors <- function(model) { return(model) } -#' Loads a package stored csv of demand vector meta for vectors to be created for every model with type and system specified -#' This function adds additional year, location and IDs along with the type and system based on the model given -#' @param model An EEIO model that has been initialized -#' @return a data frame of metadata with cols Type, System, Name, Year, Location and ID with rows for each default +#' Loads a package stored demand vector metadata (.yml) for vectors to be created for every model with type and system specified +#' This function adds additional year, location and IDs along with the type and system based on the model specs. +#' @param model An EEIO model object with model specs and IO tables loaded +#' @return a data frame of metadata with columns Type, System, Name, Year, Location and ID with rows for each default loadDefaultDemandVectorMeta <- function(model) { meta <- data.frame() specs <- getConfiguration("DefaultDemandVectors", "demand") diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index 9d47fc60..79b2b22f 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -1,7 +1,7 @@ # Functions for loading input-output tables #' Prepare economic components of an EEIO model. -#' @param model A list of model specs +#' @param model An EEIO model object with model specs loaded #' @param configpaths str vector, paths (including file name) of model configuration file #' and optional agg/disagg configuration file(s). If NULL, built-in config files are used. #' @return A list with EEIO model economic components. @@ -212,7 +212,7 @@ loadBEAMakeorUseTable <- function (iolevel, makeoruse, year, redef){ } #' Calculate industry and commodity output vectors from model components. -#' @param model An EEIO model with IO tables +#' @param model An EEIO model object with model specs and IO tables loaded #' @return An EEIO model with industry and commodity output added calculateIndustryCommodityOutput <- function(model) { model$IndustryOutput <- colSums(model$UseTransactions) + colSums(model$UseValueAdded) diff --git a/R/LoadIndicators.R b/R/LoadIndicators.R index 43eac33e..3a99b8ef 100644 --- a/R/LoadIndicators.R +++ b/R/LoadIndicators.R @@ -1,7 +1,7 @@ # Functions for loading and checking indicator data #' Loads data for all model indicators as listed in model specs -#' @param model A model object with IO data loaded +#' @param model A model object with model specs, IO tables, and satelilte tables loaded #' @return A model object with Indicators added loadandbuildIndicators <- function(model) { # Load model indicators @@ -12,7 +12,7 @@ loadandbuildIndicators <- function(model) { } #' Load indicators and associated factors in a list based on model config. -#' @param model A model object with IO tables and satellite tables loaded. +#' @param model A model object with model specs, IO tables, and satellite tables loaded. #' @return A list with a dataframe for indicator meta and a dataframe for indicator factors. loadIndicators <- function(model) { logging::loginfo("Initializing model indicators...") diff --git a/R/LoadSatellites.R b/R/LoadSatellites.R index bde5f0f7..09bd8d22 100644 --- a/R/LoadSatellites.R +++ b/R/LoadSatellites.R @@ -1,5 +1,5 @@ #' Load totals by sector/region and prepares them based on model specs. -#' @param model A model list object with the specs object listed +#' @param model A model list object with model specs and IO tables listed #' @return Lists of totals by sector by region and unique flows #' @format A list with lists of totals by sector #' \describe{ @@ -85,7 +85,7 @@ loadSatTables <- function(model) { } #' Loads data for all satellite tables as lists in model specs -#' @param model A model object with IO data loaded +#' @param model A model list object with model specs and IO tables listed #' @return A model object with Satellite tables added loadandbuildSatelliteTables <- function(model) { # Generate satellite tables @@ -95,7 +95,7 @@ loadandbuildSatelliteTables <- function(model) { #'Reads a satellite table specification and generates a totals-by-sector table #'@param sat_spec, a standard specification for a single satellite table -#'@param model A model object with IO and satellite data loaded +#' @param model A model list object with model specs and IO tables listed #'@return a totals-by-sector dataframe generateTbSfromSatSpec <- function(sat_spec, model) { # Check if the satellite table uses a file from within useeior. If so, proceed. diff --git a/R/SatelliteFunctions.R b/R/SatelliteFunctions.R index a8d2697c..67712ae3 100644 --- a/R/SatelliteFunctions.R +++ b/R/SatelliteFunctions.R @@ -122,7 +122,7 @@ aggregateSatelliteTable <- function(sattable, from_level, model) { #' Collapse a totals by sector table so that each flow sector combination exists only once #' @param tbs totals by sector sourced from satellite table -#' @param model A EEIO model with IOdata, and model specs +#' @param model An EEIO model object with model specs and IO table loaded #' @return aggregated totals by sector collapseTBS <- function(tbs, model) { # Add in BEA industry names @@ -167,7 +167,7 @@ collapseTBS <- function(tbs, model) { } #' Adds an indicator score to a totals by sector table. A short cut alternative to getting totals before model result -#' @param model A EEIO model with IOdata, satellite tables, and indicators loaded +#' @param model A EEIO model with model specs, IO tables, satellite tables, and indicators loaded #' @param totals_by_sector_name The name of one of the totals by sector tables available in model$SatelliteTables$totals_by_sector #' @param indicator_name The name of the indicator of interest from the model$Indicators$factors #' @return a totals_by_sector table with fields from the Indicator table "Code" and "Amount", and calculated "IndicatorScore" added @@ -184,7 +184,7 @@ calculateIndicatorScoresforTotalsBySector <- function(model, totals_by_sector_na } #' Get value added from BEA input-output use table, convert to standard totals_by_sector format. -#' @param model A EEIO model with IOdata, satellite tables, and indicators loaded +#' @param model A EEIO model with model specs and IO tables loaded #' @return A value-added totals_by_sector table with fields of standard totals_by_sector getValueAddedTotalsbySector <- function(model) { # Extract ValueAdded from Use table, add names diff --git a/R/UtilityFunctions.R b/R/UtilityFunctions.R index 5b4d1b50..1c863c3b 100644 --- a/R/UtilityFunctions.R +++ b/R/UtilityFunctions.R @@ -340,9 +340,9 @@ writeDatatoRDA <- function(data, data_name) { list(as.name(data_name), overwrite = TRUE)) } -#'Create sector schema for a model -#'@param model, any model object -#'@return A string of sector schema for a model +#' Create sector schema for a model +#' @param model An EEIO model object with model specs loaded +#' @return A string of sector schema for a model generateModelSectorSchema <- function(model) { SectorSchema <- paste(model$specs$IODataSource, model$specs$BaseIOLevel, sep = "_") diff --git a/R/ValidateModel.R b/R/ValidateModel.R index 2ab8917f..7bab5336 100644 --- a/R/ValidateModel.R +++ b/R/ValidateModel.R @@ -1,11 +1,11 @@ # Validation functions -#'Compares the total flows against the model flow totals result calculation with the total demand -#'@param model, EEIOmodel object completely built -#'@param use_domestic, a logical value indicating whether to use domestic demand vector -#'@param tolerance, a numeric value, tolerance level of the comparison -#'@return A list with pass/fail validation result and the cell-by-cell relative diff matrix -#'@export +#' Compares the total flows against the model flow totals result calculation with the total demand +#' @param model A complete EEIO model: a list with USEEIO model components and attributes +#' @param use_domestic, a logical value indicating whether to use domestic demand vector +#' @param tolerance, a numeric value, tolerance level of the comparison +#' @return A list with pass/fail validation result and the cell-by-cell relative diff matrix +#' @export compareEandLCIResult <- function(model, use_domestic = FALSE, tolerance = 0.05) { # Prepare left side of the equation CbS_cast <- standardizeandcastSatelliteTable(model$CbS,model) @@ -46,9 +46,9 @@ compareEandLCIResult <- function(model, use_domestic = FALSE, tolerance = 0.05) } #' Calculate scaling vector with appropriate production demand vector -#'@param model, EEIOmodel object completely built -#'@param use_domestic, a logical value indicating whether to use domestic demand vector -#'@return c, a numeric vector with total $ values for each sector in model +#' @param model A complete EEIO model: a list with USEEIO model components and attributes +#' @param use_domestic, a logical value indicating whether to use domestic demand vector +#' @return c, a numeric vector with total $ values for each sector in model calculateProductofLeontiefAndProductionDemand <- function (model, use_domestic) { if (use_domestic) { f <- model$DemandVectors$vectors[endsWith(names(model$DemandVectors$vectors), "Production_Domestic")][[1]] @@ -62,14 +62,14 @@ calculateProductofLeontiefAndProductionDemand <- function (model, use_domestic) return(c) } -#'Compares the total sector output against the model result calculation with the demand vector. and direct perspective. -#'Uses the model$FinalDemand and model$L -#'Works for the domestic model with the equivalent tables -#'@param model, EEIOmodel object completely built -#'@param use_domestic, a logical value indicating whether to use domestic demand vector -#'@param tolerance, a numeric value, tolerance level of the comparison -#'@return A list with pass/fail validation result and the cell-by-cell relative diff matrix -#'@export +#' Compares the total sector output against the model result calculation with the demand vector. and direct perspective. +#' Uses the model$FinalDemand and model$L +#' Works for the domestic model with the equivalent tables +#' @param model A complete EEIO model: a list with USEEIO model components and attributes +#' @param use_domestic, a logical value indicating whether to use domestic demand vector +#' @param tolerance, a numeric value, tolerance level of the comparison +#' @return A list with pass/fail validation result and the cell-by-cell relative diff matrix +#' @export compareOutputandLeontiefXDemand <- function(model, use_domestic=FALSE, tolerance=0.05) { # Generate output and scaling vector if(model$specs$CommodityorIndustryType == "Commodity") { @@ -94,11 +94,11 @@ compareOutputandLeontiefXDemand <- function(model, use_domestic=FALSE, tolerance return(validation) } -#'Compares the total commodity output against the summation of model domestic Use and production demand -#'@param model, EEIOmodel object completely built -#'@param tolerance, a numeric value, tolerance level of the comparison -#'@return A list with pass/fail validation result and the cell-by-cell relative diff matrix -#'@export +#' Compares the total commodity output against the summation of model domestic Use and production demand +#' @param model A complete EEIO model: a list with USEEIO model components and attributes +#' @param tolerance, a numeric value, tolerance level of the comparison +#' @return A list with pass/fail validation result and the cell-by-cell relative diff matrix +#' @export compareCommodityOutputandDomesticUseplusProductionDemand <- function(model, tolerance=0.05) { q <- model$q x <- rowSums(model$U_d[model$Commodities$Code_Loc, model$Industries$Code_Loc]) + @@ -118,12 +118,12 @@ compareCommodityOutputandDomesticUseplusProductionDemand <- function(model, tole return(validation) } -#'Compares the total commodity output multiplied by Market Share matrix and transformed by commodity CPI -#'against the total industry output transformed by industry CPI -#'@param model, EEIOmodel object completely built -#'@param tolerance, a numeric value, tolerance level of the comparison -#'@return A list with pass/fail validation result and the cell-by-cell relative diff matrix -#'@export +#' Compares the total commodity output multiplied by Market Share matrix and transformed by commodity CPI +#' against the total industry output transformed by industry CPI +#' @param model A complete EEIO model: a list with USEEIO model components and attributes +#' @param tolerance, a numeric value, tolerance level of the comparison +#' @return A list with pass/fail validation result and the cell-by-cell relative diff matrix +#' @export compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation <- function(model, tolerance=0.05) { commodityCPI_ratio <- model$MultiYearCommodityCPI[, "2017"]/model$MultiYearCommodityCPI[, "2012"] commodityCPI_ratio[is.na(commodityCPI_ratio)] <- 1 @@ -144,15 +144,15 @@ compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation <- func return(validation) } -#'Concatenate all satellite flows in model -#'@param model, EEIOmodel object completely built +#' Concatenate all satellite flows in model +#' @param model A complete EEIO model: a list with USEEIO model components and attributes prepareEfromtbs <- function(model) { E <- standardizeandcastSatelliteTable(model$TbS,model) return(E) } #' Generate Chi matrix, i.e. ratios of model IO year commodity output over the output of the flow year in model IO year dollar. -#' @param model A completely built EEIOmodel object +#' @param model A complete EEIO model: a list with USEEIO model components and attributes #' @param output_type Either Commodity or Industry, default is Commodity #' @return Chi matrix contains ratios of model IO year commodity output over the output of the flow year in model IO year dollar. generateChiMatrix <- function(model, output_type = "Commodity") { @@ -187,7 +187,7 @@ generateChiMatrix <- function(model, output_type = "Commodity") { } #' Gets industry output from model Use and Make and checks if they are the same -#' @param model, a built model object +#' @param model A complete EEIO model: a list with USEEIO model components and attributes compareIndustryOutputinMakeandUse <- function(model) { # Calculate Industry Output (x) from Make and Use tables x_make <-rowSums(model$V) diff --git a/R/VisualizationFunctions.R b/R/VisualizationFunctions.R index c4d98500..9c8b7b2c 100644 --- a/R/VisualizationFunctions.R +++ b/R/VisualizationFunctions.R @@ -166,7 +166,7 @@ barplotIndicatorScoresbySector <- function(model_list, totals_by_sector_name, in } #' Heatmap showing coverage of satellite tables -#' @param model A complete EEIO model +#' @param model A complete EEIO model: a list with USEEIO model components and attributes #' @param form Form of sectors in satellite table, can be"Commodity" and "Industry". #' @export heatmapSatelliteTableCoverage <- function(model, form="Commodity") { @@ -218,7 +218,7 @@ heatmapSatelliteTableCoverage <- function(model, form="Commodity") { } #' SMM tool like heatmap showing ranking of sectors -#' @param model A complete EEIO model +#' @param model A complete EEIO model: a list with USEEIO model components and attributes #' @param matrix A matrix from model result #' @param indicators A vector of indicators to plot #' @param sector_to_remove Code of one or more BEA sectors that will be removed from the plot. Can be "". @@ -309,7 +309,7 @@ barplotFloworImpactFractionbyRegion <- function(R1_calc_result, Total_calc_resul ## Helper functions for plotting #' Uses VizualizationEssentials.yml to get a mapping of the to the BEA Sector Color scheme -#' @param model A complete EEIO model +#' @param model A complete EEIO model: a list with USEEIO model components and attributes #' @return df with mapping with model BaseIOLevel codes to BEA Sector Codes, Names, and colors getBEASectorColorMapping <- function(model) { # Load VisualizationEssentials.yml and convert it to a data frame ColorLabelMapping diff --git a/R/WriteModel.R b/R/WriteModel.R index d57e4993..d743aa78 100644 --- a/R/WriteModel.R +++ b/R/WriteModel.R @@ -63,7 +63,7 @@ writeModelMatrices <- function(model, to_format, outputfolder) { } #' Write selected model matrices, demand vectors, and metadata as XLSX file to output folder -#' @param model, any model object +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param outputfolder A directory to write model matrices and metadata as XLSX file out to #' @description Writes model matrices demand vectors, and metadata as XLSX file to output folder. #' @export @@ -286,9 +286,9 @@ writeModelMetadata <- function(model, dirs) { } #'Create a unique hash identifier for a model -#'@param model, any model object -#'@return char string -#'@export +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @return char string +#' @export generateModelIdentifier <- function(model) { id <- digest::digest(model, algo="sha256") return(id) @@ -304,7 +304,7 @@ writeSessionInfotoFile <- function(path) { } #' Prepare sectorcrosswalk table for a model -#' @param model, any model object +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @return a data.frame, sectorcrosswalk table prepareModelSectorCrosswalk <- function(model) { crosswalk <- model$crosswalk diff --git a/man/aggregateMakeTable.Rd b/man/aggregateMakeTable.Rd index 38d35b49..363cd4af 100644 --- a/man/aggregateMakeTable.Rd +++ b/man/aggregateMakeTable.Rd @@ -7,7 +7,7 @@ aggregateMakeTable(model, aggregationSpecs) } \arguments{ -\item{model}{Model file loaded with IO tables} +\item{model}{An EEIO model object with model specs and IO tables loaded.} \item{aggregationSpecs}{Specifications for aggregation} } diff --git a/man/aggregateModel.Rd b/man/aggregateModel.Rd index 461f92bb..25a36976 100644 --- a/man/aggregateModel.Rd +++ b/man/aggregateModel.Rd @@ -7,7 +7,7 @@ aggregateModel(model) } \arguments{ -\item{model}{Model file loaded with IO tables} +\item{model}{An EEIO model object with model specs and IO tables loaded} } \value{ An aggregated model. diff --git a/man/aggregateMultiYearCPI.Rd b/man/aggregateMultiYearCPI.Rd index cbc66409..974e9ae4 100644 --- a/man/aggregateMultiYearCPI.Rd +++ b/man/aggregateMultiYearCPI.Rd @@ -7,7 +7,7 @@ aggregateMultiYearCPI(model, mainIndex, indecesToAggregate, type) } \arguments{ -\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} +\item{model}{An EEIO model object with model specs and IO tables loaded.} \item{mainIndex}{Index to aggregate the others to.} diff --git a/man/aggregateSector.Rd b/man/aggregateSector.Rd index 70e5edc0..365958f9 100644 --- a/man/aggregateSector.Rd +++ b/man/aggregateSector.Rd @@ -7,7 +7,7 @@ aggregateSector(model, mainSector, sectorToRemove, tableType, domestic = FALSE) } \arguments{ -\item{model}{Model file loaded with IO tables} +\item{model}{An EEIO model object with model specs and IO tables loaded} \item{mainSector}{Sector to aggregate to (string)} diff --git a/man/aggregateUseTable.Rd b/man/aggregateUseTable.Rd index 962108ba..779334ff 100644 --- a/man/aggregateUseTable.Rd +++ b/man/aggregateUseTable.Rd @@ -7,7 +7,7 @@ aggregateUseTable(model, aggregationSpecs, domestic = FALSE) } \arguments{ -\item{model}{Model file loaded with IO tables} +\item{model}{An EEIO model object with model specs and IO tables loaded} \item{aggregationSpecs}{Specifications for aggregation} diff --git a/man/calculateConsumptionContributiontoImpact.Rd b/man/calculateConsumptionContributiontoImpact.Rd index 2487b4fb..5da6a402 100644 --- a/man/calculateConsumptionContributiontoImpact.Rd +++ b/man/calculateConsumptionContributiontoImpact.Rd @@ -9,7 +9,7 @@ calculateConsumptionContributiontoImpact(y, model, indicator) \arguments{ \item{y, }{a model demand vector} -\item{model, }{A complete EEIO Model object} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} \item{indicator, }{str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential"} } diff --git a/man/calculateFlowContributiontoImpact.Rd b/man/calculateFlowContributiontoImpact.Rd index f030444a..0f53b4c4 100644 --- a/man/calculateFlowContributiontoImpact.Rd +++ b/man/calculateFlowContributiontoImpact.Rd @@ -8,7 +8,7 @@ Uses model M matrix for flows and C matrix for indicator} calculateFlowContributiontoImpact(model, sector, indicator, domestic = FALSE) } \arguments{ -\item{model, }{A complete EEIO Model object} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} \item{sector, }{str, index of a model sector for use in the M matrix, e.g. "221100/us"} diff --git a/man/calculateIndicatorScoresforTotalsBySector.Rd b/man/calculateIndicatorScoresforTotalsBySector.Rd index 94cdb09b..b1968092 100644 --- a/man/calculateIndicatorScoresforTotalsBySector.Rd +++ b/man/calculateIndicatorScoresforTotalsBySector.Rd @@ -11,7 +11,7 @@ calculateIndicatorScoresforTotalsBySector( ) } \arguments{ -\item{model}{A EEIO model with IOdata, satellite tables, and indicators loaded} +\item{model}{A EEIO model with model specs, IO tables, satellite tables, and indicators loaded} \item{totals_by_sector_name}{The name of one of the totals by sector tables available in model$SatelliteTables$totals_by_sector} diff --git a/man/calculateIndustryCommodityOutput.Rd b/man/calculateIndustryCommodityOutput.Rd index c5b64711..cb1889ee 100644 --- a/man/calculateIndustryCommodityOutput.Rd +++ b/man/calculateIndustryCommodityOutput.Rd @@ -7,7 +7,7 @@ calculateIndustryCommodityOutput(model) } \arguments{ -\item{model}{An EEIO model with IO tables} +\item{model}{An EEIO model object with model specs and IO tables loaded} } \value{ An EEIO model with industry and commodity output added diff --git a/man/calculateProductofLeontiefAndProductionDemand.Rd b/man/calculateProductofLeontiefAndProductionDemand.Rd index 7f30f740..c8ebbc7d 100644 --- a/man/calculateProductofLeontiefAndProductionDemand.Rd +++ b/man/calculateProductofLeontiefAndProductionDemand.Rd @@ -7,7 +7,7 @@ calculateProductofLeontiefAndProductionDemand(model, use_domestic) } \arguments{ -\item{model, }{EEIOmodel object completely built} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} \item{use_domestic, }{a logical value indicating whether to use domestic demand vector} } diff --git a/man/calculateSectorContributiontoImpact.Rd b/man/calculateSectorContributiontoImpact.Rd index 0f618c69..00007d95 100644 --- a/man/calculateSectorContributiontoImpact.Rd +++ b/man/calculateSectorContributiontoImpact.Rd @@ -8,7 +8,7 @@ Uses model L matrix for total requirements and D matrix for direct indicator res calculateSectorContributiontoImpact(model, sector, indicator, domestic = FALSE) } \arguments{ -\item{model, }{A complete EEIO Model object} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} \item{sector, }{str, index of a model sector for use in the M matrix, e.g. "221100/us"} diff --git a/man/collapseTBS.Rd b/man/collapseTBS.Rd index 55041cb7..29e2307f 100644 --- a/man/collapseTBS.Rd +++ b/man/collapseTBS.Rd @@ -9,7 +9,7 @@ collapseTBS(tbs, model) \arguments{ \item{tbs}{totals by sector sourced from satellite table} -\item{model}{A EEIO model with IOdata, and model specs} +\item{model}{An EEIO model object with model specs and IO table loaded} } \value{ aggregated totals by sector diff --git a/man/compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation.Rd b/man/compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation.Rd index 7bbe71db..0116b258 100644 --- a/man/compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation.Rd +++ b/man/compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation.Rd @@ -11,7 +11,7 @@ compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation( ) } \arguments{ -\item{model, }{EEIOmodel object completely built} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} \item{tolerance, }{a numeric value, tolerance level of the comparison} } diff --git a/man/compareCommodityOutputandDomesticUseplusProductionDemand.Rd b/man/compareCommodityOutputandDomesticUseplusProductionDemand.Rd index 6c85441e..e1289853 100644 --- a/man/compareCommodityOutputandDomesticUseplusProductionDemand.Rd +++ b/man/compareCommodityOutputandDomesticUseplusProductionDemand.Rd @@ -10,7 +10,7 @@ compareCommodityOutputandDomesticUseplusProductionDemand( ) } \arguments{ -\item{model, }{EEIOmodel object completely built} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} \item{tolerance, }{a numeric value, tolerance level of the comparison} } diff --git a/man/compareEandLCIResult.Rd b/man/compareEandLCIResult.Rd index 97f4a95f..392ec2db 100644 --- a/man/compareEandLCIResult.Rd +++ b/man/compareEandLCIResult.Rd @@ -7,7 +7,7 @@ compareEandLCIResult(model, use_domestic = FALSE, tolerance = 0.05) } \arguments{ -\item{model, }{EEIOmodel object completely built} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} \item{use_domestic, }{a logical value indicating whether to use domestic demand vector} diff --git a/man/compareFlowTotals.Rd b/man/compareFlowTotals.Rd index 8ee2de45..1ede2b9d 100644 --- a/man/compareFlowTotals.Rd +++ b/man/compareFlowTotals.Rd @@ -7,9 +7,9 @@ compareFlowTotals(modelA, modelB) } \arguments{ -\item{modelA}{a useeior model} +\item{modelA}{A complete EEIO model: a list with USEEIO model components and attributes.} -\item{modelB}{a useeior model} +\item{modelB}{A complete EEIO model: a list with USEEIO model components and attributes.} } \value{ a list with pass/fail comparison results diff --git a/man/compareIndustryOutputinMakeandUse.Rd b/man/compareIndustryOutputinMakeandUse.Rd index 2a035265..feee35b9 100644 --- a/man/compareIndustryOutputinMakeandUse.Rd +++ b/man/compareIndustryOutputinMakeandUse.Rd @@ -7,7 +7,7 @@ compareIndustryOutputinMakeandUse(model) } \arguments{ -\item{model, }{a built model object} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} } \description{ Gets industry output from model Use and Make and checks if they are the same diff --git a/man/compareOutputandLeontiefXDemand.Rd b/man/compareOutputandLeontiefXDemand.Rd index cede92d3..405dab03 100644 --- a/man/compareOutputandLeontiefXDemand.Rd +++ b/man/compareOutputandLeontiefXDemand.Rd @@ -9,7 +9,7 @@ Works for the domestic model with the equivalent tables} compareOutputandLeontiefXDemand(model, use_domestic = FALSE, tolerance = 0.05) } \arguments{ -\item{model, }{EEIOmodel object completely built} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} \item{use_domestic, }{a logical value indicating whether to use domestic demand vector} diff --git a/man/constructEEIOMatrices.Rd b/man/constructEEIOMatrices.Rd index 09adc5cd..16f1c144 100644 --- a/man/constructEEIOMatrices.Rd +++ b/man/constructEEIOMatrices.Rd @@ -8,10 +8,10 @@ and indicator tables.} constructEEIOMatrices(model) } \arguments{ -\item{model}{Model file loaded with IO tables, satellite tables, and indicator tables.} +\item{model}{An EEIO model object with model specs, IO tables, satellite tables, and indicators loaded} } \value{ -A list with EEIO matrices.. +A list with EEIO matrices. } \description{ Construct EEIO matrices based on loaded IO tables, built satellite tables, diff --git a/man/disaggregateModel.Rd b/man/disaggregateModel.Rd index 12a1151b..33de1849 100644 --- a/man/disaggregateModel.Rd +++ b/man/disaggregateModel.Rd @@ -7,7 +7,7 @@ disaggregateModel(model) } \arguments{ -\item{model}{Model file loaded with IO tables} +\item{model}{An EEIO model object with model specs and IO tables loaded} } \value{ A disaggregated model. diff --git a/man/disaggregateSetup.Rd b/man/disaggregateSetup.Rd index 60f4bd50..55b624b2 100644 --- a/man/disaggregateSetup.Rd +++ b/man/disaggregateSetup.Rd @@ -7,7 +7,7 @@ disaggregateSetup(model, configpaths = NULL) } \arguments{ -\item{model}{Model file loaded with IO tables} +\item{model}{An EEIO model object with model specs and IO tables loaded} \item{configpaths}{str vector, paths (including file name) of disagg configuration file(s). If NULL, built-in config files are used.} diff --git a/man/generateCbSfromTbSandModel.Rd b/man/generateCbSfromTbSandModel.Rd index 931b0ab8..db236f1c 100644 --- a/man/generateCbSfromTbSandModel.Rd +++ b/man/generateCbSfromTbSandModel.Rd @@ -7,7 +7,7 @@ generateCbSfromTbSandModel(model) } \arguments{ -\item{model, }{a model with econ and flow data loaded} +\item{model}{An EEIO model object with model specs, IO tables, satellite tables, and indicators loaded} } \value{ A dataframe of Coefficients-by-Sector (CbS) table diff --git a/man/generateChiMatrix.Rd b/man/generateChiMatrix.Rd index c361d63e..ff443c5b 100644 --- a/man/generateChiMatrix.Rd +++ b/man/generateChiMatrix.Rd @@ -7,7 +7,7 @@ generateChiMatrix(model, output_type = "Commodity") } \arguments{ -\item{model}{A completely built EEIOmodel object} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} \item{output_type}{Either Commodity or Industry, default is Commodity} } diff --git a/man/generateModelIdentifier.Rd b/man/generateModelIdentifier.Rd index b21ffc4b..c8383aec 100644 --- a/man/generateModelIdentifier.Rd +++ b/man/generateModelIdentifier.Rd @@ -7,7 +7,7 @@ generateModelIdentifier(model) } \arguments{ -\item{model, }{any model object} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} } \value{ char string diff --git a/man/generateModelSectorSchema.Rd b/man/generateModelSectorSchema.Rd index f0fc92f1..6611a96f 100644 --- a/man/generateModelSectorSchema.Rd +++ b/man/generateModelSectorSchema.Rd @@ -7,7 +7,7 @@ generateModelSectorSchema(model) } \arguments{ -\item{model, }{any model object} +\item{model}{An EEIO model object with model specs loaded} } \value{ A string of sector schema for a model diff --git a/man/generateTbSfromSatSpec.Rd b/man/generateTbSfromSatSpec.Rd index 6b8c44b3..ea78c8f3 100644 --- a/man/generateTbSfromSatSpec.Rd +++ b/man/generateTbSfromSatSpec.Rd @@ -9,7 +9,7 @@ generateTbSfromSatSpec(sat_spec, model) \arguments{ \item{sat_spec, }{a standard specification for a single satellite table} -\item{model}{A model object with IO and satellite data loaded} +\item{model}{A model list object with model specs and IO tables listed} } \value{ a totals-by-sector dataframe diff --git a/man/getAggregationSpecs.Rd b/man/getAggregationSpecs.Rd index 991a7130..04213878 100644 --- a/man/getAggregationSpecs.Rd +++ b/man/getAggregationSpecs.Rd @@ -7,7 +7,7 @@ getAggregationSpecs(model, configpaths = NULL) } \arguments{ -\item{model}{Model file loaded with IO tables} +\item{model}{An EEIO model object with model specs and IO tables loaded} \item{configpaths}{str vector, paths (including file name) of agg configuration file(s). If NULL, built-in config files are used.} diff --git a/man/getBEASectorColorMapping.Rd b/man/getBEASectorColorMapping.Rd index 96042568..dd125ab8 100644 --- a/man/getBEASectorColorMapping.Rd +++ b/man/getBEASectorColorMapping.Rd @@ -7,7 +7,7 @@ getBEASectorColorMapping(model) } \arguments{ -\item{model}{A complete EEIO model} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} } \value{ df with mapping with model BaseIOLevel codes to BEA Sector Codes, Names, and colors diff --git a/man/getDisaggregationSpecs.Rd b/man/getDisaggregationSpecs.Rd index 538a8bfc..d2262d34 100644 --- a/man/getDisaggregationSpecs.Rd +++ b/man/getDisaggregationSpecs.Rd @@ -7,7 +7,7 @@ getDisaggregationSpecs(model, configpaths = NULL) } \arguments{ -\item{model}{Model file loaded with IO tables} +\item{model}{An EEIO model object with model specs and IO tables loaded} \item{configpaths}{str vector, paths (including file name) of disagg configuration file(s). If NULL, built-in config files are used.} diff --git a/man/getValueAddedTotalsbySector.Rd b/man/getValueAddedTotalsbySector.Rd index 3aa750a3..eaac6090 100644 --- a/man/getValueAddedTotalsbySector.Rd +++ b/man/getValueAddedTotalsbySector.Rd @@ -7,7 +7,7 @@ getValueAddedTotalsbySector(model) } \arguments{ -\item{model}{A EEIO model with IOdata, satellite tables, and indicators loaded} +\item{model}{A EEIO model with model specs and IO tables loaded} } \value{ A value-added totals_by_sector table with fields of standard totals_by_sector diff --git a/man/heatmapSatelliteTableCoverage.Rd b/man/heatmapSatelliteTableCoverage.Rd index be37163c..5b31c2b6 100644 --- a/man/heatmapSatelliteTableCoverage.Rd +++ b/man/heatmapSatelliteTableCoverage.Rd @@ -7,7 +7,7 @@ heatmapSatelliteTableCoverage(model, form = "Commodity") } \arguments{ -\item{model}{A complete EEIO model} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} \item{form}{Form of sectors in satellite table, can be"Commodity" and "Industry".} } diff --git a/man/heatmapSectorRanking.Rd b/man/heatmapSectorRanking.Rd index 083b5b17..53d54ba8 100644 --- a/man/heatmapSectorRanking.Rd +++ b/man/heatmapSectorRanking.Rd @@ -7,7 +7,7 @@ heatmapSectorRanking(model, matrix, indicators, sector_to_remove, N_sector) } \arguments{ -\item{model}{A complete EEIO model} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} \item{matrix}{A matrix from model result} diff --git a/man/loadDefaultDemandVectorMeta.Rd b/man/loadDefaultDemandVectorMeta.Rd index 9fb53e20..66a98b78 100644 --- a/man/loadDefaultDemandVectorMeta.Rd +++ b/man/loadDefaultDemandVectorMeta.Rd @@ -2,18 +2,18 @@ % Please edit documentation in R/LoadDemandVectors.R \name{loadDefaultDemandVectorMeta} \alias{loadDefaultDemandVectorMeta} -\title{Loads a package stored csv of demand vector meta for vectors to be created for every model with type and system specified -This function adds additional year, location and IDs along with the type and system based on the model given} +\title{Loads a package stored demand vector metadata (.yml) for vectors to be created for every model with type and system specified +This function adds additional year, location and IDs along with the type and system based on the model specs.} \usage{ loadDefaultDemandVectorMeta(model) } \arguments{ -\item{model}{An EEIO model that has been initialized} +\item{model}{An EEIO model object with model specs and IO tables loaded} } \value{ -a data frame of metadata with cols Type, System, Name, Year, Location and ID with rows for each default +a data frame of metadata with columns Type, System, Name, Year, Location and ID with rows for each default } \description{ -Loads a package stored csv of demand vector meta for vectors to be created for every model with type and system specified -This function adds additional year, location and IDs along with the type and system based on the model given +Loads a package stored demand vector metadata (.yml) for vectors to be created for every model with type and system specified +This function adds additional year, location and IDs along with the type and system based on the model specs. } diff --git a/man/loadDemandVectors.Rd b/man/loadDemandVectors.Rd index e23e6896..1f9911b8 100644 --- a/man/loadDemandVectors.Rd +++ b/man/loadDemandVectors.Rd @@ -7,7 +7,7 @@ loadDemandVectors(model) } \arguments{ -\item{model}{A model list object with the specs object listed} +\item{model}{An EEIO model object with model specs and IO tables loaded} } \value{ model with a list of demand vectors and a meta file stored appended as model$DemandVectors diff --git a/man/loadIOData.Rd b/man/loadIOData.Rd index 29b60341..75449fc8 100644 --- a/man/loadIOData.Rd +++ b/man/loadIOData.Rd @@ -7,7 +7,7 @@ loadIOData(model, configpaths = NULL) } \arguments{ -\item{model}{A list of model specs} +\item{model}{An EEIO model object with model specs loaded} \item{configpaths}{str vector, paths (including file name) of model configuration file and optional agg/disagg configuration file(s). If NULL, built-in config files are used.} diff --git a/man/loadIndicators.Rd b/man/loadIndicators.Rd index 5088acc8..eb65ddd7 100644 --- a/man/loadIndicators.Rd +++ b/man/loadIndicators.Rd @@ -7,7 +7,7 @@ loadIndicators(model) } \arguments{ -\item{model}{A model object with IO tables and satellite tables loaded.} +\item{model}{A model object with model specs, IO tables, and satellite tables loaded.} } \value{ A list with a dataframe for indicator meta and a dataframe for indicator factors. diff --git a/man/loadSatTables.Rd b/man/loadSatTables.Rd index 1d917eb4..0e7fb90c 100644 --- a/man/loadSatTables.Rd +++ b/man/loadSatTables.Rd @@ -35,7 +35,7 @@ A list with lists of totals by sector loadSatTables(model) } \arguments{ -\item{model}{A model list object with the specs object listed} +\item{model}{A model list object with model specs and IO tables listed} } \value{ Lists of totals by sector by region and unique flows diff --git a/man/loadandbuildIndicators.Rd b/man/loadandbuildIndicators.Rd index 09724ebe..695e58ab 100644 --- a/man/loadandbuildIndicators.Rd +++ b/man/loadandbuildIndicators.Rd @@ -7,7 +7,7 @@ loadandbuildIndicators(model) } \arguments{ -\item{model}{A model object with IO data loaded} +\item{model}{A model object with model specs, IO tables, and satelilte tables loaded} } \value{ A model object with Indicators added diff --git a/man/loadandbuildSatelliteTables.Rd b/man/loadandbuildSatelliteTables.Rd index 451c43e9..19a56055 100644 --- a/man/loadandbuildSatelliteTables.Rd +++ b/man/loadandbuildSatelliteTables.Rd @@ -7,7 +7,7 @@ loadandbuildSatelliteTables(model) } \arguments{ -\item{model}{A model object with IO data loaded} +\item{model}{A model list object with model specs and IO tables listed} } \value{ A model object with Satellite tables added diff --git a/man/prepareConsumptionDemand.Rd b/man/prepareConsumptionDemand.Rd index 9e3fcaf1..0d47bc3f 100644 --- a/man/prepareConsumptionDemand.Rd +++ b/man/prepareConsumptionDemand.Rd @@ -7,7 +7,7 @@ prepareConsumptionDemand(model) } \arguments{ -\item{model, }{a model} +\item{model}{An EEIO model object with model specs and IO tables loaded} } \value{ a named vector with demand diff --git a/man/prepareDomesticConsumptionDemand.Rd b/man/prepareDomesticConsumptionDemand.Rd index 20efdacb..6493d1b8 100644 --- a/man/prepareDomesticConsumptionDemand.Rd +++ b/man/prepareDomesticConsumptionDemand.Rd @@ -7,7 +7,7 @@ prepareDomesticConsumptionDemand(model) } \arguments{ -\item{model, }{a model} +\item{model}{An EEIO model object with model specs and IO tables loaded} } \value{ A named vector with demand diff --git a/man/prepareDomesticProductionDemand.Rd b/man/prepareDomesticProductionDemand.Rd index 94d26fe3..e8fb6870 100644 --- a/man/prepareDomesticProductionDemand.Rd +++ b/man/prepareDomesticProductionDemand.Rd @@ -8,7 +8,7 @@ Formula for production vector: y_p <- y_dc + y_e + y_d_delta + mu} prepareDomesticProductionDemand(model) } \arguments{ -\item{model, }{a model} +\item{model}{An EEIO model object with model specs and IO tables loaded} } \value{ A named vector with demand diff --git a/man/prepareEfromtbs.Rd b/man/prepareEfromtbs.Rd index 4c0e7a0d..27403254 100644 --- a/man/prepareEfromtbs.Rd +++ b/man/prepareEfromtbs.Rd @@ -7,7 +7,7 @@ prepareEfromtbs(model) } \arguments{ -\item{model, }{EEIOmodel object completely built} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} } \description{ Concatenate all satellite flows in model diff --git a/man/prepareHouseholdDemand.Rd b/man/prepareHouseholdDemand.Rd index cd65b978..f8eb2dfc 100644 --- a/man/prepareHouseholdDemand.Rd +++ b/man/prepareHouseholdDemand.Rd @@ -7,7 +7,7 @@ prepareHouseholdDemand(model) } \arguments{ -\item{model, }{a model} +\item{model}{An EEIO model object with model specs and IO tables loaded} } \value{ A named vector with demand diff --git a/man/prepareModelSectorCrosswalk.Rd b/man/prepareModelSectorCrosswalk.Rd index 00c5a10a..99cedb98 100644 --- a/man/prepareModelSectorCrosswalk.Rd +++ b/man/prepareModelSectorCrosswalk.Rd @@ -7,7 +7,7 @@ prepareModelSectorCrosswalk(model) } \arguments{ -\item{model, }{any model object} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} } \value{ a data.frame, sectorcrosswalk table diff --git a/man/prepareProductionDemand.Rd b/man/prepareProductionDemand.Rd index 1feb1d08..cb3d955b 100644 --- a/man/prepareProductionDemand.Rd +++ b/man/prepareProductionDemand.Rd @@ -10,7 +10,7 @@ y_m values are generally negative in the BEA data and thus are added (whereas wh prepareProductionDemand(model) } \arguments{ -\item{model, }{a model} +\item{model}{An EEIO model object with model specs and IO tables loaded} } \value{ A named vector with demand diff --git a/man/standardizeandcastSatelliteTable.Rd b/man/standardizeandcastSatelliteTable.Rd index a7d19888..1f3872e4 100644 --- a/man/standardizeandcastSatelliteTable.Rd +++ b/man/standardizeandcastSatelliteTable.Rd @@ -9,7 +9,7 @@ standardizeandcastSatelliteTable(df, model) \arguments{ \item{df}{a dataframe of flowables, contexts, units, sectors and locations} -\item{model}{an EEIO model with IO tables loaded} +\item{model}{An EEIO model object with model specs, IO tables, satellite tables, and indicators loaded} } \value{ A matrix-like dataframe of flows x sector diff --git a/man/sumforConsumption.Rd b/man/sumforConsumption.Rd index 7bc0decc..4c547e0f 100644 --- a/man/sumforConsumption.Rd +++ b/man/sumforConsumption.Rd @@ -9,7 +9,7 @@ Domestic portion of national consumption: y_dc <- Y_dh + Y_dv + Y_dg} sumforConsumption(model, Y) } \arguments{ -\item{model, }{a model} +\item{model}{An EEIO model object with model specs and IO tables loaded} \item{Y, }{a model Demand df.} } diff --git a/man/writeModeltoXLSX.Rd b/man/writeModeltoXLSX.Rd index af843c1a..c41f386d 100644 --- a/man/writeModeltoXLSX.Rd +++ b/man/writeModeltoXLSX.Rd @@ -7,7 +7,7 @@ writeModeltoXLSX(model, outputfolder) } \arguments{ -\item{model, }{any model object} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} \item{outputfolder}{A directory to write model matrices and metadata as XLSX file out to} } From 2d18676cf8d1315d6ae3200e477d23a643d98bc5 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Tue, 7 Dec 2021 14:42:37 -0800 Subject: [PATCH 236/319] Update ModelSpecification.md Add default demand in Demand Vector Specifications --- format_specs/ModelSpecification.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/format_specs/ModelSpecification.md b/format_specs/ModelSpecification.md index 5dfc5a60..32bfd8c8 100644 --- a/format_specs/ModelSpecification.md +++ b/format_specs/ModelSpecification.md @@ -58,7 +58,15 @@ Model specifications are assigned in a yml file based on the parameters shown be ## Demand Vector Specifications -Each demand vector list is given a unique `Name` +Default demand vectors (`CompleteProduction`, `DomesticProduction`, `CompleteConsumption`, `DomesticConsumption`) +| Item | Type | Required? | Description | +| --- | --- | --- | --------- | +| Type | str | Y | | +| Year | int | N | Use model IO data year | +| System | str | Y | | +| Location | str | N | Use model region acronym | + +Customizable demand vector list is given a unique `Name`, such as `HouseholdConsumption` | Item | Type | Required? | Description | | --- | --- | --- | --------- | | Type | str | Y | | From 5ddf8f9ed765bac1fa6de77e54c937298a27c95f Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 7 Dec 2021 15:04:03 -0800 Subject: [PATCH 237/319] y_m -> y_i to represent imports in production demand calculation --- R/DemandFunctions.R | 10 +++++----- man/prepareProductionDemand.Rd | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index f12d518f..fd316b2c 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -39,9 +39,9 @@ sumforConsumption <- function(model, Y) { } #' Prepares a demand vector representing production -#' Formula for production vector: y_p <- y_c + y_e + y_m + y_delta -#' where y_c = consumption, y_e = exports, y_m = imports, y_delta = change in inventories -#' y_m values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted) +#' Formula for production vector: y_p <- y_c + y_e + y_i + y_delta +#' where y_c = consumption, y_e = exports, y_i = imports, y_delta = change in inventories +#' y_i values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted) #' @param model An EEIO model object with model specs and IO tables loaded #' @return A named vector with demand prepareProductionDemand <- function(model) { @@ -50,9 +50,9 @@ prepareProductionDemand <- function(model) { import_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Import", "Code_Loc"] y_c <- sumforConsumption(model, model$FinalDemand) y_e <- sumDemandCols(model$FinalDemand, export_code) - y_m <- sumDemandCols(model$FinalDemand, import_code) + y_i <- sumDemandCols(model$FinalDemand, import_code) y_delta <- sumDemandCols(model$FinalDemand, changeinventories_code) - y_p <- y_c + y_e + y_m + y_delta + y_p <- y_c + y_e + y_i + y_delta return(y_p) } diff --git a/man/prepareProductionDemand.Rd b/man/prepareProductionDemand.Rd index cb3d955b..e1ca1471 100644 --- a/man/prepareProductionDemand.Rd +++ b/man/prepareProductionDemand.Rd @@ -3,9 +3,9 @@ \name{prepareProductionDemand} \alias{prepareProductionDemand} \title{Prepares a demand vector representing production -Formula for production vector: y_p <- y_c + y_e + y_m + y_delta -where y_c = consumption, y_e = exports, y_m = imports, y_delta = change in inventories -y_m values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted)} +Formula for production vector: y_p <- y_c + y_e + y_i + y_delta +where y_c = consumption, y_e = exports, y_i = imports, y_delta = change in inventories +y_i values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted)} \usage{ prepareProductionDemand(model) } @@ -17,7 +17,7 @@ A named vector with demand } \description{ Prepares a demand vector representing production -Formula for production vector: y_p <- y_c + y_e + y_m + y_delta -where y_c = consumption, y_e = exports, y_m = imports, y_delta = change in inventories -y_m values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted) +Formula for production vector: y_p <- y_c + y_e + y_i + y_delta +where y_c = consumption, y_e = exports, y_i = imports, y_delta = change in inventories +y_i values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted) } From 8499d94a62801f8da96acd82863a946e1a90595d Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 8 Dec 2021 11:36:45 -0500 Subject: [PATCH 238/319] Update and rename DisaggregationSpecification.md to DisaggregationAndAggregationSpecification.md Edited file to include aggregation specifications as well as the updated format for the Disaggregated Sectors Format .csv file. --- ...aggregationAndAggregationSpecification.md} | 38 +++++++++++++++---- 1 file changed, 30 insertions(+), 8 deletions(-) rename format_specs/{DisaggregationSpecification.md => DisaggregationAndAggregationSpecification.md} (52%) diff --git a/format_specs/DisaggregationSpecification.md b/format_specs/DisaggregationAndAggregationSpecification.md similarity index 52% rename from format_specs/DisaggregationSpecification.md rename to format_specs/DisaggregationAndAggregationSpecification.md index f9a27f8e..ddf1f782 100644 --- a/format_specs/DisaggregationSpecification.md +++ b/format_specs/DisaggregationAndAggregationSpecification.md @@ -1,8 +1,15 @@ -# Disaggregation File Specification -Disaggregation specifications are assigned in a yml file based on the parameters shown below. Each disaggregation is a list, named based on the [Code/location](https://github.com/USEPA/useeior/blob/master/format_specs/Model.md#sector-meta) of the original sector (e.g. `562000/US`) +# Disaggregation and Aggregation File Specifications +This page describes the file formats needed to run the aggregation and disaggregation functions in USEEIOR. Aggregating a sector requires only one .yml input file, while disaggregation requires a .yml input file and several .csv files to specifiy the disaggregation parameters. + +# Disaggreation and Aggregation .yml File Specification +The disaggregation and aggregation files are assigned in a yml file based on the parameters shown below. Each file is a list, named based on the [Code/location](https://github.com/USEPA/useeior/blob/master/format_specs/Model.md#sector-meta) of the sector to be disaggregated or aggregated to (e.g. `221100/US`) + + +## Disaggregation + | Item | Type | Required? | Description | -| --- | --- | --- | --------- | +| --- | --- | --- | --------- | | OriginalSectorCode | str | Y | Code/location of the sector to be disaggregated | | OriginalSectorName | str | Y | Name of the sector to be disaggregated | | DisaggregationType | str | Y | Can be "Predefined" for a uniform disaggregation or "User Defined" for a custom disaggregation with user-supplied inputs| @@ -11,17 +18,32 @@ Disaggregation specifications are assigned in a yml file based on the parameters | UseFile | str | N | Pointer to a file containing [use table allocations for disaggregated sectors](#disaggregated-table-format) | | EnvFile | str | N | Pointer to a file containing satellite table data for [disaggregated sectors](#disaggregated-satellite-table-format) | +## Aggregation + +| Item | Type | Required? | Description | +| --- | --- | --- | --------- | +| Sectors | str | Y | Bracketed list of strings of the Code/location of the sectors to be aggregated, with the first item in the list being the main aggregation sector (i.e., where all sectors will be aggregated to). | + + # Disaggregation Table Specifications Input disaggregation tables are in csv format with the fields shown below. The Disaggregated Table format applies to both the Disaggregated Make and Disaggregated Use tables. ## Disaggregated Sectors Format -| Field | Type | Required? | Description | -| --- | --- | --- | --- -| NAICS_2012_Code | string | Y | NAICS 2012 6-digit code | -| USEEIO_Code | string | Y | Code for new sector in the form of Code/location | -| USEEIO_Name | string | Y | Name for new sector | +This .csv file is a crosswalk between the most relevant 6-digit NAICS codes and the disaggregated sectors. + + +| Field | Type | Required? | Description | +| ------------------ | ------- | ---------- | ---------------------------------------------| +| NAICS\_2012\_Code | string | Y | NAICS 2012 6-digit code | +| USEEIO\_Code | string | Y | Code for new sector in the form of Code/location | +| USEEIO\_Name | string | Y | Name for new sector | +| Category | string | Y | 2-digit NAICS Code:Description combination which the disaggregated sector would fall under (e.g., 22:Utilities for disaggregated electricity sector 221111/US) | +| Subcategory | string | Y | 3- or 4-digit NAICS Code:Description combination which the disaggregated sector would fall under (e.g., 2211:Electric Power Generation, Transmission, and Distribution for disaggregated electricity sector 221111/US) | +| Description | string | Y | Description of the disaggregated sector | ## Disaggregated Table Format +These .csv files contain the input values required for the disaggregation of the Make and Use tables. One file is required for each table. + Field | Type | Required? | Description | -- | -- | -- | -- | IndustryCode | string | Y | Code/location for industry. Values included in this column can represent the original industry code to be disaggregated; the new industry codes representing disaggregated sectors; or existing industries where an allocation for a newly disaggregated commodity is to be assigned. | From f9d210b417864725417354a9d12b5348cb047fdf Mon Sep 17 00:00:00 2001 From: Mo Li Date: Wed, 8 Dec 2021 11:35:15 -0800 Subject: [PATCH 239/319] Update ModelSpecification.md Simplify Demand Vector Specifications --- format_specs/ModelSpecification.md | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/format_specs/ModelSpecification.md b/format_specs/ModelSpecification.md index 32bfd8c8..66f6cbe7 100644 --- a/format_specs/ModelSpecification.md +++ b/format_specs/ModelSpecification.md @@ -58,22 +58,16 @@ Model specifications are assigned in a yml file based on the parameters shown be ## Demand Vector Specifications -Default demand vectors (`CompleteProduction`, `DomesticProduction`, `CompleteConsumption`, `DomesticConsumption`) -| Item | Type | Required? | Description | -| --- | --- | --- | --------- | -| Type | str | Y | | -| Year | int | N | Use model IO data year | -| System | str | Y | | -| Location | str | N | Use model region acronym | +Default demand vectors include `CompleteProduction`, `DomesticProduction`, `CompleteConsumption`, and `DomesticConsumption`. + +Customized demand vector list is given a unique `Name`, such as `HouseholdConsumption`. -Customizable demand vector list is given a unique `Name`, such as `HouseholdConsumption` | Item | Type | Required? | Description | | --- | --- | --- | --------- | | Type | str | Y | | -| Year | int | Y | | +| Year | int | Y (customized), N (default) | Use model IO data year (default) | | System | str | Y | | -| Location | str | Y | | - +| Location | str | Y (customized), N (default) | Use model region acronym (default) | ## DataSources Specifications | Item | Type | Required? | Description | From 723e3fb34e87270569ff186bd11cd60081fff398 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 8 Dec 2021 12:10:31 -0800 Subject: [PATCH 240/319] Revert "y_m -> y_i to represent imports in production demand calculation" This reverts commit 5ddf8f9ed765bac1fa6de77e54c937298a27c95f. --- R/DemandFunctions.R | 10 +++++----- man/prepareProductionDemand.Rd | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index fd316b2c..f12d518f 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -39,9 +39,9 @@ sumforConsumption <- function(model, Y) { } #' Prepares a demand vector representing production -#' Formula for production vector: y_p <- y_c + y_e + y_i + y_delta -#' where y_c = consumption, y_e = exports, y_i = imports, y_delta = change in inventories -#' y_i values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted) +#' Formula for production vector: y_p <- y_c + y_e + y_m + y_delta +#' where y_c = consumption, y_e = exports, y_m = imports, y_delta = change in inventories +#' y_m values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted) #' @param model An EEIO model object with model specs and IO tables loaded #' @return A named vector with demand prepareProductionDemand <- function(model) { @@ -50,9 +50,9 @@ prepareProductionDemand <- function(model) { import_code <- model$FinalDemandMeta[model$FinalDemandMeta$Group=="Import", "Code_Loc"] y_c <- sumforConsumption(model, model$FinalDemand) y_e <- sumDemandCols(model$FinalDemand, export_code) - y_i <- sumDemandCols(model$FinalDemand, import_code) + y_m <- sumDemandCols(model$FinalDemand, import_code) y_delta <- sumDemandCols(model$FinalDemand, changeinventories_code) - y_p <- y_c + y_e + y_i + y_delta + y_p <- y_c + y_e + y_m + y_delta return(y_p) } diff --git a/man/prepareProductionDemand.Rd b/man/prepareProductionDemand.Rd index e1ca1471..cb3d955b 100644 --- a/man/prepareProductionDemand.Rd +++ b/man/prepareProductionDemand.Rd @@ -3,9 +3,9 @@ \name{prepareProductionDemand} \alias{prepareProductionDemand} \title{Prepares a demand vector representing production -Formula for production vector: y_p <- y_c + y_e + y_i + y_delta -where y_c = consumption, y_e = exports, y_i = imports, y_delta = change in inventories -y_i values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted)} +Formula for production vector: y_p <- y_c + y_e + y_m + y_delta +where y_c = consumption, y_e = exports, y_m = imports, y_delta = change in inventories +y_m values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted)} \usage{ prepareProductionDemand(model) } @@ -17,7 +17,7 @@ A named vector with demand } \description{ Prepares a demand vector representing production -Formula for production vector: y_p <- y_c + y_e + y_i + y_delta -where y_c = consumption, y_e = exports, y_i = imports, y_delta = change in inventories -y_i values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted) +Formula for production vector: y_p <- y_c + y_e + y_m + y_delta +where y_c = consumption, y_e = exports, y_m = imports, y_delta = change in inventories +y_m values are generally negative in the BEA data and thus are added (whereas when positive they are subtracted) } From 188d734d65f31a38055ebb702d6b667bff170e96 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 8 Dec 2021 21:07:20 -0500 Subject: [PATCH 241/319] change function name to aggregateResultMatrixbyRow resolves #189 --- NAMESPACE | 2 +- R/CalculationFunctions.R | 6 +++--- ...ggregateResultTable.Rd => aggregateResultMatrixbyRow.Rd} | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) rename man/{aggregateResultTable.Rd => aggregateResultMatrixbyRow.Rd} (78%) diff --git a/NAMESPACE b/NAMESPACE index fa9c50b7..7540efd7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,7 +2,7 @@ export(adjustResultMatrixPrice) export(aggregateResultMatrix) -export(aggregateResultTable) +export(aggregateResultMatrixbyRow) export(barplotFloworImpactFractionbyRegion) export(barplotIndicatorScoresbySector) export(buildModel) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 38874062..304d3f67 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -207,7 +207,7 @@ calculateFlowContributiontoImpact <- function (model, sector, indicator, domesti #' @param crosswalk Sector crosswalk between levels of detail #' @return An aggregated matrix with sectors as rows #' @export -aggregateResultTable <- function (matrix, to_level, crosswalk) { +aggregateResultMatrixbyRow <- function (matrix, to_level, crosswalk) { # Determine the columns within MasterCrosswalk that will be used in aggregation from_code <- "USEEIO" to_code <- paste0("BEA_", to_level) @@ -233,8 +233,8 @@ aggregateResultTable <- function (matrix, to_level, crosswalk) { #' @return An aggregated matrix with sectors as rows and columns #' @export aggregateResultMatrix <- function (matrix, to_level, crosswalk) { - row_agg_matrix <- aggregateResultTable (matrix, to_level, crosswalk) - col_agg_matrix <- aggregateResultTable (t(row_agg_matrix), to_level, crosswalk) + row_agg_matrix <- aggregateResultMatrixbyRow (matrix, to_level, crosswalk) + col_agg_matrix <- aggregateResultMatrixbyRow (t(row_agg_matrix), to_level, crosswalk) agg_matrix <- t(col_agg_matrix) return(agg_matrix) } diff --git a/man/aggregateResultTable.Rd b/man/aggregateResultMatrixbyRow.Rd similarity index 78% rename from man/aggregateResultTable.Rd rename to man/aggregateResultMatrixbyRow.Rd index 23a84d29..9af4b266 100644 --- a/man/aggregateResultTable.Rd +++ b/man/aggregateResultMatrixbyRow.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/CalculationFunctions.R -\name{aggregateResultTable} -\alias{aggregateResultTable} +\name{aggregateResultMatrixbyRow} +\alias{aggregateResultMatrixbyRow} \title{Aggregate result matrix by rows} \usage{ -aggregateResultTable(matrix, to_level, crosswalk) +aggregateResultMatrixbyRow(matrix, to_level, crosswalk) } \arguments{ \item{matrix}{A matrix with sectors as rows} From caaba5d16642df709fdabf95a5e281502b3a54a2 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 9 Dec 2021 09:55:07 -0800 Subject: [PATCH 242/319] Small revisions in function docs --- R/CalculationFunctions.R | 4 ++-- R/VisualizationFunctions.R | 2 +- man/barplotFloworImpactFractionbyRegion.Rd | 4 ++-- man/calculateFlowContributiontoImpact.Rd | 2 +- man/calculateSectorContributiontoImpact.Rd | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 304d3f67..4756b12e 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -167,7 +167,7 @@ calculatePercentContributiontoImpact <- function (x,y) { #' Calculate the percent contribution of sectors to an N indicator result #' Uses model L matrix for total requirements and D matrix for direct indicator result #' @param model A complete EEIO model: a list with USEEIO model components and attributes -#' @param sector, str, index of a model sector for use in the M matrix, e.g. "221100/us" +#' @param sector, str, index of a model sector for use in the M matrix, e.g. "221100/US" #' @param indicator, str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential" #' @param domestic, boolean, sets model to use domestic flow matrix. Default is FALSE. #' @return A dataframe sorted from highest process contribution "contribution", also showing "x","y","impact" @@ -185,7 +185,7 @@ calculateSectorContributiontoImpact <- function (model, sector, indicator, domes #' Calculate the percent contribution of M flows to an N indicator result #' Uses model M matrix for flows and C matrix for indicator #' @param model A complete EEIO model: a list with USEEIO model components and attributes -#' @param sector, str, index of a model sector for use in the M matrix, e.g. "221100/us" +#' @param sector, str, index of a model sector for use in the M matrix, e.g. "221100/US" #' @param indicator, str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential" #' @param domestic, boolean, sets model to use domestic flow matrix. Default is FALSE. #' @return A dataframe sorted from highest flow contribution "contribution", also showing "x","y","impact" diff --git a/R/VisualizationFunctions.R b/R/VisualizationFunctions.R index 9c8b7b2c..6571986c 100644 --- a/R/VisualizationFunctions.R +++ b/R/VisualizationFunctions.R @@ -279,7 +279,7 @@ heatmapSectorRanking <- function(model, matrix, indicators, sector_to_remove, N_ return(p) } -#' Proportional bar chart splitting out flows or impacts by a region and the Rest of the regions +#' Proportional bar chart splitting out flows or impacts by a region and the Rest of the region #' @param R1_calc_result A matrix from model result. #' @param Total_calc_result A matrix from model result. #' @param y_title The title of y axis, excluding unit. diff --git a/man/barplotFloworImpactFractionbyRegion.Rd b/man/barplotFloworImpactFractionbyRegion.Rd index f7c534bc..2b9feeab 100644 --- a/man/barplotFloworImpactFractionbyRegion.Rd +++ b/man/barplotFloworImpactFractionbyRegion.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/VisualizationFunctions.R \name{barplotFloworImpactFractionbyRegion} \alias{barplotFloworImpactFractionbyRegion} -\title{Proportional bar chart splitting out flows or impacts by a region and the Rest of the regions} +\title{Proportional bar chart splitting out flows or impacts by a region and the Rest of the region} \usage{ barplotFloworImpactFractionbyRegion(R1_calc_result, Total_calc_result, y_title) } @@ -17,5 +17,5 @@ barplotFloworImpactFractionbyRegion(R1_calc_result, Total_calc_result, y_title) a ggplot bar chart with horizontal orientation } \description{ -Proportional bar chart splitting out flows or impacts by a region and the Rest of the regions +Proportional bar chart splitting out flows or impacts by a region and the Rest of the region } diff --git a/man/calculateFlowContributiontoImpact.Rd b/man/calculateFlowContributiontoImpact.Rd index 0f53b4c4..5c01bde9 100644 --- a/man/calculateFlowContributiontoImpact.Rd +++ b/man/calculateFlowContributiontoImpact.Rd @@ -10,7 +10,7 @@ calculateFlowContributiontoImpact(model, sector, indicator, domestic = FALSE) \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes} -\item{sector, }{str, index of a model sector for use in the M matrix, e.g. "221100/us"} +\item{sector, }{str, index of a model sector for use in the M matrix, e.g. "221100/US"} \item{indicator, }{str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential"} diff --git a/man/calculateSectorContributiontoImpact.Rd b/man/calculateSectorContributiontoImpact.Rd index 00007d95..c46998dd 100644 --- a/man/calculateSectorContributiontoImpact.Rd +++ b/man/calculateSectorContributiontoImpact.Rd @@ -10,7 +10,7 @@ calculateSectorContributiontoImpact(model, sector, indicator, domestic = FALSE) \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes} -\item{sector, }{str, index of a model sector for use in the M matrix, e.g. "221100/us"} +\item{sector, }{str, index of a model sector for use in the M matrix, e.g. "221100/US"} \item{indicator, }{str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential"} From fe05ac8b7f4b920f0aaa8470e6d00bc19d45f795 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 9 Dec 2021 13:47:14 -0800 Subject: [PATCH 243/319] Add x_title as parameter for more customizing freedom in heatmap of sector ranking --- R/VisualizationFunctions.R | 6 ++++-- man/heatmapSectorRanking.Rd | 11 ++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/R/VisualizationFunctions.R b/R/VisualizationFunctions.R index 6571986c..7370b8e3 100644 --- a/R/VisualizationFunctions.R +++ b/R/VisualizationFunctions.R @@ -223,8 +223,9 @@ heatmapSatelliteTableCoverage <- function(model, form="Commodity") { #' @param indicators A vector of indicators to plot #' @param sector_to_remove Code of one or more BEA sectors that will be removed from the plot. Can be "". #' @param N_sector A numeric value indicating number of sectors to show in the ranking +#' @param x_title A string specifying desired title on the x-axis, default is NULL, the title will be "modelname indicators" #' @export -heatmapSectorRanking <- function(model, matrix, indicators, sector_to_remove, N_sector) { +heatmapSectorRanking <- function(model, matrix, indicators, sector_to_remove, N_sector, x_title = NULL) { # Generate BEA sector color mapping mapping <- getBEASectorColorMapping(model) mapping$GroupName <- mapping$SectorName @@ -260,6 +261,7 @@ heatmapSectorRanking <- function(model, matrix, indicators, sector_to_remove, N_ # Prepare axis label color label_colors <- rev(unique(df[, c("SectorName", "color")])[, "color"]) + x_title <- ifelse(is.null(x_title), paste(model$specs$Model, "Indicators"), x_title) # plot p <- ggplot(df, aes(x = factor(Indicator, levels = c("Score", indicators)), @@ -269,7 +271,7 @@ heatmapSectorRanking <- function(model, matrix, indicators, sector_to_remove, N_ scale_fill_gradient(low = "white", high = "black") + scale_x_discrete(expand = c(0, 0), position = "top") + scale_y_discrete(expand = c(0, 0), labels = function(x) stringr::str_wrap(x, 30)) + - labs(x = paste(model$specs$Model, "Indicators"), y = "") + theme_bw() + + labs(x = x_title, y = "") + theme_bw() + theme(axis.text = element_text(color = "black", size = 15), axis.title.x = element_text(size = 20), axis.text.x = element_text(angle = 45, hjust = 0, vjust = 1), diff --git a/man/heatmapSectorRanking.Rd b/man/heatmapSectorRanking.Rd index 53d54ba8..df755cbf 100644 --- a/man/heatmapSectorRanking.Rd +++ b/man/heatmapSectorRanking.Rd @@ -4,7 +4,14 @@ \alias{heatmapSectorRanking} \title{SMM tool like heatmap showing ranking of sectors} \usage{ -heatmapSectorRanking(model, matrix, indicators, sector_to_remove, N_sector) +heatmapSectorRanking( + model, + matrix, + indicators, + sector_to_remove, + N_sector, + x_title = NULL +) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes} @@ -16,6 +23,8 @@ heatmapSectorRanking(model, matrix, indicators, sector_to_remove, N_sector) \item{sector_to_remove}{Code of one or more BEA sectors that will be removed from the plot. Can be "".} \item{N_sector}{A numeric value indicating number of sectors to show in the ranking} + +\item{x_title}{A string specifying desired title on the x-axis, default is NULL, the title will be "modelname indicators"} } \description{ SMM tool like heatmap showing ranking of sectors From 06c6644ad2bff3450d4e08e4acd933d515876836 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 9 Dec 2021 15:22:03 -0800 Subject: [PATCH 244/319] Modify axis title in barplotFloworImpactFractionbyRegion function --- R/VisualizationFunctions.R | 10 +++++----- man/barplotFloworImpactFractionbyRegion.Rd | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/VisualizationFunctions.R b/R/VisualizationFunctions.R index 7370b8e3..476880a7 100644 --- a/R/VisualizationFunctions.R +++ b/R/VisualizationFunctions.R @@ -284,23 +284,23 @@ heatmapSectorRanking <- function(model, matrix, indicators, sector_to_remove, N_ #' Proportional bar chart splitting out flows or impacts by a region and the Rest of the region #' @param R1_calc_result A matrix from model result. #' @param Total_calc_result A matrix from model result. -#' @param y_title The title of y axis, excluding unit. +#' @param x_title The title of x axis, excluding unit. #' @return a ggplot bar chart with horizontal orientation #' @export -barplotFloworImpactFractionbyRegion <- function(R1_calc_result, Total_calc_result, y_title) { +barplotFloworImpactFractionbyRegion <- function(R1_calc_result, Total_calc_result, x_title) { rel_diff <- as.data.frame(colSums(R1_calc_result)/colSums(Total_calc_result)) - colnames(rel_diff) <- y_title + colnames(rel_diff) <- "Fraction" rel_diff[["Indicator"]] <- rownames(rel_diff) mapping <- getIndicatorColorMapping() rel_diff <- merge(rel_diff, mapping, by.x = 0, by.y = "Indicator") rel_diff <- rel_diff[rev(match(mapping$Indicator, rel_diff$Indicator)), ] p <- ggplot(rel_diff, aes(y = factor(Indicator, levels = Indicator), - x = !!as.name(y_title), fill = Indicator)) + + x = Fraction, fill = Indicator)) + scale_fill_manual(limits = rel_diff$Indicator, values = rel_diff$color) + scale_x_continuous(expand = expansion(mult = c(0, 0.1)), breaks = scales::pretty_breaks(), labels = scales::label_percent(accuracy = 1)) + - geom_col() + theme_bw() + + geom_col() + labs(x = x_title, y = "") + theme_bw() + theme(axis.text = element_text(color = "black", size = 15), axis.title.x = element_text(size = 15), axis.title.y = element_blank(), diff --git a/man/barplotFloworImpactFractionbyRegion.Rd b/man/barplotFloworImpactFractionbyRegion.Rd index 2b9feeab..3a8c3eff 100644 --- a/man/barplotFloworImpactFractionbyRegion.Rd +++ b/man/barplotFloworImpactFractionbyRegion.Rd @@ -4,14 +4,14 @@ \alias{barplotFloworImpactFractionbyRegion} \title{Proportional bar chart splitting out flows or impacts by a region and the Rest of the region} \usage{ -barplotFloworImpactFractionbyRegion(R1_calc_result, Total_calc_result, y_title) +barplotFloworImpactFractionbyRegion(R1_calc_result, Total_calc_result, x_title) } \arguments{ \item{R1_calc_result}{A matrix from model result.} \item{Total_calc_result}{A matrix from model result.} -\item{y_title}{The title of y axis, excluding unit.} +\item{x_title}{The title of x axis, excluding unit.} } \value{ a ggplot bar chart with horizontal orientation From 40cf9ee650424e7e78a9ff869d25b4b277fdde82 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 10 Dec 2021 10:08:46 -0800 Subject: [PATCH 245/319] Unit in indicator score for TbS table -> indicator unit --- R/SatelliteFunctions.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/SatelliteFunctions.R b/R/SatelliteFunctions.R index 67712ae3..0f908780 100644 --- a/R/SatelliteFunctions.R +++ b/R/SatelliteFunctions.R @@ -180,6 +180,7 @@ calculateIndicatorScoresforTotalsBySector <- function(model, totals_by_sector_na # Mergeflows_in_indicator and totals_by_sector and calculate IndicatorScore df <- merge(totals_by_sector, flows_in_indicator, by = c("Flowable", "Context", "Unit")) df$IndicatorScore <- df$FlowAmount*df$Amount + df$Unit <- model$Indicators$meta[model$Indicators$meta$Name==indicator_name, 'Unit'] return(df) } From f39b00dc08db3c32d7e05f076d11684866deec84 Mon Sep 17 00:00:00 2001 From: Catherine Birney Date: Fri, 10 Dec 2021 16:05:39 -0500 Subject: [PATCH 246/319] update the land national 2012 flowsa parquet version --- inst/extdata/modelspecs/USEEIOv2.1.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/extdata/modelspecs/USEEIOv2.1.yml b/inst/extdata/modelspecs/USEEIOv2.1.yml index 41d05423..1f55b0c8 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1.yml @@ -132,7 +132,7 @@ SatelliteTable: FullName: "Land use" Abbreviation: "LAND" StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Land_national_2012_v0.3.1_f3cdf5b.parquet" + StaticFile: "flowsa/FlowBySector/Land_national_2012_v1.0.0_c31cd44.parquet" FileLocation: "DataCommons" DataYears: [2012] Locations: ["US"] From 598135d81aee87acfdef7cf3206107de4a486aef Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Fri, 10 Dec 2021 14:22:55 -0800 Subject: [PATCH 247/319] Replace NULL with model in dirs preparation in writeSectorCrosswalk, fixes #163 --- R/WriteModel.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/WriteModel.R b/R/WriteModel.R index d743aa78..6f041f77 100644 --- a/R/WriteModel.R +++ b/R/WriteModel.R @@ -23,7 +23,7 @@ writeModelforAPI <-function(model, basedir){ #' @description Writes the model sector crosswalk as .csv file #' @export writeSectorCrosswalk <- function(model, basedir){ - dirs <- setWriteDirsforAPI(NULL,basedir) + dirs <- setWriteDirsforAPI(model, basedir) prepareWriteDirs(model, dirs) crosswalk <- prepareModelSectorCrosswalk(model) crosswalk$ModelSchema <- "" From 4b4be42ee38ab60e4e4bf1cf240a8dac2ecfb591 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Sun, 12 Dec 2021 13:34:12 -0800 Subject: [PATCH 248/319] Add grid lines in sector ranking heat map --- R/VisualizationFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/VisualizationFunctions.R b/R/VisualizationFunctions.R index 476880a7..b6f628ad 100644 --- a/R/VisualizationFunctions.R +++ b/R/VisualizationFunctions.R @@ -267,7 +267,7 @@ heatmapSectorRanking <- function(model, matrix, indicators, sector_to_remove, N_ p <- ggplot(df, aes(x = factor(Indicator, levels = c("Score", indicators)), y = factor(SectorName, levels = rev(unique(SectorName))), fill = Value)) + - geom_tile(color = "white", size = 0.2) + + geom_tile(color = "black", size = 0.2) + scale_fill_gradient(low = "white", high = "black") + scale_x_discrete(expand = c(0, 0), position = "top") + scale_y_discrete(expand = c(0, 0), labels = function(x) stringr::str_wrap(x, 30)) + From 72afcd51dba2f056a972ae2b558faf1594d6536a Mon Sep 17 00:00:00 2001 From: catherinebirney Date: Mon, 13 Dec 2021 13:40:37 -0500 Subject: [PATCH 249/319] update the water and land FBS to flowsav1.0 to account for methodology changes since v0.3.1 --- inst/extdata/modelspecs/USEEIOv2.0.1.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/extdata/modelspecs/USEEIOv2.0.1.yml b/inst/extdata/modelspecs/USEEIOv2.0.1.yml index ca9b45b4..90173e93 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0.1.yml @@ -16,7 +16,7 @@ SatelliteTable: FullName: "Water withdrawals" Abbreviation: "WAT" StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v0.3.1_f3cdf5b.parquet" + StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v1.0.0_c31cd44.parquet" FileLocation: "DataCommons" DataYears: [2015] Locations: ["US"] @@ -131,7 +131,7 @@ SatelliteTable: FullName: "Land use" Abbreviation: "LAND" StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Land_national_2012_v0.3.1_f3cdf5b.parquet" + StaticFile: "flowsa/FlowBySector/Land_national_2012_v1.0.0_c31cd44.parquet" FileLocation: "DataCommons" DataYears: [2012] Locations: ["US"] From 5a488594a289db82c54e3413f196cfa4150793c4 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Mon, 13 Dec 2021 11:30:47 -0800 Subject: [PATCH 250/319] Update water FBS to m1 in USEEIOv2.1.yml --- inst/extdata/modelspecs/USEEIOv2.1.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/extdata/modelspecs/USEEIOv2.1.yml b/inst/extdata/modelspecs/USEEIOv2.1.yml index 1f55b0c8..d5313851 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1.yml @@ -17,7 +17,7 @@ SatelliteTable: FullName: "Water withdrawals" Abbreviation: "WAT" StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Water_national_2015_m3_v0.4.1_7c5071e.parquet" + StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v1.0.0_c31cd44.parquet" FileLocation: "DataCommons" DataYears: [2015] Locations: ["US"] From f0741326308103f389f038a6f0edad6afa5d7686 Mon Sep 17 00:00:00 2001 From: catherinebirney Date: Mon, 13 Dec 2021 15:35:30 -0500 Subject: [PATCH 251/319] revert national water fbs to m3 for 2.1.yml --- inst/extdata/modelspecs/USEEIOv2.1.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/extdata/modelspecs/USEEIOv2.1.yml b/inst/extdata/modelspecs/USEEIOv2.1.yml index d5313851..1f55b0c8 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1.yml @@ -17,7 +17,7 @@ SatelliteTable: FullName: "Water withdrawals" Abbreviation: "WAT" StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v1.0.0_c31cd44.parquet" + StaticFile: "flowsa/FlowBySector/Water_national_2015_m3_v0.4.1_7c5071e.parquet" FileLocation: "DataCommons" DataYears: [2015] Locations: ["US"] From a70780de8fbd9ea5ef6d9807663c82f1889b4a25 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 14 Dec 2021 15:31:41 -0800 Subject: [PATCH 252/319] Import in Domestic Use -> 0 --- R/IOFunctions.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/IOFunctions.R b/R/IOFunctions.R index e2df7050..c4490966 100644 --- a/R/IOFunctions.R +++ b/R/IOFunctions.R @@ -183,6 +183,8 @@ generateDomesticUse <- function(Use, specs) { } # Subtract Import from Use DomesticUse <- Use - Import[rownames(Use), colnames(Use)] + # Adjust Import column in DomesticUse to 0 + DomesticUse[, getVectorOfCodes(specs$BaseIOSchema, specs$BaseIOLevel, "Import")] <- 0 return(DomesticUse) } From 3a0cdccb2cec86bfc7719beca11fad0d2a2c6ee8 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Wed, 15 Dec 2021 10:17:11 -0800 Subject: [PATCH 253/319] Add doc about adjusting Import in DomesticUse to 0 --- R/IOFunctions.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/IOFunctions.R b/R/IOFunctions.R index c4490966..ec0a91ea 100644 --- a/R/IOFunctions.R +++ b/R/IOFunctions.R @@ -183,7 +183,9 @@ generateDomesticUse <- function(Use, specs) { } # Subtract Import from Use DomesticUse <- Use - Import[rownames(Use), colnames(Use)] - # Adjust Import column in DomesticUse to 0 + # Adjust Import column in DomesticUse to 0. + # Note: the original values in Import column are essentially the International Trade Adjustment + # that are reserved and added as an additional column (F050/F05000) in DomesticUse. DomesticUse[, getVectorOfCodes(specs$BaseIOSchema, specs$BaseIOLevel, "Import")] <- 0 return(DomesticUse) } From e13d28df4d8b924d74132c371f6c465a1066d617 Mon Sep 17 00:00:00 2001 From: Ben Young <44471635+bl-young@users.noreply.github.com> Date: Wed, 15 Dec 2021 13:41:31 -0500 Subject: [PATCH 254/319] Update R-CMD-check.yaml remove 2.1 from github actions, add summary model (w/disagg) and industry model (without disagg) --- .github/workflows/R-CMD-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 5e3d525c..66b476b1 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -64,7 +64,7 @@ jobs: run: | require(devtools) devtools::load_all() - for (modelname in c("USEEIOv2.0", "USEEIOv2.0.1", "USEEIOv2.1")) { + for (modelname in c("USEEIOv2.0", "USEEIOv2.0i-GHG_nodisagg", "USEEIOv2.0s-GHG", "USEEIOv2.0.1")) { m <- useeior::buildModel(modelname) print("-----") From aa39236b1eb62ee3686471c3a136b4c2dc1e64dd Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 15 Dec 2021 14:29:30 -0500 Subject: [PATCH 255/319] Fixed issue with disaggregateInternationalTradeAdjustement function for 'USEEIOv2.0s-GHG' summary level model --- R/DisaggregateFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/DisaggregateFunctions.R b/R/DisaggregateFunctions.R index e6ecb38c..dd7f2d7b 100644 --- a/R/DisaggregateFunctions.R +++ b/R/DisaggregateFunctions.R @@ -159,7 +159,7 @@ disaggregateInternationalTradeAdjustment <- function(model, disagg, ratios = NUL originalInternationalTradeAdjustment <- model$InternationalTradeAdjustment originalNameList <- names(model$InternationalTradeAdjustment) # Get names from named vector - codeLength <- nchar(gsub("/.*", "", disagg$DisaggregatedSectorCodes[1])) # Calculate code length (needed for summary vs. detail level code lengths) + codeLength <- nchar(gsub("/.*", "", disagg$OriginalSectorCode)) # Calculate code length (needed for summary vs. detail level code lengths) originalIndex <- which(originalNameList == substr(disagg$OriginalSectorCode, 1, codeLength)) # Get row index of the original aggregate sector in the object originalRow <- model$InternationalTradeAdjustment[originalIndex] # Copy row containing the Margins information for the original aggregate sector disaggInternationalTradeAdjustment <- rep(originalRow,length(disagg$DisaggregatedSectorCodes)) # Replicate the original a number of times equal to the number of disaggregate sectors From e84e1e165acb36b2612cf52d0e8bbf4b725e59b4 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 15 Dec 2021 14:37:14 -0500 Subject: [PATCH 256/319] separate each model as a new step in gh actions to enable testing of all models using `fail-fast: false` requires new function `printValidationResults` for brevity --- .github/workflows/R-CMD-check.yaml | 79 +++++++++++++++--------------- R/ValidateModel.R | 39 +++++++++++++++ man/printValidationResults.Rd | 14 ++++++ 3 files changed, 93 insertions(+), 39 deletions(-) create mode 100644 man/printValidationResults.Rd diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 66b476b1..ae73571c 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -60,53 +60,54 @@ jobs: - uses: r-lib/actions/check-r-package@v1 - - name: Build and validate models + - name: Build and validate models - USEEIOv2.0 run: | require(devtools) devtools::load_all() - for (modelname in c("USEEIOv2.0", "USEEIOv2.0i-GHG_nodisagg", "USEEIOv2.0s-GHG", "USEEIOv2.0.1")) { + modelname <- "USEEIOv2.0" m <- useeior::buildModel(modelname) - print("-----") print(paste("Validation for ", modelname)) - print("Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production") - econval <- compareOutputandLeontiefXDemand(m, tolerance = 0.01) - print(paste("Number of sectors passing:",econval$N_Pass)) - print(paste("Number of sectors failing:",econval$N_Fail)) - print(paste("Sectors failing:", paste(unique(econval$Failure$rownames), collapse = ", "))) - - print("Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production") - econval <- compareOutputandLeontiefXDemand(m,use_domestic=TRUE, tolerance = 0.01) - print(paste("Number of sectors passing:",econval$N_Pass)) - print(paste("Number of sectors failing:",econval$N_Fail)) - print(paste("Sectors failing:", paste(unique(econval$Failure$rownames), collapse = ", "))) - - print("Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production") - modelval <- compareEandLCIResult(m, tolerance = 0.01) - print(paste("Number of flow totals by commodity passing:",modelval$N_Pass)) - print(paste("Number of flow totals by commodity failing:",modelval$N_Fail)) - - print("Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production") - dom_val <- compareEandLCIResult(m, use_domestic=TRUE, tolerance = 0.01) - print(paste("Number of flow totals by commodity passing:",dom_val$N_Pass)) - print(paste("Number of flow totals by commodity failing:",dom_val$N_Fail)) - print(paste("Sectors with flow totals failing:", paste(unique(dom_val$Failure$variable), collapse = ", "))) - - print("Validate that commodity output are properly transformed to industry output via MarketShare") - q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(m, tolerance = 0.01) - print(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass)) - print(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) - print(paste("Sectors with flow totals failing:", paste(unique(q_x_val$Failure$rownames), collapse = ", "))) - - print("Validate that commodity output equals to domestic use plus production demand") - q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(m, tolerance = 0.01) - print(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) - print(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) - print(paste("Sectors with flow totals failing:", paste(unique(q_val$Failure$rownames), collapse = ", "))) + printValidationResults(m) + + shell: Rscript {0} + + - name: Build and validate models - USEEIOv2.0 industry model + run: | + require(devtools) + devtools::load_all() + modelname <- "USEEIOv2.0i-GHG_nodisagg" + m <- useeior::buildModel(modelname) + print("-----") + print(paste("Validation for ", modelname)) + printValidationResults(m) + + shell: Rscript {0} + + - name: Build and validate models - USEEIOv2.0 summary model + run: | + require(devtools) + devtools::load_all() + modelname <- "USEEIOv2.0s-GHG" + m <- useeior::buildModel(modelname) + print("-----") + print(paste("Validation for ", modelname)) + printValidationResults(m) + + shell: Rscript {0} + + - name: Build and validate models - USEEIOv2.0.1 + run: | + require(devtools) + devtools::load_all() + modelname <- "USEEIOv2.0.1" + m <- useeior::buildModel(modelname) print("-----") - } + print(paste("Validation for ", modelname)) + printValidationResults(m) + shell: Rscript {0} - + #- name: Show testthat output # if: always() # step will run even if previous steps fail # run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true diff --git a/R/ValidateModel.R b/R/ValidateModel.R index 7bab5336..12e8fd11 100644 --- a/R/ValidateModel.R +++ b/R/ValidateModel.R @@ -269,3 +269,42 @@ checkNamesandOrdering <- function(n1, n2, note) { stop(paste(note, "not the same or not in the same order.")) } } + +#' Run validation checks and print to console +#' @param model A complete EEIO model: a list with USEEIO model components and attributes +printValidationResults <- function(model) { + print("Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production") + econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01) + print(paste("Number of sectors passing:",econval$N_Pass)) + print(paste("Number of sectors failing:",econval$N_Fail)) + print(paste("Sectors failing:", paste(unique(econval$Failure$rownames), collapse = ", "))) + + print("Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production") + econval <- compareOutputandLeontiefXDemand(model, use_domestic=TRUE, tolerance = 0.01) + print(paste("Number of sectors passing:",econval$N_Pass)) + print(paste("Number of sectors failing:",econval$N_Fail)) + print(paste("Sectors failing:", paste(unique(econval$Failure$rownames), collapse = ", "))) + + print("Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production") + modelval <- compareEandLCIResult(model, tolerance = 0.01) + print(paste("Number of flow totals by commodity passing:",modelval$N_Pass)) + print(paste("Number of flow totals by commodity failing:",modelval$N_Fail)) + + print("Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production") + dom_val <- compareEandLCIResult(model, use_domestic=TRUE, tolerance = 0.01) + print(paste("Number of flow totals by commodity passing:",dom_val$N_Pass)) + print(paste("Number of flow totals by commodity failing:",dom_val$N_Fail)) + print(paste("Sectors with flow totals failing:", paste(unique(dom_val$Failure$variable), collapse = ", "))) + + print("Validate that commodity output are properly transformed to industry output via MarketShare") + q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01) + print(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass)) + print(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) + print(paste("Sectors with flow totals failing:", paste(unique(q_x_val$Failure$rownames), collapse = ", "))) + + print("Validate that commodity output equals to domestic use plus production demand") + q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01) + print(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) + print(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) + print(paste("Sectors with flow totals failing:", paste(unique(q_val$Failure$rownames), collapse = ", "))) +} diff --git a/man/printValidationResults.Rd b/man/printValidationResults.Rd new file mode 100644 index 00000000..01669129 --- /dev/null +++ b/man/printValidationResults.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ValidateModel.R +\name{printValidationResults} +\alias{printValidationResults} +\title{Run validation checks and print to console} +\usage{ +printValidationResults(model) +} +\arguments{ +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} +} +\description{ +Run validation checks and print to console +} From 17aa4ed103099231a45801d2f0ff710342f41b34 Mon Sep 17 00:00:00 2001 From: Ben Young <44471635+bl-young@users.noreply.github.com> Date: Wed, 15 Dec 2021 14:55:17 -0500 Subject: [PATCH 257/319] Update R-CMD-check.yaml use if: always() to run all models even after a failure --- .github/workflows/R-CMD-check.yaml | 32 +++++++++++------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index ae73571c..2686e062 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -61,50 +61,42 @@ jobs: - uses: r-lib/actions/check-r-package@v1 - name: Build and validate models - USEEIOv2.0 + if: always() run: | require(devtools) devtools::load_all() - modelname <- "USEEIOv2.0" - m <- useeior::buildModel(modelname) - print("-----") - print(paste("Validation for ", modelname)) - printValidationResults(m) + m <- useeior::buildModel("USEEIOv2.0") + useeior::printValidationResults(m) shell: Rscript {0} - name: Build and validate models - USEEIOv2.0 industry model + if: always() run: | require(devtools) devtools::load_all() - modelname <- "USEEIOv2.0i-GHG_nodisagg" - m <- useeior::buildModel(modelname) - print("-----") - print(paste("Validation for ", modelname)) - printValidationResults(m) + m <- useeior::buildModel("USEEIOv2.0i-GHG_nodisagg") + useeior::printValidationResults(m) shell: Rscript {0} - name: Build and validate models - USEEIOv2.0 summary model + if: always() run: | require(devtools) devtools::load_all() - modelname <- "USEEIOv2.0s-GHG" - m <- useeior::buildModel(modelname) - print("-----") - print(paste("Validation for ", modelname)) - printValidationResults(m) + m <- useeior::buildModel("USEEIOv2.0s-GHG") + useeior::printValidationResults(m) shell: Rscript {0} - name: Build and validate models - USEEIOv2.0.1 + if: always() run: | require(devtools) devtools::load_all() - modelname <- "USEEIOv2.0.1" - m <- useeior::buildModel(modelname) - print("-----") - print(paste("Validation for ", modelname)) - printValidationResults(m) + m <- useeior::buildModel("USEEIOv2.0.1") + useeior::printValidationResults(m) shell: Rscript {0} From 6f29af5ec1a65cddd8a9bb6f9d61a11b6fd96cb0 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 15 Dec 2021 12:30:06 -0800 Subject: [PATCH 258/319] Convert model$mu to numeric vector format for industry models, relates to issue #190 --- R/DemandFunctions.R | 3 ++- R/LoadIOTables.R | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/R/DemandFunctions.R b/R/DemandFunctions.R index f12d518f..aab3f83e 100644 --- a/R/DemandFunctions.R +++ b/R/DemandFunctions.R @@ -66,7 +66,8 @@ prepareDomesticProductionDemand <- function(model) { y_d_c <- sumforConsumption(model, model$DomesticFinalDemand) y_d_e <- sumDemandCols(model$DomesticFinalDemand, export_code) y_d_delta <- sumDemandCols(model$DomesticFinalDemand, changeinventories_code) - y_d_p <- y_d_c + y_d_e + y_d_delta + model$InternationalTradeAdjustment + mu <- model$InternationalTradeAdjustment + y_d_p <- y_d_c + y_d_e + y_d_delta + mu return(y_d_p) } diff --git a/R/LoadIOTables.R b/R/LoadIOTables.R index 79b2b22f..9f66ae97 100644 --- a/R/LoadIOTables.R +++ b/R/LoadIOTables.R @@ -130,7 +130,7 @@ loadNationalIOData <- function(model) { model$InternationalTradeAdjustmentbyCommodity <- model$InternationalTradeAdjustment model$FinalDemand <- transformFinalDemandwithMarketShares(model$FinalDemand, model) model$DomesticFinalDemand <- transformFinalDemandwithMarketShares(model$DomesticFinalDemand, model) - model$InternationalTradeAdjustment <- transformFinalDemandwithMarketShares(model$InternationalTradeAdjustment, model) + model$InternationalTradeAdjustment <- unlist(transformFinalDemandwithMarketShares(model$InternationalTradeAdjustment, model)) } # Add Margins table From 68c60bca53c843b37484016146ff0fc33e257d64 Mon Sep 17 00:00:00 2001 From: Ben Young <44471635+bl-young@users.noreply.github.com> Date: Wed, 15 Dec 2021 17:22:20 -0500 Subject: [PATCH 259/319] `compareCommodityOutputandDomesticUsePlusProductionDemand` only for commodity models Co-authored-by: Mo Li --- R/ValidateModel.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/ValidateModel.R b/R/ValidateModel.R index 12e8fd11..a02b325e 100644 --- a/R/ValidateModel.R +++ b/R/ValidateModel.R @@ -302,9 +302,11 @@ printValidationResults <- function(model) { print(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) print(paste("Sectors with flow totals failing:", paste(unique(q_x_val$Failure$rownames), collapse = ", "))) +if (model$specs$CommodityorIndustryType=="Commodity") { print("Validate that commodity output equals to domestic use plus production demand") q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01) print(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) print(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) print(paste("Sectors with flow totals failing:", paste(unique(q_val$Failure$rownames), collapse = ", "))) } +} From 0e05584867743fbfdade9a013ad28fa78426912c Mon Sep 17 00:00:00 2001 From: Ben Young <44471635+bl-young@users.noreply.github.com> Date: Wed, 15 Dec 2021 18:31:21 -0500 Subject: [PATCH 260/319] fix link in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 05d3b3d8..992b0350 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # useeior [![R CI/CD test](https://github.com/USEPA/useeior/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/USEPA/useeior/actions/workflows/R-CMD-check.yaml) -`useeior` is an R package for building and using [USEEIO models](https://www.epa.gov/land-research/us-environmentally-extended-input-output-useeio-models). The [model object](format_specs/Model.md) is the primary output that is built according to a given [model specification](format_specs/ModelSpecification.md) and optional [disaggregation specification](format_specs/DisaggregationSpecification.md). [Model specifications](inst/extdata/modelspecs) and associated [disaggregation specifications](inst/extdata/disaggspecs) for EPA-validated models are included in the package. The package offers various functions for validating, calculating, visualizing, and writing out models and/or their components. `useeior` is a core component of the [USEEIO Modeling Framework](https://github.com/USEPA/useeio). +`useeior` is an R package for building and using [USEEIO models](https://www.epa.gov/land-research/us-environmentally-extended-input-output-useeio-models). The [model object](format_specs/Model.md) is the primary output that is built according to a given [model specification](format_specs/ModelSpecification.md) and optional [disaggregation specification](format_specs/DisaggregationAndAggregationSpecification.md). [Model specifications](inst/extdata/modelspecs) and associated [disaggregation specifications](inst/extdata/disaggspecs) for EPA-validated models are included in the package. The package offers various functions for validating, calculating, visualizing, and writing out models and/or their components. `useeior` is a core component of the [USEEIO Modeling Framework](https://github.com/USEPA/useeio). `useeior` is in a stable development state. Users intending to use the package for production purposes and applications should use [Releases](https://github.com/USEPA/useeior/releases). From 35eb0dbc3b54b4cc4b7b80e1b021243962764b8c Mon Sep 17 00:00:00 2001 From: Mo Li Date: Wed, 15 Dec 2021 15:32:37 -0800 Subject: [PATCH 261/319] Create README.md Install useeior@v0.4 -> useeior@v1.0. Build USEEIOv2.0 -> USEEIOv2.0.1. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 992b0350..3736299d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # useeior [![R CI/CD test](https://github.com/USEPA/useeior/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/USEPA/useeior/actions/workflows/R-CMD-check.yaml) -`useeior` is an R package for building and using [USEEIO models](https://www.epa.gov/land-research/us-environmentally-extended-input-output-useeio-models). The [model object](format_specs/Model.md) is the primary output that is built according to a given [model specification](format_specs/ModelSpecification.md) and optional [disaggregation specification](format_specs/DisaggregationAndAggregationSpecification.md). [Model specifications](inst/extdata/modelspecs) and associated [disaggregation specifications](inst/extdata/disaggspecs) for EPA-validated models are included in the package. The package offers various functions for validating, calculating, visualizing, and writing out models and/or their components. `useeior` is a core component of the [USEEIO Modeling Framework](https://github.com/USEPA/useeio). +`useeior` is an R package for building and using [USEEIO models](https://www.epa.gov/land-research/us-environmentally-extended-input-output-useeio-models). The [model object](format_specs/Model.md) is the primary output that is built according to a given [model specification](format_specs/ModelSpecification.md) and optional [disaggregation specification](format_specs/DisaggregationSpecification.md). [Model specifications](inst/extdata/modelspecs) and associated [disaggregation specifications](inst/extdata/disaggspecs) for EPA-validated models are included in the package. The package offers various functions for validating, calculating, visualizing, and writing out models and/or their components. `useeior` is a core component of the [USEEIO Modeling Framework](https://github.com/USEPA/useeio). `useeior` is in a stable development state. Users intending to use the package for production purposes and applications should use [Releases](https://github.com/USEPA/useeior/releases). @@ -15,8 +15,8 @@ devtools::install_github("USEPA/useeior") ``` ``` -# Install a previously released version (e.g. v0.4) from GitHub -devtools::install_github("USEPA/useeior@v0.4") +# Install a previously released version (e.g. v1.0) from GitHub +devtools::install_github("USEPA/useeior@v1.0") ``` See [Releases](https://github.com/USEPA/useeior/releases) for all previously realeased versions. @@ -31,10 +31,10 @@ View all models with existing config files that can be built using useeior useeior::seeAvailableModels() ``` -Build a model available in useeior (e.g. USEEIOv2.0) +Build a model that is available in useeior (e.g. the latest USEEIOv2.0.1 model) ``` -model <- useeior::buildModel('USEEIOv2.0') +model <- useeior::buildModel('USEEIOv2.0.1') ``` To build a customized model, refer to [Advanced Uses](https://github.com/USEPA/useeior/wiki/Using-useeior#advanced-uses) in Wiki. From eb12b630b1df02c08e30cfc9ec7c10e1a9a1749c Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 15 Dec 2021 15:42:23 -0800 Subject: [PATCH 262/319] Create BaseIOLevel anchor and alias in model yml for easier reuse --- inst/extdata/modelspecs/USEEIOv2.0.1.yml | 4 ++-- inst/extdata/modelspecs/USEEIOv2.0.yml | 4 ++-- inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml | 4 ++-- inst/extdata/modelspecs/USEEIOv2.1.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/inst/extdata/modelspecs/USEEIOv2.0.1.yml b/inst/extdata/modelspecs/USEEIOv2.0.1.yml index 90173e93..5689fc07 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0.1.yml @@ -1,6 +1,6 @@ Model: "USEEIOv2.0.1" BaseIOSchema: 2012 -BaseIOLevel: "Detail" +BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data ModelRegionAcronyms: ["US"] ModelType: "EEIO" @@ -398,7 +398,7 @@ SatelliteTable: Locations: ["US"] SectorListSource: "BEA" SectorListYear: 2012 - SectorListLevel: "Detail" + SectorListLevel: *BaseIOLevel OriginalFlowSource: "Input-Output Tables" ScriptFunctionCall: "getValueAddedTotalsbySector" #function to call for script ScriptFunctionParameters: ["model"] #list of parameters diff --git a/inst/extdata/modelspecs/USEEIOv2.0.yml b/inst/extdata/modelspecs/USEEIOv2.0.yml index a7d34e5f..9ed81afe 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0.yml @@ -1,6 +1,6 @@ Model: "USEEIOv2.0" BaseIOSchema: 2012 -BaseIOLevel: "Detail" +BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data ModelRegionAcronyms: ["US"] ModelType: "EEIO" @@ -398,7 +398,7 @@ SatelliteTable: Locations: ["US"] SectorListSource: "BEA" SectorListYear: 2012 - SectorListLevel: "Detail" + SectorListLevel: *BaseIOLevel OriginalFlowSource: "Input-Output Tables" ScriptFunctionCall: "getValueAddedTotalsbySector" #function to call for script ScriptFunctionParameters: ["model"] #list of parameters diff --git a/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml index 037f177d..e4b3a1bc 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml @@ -1,6 +1,6 @@ Model: "USEEIOv2.0_nodisagg" BaseIOSchema: 2012 -BaseIOLevel: "Detail" +BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data ModelRegionAcronyms: ["US"] ModelType: "EEIO" @@ -398,7 +398,7 @@ SatelliteTable: Locations: ["US"] SectorListSource: "BEA" SectorListYear: 2012 - SectorListLevel: "Detail" + SectorListLevel: *BaseIOLevel OriginalFlowSource: "Input-Output Tables" ScriptFunctionCall: "getValueAddedTotalsbySector" #function to call for script ScriptFunctionParameters: ["model"] #list of parameters diff --git a/inst/extdata/modelspecs/USEEIOv2.1.yml b/inst/extdata/modelspecs/USEEIOv2.1.yml index 1f55b0c8..f4783d10 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1.yml @@ -1,6 +1,6 @@ Model: "USEEIOv2.1" BaseIOSchema: 2012 -BaseIOLevel: "Detail" +BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data ModelRegionAcronyms: ["US"] ModelType: "EEIO" @@ -399,7 +399,7 @@ SatelliteTable: Locations: ["US"] SectorListSource: "BEA" SectorListYear: 2012 - SectorListLevel: "Detail" + SectorListLevel: *BaseIOLevel OriginalFlowSource: "Input-Output Tables" ScriptFunctionCall: "getValueAddedTotalsbySector" #function to call for script ScriptFunctionParameters: ["model"] #list of parameters From 8170f06da30a9982dcbcf945623b2ecd6f407e7a Mon Sep 17 00:00:00 2001 From: Mo Li Date: Fri, 17 Dec 2021 14:15:08 -0800 Subject: [PATCH 263/319] Add general hybridization in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3736299d..6d1788d5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # useeior [![R CI/CD test](https://github.com/USEPA/useeior/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/USEPA/useeior/actions/workflows/R-CMD-check.yaml) -`useeior` is an R package for building and using [USEEIO models](https://www.epa.gov/land-research/us-environmentally-extended-input-output-useeio-models). The [model object](format_specs/Model.md) is the primary output that is built according to a given [model specification](format_specs/ModelSpecification.md) and optional [disaggregation specification](format_specs/DisaggregationSpecification.md). [Model specifications](inst/extdata/modelspecs) and associated [disaggregation specifications](inst/extdata/disaggspecs) for EPA-validated models are included in the package. The package offers various functions for validating, calculating, visualizing, and writing out models and/or their components. `useeior` is a core component of the [USEEIO Modeling Framework](https://github.com/USEPA/useeio). +`useeior` is an R package for building and using [USEEIO models](https://www.epa.gov/land-research/us-environmentally-extended-input-output-useeio-models). The [model object](format_specs/Model.md) is the primary output that is built according to a given [model specification](format_specs/ModelSpecification.md) and optional hybridization specification, e.g. [disaggregation](format_specs/DisaggregationAndAggregationSpecification.md). [Model specifications](inst/extdata/modelspecs) and associated hybridization specifications, e.g. [disaggregation](inst/extdata/disaggspecs), for EPA-validated models are included in the package. The package offers various functions for validating, calculating, visualizing, and writing out models and/or their components. `useeior` is a core component of the [USEEIO Modeling Framework](https://github.com/USEPA/useeio). `useeior` is in a stable development state. Users intending to use the package for production purposes and applications should use [Releases](https://github.com/USEPA/useeior/releases). From 61563fee87918e3b54468061146f1e12a8c3dc22 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Mon, 20 Dec 2021 16:21:09 -0800 Subject: [PATCH 264/319] Update README.md Add validation examples for USEEIOv2.0.1 --- README.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d1788d5..16c1bf3c 100644 --- a/README.md +++ b/README.md @@ -75,9 +75,34 @@ Write model matrices as `.csv` files to a given output folder. useeior::writeModelMatrices(model, to_format = "csv", outputfolder) ``` -### Validate and Visualize Model +### Validate Model (examples) + +Validate that flow totals by commodity `E_c` can be recalculated (within 1%) using the model satellite matrix `B`, market shares matrix `V_n`, total requirements matrix `L`, and demand vector `y` for US production. + +``` +> modelval <- compareEandLCIResult(model, tolerance = 0.01) +> print(paste("Number of flow totals by commodity passing:", modelval$N_Pass)) +[1] "Number of flow totals by commodity passing: 1118742" +> print(paste("Number of flow totals by commodity failing:", modelval$N_Fail)) +[1] "Number of flow totals by commodity failing: 0" +``` + +Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix `L` and demand vector `y` for US production. + +``` +> econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01) +> print(paste("Number of sectors passing:",econval$N_Pass)) +[1] "Number of sectors passing: 409" +> print(paste("Number of sectors failing:",econval$N_Fail)) +[1] "Number of sectors failing: 2" +> print(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +[1] "Sectors failing: S00402/US, S00300/US" +``` +Note: `S00402/US - Used and secondhand goods` and `S00300/US - Noncomparable imports` are two commodities that are not produced by any industry in the US, therefore their commodity output naturally cannot recalculated with the model total requirements matrix `L` and demand vector `y` for US production. + + +### Visualize Model Results -Once a model is built, model results can be validated, exported, and visualized for further applications. A complete list of available functions for calculating, validating, exporting and visualizing model can be found [here](https://github.com/USEPA/useeior/wiki/Using-useeior#calculate-validate-export-visualize-model) in the Wiki. From d4d4f0251d43255cb5c568386506c4f4c6be7879 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 20 Dec 2021 16:29:41 -0800 Subject: [PATCH 265/319] Add Example.Rmd in inst/doc; add example figure (as lfs object) in inst/img; update .Rbuildignore; add .gitattributes --- .Rbuildignore | 1 + .gitattributes | 1 + inst/doc/Example.Rmd | 137 ++++++++++++++++++ .../ranking_direct_prod_final_cons_v2.0.1.png | 3 + 4 files changed, 142 insertions(+) create mode 100644 .gitattributes create mode 100644 inst/doc/Example.Rmd create mode 100644 inst/img/ranking_direct_prod_final_cons_v2.0.1.png diff --git a/.Rbuildignore b/.Rbuildignore index 9d6b7ea2..fbb29ab9 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,4 +4,5 @@ ^build-scripts$ ^examples$ ^inst/doc$ +^inst/img$ ^\.github$ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..24a8e879 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.png filter=lfs diff=lfs merge=lfs -text diff --git a/inst/doc/Example.Rmd b/inst/doc/Example.Rmd new file mode 100644 index 00000000..d5d8265b --- /dev/null +++ b/inst/doc/Example.Rmd @@ -0,0 +1,137 @@ +--- +title: "useeior Example" +output: + html_document: + df_print: paged +--- + +```{r setup, include=FALSE} +knitr::knit_hooks$set(optipng = knitr::hook_optipng) +knitr::opts_chunk$set(echo = FALSE, + warning = FALSE, + message = FALSE, + fig.width = 14, + fig.height = 7, + fig.path = "../img/", + optipng = "-o1 -quiet", + fig.process = function(x) { + x2 = sub('-\\d+([.][a-z]+)$', '\\1', x) + if (file.rename(x, x2)) x2 else x + }) +library(useeior) +``` + +# Build Model + +```{r include=FALSE} +model <- buildModel("USEEIOv2.0.1") +``` + +# Validation + +Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production +```{r} +modelval <- compareEandLCIResult(model, tolerance = 0.01) +print(paste("Number of flow totals by commodity passing:", modelval$N_Pass)) +print(paste("Number of flow totals by commodity failing:", modelval$N_Fail)) +``` + +Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production +```{r} +econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01) +print(paste("Number of sectors passing:",econval$N_Pass)) +print(paste("Number of sectors failing:",econval$N_Fail)) +print(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +``` + +# Visualization +```{r include=FALSE} +result <- c(useeior::calculateEEIOModel(model, perspective = 'DIRECT', demand = "Production"), + useeior::calculateEEIOModel(model, perspective = 'FINAL', demand = "Consumption")) +colnames(result$LCIA_d) <- model$Indicators$meta[match(colnames(result$LCIA_d), model$Indicators$meta$Name), "Code"] +colnames(result$LCIA_f) <- colnames(result$LCIA_d) +indicators <- c("ACID", "CCDD", "CMSW", "CRHW", "ENRG", "ETOX", "EUTR", "GHG", + "HRSP", "HTOX", "LAND", "MNRL", "OZON", "SMOG", "WATR") +model_list <- list("USEEIOv2.0.1" = model) +``` + +```{r "ranking_direct_prod_final_cons_v2.0.1", fig.width = 20, fig.height = 12} +p1 <- heatmapSectorRanking(model, matrix = result$LCIA_d, indicators, + sector_to_remove = "", N_sector = 20, x_title = "US production demand & direct perspective") +p2 <- heatmapSectorRanking(model, matrix = result$LCIA_f, indicators, + sector_to_remove = "", N_sector = 20, x_title = "US consumption demand & final perspective") +gridExtra::grid.arrange(p1, p2, nrow = 1) +``` + +```{r "N_v2.0.1", echo=FALSE, fig.width = 35, fig.height = 50} +coeffs <- c("Acidification Potential", "Greenhouse Gases", "Freshwater withdrawals") +plotMatrixCoefficient(model_list, matrix_name = "N", coefficient_name = coeffs, sector_to_remove = "", y_title = coeffs, y_label = "Name") +``` + +```{r "domestic_proportion_impact_USconsumption_v2.0.1", include=FALSE, fig.height = 12, fig.width = 12} +fullcons <- calculateEEIOModel(model, perspective = "DIRECT", demand = "Consumption", use_domestic_requirements = FALSE) +domcons <- calculateEEIOModel(model, perspective = "DIRECT", demand = "Consumption", use_domestic_requirements = TRUE) +barplotFloworImpactFractionbyRegion(R1_calc_result = domcons$LCIA_d, Total_calc_result = fullcons$LCIA_d, x_title = "") +``` + +```{r "indicator_score_v2.0.1", fig.height = 12, fig.width = 12} +barplotIndicatorScoresbySector(model_list, totals_by_sector_name = "GHG", indicator_name = "Greenhouse Gases", sector = FALSE, y_title = "Greenhouse Gases") +``` + +# Contribution Analysis + +Flow contribution to Acidification Potential in Electricity (221100) +```{r echo=FALSE, warning=FALSE} +ACID_elec <- calculateFlowContributiontoImpact(model, "221100/US", "Acidification Potential") +ACID_elec$contribution <- scales::percent(ACID_elec$contribution, accuracy = 0.1) +head(subset(ACID_elec, TRUE, select = "contribution")) +``` + +Flow contribution to Smog Formation Potential in Electricity (221100) +```{r echo=FALSE, warning=FALSE} +SMOG_elec <- calculateFlowContributiontoImpact(model, "221100/US", "Smog Formation Potential") +SMOG_elec$contribution <- scales::percent(SMOG_elec$contribution, accuracy = 0.1) +head(subset(SMOG_elec, TRUE, select = "contribution")) +``` + +Flow contribution to Smog Formation Potential in Wheat, corn, rice, and other grains (1111B0) +```{r echo=FALSE, warning=FALSE} +SMOG_wheat <- calculateFlowContributiontoImpact(model, "1111B0/US", "Smog Formation Potential") +SMOG_wheat$contribution <- scales::percent(SMOG_wheat$contribution, accuracy = 0.1) +head(subset(SMOG_wheat, TRUE, select = "contribution")) +``` + +Flow contribution to Human Health - Respiratory Effects in Fresh wheat, corn, rice, and other grains (1111B0) +```{r echo=FALSE, warning=FALSE} +HHRP_wheat <- calculateFlowContributiontoImpact(model, "1111B0/US", "Human Health - Respiratory Effects") +HHRP_wheat$contribution <- scales::percent(HHRP_wheat$contribution, accuracy = 0.1) +head(subset(HHRP_wheat, TRUE, select = "contribution")) +``` + +Flow contribution to Human Health Toxicity in Cement (327310) +```{r echo=FALSE, warning=FALSE} +HTOX_cement <- calculateFlowContributiontoImpact(model, "327310/US", "Human Health Toxicity") +HTOX_cement$contribution <- scales::percent(HTOX_cement$contribution, accuracy = 0.1) +head(subset(HTOX_cement, TRUE, select = "contribution")) +``` + +Flow contribution to Freshwater Ecotoxicity Potential in Fresh vegetables, melons, and potatoes (111200) +```{r echo=FALSE, warning=FALSE} +ETOX_fruits_veggie <-calculateFlowContributiontoImpact(model, "111200/US", "Freshwater Ecotoxicity Potential") +ETOX_fruits_veggie$contribution <- scales::percent(ETOX_fruits_veggie$contribution, accuracy = 0.1) +head(subset(ETOX_fruits_veggie, TRUE, select = "contribution")) +``` + +Sector contribution to Human Health - Respiratory Effects in Flours and malts (311210) +```{r echo=FALSE, warning=FALSE} +HHRP_flour <- calculateSectorContributiontoImpact(model, "311210/US", "Human Health - Respiratory Effects") +HHRP_flour$contribution <- scales::percent(HHRP_flour$contribution, accuracy = 0.1) +head(subset(HHRP_flour, TRUE, select = "contribution")) +``` + +Sector contribution to Land use in Timber and raw forest products (113000) +```{r echo=FALSE, warning=FALSE} +LAND_for <- calculateSectorContributiontoImpact(model, "113000/US", "Land use") +LAND_for$contribution <- scales::percent(LAND_for$contribution, accuracy = 0.1) +head(subset(LAND_for, TRUE, select = "contribution")) +``` diff --git a/inst/img/ranking_direct_prod_final_cons_v2.0.1.png b/inst/img/ranking_direct_prod_final_cons_v2.0.1.png new file mode 100644 index 00000000..70057628 --- /dev/null +++ b/inst/img/ranking_direct_prod_final_cons_v2.0.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ab5b78c504a99347eeb619afb9494d24151cbe29a53108a47b61a78f9b4906d +size 276229 From 0acb42a1e82c96b6cdccc3d23779f07a0fb6c976 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Mon, 20 Dec 2021 16:32:32 -0800 Subject: [PATCH 266/319] Update R-CMD-check.yaml Add **.png, **.Rmd, and .gitattributes under paths-ignore --- .github/workflows/R-CMD-check.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 2686e062..a989fe16 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -9,16 +9,22 @@ on: - '**.md' # prevent md files (e.g., README.md) in any repo dir from trigering workflow - '**.bib' - '**.ya?ml' # captures both .yml and .yaml + - '**.png' + - '**.Rmd' - 'LICENSE' - '.gitignore' + - '.gitattributes' pull_request: branches: [master, develop] paths-ignore: - '**.md' - '**.bib' - '**.ya?ml' + - '**.png' + - '**.Rmd' - 'LICENSE' - '.gitignore' + - '.gitattributes' workflow_dispatch: # also allow manual trigger, for testing purposes jobs: From dfa1ca71880f4ac37e8647ae8374f3a3656c07b9 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 20 Dec 2021 17:02:20 -0800 Subject: [PATCH 267/319] Update ranking plot title --- inst/doc/Example.Rmd | 4 ++-- inst/img/ranking_direct_prod_final_cons_v2.0.1.png | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inst/doc/Example.Rmd b/inst/doc/Example.Rmd index d5d8265b..36dd284b 100644 --- a/inst/doc/Example.Rmd +++ b/inst/doc/Example.Rmd @@ -57,9 +57,9 @@ model_list <- list("USEEIOv2.0.1" = model) ```{r "ranking_direct_prod_final_cons_v2.0.1", fig.width = 20, fig.height = 12} p1 <- heatmapSectorRanking(model, matrix = result$LCIA_d, indicators, - sector_to_remove = "", N_sector = 20, x_title = "US production demand & direct perspective") + sector_to_remove = "", N_sector = 20, x_title = "LCIA_d (DIRECT perspective) & US production demand") p2 <- heatmapSectorRanking(model, matrix = result$LCIA_f, indicators, - sector_to_remove = "", N_sector = 20, x_title = "US consumption demand & final perspective") + sector_to_remove = "", N_sector = 20, x_title = "LCIA_f (FINAL perspective) & US consumption demand") gridExtra::grid.arrange(p1, p2, nrow = 1) ``` diff --git a/inst/img/ranking_direct_prod_final_cons_v2.0.1.png b/inst/img/ranking_direct_prod_final_cons_v2.0.1.png index 70057628..6451710d 100644 --- a/inst/img/ranking_direct_prod_final_cons_v2.0.1.png +++ b/inst/img/ranking_direct_prod_final_cons_v2.0.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6ab5b78c504a99347eeb619afb9494d24151cbe29a53108a47b61a78f9b4906d -size 276229 +oid sha256:24d3d1761d3b9ded47ad802cfa9a5116f831b65a14899f6ee65b137764235849 +size 481220 From ab54243ab092dbf5362d48c1639e516508cfc96e Mon Sep 17 00:00:00 2001 From: Mo Li Date: Mon, 20 Dec 2021 17:11:04 -0800 Subject: [PATCH 268/319] Update README.md Add visualization example for USEEIOv2.0.1 --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 16c1bf3c..f13a70e4 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,37 @@ Note: `S00402/US - Used and secondhand goods` and `S00300/US - Noncomparable imp ### Visualize Model Results +Rank sectors based a composite score of selected total impacts (LCIA_d or LCIA_f) associated with total US demand (US production or consumption vector). +The ranking is an effective means to identify prioritization opportunity in practices like the EPA's [Sustainable Materials Management program](https://www.epa.gov/smm). +Comparing rankings may also be used as another form of model validation that incorporates the demand vectors and the indicators as well as the model result matrices. + +``` +# Calculate model LCIA_d and LCIA_f +result <- c(useeior::calculateEEIOModel(model, perspective = 'DIRECT', demand = "Production"), + useeior::calculateEEIOModel(model, perspective = 'FINAL', demand = "Consumption")) +colnames(result$LCIA_d) <- model$Indicators$meta[match(colnames(result$LCIA_d), + model$Indicators$meta$Name), "Code"] +colnames(result$LCIA_f) <- colnames(result$LCIA_d) +# Define indicators +indicators <- c("ACID", "CCDD", "CMSW", "CRHW", "ENRG", "ETOX", "EUTR", "GHG", + "HRSP", "HTOX", "LAND", "MNRL", "OZON", "SMOG", "WATR") +# Create figure on the left +heatmapSectorRanking(model, + matrix = result$LCIA_d, + indicators, + sector_to_remove = "", + N_sector = 20, + x_title = "LCIA_d (DIRECT perspective) & US production demand") +# Create figure on the right +heatmapSectorRanking(model, + matrix = result$LCIA_f, + indicators, + sector_to_remove = "", + N_sector = 20, + x_title = "LCIA_f (FINAL perspective) & US consumption demand") +``` + +![](https://github.com/USEPA/useeior/blob/develop/inst/img/ranking_direct_prod_final_cons_v2.0.1.png) A complete list of available functions for calculating, validating, exporting and visualizing model can be found [here](https://github.com/USEPA/useeior/wiki/Using-useeior#calculate-validate-export-visualize-model) in the Wiki. From f9daf310414b5ac87a3501a880e929aa522ba66c Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 20 Dec 2021 17:25:50 -0800 Subject: [PATCH 269/319] Add sector name in SectorContributiontoImpact analysis --- R/CalculationFunctions.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 4756b12e..99743f62 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -178,7 +178,12 @@ calculateSectorContributiontoImpact <- function (model, sector, indicator, domes L <- model$L_d } D <- model$D - df <- calculatePercentContributiontoImpact( L[,sector],D[indicator,]) + df <- calculatePercentContributiontoImpact(L[,sector],D[indicator,]) + # Add sector name for easier interpretation of results + rownames(df) <- paste(rownames(df), + model$Commodities[match(rownames(df), + model$Commodities$Code_Loc), "Name"], + sep = " - ") return(df) } From 3a77810a2c0e7bfe503d8aa3c24bf56e781a8d8a Mon Sep 17 00:00:00 2001 From: Mo Li Date: Mon, 20 Dec 2021 17:28:49 -0800 Subject: [PATCH 270/319] Update README.md Add contribution analysis examples for USEEIOv2.0.1 --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index f13a70e4..e7fe0b03 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,36 @@ heatmapSectorRanking(model, ![](https://github.com/USEPA/useeior/blob/develop/inst/img/ranking_direct_prod_final_cons_v2.0.1.png) +### Analyze Flow and Sector Contribution to Impact + +Analyze `flow` contribution to `Acidification Potential` in the `Electricity` sector (`221100/US`). + +``` +> ACID_elec <- calculateFlowContributiontoImpact(model, "221100/US", "Acidification Potential") +> ACID_elec$contribution <- scales::percent(ACID_elec$contribution, accuracy = 0.1) +> head(subset(ACID_elec, TRUE, select = "contribution"), 5) + contribution +Sulfur dioxide/emission/air/kg 57.4% +Nitrogen dioxide/emission/air/kg 39.2% +Ammonia/emission/air/kg 2.3% +Sulfuric acid/emission/air/kg 0.7% +Hydrofluoric acid/emission/air/kg 0.2% +``` + +Analyze `sector` contribution to `Human Health - Respiratory Effects` in the `Flours and malts` sector (`311210/US`). + +``` +> HHRP_flour <- calculateSectorContributiontoImpact(model, "311210/US", "Human Health - Respiratory Effects") +> HHRP_flour$contribution <- scales::percent(HHRP_flour$contribution, accuracy = 0.1) +> head(subset(HHRP_flour, TRUE, select = "contribution"), 5) + contribution +1111B0/US - Fresh wheat, corn, rice, and other grains 90.7% +311210/US - Flours and malts 1.5% +115000/US - Agriculture and forestry support 0.9% +2123A0/US - Sand, gravel, clay, phosphate, other nonmetallic minerals 0.8% +1111A0/US - Fresh soybeans, canola, flaxseeds, and other oilseeds 0.8% +``` + A complete list of available functions for calculating, validating, exporting and visualizing model can be found [here](https://github.com/USEPA/useeior/wiki/Using-useeior#calculate-validate-export-visualize-model) in the Wiki. ## Disclaimer From b6130acc01257963eb14fdcf59ddb1ffd5bca11e Mon Sep 17 00:00:00 2001 From: Mo Li Date: Mon, 20 Dec 2021 17:32:47 -0800 Subject: [PATCH 271/319] Add useeior:: in README --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index e7fe0b03..f685c5cc 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ useeior::writeModelMatrices(model, to_format = "csv", outputfolder) Validate that flow totals by commodity `E_c` can be recalculated (within 1%) using the model satellite matrix `B`, market shares matrix `V_n`, total requirements matrix `L`, and demand vector `y` for US production. ``` -> modelval <- compareEandLCIResult(model, tolerance = 0.01) +> modelval <- useeior::compareEandLCIResult(model, tolerance = 0.01) > print(paste("Number of flow totals by commodity passing:", modelval$N_Pass)) [1] "Number of flow totals by commodity passing: 1118742" > print(paste("Number of flow totals by commodity failing:", modelval$N_Fail)) @@ -90,7 +90,7 @@ Validate that flow totals by commodity `E_c` can be recalculated (within 1%) usi Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix `L` and demand vector `y` for US production. ``` -> econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01) +> econval <- useeior::compareOutputandLeontiefXDemand(model, tolerance = 0.01) > print(paste("Number of sectors passing:",econval$N_Pass)) [1] "Number of sectors passing: 409" > print(paste("Number of sectors failing:",econval$N_Fail)) @@ -118,19 +118,19 @@ colnames(result$LCIA_f) <- colnames(result$LCIA_d) indicators <- c("ACID", "CCDD", "CMSW", "CRHW", "ENRG", "ETOX", "EUTR", "GHG", "HRSP", "HTOX", "LAND", "MNRL", "OZON", "SMOG", "WATR") # Create figure on the left -heatmapSectorRanking(model, - matrix = result$LCIA_d, - indicators, - sector_to_remove = "", - N_sector = 20, - x_title = "LCIA_d (DIRECT perspective) & US production demand") +useeior::heatmapSectorRanking(model, + matrix = result$LCIA_d, + indicators, + sector_to_remove = "", + N_sector = 20, + x_title = "LCIA_d (DIRECT perspective) & US production demand") # Create figure on the right -heatmapSectorRanking(model, - matrix = result$LCIA_f, - indicators, - sector_to_remove = "", - N_sector = 20, - x_title = "LCIA_f (FINAL perspective) & US consumption demand") +useeior::heatmapSectorRanking(model, + matrix = result$LCIA_f, + indicators, + sector_to_remove = "", + N_sector = 20, + x_title = "LCIA_f (FINAL perspective) & US consumption demand") ``` ![](https://github.com/USEPA/useeior/blob/develop/inst/img/ranking_direct_prod_final_cons_v2.0.1.png) @@ -140,7 +140,7 @@ heatmapSectorRanking(model, Analyze `flow` contribution to `Acidification Potential` in the `Electricity` sector (`221100/US`). ``` -> ACID_elec <- calculateFlowContributiontoImpact(model, "221100/US", "Acidification Potential") +> ACID_elec <- useeior::calculateFlowContributiontoImpact(model, "221100/US", "Acidification Potential") > ACID_elec$contribution <- scales::percent(ACID_elec$contribution, accuracy = 0.1) > head(subset(ACID_elec, TRUE, select = "contribution"), 5) contribution @@ -154,7 +154,7 @@ Hydrofluoric acid/emission/air/kg 0.2% Analyze `sector` contribution to `Human Health - Respiratory Effects` in the `Flours and malts` sector (`311210/US`). ``` -> HHRP_flour <- calculateSectorContributiontoImpact(model, "311210/US", "Human Health - Respiratory Effects") +> HHRP_flour <- useeior::calculateSectorContributiontoImpact(model, "311210/US", "Human Health - Respiratory Effects") > HHRP_flour$contribution <- scales::percent(HHRP_flour$contribution, accuracy = 0.1) > head(subset(HHRP_flour, TRUE, select = "contribution"), 5) contribution From e0860d4e4bb0f0d29585996b9c22fa9bb613111f Mon Sep 17 00:00:00 2001 From: catherinebirney Date: Tue, 21 Dec 2021 14:09:22 -0500 Subject: [PATCH 272/319] change line color to red --- R/VisualizationFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/VisualizationFunctions.R b/R/VisualizationFunctions.R index b6f628ad..839875c0 100644 --- a/R/VisualizationFunctions.R +++ b/R/VisualizationFunctions.R @@ -75,7 +75,7 @@ plotMatrixCoefficient <- function(model_list, matrix_name, coefficient_name, sec p <- ggplot(df, aes(x = factor(x, levels = rev(unique(x))), y = Value, shape = as.character(modelname))) if (length(model_list)>1) { - p <- p + geom_line(aes(group = x)) + p <- p + geom_line(aes(group = x), color='red') } p <- p + geom_point(aes(color = GroupName), size = 3) + scale_shape_manual(values = c(0:(length(unique(df$modelname))-1))) + From 09708d5901ef51cf7cc373ac5833841dfe41ba76 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Wed, 22 Dec 2021 08:56:55 -0800 Subject: [PATCH 273/319] Delete examples directory --- examples/USEEIO2s-GHG.R | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 examples/USEEIO2s-GHG.R diff --git a/examples/USEEIO2s-GHG.R b/examples/USEEIO2s-GHG.R deleted file mode 100644 index 31746090..00000000 --- a/examples/USEEIO2s-GHG.R +++ /dev/null @@ -1,25 +0,0 @@ -# Example for running useeior, see https://github.com/USEPA/useeior for more information on the model -# Must install useeior first to run example. See Wiki @ https://github.com/USEPA/useeior/Wiki for install instructions -# Run ?functionname to see documentation and function input options for the functions in this example - -library(useeior) - -# See all available model names -# explanation of model names can be found at https://github.com/USEPA/USEEIO/blob/master/VersioningScheme.md -seeAvailableModels() - -# Build USEEIO v2.0-GHG -model <- buildModel("USEEIOv2.0s-GHG") - -# Calculate direct perspective life cycle inventory (LCI) result and life cycle impact assessment (LCIA) -# result using total US production -result <- calculateEEIOModel(model, perspective = "DIRECT", demand = "Production") - -# Calculate a sector by sector result matrix for a specified indicator based on one of the demand -# vectors included in the model -y <- model[["DemandVectors"]][["vectors"]][["2012_US_Consumption_Complete"]] -impact_result <- calculateConsumptionContributiontoImpact(y, model, indicator = "Greenhouse Gases") - -# Adjust N matrix (direct + indirect impacts per dollar) to 2018 dollar and purchaser price -N_adj <- adjustResultMatrixPrice("N", currency_year = 2012, purchaser_price = FALSE, model) - From 77345d64b32a18f402cebfe7b087b23ea9ce367a Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 22 Dec 2021 17:45:28 -0800 Subject: [PATCH 274/319] Reorganize write model functions --- R/WriteModel.R | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/R/WriteModel.R b/R/WriteModel.R index 6f041f77..d5250a12 100644 --- a/R/WriteModel.R +++ b/R/WriteModel.R @@ -137,6 +137,15 @@ writeModeltoXLSX <- function(model, outputfolder) { logging::loginfo(paste0("Model matrices written to Excel workbook (.xlsx) in /", outputfolder, ".")) } +#'Create a unique hash identifier for a model +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @return char string +#' @export +generateModelIdentifier <- function(model) { + id <- digest::digest(model, algo="sha256") + return(id) +} + ###All functions below here are internal #' Sets directories to write model output data to @@ -285,15 +294,6 @@ writeModelMetadata <- function(model, dirs) { logging::loginfo(paste0("Model metadata written to ", outputfolder, ".")) } -#'Create a unique hash identifier for a model -#' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @return char string -#' @export -generateModelIdentifier <- function(model) { - id <- digest::digest(model, algo="sha256") - return(id) -} - #' Write out session information to a "Rsessioninfo.txt file in the given path #' @param path, str, a path without the file #' @return None From e4fff4ce6b494c905afec9635a76041c948013bf Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 22 Dec 2021 18:07:47 -0800 Subject: [PATCH 275/319] Standardize inputs for write functions --- R/WriteModel.R | 18 ++++++++---------- man/writeModelDemandstoJSON.Rd | 4 ++-- man/writeModelMetadata.Rd | 4 ++-- man/writeModeltoXLSX.Rd | 2 +- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/R/WriteModel.R b/R/WriteModel.R index d5250a12..37829678 100644 --- a/R/WriteModel.R +++ b/R/WriteModel.R @@ -14,7 +14,7 @@ writeModelforAPI <-function(model, basedir){ prepareWriteDirs(model, dirs) writeModelMatrices(model,"bin",dirs$model) writeModelDemandstoJSON(model,dirs$demands) - writeModelMetadata(model,dirs) + writeModelMetadata(model,dirs$data) } #' Write the model sector crosswalk as .csv file @@ -64,7 +64,7 @@ writeModelMatrices <- function(model, to_format, outputfolder) { #' Write selected model matrices, demand vectors, and metadata as XLSX file to output folder #' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @param outputfolder A directory to write model matrices and metadata as XLSX file out to +#' @param outputfolder A directory to write model matrices and metadata as XLSX file. #' @description Writes model matrices demand vectors, and metadata as XLSX file to output folder. #' @export writeModeltoXLSX <- function(model, outputfolder) { @@ -184,9 +184,9 @@ prepareWriteDirs <- function(model, dirs) { #' Write model demand vectors as JSON files for API to output folder. #' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @param demandsfolder Path to output folder. +#' @param outputfolder A directory to write model demand vectors. #' @description Writes model demand vectors, including y and y_d for consumption and production. -writeModelDemandstoJSON <- function(model, demandsfolder) { +writeModelDemandstoJSON <- function(model, outputfolder) { #!WARNING: Only works for single region model if (model$specs$ModelRegionAcronyms!="US") { stop("Currently only works for single region US models.") @@ -199,17 +199,17 @@ writeModelDemandstoJSON <- function(model, demandsfolder) { rownames(f) <- NULL f <- f[, c("sector", "amount")] f <- jsonlite::toJSON(f, pretty = TRUE) - write(f, paste0(demandsfolder, "/", n, ".json")) + write(f, paste0(outputfolder, "/", n, ".json")) } - logging::loginfo(paste0("Model demand vectors for API written to ", demandsfolder, ".")) + logging::loginfo(paste0("Model demand vectors for API written to ", outputfolder, ".")) } #' Write model metadata (indicators and demands, sectors, and flows) as CSV files to output folder #' format for file is here https://github.com/USEPA/USEEIO_API/blob/master/doc/data_format.md #' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @param dirs A named list of directories +#' @param outputfolder A directory to write model metadata. #' @description Writes model metadata, including indicators and demands. -writeModelMetadata <- function(model, dirs) { +writeModelMetadata <- function(model, outputfolder) { #!WARNING: Only works for single region model if (model$specs$ModelRegionAcronyms!="US") { stop("Currently only works for single region US models.") @@ -217,8 +217,6 @@ writeModelMetadata <- function(model, dirs) { # Load metadata fields for API fields <- configr::read.config(system.file("extdata/USEEIO_API_fields.yml", package="useeior")) - # Define output folder - outputfolder <- dirs$model # Write model description to models.csv model_desc <- file.path(dirs$data, "models.csv") diff --git a/man/writeModelDemandstoJSON.Rd b/man/writeModelDemandstoJSON.Rd index 5fb09f46..18c08c53 100644 --- a/man/writeModelDemandstoJSON.Rd +++ b/man/writeModelDemandstoJSON.Rd @@ -4,12 +4,12 @@ \alias{writeModelDemandstoJSON} \title{Write model demand vectors as JSON files for API to output folder.} \usage{ -writeModelDemandstoJSON(model, demandsfolder) +writeModelDemandstoJSON(model, outputfolder) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} -\item{demandsfolder}{Path to output folder.} +\item{outputfolder}{A directory to write model demand vectors.} } \description{ Writes model demand vectors, including y and y_d for consumption and production. diff --git a/man/writeModelMetadata.Rd b/man/writeModelMetadata.Rd index 34f18177..f96f81c5 100644 --- a/man/writeModelMetadata.Rd +++ b/man/writeModelMetadata.Rd @@ -5,12 +5,12 @@ \title{Write model metadata (indicators and demands, sectors, and flows) as CSV files to output folder format for file is here https://github.com/USEPA/USEEIO_API/blob/master/doc/data_format.md} \usage{ -writeModelMetadata(model, dirs) +writeModelMetadata(model, outputfolder) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} -\item{dirs}{A named list of directories} +\item{outputfolder}{A directory to write model metadata.} } \description{ Writes model metadata, including indicators and demands. diff --git a/man/writeModeltoXLSX.Rd b/man/writeModeltoXLSX.Rd index c41f386d..efd5b6b5 100644 --- a/man/writeModeltoXLSX.Rd +++ b/man/writeModeltoXLSX.Rd @@ -9,7 +9,7 @@ writeModeltoXLSX(model, outputfolder) \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} -\item{outputfolder}{A directory to write model matrices and metadata as XLSX file out to} +\item{outputfolder}{A directory to write model matrices and metadata as XLSX file.} } \description{ Writes model matrices demand vectors, and metadata as XLSX file to output folder. From f64cf9625e5ed40be66793682cc8846a477381e3 Mon Sep 17 00:00:00 2001 From: catherinebirney Date: Wed, 22 Dec 2021 23:06:16 -0500 Subject: [PATCH 276/319] update the land and water parquets to v1.0.1 --- inst/extdata/modelspecs/USEEIOv2.0.1.yml | 4 ++-- inst/extdata/modelspecs/USEEIOv2.1.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inst/extdata/modelspecs/USEEIOv2.0.1.yml b/inst/extdata/modelspecs/USEEIOv2.0.1.yml index 5689fc07..a91d65e7 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0.1.yml @@ -16,7 +16,7 @@ SatelliteTable: FullName: "Water withdrawals" Abbreviation: "WAT" StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v1.0.0_c31cd44.parquet" + StaticFile: "flowsa/FlowBySector/Water_national_2015_m1_v1.0.1_0470867.parquet" FileLocation: "DataCommons" DataYears: [2015] Locations: ["US"] @@ -131,7 +131,7 @@ SatelliteTable: FullName: "Land use" Abbreviation: "LAND" StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Land_national_2012_v1.0.0_c31cd44.parquet" + StaticFile: "flowsa/FlowBySector/Land_national_2012_v1.0.1_0470867.parquet" FileLocation: "DataCommons" DataYears: [2012] Locations: ["US"] diff --git a/inst/extdata/modelspecs/USEEIOv2.1.yml b/inst/extdata/modelspecs/USEEIOv2.1.yml index f4783d10..3bd16727 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1.yml @@ -132,7 +132,7 @@ SatelliteTable: FullName: "Land use" Abbreviation: "LAND" StaticSource: TRUE - StaticFile: "flowsa/FlowBySector/Land_national_2012_v1.0.0_c31cd44.parquet" + StaticFile: "flowsa/FlowBySector/Land_national_2012_v1.0.1_0470867.parquet" FileLocation: "DataCommons" DataYears: [2012] Locations: ["US"] From 42011051890f135513a3d5617a9ba310047ada75 Mon Sep 17 00:00:00 2001 From: Wesley Ingwersen Date: Thu, 23 Dec 2021 06:59:21 -0500 Subject: [PATCH 277/319] Minor wording changes to code docs in README --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f685c5cc..28a03f71 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ View all models with existing config files that can be built using useeior useeior::seeAvailableModels() ``` -Build a model that is available in useeior (e.g. the latest USEEIOv2.0.1 model) +Build a model that is available in useeior (e.g. the USEEIOv2.0.1 model) ``` model <- useeior::buildModel('USEEIOv2.0.1') @@ -63,7 +63,7 @@ result <- useeior::calculateEEIOModel(model, use_domestic_requirements = FALSE) ``` -### Write Model Results to File +### Write Model to File Write selected model matrices, demand vectors, and metadata as one `.xlsx` file to a given output folder. ``` @@ -98,8 +98,7 @@ Validate that commodity output can be recalculated (within 1%) with the model to > print(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) [1] "Sectors failing: S00402/US, S00300/US" ``` -Note: `S00402/US - Used and secondhand goods` and `S00300/US - Noncomparable imports` are two commodities that are not produced by any industry in the US, therefore their commodity output naturally cannot recalculated with the model total requirements matrix `L` and demand vector `y` for US production. - +Note: `S00402/US - Used and secondhand goods` and `S00300/US - Noncomparable imports` are two commodities that are not produced by any industry in the US, therefore their commodity output naturally cannot recalculated with the model total requirements matrix `L` and demand vector `y` for US production. Results for these sectors are not recommended for use. ### Visualize Model Results From f80fab857a4f506f16fba9e446839b1a2d28b62b Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Thu, 23 Dec 2021 10:06:26 -0500 Subject: [PATCH 278/319] c -> s for scaling vector m_d <- LCI_d for LCI direct perspective --- R/CalculationFunctions.R | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 99743f62..d97e22ad 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -50,11 +50,11 @@ calculateEEIOModel <- function(model, perspective, demand = "Production", use_do if (perspective=="DIRECT") { # Calculate DirectPerspectiveLCI (transposed m_d with total impacts in form of sectorxflows) logging::loginfo("Calculating Direct Perspective LCI...") - c <- getScalingVector(L, f) - result$LCI_d <- calculateDirectPerspectiveLCI(model$B, c) + s <- getScalingVector(L, f) + result$LCI_d <- calculateDirectPerspectiveLCI(model$B, s) # Calculate DirectPerspectiveLCIA (transposed u_d with total impacts in form of sectorximpact categories) logging::loginfo("Calculating Direct Perspective LCIA...") - result$LCIA_d <- calculateDirectPerspectiveLCIA(model$D, c) + result$LCIA_d <- calculateDirectPerspectiveLCIA(model$D, s) } else if (perspective=="FINAL") { # Calculate FinalPerspectiveLCI logging::loginfo("Calculating Final Perspective LCI...") @@ -78,22 +78,22 @@ calculateEEIOModel <- function(model, perspective, demand = "Production", use_do #' Journal of Cleaner Production 158 (August): 308–18. https://doi.org/10.1016/j.jclepro.2017.04.150. #' SI1, Equation 8. getScalingVector <- function(L, demand) { - c <- L %*% demand - return(c) + s <- L %*% demand + return(s) } #' Multiply the B matrix and the scaling vector c. #' @param B Marginal impact per unit of the environmental flows. -#' @param c Scaling vector. +#' @param s Scaling vector. #' @return A transposed matrix with total impacts in form of sector x flows. #' @references Yang, Yi, Wesley W. Ingwersen, Troy R. Hawkins, Michael Srocka, and David E. Meyer. #' 2017. “USEEIO: A New and Transparent United States Environmentally-Extended Input-Output Model.†#' Journal of Cleaner Production 158 (August): 308–18. https://doi.org/10.1016/j.jclepro.2017.04.150. #' SI1, Equation 8. -calculateDirectPerspectiveLCI <- function(B, c) { - m_d <- t(B %*% diag(as.vector(c), nrow(c))) - rownames(m_d) <- rownames(c) - return(m_d) +calculateDirectPerspectiveLCI <- function(B, s) { + lci_d <- t(B %*% diag(as.vector(s), nrow(s))) + rownames(lci_d) <- rownames(s) + return(lci_d) } #' The final perspective LCI aligns flows with sectors consumed by final users @@ -120,9 +120,9 @@ calculateFinalPerspectiveLCI <- function(M, y) { #' 2017. “USEEIO: A New and Transparent United States Environmentally-Extended Input-Output Model.†#' Journal of Cleaner Production 158 (August): 308–18. https://doi.org/10.1016/j.jclepro.2017.04.150. #' SI1, Equation 8. -calculateDirectPerspectiveLCIA <- function(D, c) { - lcia_d <- t(D %*% diag(as.vector(c), nrow(c))) - rownames(lcia_d) <- rownames(c) +calculateDirectPerspectiveLCIA <- function(D, s) { + lcia_d <- t(D %*% diag(as.vector(s), nrow(s))) + rownames(lcia_d) <- rownames(s) return(lcia_d) } From c3f4d2b120b426c67899ee8fde616a8260bc1452 Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Thu, 23 Dec 2021 10:32:39 -0500 Subject: [PATCH 279/319] Fix issue #194; add perspectives definitions and link to it from README.md --- README.md | 2 +- format_specs/result.md | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 28a03f71..4fd2f019 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ N_adj <- useeior::adjustResultMatrixPrice("N", ### Calculate Model LCI and LCIA -Calculate model life cycle inventory (LCI) and life cycle impact assessment (LCIA) results under user-specified perspective, demand vector (from DemandVectors in the model object or a user-provided vector) and a selected direct requirements matrix (complete or domestic). +Calculate model life cycle inventory (LCI) and life cycle impact assessment (LCIA) results under user-specified [perspective](../format-specs/result.md#calculation-perspectives), demand vector (from DemandVectors in the model object or a user-provided vector) and a selected direct requirements matrix (complete or domestic). ``` result <- useeior::calculateEEIOModel(model, diff --git a/format_specs/result.md b/format_specs/result.md index f0e2b576..c5f92d92 100644 --- a/format_specs/result.md +++ b/format_specs/result.md @@ -1,10 +1,16 @@ ## Model Result Format A result object from a USEEIO model contains one or more of the following elements. -| Item | Type | Description | -| --- | --- | --------- | -| LCI_d | matrix | Direct resource use and emissions by sector (sector x flow). Calculated from _B_ | -| LCIA_d | matrix | Direct impacts by sector (sector x indicator). Calculated from _D_ | -| LCI_f | matrix | Total (final) resource use and emissions by sector (sector x flow). Calculated from _M_ | -| LCIA_f | matrix | Total (final) impacts by sector (sector x indicator). Calculated from _N_ | +| Item | Type | Shape | Description | +| --- | --- | --------- | ---| +| LCI_d | matrix | sector x flow | Direct + indirect resource use and emissions by sector calculated with the [DIRECT perspective](#calculation-perspectives) | +| LCIA_d | matrix | sector x indicator | Direct + indirect impacts by sector calculated with the [DIRECT perspective]((#calculation-perspectives))| +| LCI_f | matrix | Direct + indirect resource use and emissions by sector calculated with the [FINAL perspective](#calculation-perspectives) | +| LCIA_f | matrix | sector x indicator | Direct + indirect impacts by sector calculated with the [FINAL perspective](#calculation-perspectives)| + +### Calculation Perspectives +|Perspective|Definition| +|---|---| +|DIRECT|Associates results with sector where emissions occur.| +|FINAL|Associates results with sector is a final consumer. Final consumption is use by a final demand component.| From 61507c77102ca5f42cf11f8504b73f0bf1857c72 Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Thu, 23 Dec 2021 10:55:18 -0500 Subject: [PATCH 280/319] Simplify result format, rename result.md to Calculation.md; fix links --- README.md | 4 +++- format_specs/Calculation.md | 13 +++++++++++++ format_specs/result.md | 16 ---------------- 3 files changed, 16 insertions(+), 17 deletions(-) create mode 100644 format_specs/Calculation.md delete mode 100644 format_specs/result.md diff --git a/README.md b/README.md index 4fd2f019..7176c716 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ N_adj <- useeior::adjustResultMatrixPrice("N", ### Calculate Model LCI and LCIA -Calculate model life cycle inventory (LCI) and life cycle impact assessment (LCIA) results under user-specified [perspective](../format-specs/result.md#calculation-perspectives), demand vector (from DemandVectors in the model object or a user-provided vector) and a selected direct requirements matrix (complete or domestic). +Calculate model life cycle inventory (LCI) and life cycle impact assessment (LCIA) results with a user-specified [calculation perspective](format_specs/Calculation.md#calculation-perspectives), demand vector (from DemandVectors in the model object or a user-provided vector) and a model [direct requirements matrix](format_specs/Model.md#a). ``` result <- useeior::calculateEEIOModel(model, @@ -63,6 +63,8 @@ result <- useeior::calculateEEIOModel(model, use_domestic_requirements = FALSE) ``` +This returns a [Calculation Result](format_specs/Calculation.md#calculation-result). + ### Write Model to File Write selected model matrices, demand vectors, and metadata as one `.xlsx` file to a given output folder. diff --git a/format_specs/Calculation.md b/format_specs/Calculation.md new file mode 100644 index 00000000..16d9ed51 --- /dev/null +++ b/format_specs/Calculation.md @@ -0,0 +1,13 @@ +## Calculation Result +A result object from a Model calculation (`calculateEEIOModel()`) contains an LCI and an LCIA matrix. The matrices have a suffix appended to them in the form `_x`, where `x` indicates the calculation perspective that was used to prepare them. + +| Matrix | Shape | Description | +| --- | ---- | ---| +| LCI | sector x flow | Direct + indirect resource use and emissions by sector | +| LCIA | sector x indicator | Direct + indirect impacts by sector | + +## Calculation Perspectives +|Suffix |Perspective|Definition| +|---|---|---| +|_d|DIRECT|Associates results with sector where emissions occur.| +|_f|FINAL|Associates results with sector is a final consumer. Final consumption is use by a final demand component.| diff --git a/format_specs/result.md b/format_specs/result.md deleted file mode 100644 index c5f92d92..00000000 --- a/format_specs/result.md +++ /dev/null @@ -1,16 +0,0 @@ -## Model Result Format -A result object from a USEEIO model contains one or more of the following elements. - -| Item | Type | Shape | Description | -| --- | --- | --------- | ---| -| LCI_d | matrix | sector x flow | Direct + indirect resource use and emissions by sector calculated with the [DIRECT perspective](#calculation-perspectives) | -| LCIA_d | matrix | sector x indicator | Direct + indirect impacts by sector calculated with the [DIRECT perspective]((#calculation-perspectives))| -| LCI_f | matrix | Direct + indirect resource use and emissions by sector calculated with the [FINAL perspective](#calculation-perspectives) | -| LCIA_f | matrix | sector x indicator | Direct + indirect impacts by sector calculated with the [FINAL perspective](#calculation-perspectives)| - - -### Calculation Perspectives -|Perspective|Definition| -|---|---| -|DIRECT|Associates results with sector where emissions occur.| -|FINAL|Associates results with sector is a final consumer. Final consumption is use by a final demand component.| From 729ef3ff36aa877cba9c3a3e57ebf180e1dea8e2 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Thu, 23 Dec 2021 09:25:51 -0800 Subject: [PATCH 281/319] Update README.md Add link to ValidateModel.Rmd for economic validation --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7176c716..62f22ed4 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,9 @@ Write model matrices as `.csv` files to a given output folder. useeior::writeModelMatrices(model, to_format = "csv", outputfolder) ``` -### Validate Model (examples) +### Validate Model + +#### Full model validation Validate that flow totals by commodity `E_c` can be recalculated (within 1%) using the model satellite matrix `B`, market shares matrix `V_n`, total requirements matrix `L`, and demand vector `y` for US production. @@ -100,7 +102,11 @@ Validate that commodity output can be recalculated (within 1%) with the model to > print(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) [1] "Sectors failing: S00402/US, S00300/US" ``` -Note: `S00402/US - Used and secondhand goods` and `S00300/US - Noncomparable imports` are two commodities that are not produced by any industry in the US, therefore their commodity output naturally cannot recalculated with the model total requirements matrix `L` and demand vector `y` for US production. Results for these sectors are not recommended for use. +Note: `S00402/US - Used and secondhand goods` and `S00300/US - Noncomparable imports` are two commodities that are not produced by any industry in the US, therefore their commodity output naturally cannot be recalculated with the model total requirements matrix `L` and demand vector `y` for US production. Results for these sectors are not recommended for use. + +#### Economic validation + +Additional economic validations are performed in [ValidateModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel.Rmd). ### Visualize Model Results From dcea044752021025a2aa417f3a2313ac1915ffe5 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Thu, 23 Dec 2021 09:35:34 -0800 Subject: [PATCH 282/319] Update README.md Add summary of model validation --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 62f22ed4..0ceb6c54 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,9 @@ useeior::writeModelMatrices(model, to_format = "csv", outputfolder) ### Validate Model -#### Full model validation +Complete model validation checks can be found in [ValidateModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel.Rmd). Knit [ValidateModel_render.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel_render.Rmd) to perform all validation checks on selected models (specified under the [YAML header](https://github.com/USEPA/useeior/blob/729ef3ff36aa877cba9c3a3e57ebf180e1dea8e2/inst/doc/ValidateModel_render.Rmd#L5)). This will return an `html` and a `md` file in [inst/doc/output/](https://github.com/USEPA/useeior/tree/develop/inst/doc/output) containg validation results for each model. + +#### Examples Validate that flow totals by commodity `E_c` can be recalculated (within 1%) using the model satellite matrix `B`, market shares matrix `V_n`, total requirements matrix `L`, and demand vector `y` for US production. @@ -104,10 +106,6 @@ Validate that commodity output can be recalculated (within 1%) with the model to ``` Note: `S00402/US - Used and secondhand goods` and `S00300/US - Noncomparable imports` are two commodities that are not produced by any industry in the US, therefore their commodity output naturally cannot be recalculated with the model total requirements matrix `L` and demand vector `y` for US production. Results for these sectors are not recommended for use. -#### Economic validation - -Additional economic validations are performed in [ValidateModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel.Rmd). - ### Visualize Model Results Rank sectors based a composite score of selected total impacts (LCIA_d or LCIA_f) associated with total US demand (US production or consumption vector). From e1aa1848c1aa876e122536f7225c6d99263b9930 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 23 Dec 2021 09:36:15 -0800 Subject: [PATCH 283/319] Update function doc --- man/calculateDirectPerspectiveLCI.Rd | 4 ++-- man/calculateDirectPerspectiveLCIA.Rd | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/man/calculateDirectPerspectiveLCI.Rd b/man/calculateDirectPerspectiveLCI.Rd index 3b817bbb..eb07eb9f 100644 --- a/man/calculateDirectPerspectiveLCI.Rd +++ b/man/calculateDirectPerspectiveLCI.Rd @@ -4,12 +4,12 @@ \alias{calculateDirectPerspectiveLCI} \title{Multiply the B matrix and the scaling vector c.} \usage{ -calculateDirectPerspectiveLCI(B, c) +calculateDirectPerspectiveLCI(B, s) } \arguments{ \item{B}{Marginal impact per unit of the environmental flows.} -\item{c}{Scaling vector.} +\item{s}{Scaling vector.} } \value{ A transposed matrix with total impacts in form of sector x flows. diff --git a/man/calculateDirectPerspectiveLCIA.Rd b/man/calculateDirectPerspectiveLCIA.Rd index 038832b1..fbc4f7ed 100644 --- a/man/calculateDirectPerspectiveLCIA.Rd +++ b/man/calculateDirectPerspectiveLCIA.Rd @@ -4,7 +4,7 @@ \alias{calculateDirectPerspectiveLCIA} \title{Multiply the C matrix and the product of B matrix and scaling vector c.} \usage{ -calculateDirectPerspectiveLCIA(D, c) +calculateDirectPerspectiveLCIA(D, s) } \arguments{ \item{D}{Direct impact per unit of the environmental flows.} From 31b36d7fe49a6382fe1543ec28f56aabe8dced93 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Thu, 23 Dec 2021 09:42:44 -0800 Subject: [PATCH 284/319] Add link to inst/doc/Example.Rmd in README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0ceb6c54..2768e7cc 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,8 @@ useeior::heatmapSectorRanking(model, ![](https://github.com/USEPA/useeior/blob/develop/inst/img/ranking_direct_prod_final_cons_v2.0.1.png) +More visualization examples are available in [Example.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/Example.Rmd). + ### Analyze Flow and Sector Contribution to Impact Analyze `flow` contribution to `Acidification Potential` in the `Electricity` sector (`221100/US`). @@ -170,6 +172,8 @@ Analyze `sector` contribution to `Human Health - Respiratory Effects` in the `Fl 1111A0/US - Fresh soybeans, canola, flaxseeds, and other oilseeds 0.8% ``` +More analysis examples are available in [Example.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/Example.Rmd). + A complete list of available functions for calculating, validating, exporting and visualizing model can be found [here](https://github.com/USEPA/useeior/wiki/Using-useeior#calculate-validate-export-visualize-model) in the Wiki. ## Disclaimer From b57de2e668715c4b0f44e67643221778834533f9 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Thu, 23 Dec 2021 09:51:18 -0800 Subject: [PATCH 285/319] Add link to CompareModel.Rmd in README --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2768e7cc..970d4fc2 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ useeior::writeModelMatrices(model, to_format = "csv", outputfolder) ### Validate Model -Complete model validation checks can be found in [ValidateModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel.Rmd). Knit [ValidateModel_render.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel_render.Rmd) to perform all validation checks on selected models (specified under the [YAML header](https://github.com/USEPA/useeior/blob/729ef3ff36aa877cba9c3a3e57ebf180e1dea8e2/inst/doc/ValidateModel_render.Rmd#L5)). This will return an `html` and a `md` file in [inst/doc/output/](https://github.com/USEPA/useeior/tree/develop/inst/doc/output) containg validation results for each model. +Complete model validation checks can be found in [ValidateModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel.Rmd). Knit [ValidateModel_render.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel_render.Rmd) to perform all validation checks on selected models (specified under the [YAML header](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel_render.Rmd#L5)). This will return an `html` and a `md` file in [inst/doc/output/](https://github.com/USEPA/useeior/tree/develop/inst/doc/output) containg validation results for each model. #### Examples @@ -108,6 +108,8 @@ Note: `S00402/US - Used and secondhand goods` and `S00300/US - Noncomparable imp ### Visualize Model Results +#### Examples + Rank sectors based a composite score of selected total impacts (LCIA_d or LCIA_f) associated with total US demand (US production or consumption vector). The ranking is an effective means to identify prioritization opportunity in practices like the EPA's [Sustainable Materials Management program](https://www.epa.gov/smm). Comparing rankings may also be used as another form of model validation that incorporates the demand vectors and the indicators as well as the model result matrices. @@ -144,6 +146,8 @@ More visualization examples are available in [Example.Rmd](https://github.com/US ### Analyze Flow and Sector Contribution to Impact +#### Examples + Analyze `flow` contribution to `Acidification Potential` in the `Electricity` sector (`221100/US`). ``` @@ -174,6 +178,14 @@ Analyze `sector` contribution to `Human Health - Respiratory Effects` in the `Fl More analysis examples are available in [Example.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/Example.Rmd). +### Compare Model Results + +Comparison betwen two models can be found in [CompareModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModel.Rmd). Knit [CompareModel_render.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModel_render.Rmd) to perform comparison on selected models (specified under the [YAML header](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModel_render.Rmd#L5)). This will return an `html` and a `md` file in [inst/doc/output/](https://github.com/USEPA/useeior/tree/develop/inst/doc/output) containg comparison results for each model. + +Currently, it only compares flow totals between two models. More comparisons will be added in the future. + +### Additional Information + A complete list of available functions for calculating, validating, exporting and visualizing model can be found [here](https://github.com/USEPA/useeior/wiki/Using-useeior#calculate-validate-export-visualize-model) in the Wiki. ## Disclaimer From 0f4ae15cde86870c8b512db165b9d01ec20a7591 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Thu, 23 Dec 2021 10:07:19 -0800 Subject: [PATCH 286/319] Add doc about default demand vectors in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 970d4fc2..07a46adf 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ N_adj <- useeior::adjustResultMatrixPrice("N", ### Calculate Model LCI and LCIA -Calculate model life cycle inventory (LCI) and life cycle impact assessment (LCIA) results with a user-specified [calculation perspective](format_specs/Calculation.md#calculation-perspectives), demand vector (from DemandVectors in the model object or a user-provided vector) and a model [direct requirements matrix](format_specs/Model.md#a). +Calculate model life cycle inventory (LCI) and life cycle impact assessment (LCIA) results with a user-specified [calculation perspective](format_specs/Calculation.md#calculation-perspectives), [demand vector](https://github.com/USEPA/useeior/blob/develop/format_specs/Model.md#demandvectors) (from `DemandVectors` in the model object, which includes four [default vectors](https://github.com/USEPA/useeior/blob/develop/format_specs/ModelSpecification.md#demand-vector-specifications), or a user-provided vector) and a model [direct requirements matrix](format_specs/Model.md#a). ``` result <- useeior::calculateEEIOModel(model, From 937635c4b952ba6be6796e2478b5dd8836ad6301 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 23 Dec 2021 10:29:46 -0800 Subject: [PATCH 287/319] c -> s in calculateDirectPerspectiveLCIA --- R/CalculationFunctions.R | 2 +- man/calculateDirectPerspectiveLCIA.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index d97e22ad..9336595a 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -114,7 +114,7 @@ calculateFinalPerspectiveLCI <- function(M, y) { #' Multiply the C matrix and the product of B matrix and scaling vector c. #' @param D Direct impact per unit of the environmental flows. -#' @param c Scaling vector. +#' @param s Scaling vector. #' @return A transposed matrix with total impacts in form of sector x impact categories. #' @references Yang, Yi, Wesley W. Ingwersen, Troy R. Hawkins, Michael Srocka, and David E. Meyer. #' 2017. “USEEIO: A New and Transparent United States Environmentally-Extended Input-Output Model.†diff --git a/man/calculateDirectPerspectiveLCIA.Rd b/man/calculateDirectPerspectiveLCIA.Rd index fbc4f7ed..8e91c06e 100644 --- a/man/calculateDirectPerspectiveLCIA.Rd +++ b/man/calculateDirectPerspectiveLCIA.Rd @@ -9,7 +9,7 @@ calculateDirectPerspectiveLCIA(D, s) \arguments{ \item{D}{Direct impact per unit of the environmental flows.} -\item{c}{Scaling vector.} +\item{s}{Scaling vector.} } \value{ A transposed matrix with total impacts in form of sector x impact categories. From 9b00934b8530d4b17889f1fa052341b9310105ed Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 23 Dec 2021 16:20:45 -0800 Subject: [PATCH 288/319] Modify model name according to new naming rule --- .../{USEEIOv2.0_nodisagg.yml => USEEIOv2.0-411.yml} | 11 ++++++++--- ...IOv2.0s-GHG_nodisagg.yml => USEEIOv2.0-79-GHG.yml} | 4 ++-- ...USEEIOv2.0-GHG_nodisagg.yml => USEEIOv2.0-GHG.yml} | 2 +- .../{USEEIOv2.0.1.yml => USEEIOv2.0.1-411.yml} | 2 +- inst/extdata/modelspecs/USEEIOv2.0.yml | 9 ++------- ...EEIOv2.0i-GHG_nodisagg.yml => USEEIOv2.0i-GHG.yml} | 2 +- ...IOv2.0is-GHG_nodisagg.yml => USEEIOv2.0is-GHG.yml} | 2 +- inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml | 2 +- .../modelspecs/{USEEIOv2.1.yml => USEEIOv2.1-422.yml} | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) rename inst/extdata/modelspecs/{USEEIOv2.0_nodisagg.yml => USEEIOv2.0-411.yml} (99%) rename inst/extdata/modelspecs/{USEEIOv2.0s-GHG_nodisagg.yml => USEEIOv2.0-79-GHG.yml} (95%) rename inst/extdata/modelspecs/{USEEIOv2.0-GHG_nodisagg.yml => USEEIOv2.0-GHG.yml} (96%) rename inst/extdata/modelspecs/{USEEIOv2.0.1.yml => USEEIOv2.0.1-411.yml} (99%) rename inst/extdata/modelspecs/{USEEIOv2.0i-GHG_nodisagg.yml => USEEIOv2.0i-GHG.yml} (96%) rename inst/extdata/modelspecs/{USEEIOv2.0is-GHG_nodisagg.yml => USEEIOv2.0is-GHG.yml} (98%) rename inst/extdata/modelspecs/{USEEIOv2.1.yml => USEEIOv2.1-422.yml} (99%) diff --git a/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0-411.yml similarity index 99% rename from inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml rename to inst/extdata/modelspecs/USEEIOv2.0-411.yml index e4b3a1bc..585dc144 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-411.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0_nodisagg" +Model: "USEEIOv2.0-411" BaseIOSchema: 2012 BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data @@ -9,7 +9,7 @@ BasePriceType: "PRO" #producer BasewithRedefinitions: FALSE CommodityorIndustryType: "Commodity" ScrapIncluded: FALSE -DisaggregationSpecs: null +DisaggregationSpecs: "WasteDisaggregationDetail" #Name of disaggregation yml file. SatelliteTable: WAT: @@ -345,7 +345,7 @@ SatelliteTable: Author: "USEPA" DataYear: 2014 URL: "https://www.epa.gov/sites/production/files/2016-11/documents/2014_smmfactsheet_508.pdf" - Primary: TRUE + Primary: TRUE CRHW: FullName: "Commercial RCRA-defined hazardous waste" Abbreviation: "CRHW" @@ -859,3 +859,8 @@ Indicators: DemandVectors: DefaultDemand: "DefaultDemandVectors" # Name of default demand vectors yml file # Additional demand vectors beyond useeior defaults + HouseholdConsumption: + Type: "Consumption" + Year: 2012 + System: "Household" + Location: "US" diff --git a/inst/extdata/modelspecs/USEEIOv2.0s-GHG_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0-79-GHG.yml similarity index 95% rename from inst/extdata/modelspecs/USEEIOv2.0s-GHG_nodisagg.yml rename to inst/extdata/modelspecs/USEEIOv2.0-79-GHG.yml index cd7ba9c5..57a35cbf 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0s-GHG_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-79-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0s-GHG_nodisagg" +Model: "USEEIOv2.0-79-GHG" BaseIOSchema: 2012 BaseIOLevel: "Summary" IOYear: 2012 # Year for IO data @@ -9,7 +9,7 @@ BasePriceType: "PRO" #producer BasewithRedefinitions: FALSE CommodityorIndustryType: "Commodity" ScrapIncluded: FALSE -DisaggregationSpecs: null +DisaggregationSpecs: "WasteDisaggregationSummary" SatelliteTable: GHG: diff --git a/inst/extdata/modelspecs/USEEIOv2.0-GHG_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0-GHG.yml similarity index 96% rename from inst/extdata/modelspecs/USEEIOv2.0-GHG_nodisagg.yml rename to inst/extdata/modelspecs/USEEIOv2.0-GHG.yml index a1c92a85..2f7b1d31 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0-GHG_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0-GHG_nodisagg" # 2012 Detail, Commodity +Model: "USEEIOv2.0-GHG" # 2012 Detail, Commodity BaseIOSchema: 2012 BaseIOLevel: "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.0.1.yml b/inst/extdata/modelspecs/USEEIOv2.0.1-411.yml similarity index 99% rename from inst/extdata/modelspecs/USEEIOv2.0.1.yml rename to inst/extdata/modelspecs/USEEIOv2.0.1-411.yml index a91d65e7..cc7b26a2 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0.1-411.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0.1" +Model: "USEEIOv2.0.1-411" BaseIOSchema: 2012 BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.0.yml b/inst/extdata/modelspecs/USEEIOv2.0.yml index 9ed81afe..1aec9ba1 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0.yml @@ -9,7 +9,7 @@ BasePriceType: "PRO" #producer BasewithRedefinitions: FALSE CommodityorIndustryType: "Commodity" ScrapIncluded: FALSE -DisaggregationSpecs: "WasteDisaggregationDetail" #Name of disaggregation yml file. +DisaggregationSpecs: null SatelliteTable: WAT: @@ -345,7 +345,7 @@ SatelliteTable: Author: "USEPA" DataYear: 2014 URL: "https://www.epa.gov/sites/production/files/2016-11/documents/2014_smmfactsheet_508.pdf" - Primary: TRUE + Primary: TRUE CRHW: FullName: "Commercial RCRA-defined hazardous waste" Abbreviation: "CRHW" @@ -859,8 +859,3 @@ Indicators: DemandVectors: DefaultDemand: "DefaultDemandVectors" # Name of default demand vectors yml file # Additional demand vectors beyond useeior defaults - HouseholdConsumption: - Type: "Consumption" - Year: 2012 - System: "Household" - Location: "US" diff --git a/inst/extdata/modelspecs/USEEIOv2.0i-GHG_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0i-GHG.yml similarity index 96% rename from inst/extdata/modelspecs/USEEIOv2.0i-GHG_nodisagg.yml rename to inst/extdata/modelspecs/USEEIOv2.0i-GHG.yml index 161b59cf..ec6f89f5 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0i-GHG_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0i-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0i-GHG_nodisagg" # 2012 Detail, Industry +Model: "USEEIOv2.0i-GHG" # 2012 Detail, Industry BaseIOSchema: 2012 BaseIOLevel: "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml b/inst/extdata/modelspecs/USEEIOv2.0is-GHG.yml similarity index 98% rename from inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml rename to inst/extdata/modelspecs/USEEIOv2.0is-GHG.yml index d8e18a9c..14240d01 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0is-GHG_nodisagg.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0is-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0is-GHG_nodisagg" +Model: "USEEIOv2.0is-GHG" BaseIOSchema: 2012 BaseIOLevel: "Summary" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml b/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml index e43cd95a..33326592 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml @@ -9,7 +9,7 @@ BasePriceType: "PRO" #producer BasewithRedefinitions: FALSE CommodityorIndustryType: "Commodity" ScrapIncluded: FALSE -DisaggregationSpecs: "WasteDisaggregationSummary" +DisaggregationSpecs: null SatelliteTable: GHG: diff --git a/inst/extdata/modelspecs/USEEIOv2.1.yml b/inst/extdata/modelspecs/USEEIOv2.1-422.yml similarity index 99% rename from inst/extdata/modelspecs/USEEIOv2.1.yml rename to inst/extdata/modelspecs/USEEIOv2.1-422.yml index 3bd16727..42ba7621 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1-422.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.1" +Model: "USEEIOv2.1-422" BaseIOSchema: 2012 BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data From f88db3db7fba55d67a1392cfd5a7a5990cd1903f Mon Sep 17 00:00:00 2001 From: Mo Li Date: Thu, 23 Dec 2021 22:08:13 -0800 Subject: [PATCH 289/319] Fix typos in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 07a46adf..997a72e2 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,7 @@ More analysis examples are available in [Example.Rmd](https://github.com/USEPA/u ### Compare Model Results -Comparison betwen two models can be found in [CompareModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModel.Rmd). Knit [CompareModel_render.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModel_render.Rmd) to perform comparison on selected models (specified under the [YAML header](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModel_render.Rmd#L5)). This will return an `html` and a `md` file in [inst/doc/output/](https://github.com/USEPA/useeior/tree/develop/inst/doc/output) containg comparison results for each model. +Comparison betwen two models can be found in [CompareModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModels.Rmd). Knit [CompareModel_render.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModels_render.Rmd) to perform comparison on selected models (specified under the [YAML header](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModels_render.Rmd#L5)). This will return an `html` and a `md` file in [inst/doc/output/](https://github.com/USEPA/useeior/tree/develop/inst/doc/output) containing comparison results for each model. Currently, it only compares flow totals between two models. More comparisons will be added in the future. From 34a28e29f21947c4e72e22b6e900ae4a7895bb80 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Thu, 23 Dec 2021 22:13:16 -0800 Subject: [PATCH 290/319] Update format in README --- README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 997a72e2..fe5496cb 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,17 @@ # useeior [![R CI/CD test](https://github.com/USEPA/useeior/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/USEPA/useeior/actions/workflows/R-CMD-check.yaml) -`useeior` is an R package for building and using [USEEIO models](https://www.epa.gov/land-research/us-environmentally-extended-input-output-useeio-models). The [model object](format_specs/Model.md) is the primary output that is built according to a given [model specification](format_specs/ModelSpecification.md) and optional hybridization specification, e.g. [disaggregation](format_specs/DisaggregationAndAggregationSpecification.md). [Model specifications](inst/extdata/modelspecs) and associated hybridization specifications, e.g. [disaggregation](inst/extdata/disaggspecs), for EPA-validated models are included in the package. The package offers various functions for validating, calculating, visualizing, and writing out models and/or their components. `useeior` is a core component of the [USEEIO Modeling Framework](https://github.com/USEPA/useeio). +`useeior` is an R package for building and using [USEEIO models](https://www.epa.gov/land-research/us-environmentally-extended-input-output-useeio-models). +The [model object](format_specs/Model.md) is the primary output that is built according to a given [model specification](format_specs/ModelSpecification.md) and optional hybridization specification, e.g. [disaggregation](format_specs/DisaggregationAndAggregationSpecification.md). +[Model specifications](inst/extdata/modelspecs) and associated hybridization specifications, e.g. [disaggregation](inst/extdata/disaggspecs), for EPA-validated models are included in the package. +The package offers various functions for validating, calculating, visualizing, and writing out models and/or their components. +`useeior` is a core component of the [USEEIO Modeling Framework](https://github.com/USEPA/useeio). -`useeior` is in a stable development state. Users intending to use the package for production purposes and applications should use [Releases](https://github.com/USEPA/useeior/releases). +`useeior` is in a stable development state. +Users intending to use the package for production purposes and applications should use [Releases](https://github.com/USEPA/useeior/releases). -See the following sections for installation and basic usage of `useeior`. See [Wiki](https://github.com/USEPA/useeior/wiki) for advanced uses, details about built-in data and metadata and how to contribute to `useeior`. +See the following sections for installation and basic usage of `useeior`. +See [Wiki](https://github.com/USEPA/useeior/wiki) for advanced uses, details about built-in data and metadata and how to contribute to `useeior`. ## Installation @@ -79,7 +85,9 @@ useeior::writeModelMatrices(model, to_format = "csv", outputfolder) ### Validate Model -Complete model validation checks can be found in [ValidateModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel.Rmd). Knit [ValidateModel_render.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel_render.Rmd) to perform all validation checks on selected models (specified under the [YAML header](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel_render.Rmd#L5)). This will return an `html` and a `md` file in [inst/doc/output/](https://github.com/USEPA/useeior/tree/develop/inst/doc/output) containg validation results for each model. +Complete model validation checks can be found in [ValidateModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel.Rmd). +Knit [ValidateModel_render.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel_render.Rmd) to perform all validation checks on selected models (specified under the [YAML header](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel_render.Rmd#L5)). +This will return an `.html` and a `.md` file in [inst/doc/output/](https://github.com/USEPA/useeior/tree/develop/inst/doc/output) containing validation results for each model. #### Examples @@ -180,7 +188,9 @@ More analysis examples are available in [Example.Rmd](https://github.com/USEPA/u ### Compare Model Results -Comparison betwen two models can be found in [CompareModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModels.Rmd). Knit [CompareModel_render.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModels_render.Rmd) to perform comparison on selected models (specified under the [YAML header](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModels_render.Rmd#L5)). This will return an `html` and a `md` file in [inst/doc/output/](https://github.com/USEPA/useeior/tree/develop/inst/doc/output) containing comparison results for each model. +Comparison betwen two models can be found in [CompareModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModels.Rmd). +Knit [CompareModel_render.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModels_render.Rmd) to perform comparison on selected models (specified under the [YAML header](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModels_render.Rmd#L5)). +This will return an `.html` and a `.md` file in [inst/doc/output/](https://github.com/USEPA/useeior/tree/develop/inst/doc/output) containing comparison results for each model. Currently, it only compares flow totals between two models. More comparisons will be added in the future. From 418f08cd4fbed241060aae7d865875eb50df6b97 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Mon, 27 Dec 2021 09:39:58 -0800 Subject: [PATCH 291/319] Update model names in R-CMD-check.yaml --- .github/workflows/R-CMD-check.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index a989fe16..26912dd6 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -66,12 +66,12 @@ jobs: - uses: r-lib/actions/check-r-package@v1 - - name: Build and validate models - USEEIOv2.0 + - name: Build and validate models - USEEIOv2.0 detail model with waste disaggregation if: always() run: | require(devtools) devtools::load_all() - m <- useeior::buildModel("USEEIOv2.0") + m <- useeior::buildModel("USEEIOv2.0-411") useeior::printValidationResults(m) shell: Rscript {0} @@ -81,7 +81,7 @@ jobs: run: | require(devtools) devtools::load_all() - m <- useeior::buildModel("USEEIOv2.0i-GHG_nodisagg") + m <- useeior::buildModel("USEEIOv2.0i-GHG") useeior::printValidationResults(m) shell: Rscript {0} @@ -96,12 +96,12 @@ jobs: shell: Rscript {0} - - name: Build and validate models - USEEIOv2.0.1 + - name: Build and validate models - USEEIOv2.0.1 detail model with waste disaggregation if: always() run: | require(devtools) devtools::load_all() - m <- useeior::buildModel("USEEIOv2.0.1") + m <- useeior::buildModel("USEEIOv2.0.1-411") useeior::printValidationResults(m) shell: Rscript {0} From eb775cfb993828c7fc3ff470052d773863a58cde Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Mon, 27 Dec 2021 10:38:50 -0800 Subject: [PATCH 292/319] calculateConsumptionContributiontoImpact -> calculateSectorPurchasedbySectorSourcedImpact --- NAMESPACE | 2 +- R/CalculationFunctions.R | 12 ++++++---- ...alculateConsumptionContributiontoImpact.Rd | 21 ----------------- ...ateSectorPurchasedbySectorSourcedImpact.Rd | 23 +++++++++++++++++++ 4 files changed, 31 insertions(+), 27 deletions(-) delete mode 100644 man/calculateConsumptionContributiontoImpact.Rd create mode 100644 man/calculateSectorPurchasedbySectorSourcedImpact.Rd diff --git a/NAMESPACE b/NAMESPACE index 7540efd7..c5f57385 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -6,11 +6,11 @@ export(aggregateResultMatrixbyRow) export(barplotFloworImpactFractionbyRegion) export(barplotIndicatorScoresbySector) export(buildModel) -export(calculateConsumptionContributiontoImpact) export(calculateEEIOModel) export(calculateFlowContributiontoImpact) export(calculateMarginSectorImpacts) export(calculateSectorContributiontoImpact) +export(calculateSectorPurchasedbySectorSourcedImpact) export(compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation) export(compareCommodityOutputandDomesticUseplusProductionDemand) export(compareEandLCIResult) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 9336595a..ee24fc9a 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -244,13 +244,15 @@ aggregateResultMatrix <- function (matrix, to_level, crosswalk) { return(agg_matrix) } -#' Calculates the result matrix by sector for a specified indciator -#' @param y, a model demand vector +#' Calculates sector x sector impacts from a given demand vector. +#' @param y a model demand vector or user-specified demand vector +#' that must have the same dimension with the model demand vector #' @param model A complete EEIO model: a list with USEEIO model components and attributes -#' @param indicator, str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential" -#' @return A matrix of impacts sector purchased x sector sourced +#' @param indicator str, index of a model indicator, e.g. "Acidification Potential" +#' @return A matrix of impacts in the form of sector purchased x sector sourced, +#' negative values should be interpreted as "reduced impacts". #' @export -calculateConsumptionContributiontoImpact <- function (y, model, indicator) { +calculateSectorPurchasedbySectorSourcedImpact <- function (y, model, indicator) { L <- model$L total_req <- L %*% diag(y) colnames(total_req) <- rownames(total_req) diff --git a/man/calculateConsumptionContributiontoImpact.Rd b/man/calculateConsumptionContributiontoImpact.Rd deleted file mode 100644 index 5da6a402..00000000 --- a/man/calculateConsumptionContributiontoImpact.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/CalculationFunctions.R -\name{calculateConsumptionContributiontoImpact} -\alias{calculateConsumptionContributiontoImpact} -\title{Calculates the result matrix by sector for a specified indciator} -\usage{ -calculateConsumptionContributiontoImpact(y, model, indicator) -} -\arguments{ -\item{y, }{a model demand vector} - -\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} - -\item{indicator, }{str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential"} -} -\value{ -A matrix of impacts sector purchased x sector sourced -} -\description{ -Calculates the result matrix by sector for a specified indciator -} diff --git a/man/calculateSectorPurchasedbySectorSourcedImpact.Rd b/man/calculateSectorPurchasedbySectorSourcedImpact.Rd new file mode 100644 index 00000000..c62f34df --- /dev/null +++ b/man/calculateSectorPurchasedbySectorSourcedImpact.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/CalculationFunctions.R +\name{calculateSectorPurchasedbySectorSourcedImpact} +\alias{calculateSectorPurchasedbySectorSourcedImpact} +\title{Calculates sector x sector impacts from a given demand vector.} +\usage{ +calculateSectorPurchasedbySectorSourcedImpact(y, model, indicator) +} +\arguments{ +\item{y}{a model demand vector or user-specified demand vector +that must have the same dimension with the model demand vector} + +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} + +\item{indicator}{str, index of a model indicator, e.g. "Acidification Potential"} +} +\value{ +A matrix of impacts in the form of sector purchased x sector sourced, +negative values should be interpreted as "reduced impacts". +} +\description{ +Calculates sector x sector impacts from a given demand vector. +} From b9b6d0fe7189ab86caf9552a413386bad71c6b36 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Mon, 27 Dec 2021 14:19:00 -0800 Subject: [PATCH 293/319] Update README.md Specify flow and sector contribution to total or direct impacts --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fe5496cb..4d0c4b47 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ More visualization examples are available in [Example.Rmd](https://github.com/US #### Examples -Analyze `flow` contribution to `Acidification Potential` in the `Electricity` sector (`221100/US`). +Analyze `flow` contribution to total `Acidification Potential` in the `Electricity` sector (`221100/US`). ``` > ACID_elec <- useeior::calculateFlowContributiontoImpact(model, "221100/US", "Acidification Potential") @@ -170,7 +170,7 @@ Sulfuric acid/emission/air/kg 0.7% Hydrofluoric acid/emission/air/kg 0.2% ``` -Analyze `sector` contribution to `Human Health - Respiratory Effects` in the `Flours and malts` sector (`311210/US`). +Analyze `sector` contribution to direct `Human Health - Respiratory Effects` in the `Flours and malts` sector (`311210/US`). ``` > HHRP_flour <- useeior::calculateSectorContributiontoImpact(model, "311210/US", "Human Health - Respiratory Effects") From 31f93347e212935b69677d0b556fb84b4ce4c808 Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Tue, 28 Dec 2021 13:19:39 -0500 Subject: [PATCH 294/319] Add hyphen before {form}{sector} in model names --- .github/workflows/R-CMD-check.yaml | 4 ++-- .../modelspecs/{USEEIOv2.0i-GHG.yml => USEEIOv2.0-i-GHG.yml} | 2 +- .../{USEEIOv2.0is-GHG.yml => USEEIOv2.0-is-GHG.yml} | 2 +- .../modelspecs/{USEEIOv2.0s-GHG.yml => USEEIOv2.0-s-GHG.yml} | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename inst/extdata/modelspecs/{USEEIOv2.0i-GHG.yml => USEEIOv2.0-i-GHG.yml} (97%) rename inst/extdata/modelspecs/{USEEIOv2.0is-GHG.yml => USEEIOv2.0-is-GHG.yml} (98%) rename inst/extdata/modelspecs/{USEEIOv2.0s-GHG.yml => USEEIOv2.0-s-GHG.yml} (98%) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 26912dd6..eb12358c 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -81,7 +81,7 @@ jobs: run: | require(devtools) devtools::load_all() - m <- useeior::buildModel("USEEIOv2.0i-GHG") + m <- useeior::buildModel("USEEIOv2.0-i-GHG") useeior::printValidationResults(m) shell: Rscript {0} @@ -91,7 +91,7 @@ jobs: run: | require(devtools) devtools::load_all() - m <- useeior::buildModel("USEEIOv2.0s-GHG") + m <- useeior::buildModel("USEEIOv2.0-s-GHG") useeior::printValidationResults(m) shell: Rscript {0} diff --git a/inst/extdata/modelspecs/USEEIOv2.0i-GHG.yml b/inst/extdata/modelspecs/USEEIOv2.0-i-GHG.yml similarity index 97% rename from inst/extdata/modelspecs/USEEIOv2.0i-GHG.yml rename to inst/extdata/modelspecs/USEEIOv2.0-i-GHG.yml index ec6f89f5..03078881 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0i-GHG.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-i-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0i-GHG" # 2012 Detail, Industry +Model: "USEEIOv2.0-i-GHG" # 2012 Detail, Industry BaseIOSchema: 2012 BaseIOLevel: "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.0is-GHG.yml b/inst/extdata/modelspecs/USEEIOv2.0-is-GHG.yml similarity index 98% rename from inst/extdata/modelspecs/USEEIOv2.0is-GHG.yml rename to inst/extdata/modelspecs/USEEIOv2.0-is-GHG.yml index 14240d01..614e8df2 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0is-GHG.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-is-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0is-GHG" +Model: "USEEIOv2.0-is-GHG" BaseIOSchema: 2012 BaseIOLevel: "Summary" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml b/inst/extdata/modelspecs/USEEIOv2.0-s-GHG.yml similarity index 98% rename from inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml rename to inst/extdata/modelspecs/USEEIOv2.0-s-GHG.yml index 33326592..8ef8c724 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0s-GHG.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-s-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0s-GHG" +Model: "USEEIOv2.0-s-GHG" BaseIOSchema: 2012 BaseIOLevel: "Summary" IOYear: 2012 # Year for IO data From 8258f3fc00e87672b643e26ec21a6e695fad92c0 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 28 Dec 2021 14:45:06 -0500 Subject: [PATCH 295/319] add NAICS proxies for S00101 and S00202 electric utilities --- inst/extdata/G_BEAtoUSEEIOtoNAICS_2012.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/extdata/G_BEAtoUSEEIOtoNAICS_2012.csv b/inst/extdata/G_BEAtoUSEEIOtoNAICS_2012.csv index 6c8ba09d..0509dd36 100644 --- a/inst/extdata/G_BEAtoUSEEIOtoNAICS_2012.csv +++ b/inst/extdata/G_BEAtoUSEEIOtoNAICS_2012.csv @@ -164,6 +164,6 @@ G,Government,GFGD,Federal general government,S00500,Federal general government ( G,Government,GFGD,Federal general government,S00500,Federal general government (defense),S00500,Federal general government (defense),928110,National Security G,Government,GFGN,Federal general government,S00600,Federal general government (nondefense),S00600,Federal general government (nondefense),92812,International Affairs G,Government,GFGN,Federal general government,S00600,Federal general government (nondefense),S00600,Federal general government (nondefense),928120,International Affairs -G,Government,GFE,Federal government enterprises,S00101,Federal electric utilities,S00101,Federal electric utilities,, +G,Government,GFE,Federal government enterprises,S00101,Federal electric utilities,S00101,Federal electric utilities,S00101,Federal electric utilities G,Government,GSLE,State and local government enterprises,S00201,State and local government passenger transit,S00201,State and local government passenger transit,S00201,State and local government passenger transit -G,Government,GSLE,State and local government enterprises,S00202,State and local government electric utilities,S00202,State and local government electric utilities,, \ No newline at end of file +G,Government,GSLE,State and local government enterprises,S00202,State and local government electric utilities,S00202,State and local government electric utilities,S00202,State and local government electric utilities \ No newline at end of file From c579bdecdaf77fa1a17647d0d7560bb8bbcf3043 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 28 Dec 2021 12:14:35 -0800 Subject: [PATCH 296/319] Re-generate MasterCrosswalk2012.rda due to 8258f3f. Can confirm exact same changes are made in MasterCrosswalk2012.rda. --- data-raw/MasterCrosswalk.R | 2 +- data/MasterCrosswalk2012.rda | Bin 77742 -> 57310 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/data-raw/MasterCrosswalk.R b/data-raw/MasterCrosswalk.R index 104b5de6..6bf65849 100644 --- a/data-raw/MasterCrosswalk.R +++ b/data-raw/MasterCrosswalk.R @@ -262,8 +262,8 @@ getMasterCrosswalk <- function (year) { } # Order by NAICS and USEEIO code columns MasterCrosswalk[MasterCrosswalk==""] <- NA - rownames(MasterCrosswalk) <- NULL MasterCrosswalk <- MasterCrosswalk[order(MasterCrosswalk[, paste("NAICS_", year, "_Code", sep = "")], MasterCrosswalk[, "USEEIO_Code"]), ] + rownames(MasterCrosswalk) <- NULL return(MasterCrosswalk) } diff --git a/data/MasterCrosswalk2012.rda b/data/MasterCrosswalk2012.rda index 2a26a84b38509d8e49b168e1ea33913fc01751ea..4292b1efbae7ec1c0796f574deff092b0f21c7ef 100644 GIT binary patch delta 56666 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%0A!@ASI`{gbtFe)M!jBcy~P3H>SB4; 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 literal 77742 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 From 7abb50020849ad337a4e40ad72342a7abe98ca23 Mon Sep 17 00:00:00 2001 From: Mo Li Date: Tue, 28 Dec 2021 16:45:44 -0800 Subject: [PATCH 297/319] Minor edits in README --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4d0c4b47..4ebacb6c 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ See [Wiki](https://github.com/USEPA/useeior/wiki) for advanced uses, details abo ``` # Install development version from GitHub +install.packages("devtools") devtools::install_github("USEPA/useeior") ``` @@ -156,7 +157,7 @@ More visualization examples are available in [Example.Rmd](https://github.com/US #### Examples -Analyze `flow` contribution to total `Acidification Potential` in the `Electricity` sector (`221100/US`). +Analyze `flow` contribution to total `Acidification Potential` in the `Electricity` sector (`221100/US`), showing top 5 contributors below. ``` > ACID_elec <- useeior::calculateFlowContributiontoImpact(model, "221100/US", "Acidification Potential") @@ -170,7 +171,7 @@ Sulfuric acid/emission/air/kg 0.7% Hydrofluoric acid/emission/air/kg 0.2% ``` -Analyze `sector` contribution to direct `Human Health - Respiratory Effects` in the `Flours and malts` sector (`311210/US`). +Analyze `sector` contribution to direct `Human Health - Respiratory Effects` in the `Flours and malts` sector (`311210/US`), showing top 5 contributors below. ``` > HHRP_flour <- useeior::calculateSectorContributiontoImpact(model, "311210/US", "Human Health - Respiratory Effects") From 80485661ad05dcf5a9c27d947efb3b0152f6bb96 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 29 Dec 2021 09:12:52 -0800 Subject: [PATCH 298/319] Add space between "USEEIO" and "v" in modelname accomodating to Versioning Scheme at #8a43f7f --- .github/workflows/R-CMD-check.yaml | 16 ++++++++-------- R/VisualizationFunctions.R | 2 +- README.md | 4 ++-- inst/doc/CompareModels_render.Rmd | 6 +++--- inst/doc/Example.Rmd | 4 ++-- inst/doc/ValidateModel_render.Rmd | 6 +++--- .../{USEEIOv2.0-411.yml => USEEIO v2.0-411.yml} | 2 +- ...EIOv2.0-79-GHG.yml => USEEIO v2.0-79-GHG.yml} | 2 +- .../{USEEIOv2.0-GHG.yml => USEEIO v2.0-GHG.yml} | 2 +- ...SEEIOv2.0-i-GHG.yml => USEEIO v2.0-i-GHG.yml} | 2 +- ...EIOv2.0-is-GHG.yml => USEEIO v2.0-is-GHG.yml} | 2 +- ...SEEIOv2.0-s-GHG.yml => USEEIO v2.0-s-GHG.yml} | 2 +- ...SEEIOv2.0.1-411.yml => USEEIO v2.0.1-411.yml} | 2 +- .../{USEEIOv2.0.yml => USEEIO v2.0.yml} | 2 +- .../{USEEIOv2.1-422.yml => USEEIO v2.1-422.yml} | 2 +- 15 files changed, 28 insertions(+), 28 deletions(-) rename inst/extdata/modelspecs/{USEEIOv2.0-411.yml => USEEIO v2.0-411.yml} (99%) rename inst/extdata/modelspecs/{USEEIOv2.0-79-GHG.yml => USEEIO v2.0-79-GHG.yml} (98%) rename inst/extdata/modelspecs/{USEEIOv2.0-GHG.yml => USEEIO v2.0-GHG.yml} (97%) rename inst/extdata/modelspecs/{USEEIOv2.0-i-GHG.yml => USEEIO v2.0-i-GHG.yml} (97%) rename inst/extdata/modelspecs/{USEEIOv2.0-is-GHG.yml => USEEIO v2.0-is-GHG.yml} (98%) rename inst/extdata/modelspecs/{USEEIOv2.0-s-GHG.yml => USEEIO v2.0-s-GHG.yml} (98%) rename inst/extdata/modelspecs/{USEEIOv2.0.1-411.yml => USEEIO v2.0.1-411.yml} (99%) rename inst/extdata/modelspecs/{USEEIOv2.0.yml => USEEIO v2.0.yml} (99%) rename inst/extdata/modelspecs/{USEEIOv2.1-422.yml => USEEIO v2.1-422.yml} (99%) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index eb12358c..d04e8735 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -66,42 +66,42 @@ jobs: - uses: r-lib/actions/check-r-package@v1 - - name: Build and validate models - USEEIOv2.0 detail model with waste disaggregation + - name: Build and validate models - USEEIO v2.0 detail model with waste disaggregation if: always() run: | require(devtools) devtools::load_all() - m <- useeior::buildModel("USEEIOv2.0-411") + m <- useeior::buildModel("USEEIO v2.0-411") useeior::printValidationResults(m) shell: Rscript {0} - - name: Build and validate models - USEEIOv2.0 industry model + - name: Build and validate models - USEEIO v2.0 industry model if: always() run: | require(devtools) devtools::load_all() - m <- useeior::buildModel("USEEIOv2.0-i-GHG") + m <- useeior::buildModel("USEEIO v2.0-i-GHG") useeior::printValidationResults(m) shell: Rscript {0} - - name: Build and validate models - USEEIOv2.0 summary model + - name: Build and validate models - USEEIO v2.0 summary model if: always() run: | require(devtools) devtools::load_all() - m <- useeior::buildModel("USEEIOv2.0-s-GHG") + m <- useeior::buildModel("USEEIO v2.0-s-GHG") useeior::printValidationResults(m) shell: Rscript {0} - - name: Build and validate models - USEEIOv2.0.1 detail model with waste disaggregation + - name: Build and validate models - USEEIO v2.0.1 detail model with waste disaggregation if: always() run: | require(devtools) devtools::load_all() - m <- useeior::buildModel("USEEIOv2.0.1-411") + m <- useeior::buildModel("USEEIO v2.0.1-411") useeior::printValidationResults(m) shell: Rscript {0} diff --git a/R/VisualizationFunctions.R b/R/VisualizationFunctions.R index 839875c0..7f761ced 100644 --- a/R/VisualizationFunctions.R +++ b/R/VisualizationFunctions.R @@ -231,7 +231,7 @@ heatmapSectorRanking <- function(model, matrix, indicators, sector_to_remove, N_ mapping$GroupName <- mapping$SectorName # Prepare data frame for plot df <- as.data.frame(prop.table(matrix, margin = 2)) - if (model$specs$Model=="USEEIOv2.0") { + if (model$specs$Model=="USEEIO v2.0") { colnames(df) <- model$Indicators$meta[order(match(model$Indicators$meta$Name, colnames(df))), "Code"] } df$Sector <- toupper(gsub("/.*", "", rownames(df))) diff --git a/README.md b/README.md index 07a46adf..4e8c2d7e 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,10 @@ View all models with existing config files that can be built using useeior useeior::seeAvailableModels() ``` -Build a model that is available in useeior (e.g. the USEEIOv2.0.1 model) +Build a model that is available in useeior (e.g. the USEEIO v2.0.1 model) ``` -model <- useeior::buildModel('USEEIOv2.0.1') +model <- useeior::buildModel('USEEIO v2.0.1') ``` To build a customized model, refer to [Advanced Uses](https://github.com/USEPA/useeior/wiki/Using-useeior#advanced-uses) in Wiki. diff --git a/inst/doc/CompareModels_render.Rmd b/inst/doc/CompareModels_render.Rmd index e64ec14c..b1bc391e 100644 --- a/inst/doc/CompareModels_render.Rmd +++ b/inst/doc/CompareModels_render.Rmd @@ -3,9 +3,9 @@ output: html_document params: modelname_pair: value: - # - ["USEEIOv2.0", "USEEIOv2.0_nodisagg"] - - ["USEEIOv2.0", "USEEIOv2.0.1"] - - ["USEEIOv2.0.1", "USEEIOv2.1"] + # - ["USEEIO v2.0", "USEEIO v2.0_nodisagg"] + - ["USEEIO v2.0", "USEEIO v2.0.1"] + - ["USEEIO v2.0.1", "USEEIO v2.1"] --- ```{r setup, include=FALSE} diff --git a/inst/doc/Example.Rmd b/inst/doc/Example.Rmd index 36dd284b..a1b730ea 100644 --- a/inst/doc/Example.Rmd +++ b/inst/doc/Example.Rmd @@ -24,7 +24,7 @@ library(useeior) # Build Model ```{r include=FALSE} -model <- buildModel("USEEIOv2.0.1") +model <- buildModel("USEEIO v2.0.1") ``` # Validation @@ -52,7 +52,7 @@ colnames(result$LCIA_d) <- model$Indicators$meta[match(colnames(result$LCIA_d), colnames(result$LCIA_f) <- colnames(result$LCIA_d) indicators <- c("ACID", "CCDD", "CMSW", "CRHW", "ENRG", "ETOX", "EUTR", "GHG", "HRSP", "HTOX", "LAND", "MNRL", "OZON", "SMOG", "WATR") -model_list <- list("USEEIOv2.0.1" = model) +model_list <- list("USEEIO v2.0.1" = model) ``` ```{r "ranking_direct_prod_final_cons_v2.0.1", fig.width = 20, fig.height = 12} diff --git a/inst/doc/ValidateModel_render.Rmd b/inst/doc/ValidateModel_render.Rmd index 0e491a62..3c84f09a 100644 --- a/inst/doc/ValidateModel_render.Rmd +++ b/inst/doc/ValidateModel_render.Rmd @@ -3,9 +3,9 @@ title: "ValidateModel_render" output: html_document params: modelname: - - "USEEIOv2.0" - - "USEEIOv2.0.1" - - "USEEIOv2.1" + - "USEEIO v2.0" + - "USEEIO v2.0.1" + - "USEEIO v2.1" --- ```{r setup, include=FALSE} diff --git a/inst/extdata/modelspecs/USEEIOv2.0-411.yml b/inst/extdata/modelspecs/USEEIO v2.0-411.yml similarity index 99% rename from inst/extdata/modelspecs/USEEIOv2.0-411.yml rename to inst/extdata/modelspecs/USEEIO v2.0-411.yml index 585dc144..575de5e6 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0-411.yml +++ b/inst/extdata/modelspecs/USEEIO v2.0-411.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0-411" +Model: "USEEIO v2.0-411" BaseIOSchema: 2012 BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.0-79-GHG.yml b/inst/extdata/modelspecs/USEEIO v2.0-79-GHG.yml similarity index 98% rename from inst/extdata/modelspecs/USEEIOv2.0-79-GHG.yml rename to inst/extdata/modelspecs/USEEIO v2.0-79-GHG.yml index 57a35cbf..0d3d72d2 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0-79-GHG.yml +++ b/inst/extdata/modelspecs/USEEIO v2.0-79-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0-79-GHG" +Model: "USEEIO v2.0-79-GHG" BaseIOSchema: 2012 BaseIOLevel: "Summary" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.0-GHG.yml b/inst/extdata/modelspecs/USEEIO v2.0-GHG.yml similarity index 97% rename from inst/extdata/modelspecs/USEEIOv2.0-GHG.yml rename to inst/extdata/modelspecs/USEEIO v2.0-GHG.yml index 2f7b1d31..1fd29471 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0-GHG.yml +++ b/inst/extdata/modelspecs/USEEIO v2.0-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0-GHG" # 2012 Detail, Commodity +Model: "USEEIO v2.0-GHG" # 2012 Detail, Commodity BaseIOSchema: 2012 BaseIOLevel: "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.0-i-GHG.yml b/inst/extdata/modelspecs/USEEIO v2.0-i-GHG.yml similarity index 97% rename from inst/extdata/modelspecs/USEEIOv2.0-i-GHG.yml rename to inst/extdata/modelspecs/USEEIO v2.0-i-GHG.yml index 03078881..186ea052 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0-i-GHG.yml +++ b/inst/extdata/modelspecs/USEEIO v2.0-i-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0-i-GHG" # 2012 Detail, Industry +Model: "USEEIO v2.0-i-GHG" # 2012 Detail, Industry BaseIOSchema: 2012 BaseIOLevel: "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.0-is-GHG.yml b/inst/extdata/modelspecs/USEEIO v2.0-is-GHG.yml similarity index 98% rename from inst/extdata/modelspecs/USEEIOv2.0-is-GHG.yml rename to inst/extdata/modelspecs/USEEIO v2.0-is-GHG.yml index 614e8df2..8d59ac13 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0-is-GHG.yml +++ b/inst/extdata/modelspecs/USEEIO v2.0-is-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0-is-GHG" +Model: "USEEIO v2.0-is-GHG" BaseIOSchema: 2012 BaseIOLevel: "Summary" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.0-s-GHG.yml b/inst/extdata/modelspecs/USEEIO v2.0-s-GHG.yml similarity index 98% rename from inst/extdata/modelspecs/USEEIOv2.0-s-GHG.yml rename to inst/extdata/modelspecs/USEEIO v2.0-s-GHG.yml index 8ef8c724..abf37ed6 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0-s-GHG.yml +++ b/inst/extdata/modelspecs/USEEIO v2.0-s-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0-s-GHG" +Model: "USEEIO v2.0-s-GHG" BaseIOSchema: 2012 BaseIOLevel: "Summary" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.0.1-411.yml b/inst/extdata/modelspecs/USEEIO v2.0.1-411.yml similarity index 99% rename from inst/extdata/modelspecs/USEEIOv2.0.1-411.yml rename to inst/extdata/modelspecs/USEEIO v2.0.1-411.yml index cc7b26a2..4040286f 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0.1-411.yml +++ b/inst/extdata/modelspecs/USEEIO v2.0.1-411.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0.1-411" +Model: "USEEIO v2.0.1-411" BaseIOSchema: 2012 BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.0.yml b/inst/extdata/modelspecs/USEEIO v2.0.yml similarity index 99% rename from inst/extdata/modelspecs/USEEIOv2.0.yml rename to inst/extdata/modelspecs/USEEIO v2.0.yml index 1aec9ba1..bb267465 100644 --- a/inst/extdata/modelspecs/USEEIOv2.0.yml +++ b/inst/extdata/modelspecs/USEEIO v2.0.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.0" +Model: "USEEIO v2.0" BaseIOSchema: 2012 BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIOv2.1-422.yml b/inst/extdata/modelspecs/USEEIO v2.1-422.yml similarity index 99% rename from inst/extdata/modelspecs/USEEIOv2.1-422.yml rename to inst/extdata/modelspecs/USEEIO v2.1-422.yml index 42ba7621..83a5a7af 100644 --- a/inst/extdata/modelspecs/USEEIOv2.1-422.yml +++ b/inst/extdata/modelspecs/USEEIO v2.1-422.yml @@ -1,4 +1,4 @@ -Model: "USEEIOv2.1-422" +Model: "USEEIO v2.1-422" BaseIOSchema: 2012 BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data From afa0dcd4ced306515602329bba368f9f51373df9 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 29 Dec 2021 11:25:10 -0800 Subject: [PATCH 299/319] Revert "Add space between "USEEIO" and "v" in modelname" This reverts commit 80485661ad05dcf5a9c27d947efb3b0152f6bb96. --- .github/workflows/R-CMD-check.yaml | 16 ++++++++-------- R/VisualizationFunctions.R | 2 +- README.md | 4 ++-- inst/doc/CompareModels_render.Rmd | 6 +++--- inst/doc/Example.Rmd | 4 ++-- inst/doc/ValidateModel_render.Rmd | 6 +++--- .../{USEEIO v2.0-411.yml => USEEIOv2.0-411.yml} | 2 +- ...EIO v2.0-79-GHG.yml => USEEIOv2.0-79-GHG.yml} | 2 +- .../{USEEIO v2.0-GHG.yml => USEEIOv2.0-GHG.yml} | 2 +- ...SEEIO v2.0-i-GHG.yml => USEEIOv2.0-i-GHG.yml} | 2 +- ...EIO v2.0-is-GHG.yml => USEEIOv2.0-is-GHG.yml} | 2 +- ...SEEIO v2.0-s-GHG.yml => USEEIOv2.0-s-GHG.yml} | 2 +- ...SEEIO v2.0.1-411.yml => USEEIOv2.0.1-411.yml} | 2 +- .../{USEEIO v2.0.yml => USEEIOv2.0.yml} | 2 +- .../{USEEIO v2.1-422.yml => USEEIOv2.1-422.yml} | 2 +- 15 files changed, 28 insertions(+), 28 deletions(-) rename inst/extdata/modelspecs/{USEEIO v2.0-411.yml => USEEIOv2.0-411.yml} (99%) rename inst/extdata/modelspecs/{USEEIO v2.0-79-GHG.yml => USEEIOv2.0-79-GHG.yml} (98%) rename inst/extdata/modelspecs/{USEEIO v2.0-GHG.yml => USEEIOv2.0-GHG.yml} (97%) rename inst/extdata/modelspecs/{USEEIO v2.0-i-GHG.yml => USEEIOv2.0-i-GHG.yml} (97%) rename inst/extdata/modelspecs/{USEEIO v2.0-is-GHG.yml => USEEIOv2.0-is-GHG.yml} (98%) rename inst/extdata/modelspecs/{USEEIO v2.0-s-GHG.yml => USEEIOv2.0-s-GHG.yml} (98%) rename inst/extdata/modelspecs/{USEEIO v2.0.1-411.yml => USEEIOv2.0.1-411.yml} (99%) rename inst/extdata/modelspecs/{USEEIO v2.0.yml => USEEIOv2.0.yml} (99%) rename inst/extdata/modelspecs/{USEEIO v2.1-422.yml => USEEIOv2.1-422.yml} (99%) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index d04e8735..eb12358c 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -66,42 +66,42 @@ jobs: - uses: r-lib/actions/check-r-package@v1 - - name: Build and validate models - USEEIO v2.0 detail model with waste disaggregation + - name: Build and validate models - USEEIOv2.0 detail model with waste disaggregation if: always() run: | require(devtools) devtools::load_all() - m <- useeior::buildModel("USEEIO v2.0-411") + m <- useeior::buildModel("USEEIOv2.0-411") useeior::printValidationResults(m) shell: Rscript {0} - - name: Build and validate models - USEEIO v2.0 industry model + - name: Build and validate models - USEEIOv2.0 industry model if: always() run: | require(devtools) devtools::load_all() - m <- useeior::buildModel("USEEIO v2.0-i-GHG") + m <- useeior::buildModel("USEEIOv2.0-i-GHG") useeior::printValidationResults(m) shell: Rscript {0} - - name: Build and validate models - USEEIO v2.0 summary model + - name: Build and validate models - USEEIOv2.0 summary model if: always() run: | require(devtools) devtools::load_all() - m <- useeior::buildModel("USEEIO v2.0-s-GHG") + m <- useeior::buildModel("USEEIOv2.0-s-GHG") useeior::printValidationResults(m) shell: Rscript {0} - - name: Build and validate models - USEEIO v2.0.1 detail model with waste disaggregation + - name: Build and validate models - USEEIOv2.0.1 detail model with waste disaggregation if: always() run: | require(devtools) devtools::load_all() - m <- useeior::buildModel("USEEIO v2.0.1-411") + m <- useeior::buildModel("USEEIOv2.0.1-411") useeior::printValidationResults(m) shell: Rscript {0} diff --git a/R/VisualizationFunctions.R b/R/VisualizationFunctions.R index 7f761ced..839875c0 100644 --- a/R/VisualizationFunctions.R +++ b/R/VisualizationFunctions.R @@ -231,7 +231,7 @@ heatmapSectorRanking <- function(model, matrix, indicators, sector_to_remove, N_ mapping$GroupName <- mapping$SectorName # Prepare data frame for plot df <- as.data.frame(prop.table(matrix, margin = 2)) - if (model$specs$Model=="USEEIO v2.0") { + if (model$specs$Model=="USEEIOv2.0") { colnames(df) <- model$Indicators$meta[order(match(model$Indicators$meta$Name, colnames(df))), "Code"] } df$Sector <- toupper(gsub("/.*", "", rownames(df))) diff --git a/README.md b/README.md index 4e8c2d7e..07a46adf 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,10 @@ View all models with existing config files that can be built using useeior useeior::seeAvailableModels() ``` -Build a model that is available in useeior (e.g. the USEEIO v2.0.1 model) +Build a model that is available in useeior (e.g. the USEEIOv2.0.1 model) ``` -model <- useeior::buildModel('USEEIO v2.0.1') +model <- useeior::buildModel('USEEIOv2.0.1') ``` To build a customized model, refer to [Advanced Uses](https://github.com/USEPA/useeior/wiki/Using-useeior#advanced-uses) in Wiki. diff --git a/inst/doc/CompareModels_render.Rmd b/inst/doc/CompareModels_render.Rmd index b1bc391e..e64ec14c 100644 --- a/inst/doc/CompareModels_render.Rmd +++ b/inst/doc/CompareModels_render.Rmd @@ -3,9 +3,9 @@ output: html_document params: modelname_pair: value: - # - ["USEEIO v2.0", "USEEIO v2.0_nodisagg"] - - ["USEEIO v2.0", "USEEIO v2.0.1"] - - ["USEEIO v2.0.1", "USEEIO v2.1"] + # - ["USEEIOv2.0", "USEEIOv2.0_nodisagg"] + - ["USEEIOv2.0", "USEEIOv2.0.1"] + - ["USEEIOv2.0.1", "USEEIOv2.1"] --- ```{r setup, include=FALSE} diff --git a/inst/doc/Example.Rmd b/inst/doc/Example.Rmd index a1b730ea..36dd284b 100644 --- a/inst/doc/Example.Rmd +++ b/inst/doc/Example.Rmd @@ -24,7 +24,7 @@ library(useeior) # Build Model ```{r include=FALSE} -model <- buildModel("USEEIO v2.0.1") +model <- buildModel("USEEIOv2.0.1") ``` # Validation @@ -52,7 +52,7 @@ colnames(result$LCIA_d) <- model$Indicators$meta[match(colnames(result$LCIA_d), colnames(result$LCIA_f) <- colnames(result$LCIA_d) indicators <- c("ACID", "CCDD", "CMSW", "CRHW", "ENRG", "ETOX", "EUTR", "GHG", "HRSP", "HTOX", "LAND", "MNRL", "OZON", "SMOG", "WATR") -model_list <- list("USEEIO v2.0.1" = model) +model_list <- list("USEEIOv2.0.1" = model) ``` ```{r "ranking_direct_prod_final_cons_v2.0.1", fig.width = 20, fig.height = 12} diff --git a/inst/doc/ValidateModel_render.Rmd b/inst/doc/ValidateModel_render.Rmd index 3c84f09a..0e491a62 100644 --- a/inst/doc/ValidateModel_render.Rmd +++ b/inst/doc/ValidateModel_render.Rmd @@ -3,9 +3,9 @@ title: "ValidateModel_render" output: html_document params: modelname: - - "USEEIO v2.0" - - "USEEIO v2.0.1" - - "USEEIO v2.1" + - "USEEIOv2.0" + - "USEEIOv2.0.1" + - "USEEIOv2.1" --- ```{r setup, include=FALSE} diff --git a/inst/extdata/modelspecs/USEEIO v2.0-411.yml b/inst/extdata/modelspecs/USEEIOv2.0-411.yml similarity index 99% rename from inst/extdata/modelspecs/USEEIO v2.0-411.yml rename to inst/extdata/modelspecs/USEEIOv2.0-411.yml index 575de5e6..585dc144 100644 --- a/inst/extdata/modelspecs/USEEIO v2.0-411.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-411.yml @@ -1,4 +1,4 @@ -Model: "USEEIO v2.0-411" +Model: "USEEIOv2.0-411" BaseIOSchema: 2012 BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIO v2.0-79-GHG.yml b/inst/extdata/modelspecs/USEEIOv2.0-79-GHG.yml similarity index 98% rename from inst/extdata/modelspecs/USEEIO v2.0-79-GHG.yml rename to inst/extdata/modelspecs/USEEIOv2.0-79-GHG.yml index 0d3d72d2..57a35cbf 100644 --- a/inst/extdata/modelspecs/USEEIO v2.0-79-GHG.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-79-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIO v2.0-79-GHG" +Model: "USEEIOv2.0-79-GHG" BaseIOSchema: 2012 BaseIOLevel: "Summary" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIO v2.0-GHG.yml b/inst/extdata/modelspecs/USEEIOv2.0-GHG.yml similarity index 97% rename from inst/extdata/modelspecs/USEEIO v2.0-GHG.yml rename to inst/extdata/modelspecs/USEEIOv2.0-GHG.yml index 1fd29471..2f7b1d31 100644 --- a/inst/extdata/modelspecs/USEEIO v2.0-GHG.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIO v2.0-GHG" # 2012 Detail, Commodity +Model: "USEEIOv2.0-GHG" # 2012 Detail, Commodity BaseIOSchema: 2012 BaseIOLevel: "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIO v2.0-i-GHG.yml b/inst/extdata/modelspecs/USEEIOv2.0-i-GHG.yml similarity index 97% rename from inst/extdata/modelspecs/USEEIO v2.0-i-GHG.yml rename to inst/extdata/modelspecs/USEEIOv2.0-i-GHG.yml index 186ea052..03078881 100644 --- a/inst/extdata/modelspecs/USEEIO v2.0-i-GHG.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-i-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIO v2.0-i-GHG" # 2012 Detail, Industry +Model: "USEEIOv2.0-i-GHG" # 2012 Detail, Industry BaseIOSchema: 2012 BaseIOLevel: "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIO v2.0-is-GHG.yml b/inst/extdata/modelspecs/USEEIOv2.0-is-GHG.yml similarity index 98% rename from inst/extdata/modelspecs/USEEIO v2.0-is-GHG.yml rename to inst/extdata/modelspecs/USEEIOv2.0-is-GHG.yml index 8d59ac13..614e8df2 100644 --- a/inst/extdata/modelspecs/USEEIO v2.0-is-GHG.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-is-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIO v2.0-is-GHG" +Model: "USEEIOv2.0-is-GHG" BaseIOSchema: 2012 BaseIOLevel: "Summary" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIO v2.0-s-GHG.yml b/inst/extdata/modelspecs/USEEIOv2.0-s-GHG.yml similarity index 98% rename from inst/extdata/modelspecs/USEEIO v2.0-s-GHG.yml rename to inst/extdata/modelspecs/USEEIOv2.0-s-GHG.yml index abf37ed6..8ef8c724 100644 --- a/inst/extdata/modelspecs/USEEIO v2.0-s-GHG.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0-s-GHG.yml @@ -1,4 +1,4 @@ -Model: "USEEIO v2.0-s-GHG" +Model: "USEEIOv2.0-s-GHG" BaseIOSchema: 2012 BaseIOLevel: "Summary" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIO v2.0.1-411.yml b/inst/extdata/modelspecs/USEEIOv2.0.1-411.yml similarity index 99% rename from inst/extdata/modelspecs/USEEIO v2.0.1-411.yml rename to inst/extdata/modelspecs/USEEIOv2.0.1-411.yml index 4040286f..cc7b26a2 100644 --- a/inst/extdata/modelspecs/USEEIO v2.0.1-411.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0.1-411.yml @@ -1,4 +1,4 @@ -Model: "USEEIO v2.0.1-411" +Model: "USEEIOv2.0.1-411" BaseIOSchema: 2012 BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIO v2.0.yml b/inst/extdata/modelspecs/USEEIOv2.0.yml similarity index 99% rename from inst/extdata/modelspecs/USEEIO v2.0.yml rename to inst/extdata/modelspecs/USEEIOv2.0.yml index bb267465..1aec9ba1 100644 --- a/inst/extdata/modelspecs/USEEIO v2.0.yml +++ b/inst/extdata/modelspecs/USEEIOv2.0.yml @@ -1,4 +1,4 @@ -Model: "USEEIO v2.0" +Model: "USEEIOv2.0" BaseIOSchema: 2012 BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data diff --git a/inst/extdata/modelspecs/USEEIO v2.1-422.yml b/inst/extdata/modelspecs/USEEIOv2.1-422.yml similarity index 99% rename from inst/extdata/modelspecs/USEEIO v2.1-422.yml rename to inst/extdata/modelspecs/USEEIOv2.1-422.yml index 83a5a7af..42ba7621 100644 --- a/inst/extdata/modelspecs/USEEIO v2.1-422.yml +++ b/inst/extdata/modelspecs/USEEIOv2.1-422.yml @@ -1,4 +1,4 @@ -Model: "USEEIO v2.1-422" +Model: "USEEIOv2.1-422" BaseIOSchema: 2012 BaseIOLevel: &BaseIOLevel "Detail" IOYear: 2012 # Year for IO data From d5ab44f26d06abd92606fd9bbb9641fa94b13bf2 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 29 Dec 2021 12:05:45 -0800 Subject: [PATCH 300/319] Rename columns in flow/sector contribution to impact table, update function docs. --- R/CalculationFunctions.R | 34 ++++++++++++--------- man/calculateFlowContributiontoImpact.Rd | 18 +++++------ man/calculatePercentContributiontoImpact.Rd | 2 +- man/calculateSectorContributiontoImpact.Rd | 18 +++++------ 4 files changed, 38 insertions(+), 34 deletions(-) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index ee24fc9a..819df41d 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -155,7 +155,7 @@ normalizeResultMatrixByTotalImpacts <- function(m) { #' Dot multiplies two vectors to calculate an impact score and the percent contribution each score to the total #' @param x, numeric vector of length n #' @param y, numeric vector of length n -#' @return A dataframe sorted from highest "contribution", also showing "x","y","impact" +#' @return A dataframe sorted by contribution (high-to-low), also showing "x","y","impact" calculatePercentContributiontoImpact <- function (x,y) { df <- cbind.data.frame(x,y) df["impact"] <- df[,"x"]*df[,"y"] @@ -164,13 +164,13 @@ calculatePercentContributiontoImpact <- function (x,y) { return(df) } -#' Calculate the percent contribution of sectors to an N indicator result -#' Uses model L matrix for total requirements and D matrix for direct indicator result -#' @param model A complete EEIO model: a list with USEEIO model components and attributes -#' @param sector, str, index of a model sector for use in the M matrix, e.g. "221100/US" -#' @param indicator, str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential" -#' @param domestic, boolean, sets model to use domestic flow matrix. Default is FALSE. -#' @return A dataframe sorted from highest process contribution "contribution", also showing "x","y","impact" +#' Calculate the percent contribution of sectors to direct+indirect impacts by an indicator, +#' using the product of model L matrix (total requirements) and D matrix (direct impacts by indicator). +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param sector, str, index of a model sector for use in the L matrix, e.g. "221100/US". +#' @param indicator, str, index of a model indicator for use in the D matrix, e.g. "Acidification Potential". +#' @param domestic, boolean, sets model to use domestic flow matrix. Default is FALSE. +#' @return A dataframe sorted by contribution (high-to-low), also showing "L", "D", "impact". #' @export calculateSectorContributiontoImpact <- function (model, sector, indicator, domestic=FALSE) { L <- model$L @@ -179,6 +179,8 @@ calculateSectorContributiontoImpact <- function (model, sector, indicator, domes } D <- model$D df <- calculatePercentContributiontoImpact(L[,sector],D[indicator,]) + # Rename x and y cols + colnames(df)[colnames(df)==c("x", "y")] <- c("L", "D") # Add sector name for easier interpretation of results rownames(df) <- paste(rownames(df), model$Commodities[match(rownames(df), @@ -187,13 +189,13 @@ calculateSectorContributiontoImpact <- function (model, sector, indicator, domes return(df) } -#' Calculate the percent contribution of M flows to an N indicator result -#' Uses model M matrix for flows and C matrix for indicator -#' @param model A complete EEIO model: a list with USEEIO model components and attributes -#' @param sector, str, index of a model sector for use in the M matrix, e.g. "221100/US" -#' @param indicator, str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential" -#' @param domestic, boolean, sets model to use domestic flow matrix. Default is FALSE. -#' @return A dataframe sorted from highest flow contribution "contribution", also showing "x","y","impact" +#' Calculate the percent contribution of flows to direct+indirect impacts by an indicator, +#' using model M matrix for total impacts of flows and C matrix for indicator. +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param sector, str, index of a model sector for use in the M matrix, e.g. "221100/US". +#' @param indicator, str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential". +#' @param domestic, boolean, sets model to use domestic flow matrix. Default is FALSE. +#' @return A dataframe sorted by contribution (high-to-low), also showing "M", "C", "impact". #' @export calculateFlowContributiontoImpact <- function (model, sector, indicator, domestic=FALSE) { M <- model$M @@ -202,6 +204,8 @@ calculateFlowContributiontoImpact <- function (model, sector, indicator, domesti M <- model$M_d } df <- calculatePercentContributiontoImpact(M[,sector], C[indicator,]) + # Rename x and y cols + colnames(df)[colnames(df)==c("x", "y")] <- c("M", "C") return(df) } diff --git a/man/calculateFlowContributiontoImpact.Rd b/man/calculateFlowContributiontoImpact.Rd index 5c01bde9..90339559 100644 --- a/man/calculateFlowContributiontoImpact.Rd +++ b/man/calculateFlowContributiontoImpact.Rd @@ -2,24 +2,24 @@ % Please edit documentation in R/CalculationFunctions.R \name{calculateFlowContributiontoImpact} \alias{calculateFlowContributiontoImpact} -\title{Calculate the percent contribution of M flows to an N indicator result -Uses model M matrix for flows and C matrix for indicator} +\title{Calculate the percent contribution of flows to direct+indirect impacts by an indicator, +using model M matrix for total impacts of flows and C matrix for indicator.} \usage{ calculateFlowContributiontoImpact(model, sector, indicator, domestic = FALSE) } \arguments{ -\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} -\item{sector, }{str, index of a model sector for use in the M matrix, e.g. "221100/US"} +\item{sector, }{str, index of a model sector for use in the M matrix, e.g. "221100/US".} -\item{indicator, }{str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential"} +\item{indicator, }{str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential".} -\item{domestic, }{boolean, sets model to use domestic flow matrix. Default is FALSE.} +\item{domestic, }{boolean, sets model to use domestic flow matrix. Default is FALSE.} } \value{ -A dataframe sorted from highest flow contribution "contribution", also showing "x","y","impact" +A dataframe sorted by contribution (high-to-low), also showing "M", "C", "impact". } \description{ -Calculate the percent contribution of M flows to an N indicator result -Uses model M matrix for flows and C matrix for indicator +Calculate the percent contribution of flows to direct+indirect impacts by an indicator, +using model M matrix for total impacts of flows and C matrix for indicator. } diff --git a/man/calculatePercentContributiontoImpact.Rd b/man/calculatePercentContributiontoImpact.Rd index ef2742af..d696bf11 100644 --- a/man/calculatePercentContributiontoImpact.Rd +++ b/man/calculatePercentContributiontoImpact.Rd @@ -12,7 +12,7 @@ calculatePercentContributiontoImpact(x, y) \item{y, }{numeric vector of length n} } \value{ -A dataframe sorted from highest "contribution", also showing "x","y","impact" +A dataframe sorted by contribution (high-to-low), also showing "x","y","impact" } \description{ Dot multiplies two vectors to calculate an impact score and the percent contribution each score to the total diff --git a/man/calculateSectorContributiontoImpact.Rd b/man/calculateSectorContributiontoImpact.Rd index c46998dd..378a2b53 100644 --- a/man/calculateSectorContributiontoImpact.Rd +++ b/man/calculateSectorContributiontoImpact.Rd @@ -2,24 +2,24 @@ % Please edit documentation in R/CalculationFunctions.R \name{calculateSectorContributiontoImpact} \alias{calculateSectorContributiontoImpact} -\title{Calculate the percent contribution of sectors to an N indicator result -Uses model L matrix for total requirements and D matrix for direct indicator result} +\title{Calculate the percent contribution of sectors to direct+indirect impacts by an indicator, +using the product of model L matrix (total requirements) and D matrix (direct impacts by indicator).} \usage{ calculateSectorContributiontoImpact(model, sector, indicator, domestic = FALSE) } \arguments{ -\item{model}{A complete EEIO model: a list with USEEIO model components and attributes} +\item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} -\item{sector, }{str, index of a model sector for use in the M matrix, e.g. "221100/US"} +\item{sector, }{str, index of a model sector for use in the L matrix, e.g. "221100/US".} -\item{indicator, }{str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential"} +\item{indicator, }{str, index of a model indicator for use in the D matrix, e.g. "Acidification Potential".} -\item{domestic, }{boolean, sets model to use domestic flow matrix. Default is FALSE.} +\item{domestic, }{boolean, sets model to use domestic flow matrix. Default is FALSE.} } \value{ -A dataframe sorted from highest process contribution "contribution", also showing "x","y","impact" +A dataframe sorted by contribution (high-to-low), also showing "L", "D", "impact". } \description{ -Calculate the percent contribution of sectors to an N indicator result -Uses model L matrix for total requirements and D matrix for direct indicator result +Calculate the percent contribution of sectors to direct+indirect impacts by an indicator, +using the product of model L matrix (total requirements) and D matrix (direct impacts by indicator). } From e51d1f447d4672d888855532377fc2f1bff16d91 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 29 Dec 2021 12:06:52 -0800 Subject: [PATCH 301/319] Correct explanation about flow/sector contribution in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4ebacb6c..df97ccee 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,7 @@ More visualization examples are available in [Example.Rmd](https://github.com/US #### Examples -Analyze `flow` contribution to total `Acidification Potential` in the `Electricity` sector (`221100/US`), showing top 5 contributors below. +Analyze `flow` contribution to total (direct+indirect) `Acidification Potential` in the `Electricity` sector (`221100/US`), showing top 5 contributors below. ``` > ACID_elec <- useeior::calculateFlowContributiontoImpact(model, "221100/US", "Acidification Potential") @@ -171,7 +171,7 @@ Sulfuric acid/emission/air/kg 0.7% Hydrofluoric acid/emission/air/kg 0.2% ``` -Analyze `sector` contribution to direct `Human Health - Respiratory Effects` in the `Flours and malts` sector (`311210/US`), showing top 5 contributors below. +Analyze `sector` contribution to total (direct+indirect) `Human Health - Respiratory Effects` in the `Flours and malts` sector (`311210/US`), showing top 5 contributors below. ``` > HHRP_flour <- useeior::calculateSectorContributiontoImpact(model, "311210/US", "Human Health - Respiratory Effects") From aa8340be0eafb8d4d2b7f9823dd59fc664c5f781 Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Wed, 29 Dec 2021 15:14:17 -0500 Subject: [PATCH 302/319] Correct description of parameters in calculateSectorContributiontoImpact --- R/CalculationFunctions.R | 4 ++-- man/calculateSectorContributiontoImpact.Rd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index ee24fc9a..7b466e23 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -167,8 +167,8 @@ calculatePercentContributiontoImpact <- function (x,y) { #' Calculate the percent contribution of sectors to an N indicator result #' Uses model L matrix for total requirements and D matrix for direct indicator result #' @param model A complete EEIO model: a list with USEEIO model components and attributes -#' @param sector, str, index of a model sector for use in the M matrix, e.g. "221100/US" -#' @param indicator, str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential" +#' @param sector, str, name of a model sector to inspect contribution to, e.g. "221100/US" +#' @param indicator, str, name of a model indicator to evaluate contribution of sector to, e.g. "Acidification Potential" #' @param domestic, boolean, sets model to use domestic flow matrix. Default is FALSE. #' @return A dataframe sorted from highest process contribution "contribution", also showing "x","y","impact" #' @export diff --git a/man/calculateSectorContributiontoImpact.Rd b/man/calculateSectorContributiontoImpact.Rd index c46998dd..229bdbb8 100644 --- a/man/calculateSectorContributiontoImpact.Rd +++ b/man/calculateSectorContributiontoImpact.Rd @@ -10,9 +10,9 @@ calculateSectorContributiontoImpact(model, sector, indicator, domestic = FALSE) \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes} -\item{sector, }{str, index of a model sector for use in the M matrix, e.g. "221100/US"} +\item{sector, }{str, name of a model sector to inspect contribution to, e.g. "221100/US"} -\item{indicator, }{str, index of a model indicator for use in the C matrix, e.g. "Acidification Potential"} +\item{indicator, }{str, name of a model indicator to evaluate contribution of sector to, e.g. "Acidification Potential"} \item{domestic, }{boolean, sets model to use domestic flow matrix. Default is FALSE.} } From 89cb023f4e97547f4052ab21c879a3386bc28ad8 Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Wed, 29 Dec 2021 15:28:52 -0500 Subject: [PATCH 303/319] add export tag back to calculateSectorContributiontoImpact --- R/CalculationFunctions.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/CalculationFunctions.R b/R/CalculationFunctions.R index 7d75f998..7fc1e620 100644 --- a/R/CalculationFunctions.R +++ b/R/CalculationFunctions.R @@ -171,6 +171,7 @@ calculatePercentContributiontoImpact <- function (x,y) { #' @param indicator, str, index of a model indicator for use in the D matrix, e.g. "Acidification Potential". #' @param domestic, boolean, sets model to use domestic flow matrix. Default is FALSE. #' @return A dataframe sorted by contribution (high-to-low), also showing "L", "D", "impact". +#' @export calculateSectorContributiontoImpact <- function (model, sector, indicator, domestic=FALSE) { L <- model$L if (domestic) { From ad43b4323807523b76958d9a2eba8b8f5fb3ddc0 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 29 Dec 2021 13:09:19 -0800 Subject: [PATCH 304/319] Make writeSectorCrosswalk internal function, wrap it in writeModelforAPI. --- NAMESPACE | 1 - R/WriteModel.R | 28 +++++++++++++--------------- man/writeSectorCrosswalk.Rd | 2 +- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index c5f57385..871622c5 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -26,5 +26,4 @@ export(seeAvailableModels) export(writeModelMatrices) export(writeModelforAPI) export(writeModeltoXLSX) -export(writeSectorCrosswalk) import(ggplot2) diff --git a/R/WriteModel.R b/R/WriteModel.R index 37829678..370ce5c1 100644 --- a/R/WriteModel.R +++ b/R/WriteModel.R @@ -15,21 +15,7 @@ writeModelforAPI <-function(model, basedir){ writeModelMatrices(model,"bin",dirs$model) writeModelDemandstoJSON(model,dirs$demands) writeModelMetadata(model,dirs$data) -} - -#' Write the model sector crosswalk as .csv file -#' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @param basedir Base directory to write the model components to -#' @description Writes the model sector crosswalk as .csv file -#' @export -writeSectorCrosswalk <- function(model, basedir){ - dirs <- setWriteDirsforAPI(model, basedir) - prepareWriteDirs(model, dirs) - crosswalk <- prepareModelSectorCrosswalk(model) - crosswalk$ModelSchema <- "" - utils::write.csv(crosswalk, paste0(dirs$data, "/sectorcrosswalk.csv"), - na = "", row.names = FALSE, fileEncoding = "UTF-8") - logging::loginfo(paste0("Sector crosswalk written as sectorcrosswalk.csv to ", dirs$data, ".")) + writeSectorCrosswalk(model, dirs$data) } #' Write model matrices as .csv or .bin files to output folder. @@ -292,6 +278,18 @@ writeModelMetadata <- function(model, outputfolder) { logging::loginfo(paste0("Model metadata written to ", outputfolder, ".")) } +#' Write the model sector crosswalk as .csv file +#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param basedir Base directory to write the model components to +#' @description Writes the model sector crosswalk as .csv file +writeSectorCrosswalk <- function(model, outputfolder){ + crosswalk <- prepareModelSectorCrosswalk(model) + crosswalk$ModelSchema <- "" + utils::write.csv(crosswalk, paste0(outputfolder, "/sectorcrosswalk.csv"), + na = "", row.names = FALSE, fileEncoding = "UTF-8") + logging::loginfo(paste0("Sector crosswalk written as sectorcrosswalk.csv to ", dirs$data, ".")) +} + #' Write out session information to a "Rsessioninfo.txt file in the given path #' @param path, str, a path without the file #' @return None diff --git a/man/writeSectorCrosswalk.Rd b/man/writeSectorCrosswalk.Rd index a53630bf..a7e43aab 100644 --- a/man/writeSectorCrosswalk.Rd +++ b/man/writeSectorCrosswalk.Rd @@ -4,7 +4,7 @@ \alias{writeSectorCrosswalk} \title{Write the model sector crosswalk as .csv file} \usage{ -writeSectorCrosswalk(model, basedir) +writeSectorCrosswalk(model, outputfolder) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} From 1597752fd1449913642f8a012003ad605953e3be Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 29 Dec 2021 14:08:23 -0800 Subject: [PATCH 305/319] Correct param doc in writeSectorCrosswalk --- R/WriteModel.R | 2 +- man/writeSectorCrosswalk.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/WriteModel.R b/R/WriteModel.R index 370ce5c1..6822f93b 100644 --- a/R/WriteModel.R +++ b/R/WriteModel.R @@ -280,7 +280,7 @@ writeModelMetadata <- function(model, outputfolder) { #' Write the model sector crosswalk as .csv file #' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @param basedir Base directory to write the model components to +#' @param outputfolder A directory to write model sector crosswalk #' @description Writes the model sector crosswalk as .csv file writeSectorCrosswalk <- function(model, outputfolder){ crosswalk <- prepareModelSectorCrosswalk(model) diff --git a/man/writeSectorCrosswalk.Rd b/man/writeSectorCrosswalk.Rd index a7e43aab..2416907d 100644 --- a/man/writeSectorCrosswalk.Rd +++ b/man/writeSectorCrosswalk.Rd @@ -9,7 +9,7 @@ writeSectorCrosswalk(model, outputfolder) \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} -\item{basedir}{Base directory to write the model components to} +\item{outputfolder}{A directory to write model sector crosswalk} } \description{ Writes the model sector crosswalk as .csv file From 6824742a8fe820acd5061b18ac431585bc599760 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 29 Dec 2021 14:16:11 -0800 Subject: [PATCH 306/319] Add sector-by-sector impacts in Example.Rmd --- inst/doc/Example.Rmd | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/inst/doc/Example.Rmd b/inst/doc/Example.Rmd index 36dd284b..92fde684 100644 --- a/inst/doc/Example.Rmd +++ b/inst/doc/Example.Rmd @@ -135,3 +135,12 @@ LAND_for <- calculateSectorContributiontoImpact(model, "113000/US", "Land use") LAND_for$contribution <- scales::percent(LAND_for$contribution, accuracy = 0.1) head(subset(LAND_for, TRUE, select = "contribution")) ``` + +# Sector-by-Sector Impacts + +Total Greenhouse Gases impacts induced by a sector (row) purchasing from another (column) for total consumption. +```{r echo=FALSE, warning=FALSE} +sector2sector_impact <- calculateSectorPurchasedbySectorSourcedImpact(y = model$DemandVectors$vectors$`2012_US_Consumption_Complete`, + model, + indicator = "Greenhouse Gases") +``` From 2ff3ccac808f1c50ec909652962e1bded0f3cf0c Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 29 Dec 2021 14:43:32 -0800 Subject: [PATCH 307/319] Create functions to download and load NAICS concordances --- R/CrosswalkFunctions.R | 27 +++++++++++++++++++++++++++ data-raw/MasterCrosswalk.R | 20 ++++---------------- man/getNAICS2012to2007Concordances.Rd | 15 +++++++++++++++ man/getNAICS2012to2017Concordances.Rd | 15 +++++++++++++++ 4 files changed, 61 insertions(+), 16 deletions(-) create mode 100644 man/getNAICS2012to2007Concordances.Rd create mode 100644 man/getNAICS2012to2017Concordances.Rd diff --git a/R/CrosswalkFunctions.R b/R/CrosswalkFunctions.R index 7f2af206..da70237a 100644 --- a/R/CrosswalkFunctions.R +++ b/R/CrosswalkFunctions.R @@ -195,3 +195,30 @@ getNAICSCodeName <- function(year) { return(NAICSCodeName_2to10) } +#' Get 2012 NAICS to 2007 NAICS concordances at 6-digit level. +#' @return data frame with columns '2012 NAICS Code', '2012 NAICS Title', +#' '2007 NAICS Code', and '2007 NAICS Title'. +getNAICS2012to2007Concordances <- function() { + filename <- "inst/extdata/2012_to_2007_NAICS.xls" + if(!file.exists(filename)) { + utils::download.file("https://www.census.gov/eos/www/naics/concordances/2012_to_2007_NAICS.xls", + filename, mode = "wb") + } + df <- as.data.frame(readxl::read_excel(filename, sheet = 1, col_names = TRUE, skip = 2)) + df <- df[, startsWith(colnames(df), "20")] + return(df) +} + +#' Get 2012 NAICS to 2017 NAICS concordances at 6-digit level. +#' @return data frame with columns '2012 NAICS Code', '2012 NAICS Title', +#' '2017 NAICS Code', and '2017 NAICS Title'. +getNAICS2012to2017Concordances <- function() { + filename <- "inst/extdata/2012_to_2017_NAICS.xlsx" + if(!file.exists(filename)) { + utils::download.file("https://www.census.gov/eos/www/naics/concordances/2012_to_2017_NAICS.xlsx", + filename, mode = "wb") + } + df <- as.data.frame(readxl::read_excel(filename, sheet = 1, col_names = TRUE, skip = 2)) + df <- df[, startsWith(colnames(df), "20")] + return(df) +} diff --git a/data-raw/MasterCrosswalk.R b/data-raw/MasterCrosswalk.R index 6bf65849..b13733fd 100644 --- a/data-raw/MasterCrosswalk.R +++ b/data-raw/MasterCrosswalk.R @@ -204,22 +204,10 @@ getMasterCrosswalk <- function (year) { BEAtoUSEEIOtoNAICS <- BEAtoUSEEIOtoNAICS[order(BEAtoUSEEIOtoNAICS[, paste("NAICS_", year, "_Code", sep = "")]), ] # Add 2007 and 2017 NAICS Code column - # Download 2012 to 2007 NAICS code concordance (6-digit) - NAICS2012to2007_filename <- "inst/extdata/2012_to_2007_NAICS.xls" - if(!file.exists(NAICS2012to2007_filename)) { - utils::download.file("https://www.census.gov/eos/www/naics/concordances/2012_to_2007_NAICS.xls", - NAICS2012to2007_filename, mode = "wb") - } - # Download 2012 to 2017 NAICS code concordance (6-digit) - NAICS2012to2017_filename <- "inst/extdata/2012_to_2017_NAICS.xlsx" - if(!file.exists(NAICS2012to2017_filename)) { - utils::download.file("https://www.census.gov/eos/www/naics/concordances/2012_to_2017_NAICS.xlsx", - NAICS2012to2017_filename, mode = "wb") - } - # Load 2012 to 2007 NAICS - NAICS2012to2007 <- as.data.frame(readxl::read_excel(NAICS2012to2007_filename, sheet = 1, col_names = TRUE, skip = 2)) - # Load 2012 to 2017 NAICS - NAICS2012to2017 <- as.data.frame(readxl::read_excel(NAICS2012to2017_filename, sheet = 1, col_names = TRUE, skip = 2)) + # Load 2012 to 2007 NAICS code concordance (6-digit) + NAICS2012to2007 <- getNAICS2012to2007Concordances() + # Load 2012 to 2017 NAICS code concordance (6-digit) + NAICS2012to2017 <- getNAICS2012to2017Concordances() # Merge to get 2012-2007-2017 NAICS table NAICS2012to2007to2017 <- merge(NAICS2012to2007[, c("2012 NAICS Code", "2007 NAICS Code")], NAICS2012to2017[, c("2012 NAICS Code", "2017 NAICS Code")], diff --git a/man/getNAICS2012to2007Concordances.Rd b/man/getNAICS2012to2007Concordances.Rd new file mode 100644 index 00000000..3bd04842 --- /dev/null +++ b/man/getNAICS2012to2007Concordances.Rd @@ -0,0 +1,15 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/CrosswalkFunctions.R +\name{getNAICS2012to2007Concordances} +\alias{getNAICS2012to2007Concordances} +\title{Get 2012 NAICS to 2007 NAICS concordances at 6-digit level.} +\usage{ +getNAICS2012to2007Concordances() +} +\value{ +data frame with columns '2012 NAICS Code', '2012 NAICS Title', +'2007 NAICS Code', and '2007 NAICS Title'. +} +\description{ +Get 2012 NAICS to 2007 NAICS concordances at 6-digit level. +} diff --git a/man/getNAICS2012to2017Concordances.Rd b/man/getNAICS2012to2017Concordances.Rd new file mode 100644 index 00000000..bdf4e482 --- /dev/null +++ b/man/getNAICS2012to2017Concordances.Rd @@ -0,0 +1,15 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/CrosswalkFunctions.R +\name{getNAICS2012to2017Concordances} +\alias{getNAICS2012to2017Concordances} +\title{Get 2012 NAICS to 2017 NAICS concordances at 6-digit level.} +\usage{ +getNAICS2012to2017Concordances() +} +\value{ +data frame with columns '2012 NAICS Code', '2012 NAICS Title', +'2017 NAICS Code', and '2017 NAICS Title'. +} +\description{ +Get 2012 NAICS to 2017 NAICS concordances at 6-digit level. +} From 586cc396b62fa6bfa6b2480bfcd9b32df1960791 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 29 Dec 2021 14:44:20 -0800 Subject: [PATCH 308/319] Delete unused data-raw/CensusData.R --- data-raw/CensusData.R | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 data-raw/CensusData.R diff --git a/data-raw/CensusData.R b/data-raw/CensusData.R deleted file mode 100644 index fd006584..00000000 --- a/data-raw/CensusData.R +++ /dev/null @@ -1,20 +0,0 @@ -# Download 2-to-6 digit 2012 NAICS code table from Census.gov -get2to6Digit2012NAICS <- function () { - # Create the placeholder file - file <- "inst/extdata/2-digit_2012_Codes.xls" - # Download 2-to-6 digit 2012 NAICS code table - if(!file.exists(file)) { - utils::download.file("https://www.census.gov/naics/2012NAICS/2-digit_2012_Codes.xls", - "2-digit_2012_Codes.xls", mode = "wb") - } -} - -get2012to2007NAICSConcordance <- function () { - # Create the placeholder file - file <- "inst/extdata/2012_to_2007_NAICS.xls" - # Download 2-to-6 digit 2012 NAICS code table - if(!file.exists(file)) { - utils::download.file("https://www.census.gov/naics/concordances/2012_to_2007_NAICS.xls", - "2012_to_2007_NAICS.xls", mode = "wb") - } -} From 579fe2e90e19b39b51af7bf57eec7bb3f91565f4 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Wed, 29 Dec 2021 15:08:07 -0800 Subject: [PATCH 309/319] Udpate date in DESCRIPTION --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 09a555be..f1b83c2a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: useeior Type: Package Title: USEEIO R modeling software Version: 1.0.0 -Date: 2021-12-03 +Date: 2021-12-29 Authors@R: c( person("Mo","Li", email="mo.li@gdit.com", role="aut"), person("Wesley","Ingwersen", email="ingwersen.wesley@epa.gov", role= c("aut", "cre")), From a6032d62c1bcba38f07a639c45e990712cc5a16a Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Thu, 30 Dec 2021 11:51:32 -0500 Subject: [PATCH 310/319] Fix #199 and change drop forAPI from setWriteDirs --- R/WriteModel.R | 30 +++++++++---------- ...{setWriteDirsforAPI.Rd => setWriteDirs.Rd} | 6 ++-- man/writeModelMetadata.Rd | 4 +-- 3 files changed, 20 insertions(+), 20 deletions(-) rename man/{setWriteDirsforAPI.Rd => setWriteDirs.Rd} (84%) diff --git a/R/WriteModel.R b/R/WriteModel.R index 6822f93b..51e374b6 100644 --- a/R/WriteModel.R +++ b/R/WriteModel.R @@ -10,11 +10,11 @@ matrices <- c("V", "U", "U_d", "A", "A_d", "B", "C", "D", "L", "L_d", #' @description Writes all model data and metadata components to the API #' @export writeModelforAPI <-function(model, basedir){ - dirs <- setWriteDirsforAPI(model,basedir) + dirs <- setWriteDirs(model,basedir) prepareWriteDirs(model, dirs) writeModelMatrices(model,"bin",dirs$model) writeModelDemandstoJSON(model,dirs$demands) - writeModelMetadata(model,dirs$data) + writeModelMetadata(model,dirs) writeSectorCrosswalk(model, dirs$data) } @@ -74,7 +74,7 @@ writeModeltoXLSX <- function(model, outputfolder) { } # List model metadata: demands, flows, indicators, sectors - dirs <- setWriteDirsforAPI(model, file.path(rappdirs::user_data_dir(), "useeior", + dirs <- setWriteDirs(model, file.path(rappdirs::user_data_dir(), "useeior", "Model_Builds", model$specs$Model)) prepareWriteDirs(model, dirs) writeModelMetadata(model, dirs) @@ -118,9 +118,9 @@ writeModeltoXLSX <- function(model, outputfolder) { USEEIOtoXLSX_ls[["SectorCrosswalk"]] <- prepareModelSectorCrosswalk(model) # Write to Excel workbook - writexl::write_xlsx(USEEIOtoXLSX_ls, paste0(outputfolder, "/", model$specs$Model, "_Matrices.xlsx"), + writexl::write_xlsx(USEEIOtoXLSX_ls, paste0(outputfolder, "/", model$specs$Model, ".xlsx"), format_headers = FALSE) - logging::loginfo(paste0("Model matrices written to Excel workbook (.xlsx) in /", outputfolder, ".")) + logging::loginfo(paste0("Model written to Excel workbook (.xlsx) in ", outputfolder, ".")) } #'Create a unique hash identifier for a model @@ -139,7 +139,7 @@ generateModelIdentifier <- function(model) { #' @param basedir Base directory to write the model components to #' @description Sets directories to write model output data to. If model is not passed, just sets data directory. #' @return A named list of directories for model output writing -setWriteDirsforAPI <- function(model=NULL, basedir) { +setWriteDirs <- function(model=NULL, basedir) { dirs <- list() dirs$data <- file.path(basedir,"build","data") if (!is.null(model)) { @@ -193,9 +193,9 @@ writeModelDemandstoJSON <- function(model, outputfolder) { #' Write model metadata (indicators and demands, sectors, and flows) as CSV files to output folder #' format for file is here https://github.com/USEPA/USEEIO_API/blob/master/doc/data_format.md #' @param model A complete EEIO model: a list with USEEIO model components and attributes. -#' @param outputfolder A directory to write model metadata. +#' @param dirs A named list of directories with model and data directory paths #' @description Writes model metadata, including indicators and demands. -writeModelMetadata <- function(model, outputfolder) { +writeModelMetadata <- function(model, dirs) { #!WARNING: Only works for single region model if (model$specs$ModelRegionAcronyms!="US") { stop("Currently only works for single region US models.") @@ -236,13 +236,13 @@ writeModelMetadata <- function(model, outputfolder) { indicators$Index <- c(1:nrow(indicators)-1) indicators <- indicators[,fields$indicators] checkNamesandOrdering(indicators$Name, rownames(model$C), "code in indicators.csv and rows in C matrix") - utils::write.csv(indicators, paste0(outputfolder, "/indicators.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") + utils::write.csv(indicators, paste0(dirs$model, "/indicators.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") # Write demands to demands.csv demands <- model$DemandVectors$meta demands$Index <- c(1:nrow(demands)-1) demands <- demands[,fields$demands] - utils::write.csv(demands, paste0(outputfolder, "/demands.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") + utils::write.csv(demands, paste0(dirs$model, "/demands.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") # Write sectors to csv sectors <- model[[gsub("y", "ies", model$specs$CommodityorIndustryType)]] @@ -252,7 +252,7 @@ writeModelMetadata <- function(model, outputfolder) { sectors$Category <- paste(sectors$Category, sectors$Subcategory, sep="/") sectors <- sectors[, fields$sectors] checkNamesandOrdering(sectors$ID, rownames(model$L), "code in sectors.csv and rows in L matrix") - utils::write.csv(sectors, paste0(outputfolder, "/sectors.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") + utils::write.csv(sectors, paste0(dirs$model, "/sectors.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") # Write flows to csv flows <- model$SatelliteTables$flows @@ -262,7 +262,7 @@ writeModelMetadata <- function(model, outputfolder) { flows$Index <- c(1:nrow(flows)-1) flows <- flows[, fields$flows] checkNamesandOrdering(flows$ID, rownames(model$B), "flows in flows.csv and rows in B matrix") - utils::write.csv(flows, paste0(outputfolder, "/flows.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") + utils::write.csv(flows, paste0(dirs$model, "/flows.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") # Write years to csv years <- data.frame(ID=colnames(model$Rho), stringsAsFactors = FALSE) @@ -270,12 +270,12 @@ writeModelMetadata <- function(model, outputfolder) { years <- years[, fields$years] checkNamesandOrdering(years$ID, colnames(model$Phi), "years in years.csv and cols in Phi matrix") checkNamesandOrdering(years$ID, colnames(model$Rho), "years in years.csv and cols in Rho matrix") - utils::write.csv(years, paste0(outputfolder, "/years.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") + utils::write.csv(years, paste0(dirs$model, "/years.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") # Write session info to R sessioninfo.txt inside the model folder writeSessionInfotoFile(dirs$model) - logging::loginfo(paste0("Model metadata written to ", outputfolder, ".")) + logging::loginfo(paste0("Model metadata written to ", dirs$model, ".")) } #' Write the model sector crosswalk as .csv file @@ -287,7 +287,7 @@ writeSectorCrosswalk <- function(model, outputfolder){ crosswalk$ModelSchema <- "" utils::write.csv(crosswalk, paste0(outputfolder, "/sectorcrosswalk.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") - logging::loginfo(paste0("Sector crosswalk written as sectorcrosswalk.csv to ", dirs$data, ".")) + logging::loginfo(paste0("Sector crosswalk written as sectorcrosswalk.csv to ", outputfolder, ".")) } #' Write out session information to a "Rsessioninfo.txt file in the given path diff --git a/man/setWriteDirsforAPI.Rd b/man/setWriteDirs.Rd similarity index 84% rename from man/setWriteDirsforAPI.Rd rename to man/setWriteDirs.Rd index 388e8086..7c22a2cd 100644 --- a/man/setWriteDirsforAPI.Rd +++ b/man/setWriteDirs.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/WriteModel.R -\name{setWriteDirsforAPI} -\alias{setWriteDirsforAPI} +\name{setWriteDirs} +\alias{setWriteDirs} \title{Sets directories to write model output data to} \usage{ -setWriteDirsforAPI(model = NULL, basedir) +setWriteDirs(model = NULL, basedir) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes. Optional} diff --git a/man/writeModelMetadata.Rd b/man/writeModelMetadata.Rd index f96f81c5..fc1ba983 100644 --- a/man/writeModelMetadata.Rd +++ b/man/writeModelMetadata.Rd @@ -5,12 +5,12 @@ \title{Write model metadata (indicators and demands, sectors, and flows) as CSV files to output folder format for file is here https://github.com/USEPA/USEEIO_API/blob/master/doc/data_format.md} \usage{ -writeModelMetadata(model, outputfolder) +writeModelMetadata(model, dirs) } \arguments{ \item{model}{A complete EEIO model: a list with USEEIO model components and attributes.} -\item{outputfolder}{A directory to write model metadata.} +\item{dirs}{A named list of directories with model and data directory paths} } \description{ Writes model metadata, including indicators and demands. From 61da463da4b1f4b540290136b41b312b2797dca7 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 30 Dec 2021 08:52:10 -0800 Subject: [PATCH 311/319] Correct url to NAICS concordance tables --- R/CrosswalkFunctions.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/CrosswalkFunctions.R b/R/CrosswalkFunctions.R index da70237a..b3bb84c9 100644 --- a/R/CrosswalkFunctions.R +++ b/R/CrosswalkFunctions.R @@ -201,7 +201,7 @@ getNAICSCodeName <- function(year) { getNAICS2012to2007Concordances <- function() { filename <- "inst/extdata/2012_to_2007_NAICS.xls" if(!file.exists(filename)) { - utils::download.file("https://www.census.gov/eos/www/naics/concordances/2012_to_2007_NAICS.xls", + utils::download.file("https://www.census.gov/naics/concordances/2012_to_2007_NAICS.xls", filename, mode = "wb") } df <- as.data.frame(readxl::read_excel(filename, sheet = 1, col_names = TRUE, skip = 2)) @@ -215,7 +215,7 @@ getNAICS2012to2007Concordances <- function() { getNAICS2012to2017Concordances <- function() { filename <- "inst/extdata/2012_to_2017_NAICS.xlsx" if(!file.exists(filename)) { - utils::download.file("https://www.census.gov/eos/www/naics/concordances/2012_to_2017_NAICS.xlsx", + utils::download.file("https://www.census.gov/naics/concordances/2012_to_2017_NAICS.xlsx", filename, mode = "wb") } df <- as.data.frame(readxl::read_excel(filename, sheet = 1, col_names = TRUE, skip = 2)) From 358be5974d71758519cc2e6ae74ded935781a60d Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 30 Dec 2021 09:21:15 -0800 Subject: [PATCH 312/319] Tidy code in WriteModel.R --- R/WriteModel.R | 75 ++++++++++++++++++++++++++--------------- man/prepareWriteDirs.Rd | 3 +- man/setWriteDirs.Rd | 3 +- 3 files changed, 51 insertions(+), 30 deletions(-) diff --git a/R/WriteModel.R b/R/WriteModel.R index 51e374b6..184405e8 100644 --- a/R/WriteModel.R +++ b/R/WriteModel.R @@ -65,9 +65,11 @@ writeModeltoXLSX <- function(model, outputfolder) { # Format tables for (n in names(USEEIOtoXLSX_ls)) { if (is.matrix(USEEIOtoXLSX_ls[[n]]) | is.data.frame(USEEIOtoXLSX_ls[[n]])) { - USEEIOtoXLSX_ls[[n]] <- cbind.data.frame(as.data.frame(rownames(USEEIOtoXLSX_ls[[n]])), USEEIOtoXLSX_ls[[n]]) + USEEIOtoXLSX_ls[[n]] <- cbind.data.frame(rownames(USEEIOtoXLSX_ls[[n]]), + USEEIOtoXLSX_ls[[n]]) } else { - USEEIOtoXLSX_ls[[n]] <- cbind.data.frame(names(USEEIOtoXLSX_ls[[n]]), USEEIOtoXLSX_ls[[n]]) + USEEIOtoXLSX_ls[[n]] <- cbind.data.frame(names(USEEIOtoXLSX_ls[[n]]), + USEEIOtoXLSX_ls[[n]]) colnames(USEEIOtoXLSX_ls[[n]])[2] <- n } colnames(USEEIOtoXLSX_ls[[n]])[1] <- "" @@ -75,7 +77,7 @@ writeModeltoXLSX <- function(model, outputfolder) { # List model metadata: demands, flows, indicators, sectors dirs <- setWriteDirs(model, file.path(rappdirs::user_data_dir(), "useeior", - "Model_Builds", model$specs$Model)) + "Model_Builds", model$specs$Model)) prepareWriteDirs(model, dirs) writeModelMetadata(model, dirs) for (df_name in c("demands", "flows", "indicators", "sectors")) { @@ -97,7 +99,7 @@ writeModeltoXLSX <- function(model, outputfolder) { (demand_meta_fields != "Subcategory")] # Remove USEEIOtoXLSX_ls$sectors USEEIOtoXLSX_ls$sectors <- NULL - + # List final demand meta final_demand_meta <- model$FinalDemandMeta final_demand_meta$Index <- c(1:nrow(final_demand_meta)-1) @@ -113,14 +115,14 @@ writeModeltoXLSX <- function(model, outputfolder) { value_added_meta$Location <- model$specs$ModelRegionAcronyms value_added_meta$Description <- "" USEEIOtoXLSX_ls[["value_added_meta"]] <- value_added_meta[, demand_meta_fields] - + # List reference tables USEEIOtoXLSX_ls[["SectorCrosswalk"]] <- prepareModelSectorCrosswalk(model) # Write to Excel workbook writexl::write_xlsx(USEEIOtoXLSX_ls, paste0(outputfolder, "/", model$specs$Model, ".xlsx"), format_headers = FALSE) - logging::loginfo(paste0("Model written to Excel workbook (.xlsx) in ", outputfolder, ".")) + logging::loginfo(paste0("Model written to Excel workbook (.xlsx) in ", outputfolder, ".")) } #'Create a unique hash identifier for a model @@ -128,7 +130,7 @@ writeModeltoXLSX <- function(model, outputfolder) { #' @return char string #' @export generateModelIdentifier <- function(model) { - id <- digest::digest(model, algo="sha256") + id <- digest::digest(model, algo = "sha256") return(id) } @@ -137,7 +139,8 @@ generateModelIdentifier <- function(model) { #' Sets directories to write model output data to #' @param model A complete EEIO model: a list with USEEIO model components and attributes. Optional #' @param basedir Base directory to write the model components to -#' @description Sets directories to write model output data to. If model is not passed, just sets data directory. +#' @description Sets directories to write model output data to. +#' If model is not passed, just sets data directory. #' @return A named list of directories for model output writing setWriteDirs <- function(model=NULL, basedir) { dirs <- list() @@ -152,7 +155,8 @@ setWriteDirs <- function(model=NULL, basedir) { #' Sets directories to write model output data to #' @param model A complete EEIO model: a list with USEEIO model components and attributes. #' @param dirs A named list of directories -#' @description Sets directories to write model output data to. If model is not passed, just uses data directory +#' @description Sets directories to write model output data to. +#' If model is not passed, just uses data directory. prepareWriteDirs <- function(model, dirs) { if (missing(model)) { if (!dir.exists(dirs$data)) { @@ -202,7 +206,8 @@ writeModelMetadata <- function(model, dirs) { } # Load metadata fields for API - fields <- configr::read.config(system.file("extdata/USEEIO_API_fields.yml", package="useeior")) + fields <- configr::read.config(system.file("extdata/USEEIO_API_fields.yml", + package="useeior")) # Write model description to models.csv model_desc <- file.path(dirs$data, "models.csv") @@ -212,12 +217,18 @@ writeModelMetadata <- function(model, dirs) { Description <- "" #Add in sector schema for model if (is.null(model$specs$DisaggregationSpecs)) { - Sector_Schema <- paste("BEA", model$specs$BaseIOSchema, model$specs$BaseIOLevel, "Code", sep = "_") + Sector_Schema <- paste("BEA", model$specs$BaseIOSchema, + model$specs$BaseIOLevel, "Code", sep = "_") } else { Sector_Schema <- generateModelSectorSchema(model) } Hash <- generateModelIdentifier(model) - model_fields <- list("ID"=ID, "Name"=Name, "Location"=Location, "Description"=Description, "Sector_Schema"=Sector_Schema, "Hash"=Hash) + model_fields <- list("ID" = ID, + "Name" = Name, + "Location" = Location, + "Description" = Description, + "Sector_Schema" = Sector_Schema, + "Hash" = Hash) if (!file.exists(model_desc)) { df <- cbind.data.frame(model_fields) } else { @@ -231,18 +242,22 @@ writeModelMetadata <- function(model, dirs) { # Write indicators to indicators.csv indicators <- model$Indicators$meta - indicators$ID <- apply(indicators[, c("Group", "Code", "Unit")], 1, FUN = joinStringswithSlashes) + indicators$ID <- apply(indicators[, c("Group", "Code", "Unit")], 1, + FUN = joinStringswithSlashes) indicators <- indicators[order(indicators$Name), ] indicators$Index <- c(1:nrow(indicators)-1) indicators <- indicators[,fields$indicators] - checkNamesandOrdering(indicators$Name, rownames(model$C), "code in indicators.csv and rows in C matrix") - utils::write.csv(indicators, paste0(dirs$model, "/indicators.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") + checkNamesandOrdering(indicators$Name, rownames(model$C), + "code in indicators.csv and rows in C matrix") + utils::write.csv(indicators, paste0(dirs$model, "/indicators.csv"), na = "", + row.names = FALSE, fileEncoding = "UTF-8") # Write demands to demands.csv demands <- model$DemandVectors$meta demands$Index <- c(1:nrow(demands)-1) demands <- demands[,fields$demands] - utils::write.csv(demands, paste0(dirs$model, "/demands.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") + utils::write.csv(demands, paste0(dirs$model, "/demands.csv"), na = "", + row.names = FALSE, fileEncoding = "UTF-8") # Write sectors to csv sectors <- model[[gsub("y", "ies", model$specs$CommodityorIndustryType)]] @@ -251,8 +266,10 @@ writeModelMetadata <- function(model, dirs) { sectors$Index <- c(1:nrow(sectors)-1) sectors$Category <- paste(sectors$Category, sectors$Subcategory, sep="/") sectors <- sectors[, fields$sectors] - checkNamesandOrdering(sectors$ID, rownames(model$L), "code in sectors.csv and rows in L matrix") - utils::write.csv(sectors, paste0(dirs$model, "/sectors.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") + checkNamesandOrdering(sectors$ID, rownames(model$L), + "code in sectors.csv and rows in L matrix") + utils::write.csv(sectors, paste0(dirs$model, "/sectors.csv"), na = "", + row.names = FALSE, fileEncoding = "UTF-8") # Write flows to csv flows <- model$SatelliteTables$flows @@ -261,20 +278,24 @@ writeModelMetadata <- function(model, dirs) { flows <- flows[order(flows$ID),] flows$Index <- c(1:nrow(flows)-1) flows <- flows[, fields$flows] - checkNamesandOrdering(flows$ID, rownames(model$B), "flows in flows.csv and rows in B matrix") - utils::write.csv(flows, paste0(dirs$model, "/flows.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") + checkNamesandOrdering(flows$ID, rownames(model$B), + "flows in flows.csv and rows in B matrix") + utils::write.csv(flows, paste0(dirs$model, "/flows.csv"), na = "", + row.names = FALSE, fileEncoding = "UTF-8") # Write years to csv years <- data.frame(ID=colnames(model$Rho), stringsAsFactors = FALSE) years$Index <- c(1:length(years$ID)-1) years <- years[, fields$years] - checkNamesandOrdering(years$ID, colnames(model$Phi), "years in years.csv and cols in Phi matrix") - checkNamesandOrdering(years$ID, colnames(model$Rho), "years in years.csv and cols in Rho matrix") - utils::write.csv(years, paste0(dirs$model, "/years.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") + checkNamesandOrdering(years$ID, colnames(model$Phi), + "years in years.csv and cols in Phi matrix") + checkNamesandOrdering(years$ID, colnames(model$Rho), + "years in years.csv and cols in Rho matrix") + utils::write.csv(years, paste0(dirs$model, "/years.csv"), na = "", + row.names = FALSE, fileEncoding = "UTF-8") # Write session info to R sessioninfo.txt inside the model folder writeSessionInfotoFile(dirs$model) - logging::loginfo(paste0("Model metadata written to ", dirs$model, ".")) } @@ -287,7 +308,8 @@ writeSectorCrosswalk <- function(model, outputfolder){ crosswalk$ModelSchema <- "" utils::write.csv(crosswalk, paste0(outputfolder, "/sectorcrosswalk.csv"), na = "", row.names = FALSE, fileEncoding = "UTF-8") - logging::loginfo(paste0("Sector crosswalk written as sectorcrosswalk.csv to ", outputfolder, ".")) + logging::loginfo(paste0("Sector crosswalk written as sectorcrosswalk.csv to ", + outputfolder, ".")) } #' Write out session information to a "Rsessioninfo.txt file in the given path @@ -304,12 +326,9 @@ writeSessionInfotoFile <- function(path) { #' @return a data.frame, sectorcrosswalk table prepareModelSectorCrosswalk <- function(model) { crosswalk <- model$crosswalk - #create name to use as column header for disaggregated schema SectorSchema <- generateModelSectorSchema(model) #rename "USEEIO" (the last column) as the sector schema colnames(crosswalk)[length(crosswalk)] <- SectorSchema #rename column - return(crosswalk) - } diff --git a/man/prepareWriteDirs.Rd b/man/prepareWriteDirs.Rd index 63ddafa1..d789223f 100644 --- a/man/prepareWriteDirs.Rd +++ b/man/prepareWriteDirs.Rd @@ -12,5 +12,6 @@ prepareWriteDirs(model, dirs) \item{dirs}{A named list of directories} } \description{ -Sets directories to write model output data to. If model is not passed, just uses data directory +Sets directories to write model output data to. +If model is not passed, just uses data directory. } diff --git a/man/setWriteDirs.Rd b/man/setWriteDirs.Rd index 7c22a2cd..78c87fff 100644 --- a/man/setWriteDirs.Rd +++ b/man/setWriteDirs.Rd @@ -15,5 +15,6 @@ setWriteDirs(model = NULL, basedir) A named list of directories for model output writing } \description{ -Sets directories to write model output data to. If model is not passed, just sets data directory. +Sets directories to write model output data to. +If model is not passed, just sets data directory. } From c0ce6a8884f3afee93fd52737601cec5e02d2789 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 30 Dec 2021 09:36:35 -0800 Subject: [PATCH 313/319] Update model names in docs --- inst/doc/CompareModels_render.Rmd | 6 +++--- inst/doc/Example.Rmd | 4 ++-- inst/doc/ValidateModel_render.Rmd | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/inst/doc/CompareModels_render.Rmd b/inst/doc/CompareModels_render.Rmd index e64ec14c..51745e3f 100644 --- a/inst/doc/CompareModels_render.Rmd +++ b/inst/doc/CompareModels_render.Rmd @@ -3,9 +3,9 @@ output: html_document params: modelname_pair: value: - # - ["USEEIOv2.0", "USEEIOv2.0_nodisagg"] - - ["USEEIOv2.0", "USEEIOv2.0.1"] - - ["USEEIOv2.0.1", "USEEIOv2.1"] + # - ["USEEIOv2.0-411", "USEEIOv2.0"] + - ["USEEIOv2.0-411", "USEEIOv2.0.1-411"] + - ["USEEIOv2.0.1-411", "USEEIOv2.1-422"] --- ```{r setup, include=FALSE} diff --git a/inst/doc/Example.Rmd b/inst/doc/Example.Rmd index 92fde684..d657b982 100644 --- a/inst/doc/Example.Rmd +++ b/inst/doc/Example.Rmd @@ -24,7 +24,7 @@ library(useeior) # Build Model ```{r include=FALSE} -model <- buildModel("USEEIOv2.0.1") +model <- buildModel("USEEIOv2.0.1-411") ``` # Validation @@ -52,7 +52,7 @@ colnames(result$LCIA_d) <- model$Indicators$meta[match(colnames(result$LCIA_d), colnames(result$LCIA_f) <- colnames(result$LCIA_d) indicators <- c("ACID", "CCDD", "CMSW", "CRHW", "ENRG", "ETOX", "EUTR", "GHG", "HRSP", "HTOX", "LAND", "MNRL", "OZON", "SMOG", "WATR") -model_list <- list("USEEIOv2.0.1" = model) +model_list <- list("USEEIOv2.0.1-411" = model) ``` ```{r "ranking_direct_prod_final_cons_v2.0.1", fig.width = 20, fig.height = 12} diff --git a/inst/doc/ValidateModel_render.Rmd b/inst/doc/ValidateModel_render.Rmd index 0e491a62..3dffd2cb 100644 --- a/inst/doc/ValidateModel_render.Rmd +++ b/inst/doc/ValidateModel_render.Rmd @@ -4,8 +4,8 @@ output: html_document params: modelname: - "USEEIOv2.0" - - "USEEIOv2.0.1" - - "USEEIOv2.1" + - "USEEIOv2.0.1-411" + - "USEEIOv2.1-422" --- ```{r setup, include=FALSE} From a862d53358e0a4f9f4abe335804d411cd39c5c2e Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 30 Dec 2021 09:37:19 -0800 Subject: [PATCH 314/319] Update validation report for example models --- inst/doc/output/ValidateUSEEIOv2.0.1-411.md | 208 +++++++++++++++++++ inst/doc/output/ValidateUSEEIOv2.0.1.md | 208 ------------------- inst/doc/output/ValidateUSEEIOv2.0.md | 156 +++++++------- inst/doc/output/ValidateUSEEIOv2.1-422.md | 212 ++++++++++++++++++++ inst/doc/output/ValidateUSEEIOv2.1.md | 211 ------------------- 5 files changed, 496 insertions(+), 499 deletions(-) create mode 100644 inst/doc/output/ValidateUSEEIOv2.0.1-411.md delete mode 100644 inst/doc/output/ValidateUSEEIOv2.0.1.md create mode 100644 inst/doc/output/ValidateUSEEIOv2.1-422.md delete mode 100644 inst/doc/output/ValidateUSEEIOv2.1.md diff --git a/inst/doc/output/ValidateUSEEIOv2.0.1-411.md b/inst/doc/output/ValidateUSEEIOv2.0.1-411.md new file mode 100644 index 00000000..9e5138d8 --- /dev/null +++ b/inst/doc/output/ValidateUSEEIOv2.0.1-411.md @@ -0,0 +1,208 @@ +--- +title: "Validating USEEIOv2.0.1-411 Model" +date: "2021-12-30" +output: + html_document: + keep_md: yes +editor_options: + chunk_output_type: console +--- + +This document presents validation results of USEEIOv2.0.1-411 model. + +### Build and Calculate Model + +```r +model <- buildModel(modelname) +#> 2021-12-30 09:30:58 INFO::Begin model initialization... +#> 2021-12-30 09:30:58 INFO::Initializing IO tables... +#> 2021-12-30 09:30:59 INFO::Initializing Gross Output tables... +#> 2021-12-30 09:31:00 INFO::Initializing Chain Price Index tables... +#> 2021-12-30 09:31:01 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... +#> 2021-12-30 09:31:01 INFO::Initializing Disaggregation of IO tables... +#> 2021-12-30 09:31:02 INFO::Initializing model satellite tables... +#> 2021-12-30 09:31:02 INFO::Loading Water withdrawals flows from DataCommons... +#> 2021-12-30 09:31:02 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... +#> 2021-12-30 09:31:12 INFO::Loading Point source industrial releases to ground flows from DataCommons... +#> 2021-12-30 09:31:12 INFO::Loading Point source releases to water flows from DataCommons... +#> 2021-12-30 09:31:13 INFO::Loading Greenhouse Gases flows from DataCommons... +#> 2021-12-30 09:31:14 INFO::Loading Land use flows from DataCommons... +#> 2021-12-30 09:31:14 INFO::Loading Mineral extraction flows from DataCommons... +#> 2021-12-30 09:31:14 INFO::Loading Energy extraction flows from DataCommons... +#> 2021-12-30 09:31:14 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation +#> 2021-12-30 09:31:14 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... +#> 2021-12-30 09:31:14 INFO::Loading Pesticide releases flows from DataCommons... +#> 2021-12-30 09:31:14 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... +#> 2021-12-30 09:31:14 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation +#> 2021-12-30 09:31:15 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... +#> 2021-12-30 09:31:15 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... +#> 2021-12-30 09:31:18 INFO::Loading Employment flows from DataCommons... +#> 2021-12-30 09:31:18 INFO::Generating Value Added flows... +#> 2021-12-30 09:31:19 INFO::Initializing model indicators... +#> 2021-12-30 09:31:19 INFO::Getting Greenhouse Gases indicator from DataCommons... +#> 2021-12-30 09:31:19 INFO::Getting Acidification Potential indicator from DataCommons... +#> 2021-12-30 09:31:19 INFO::Getting Eutrophication Potential indicator from DataCommons... +#> 2021-12-30 09:31:19 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... +#> 2021-12-30 09:31:24 INFO::Getting Human Health - Cancer indicator from DataCommons... +#> 2021-12-30 09:31:25 INFO::Getting Human Health - Noncancer indicator from DataCommons... +#> 2021-12-30 09:31:26 INFO::Getting Human Health Toxicity indicator from DataCommons... +#> 2021-12-30 09:31:29 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... +#> 2021-12-30 09:31:29 INFO::Getting Ozone Depletion indicator from DataCommons... +#> 2021-12-30 09:31:29 INFO::Getting Smog Formation Potential indicator from DataCommons... +#> 2021-12-30 09:31:30 INFO::Getting Freshwater withdrawals indicator from DataCommons... +#> 2021-12-30 09:31:30 INFO::Getting Land use indicator from DataCommons... +#> 2021-12-30 09:31:30 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... +#> 2021-12-30 09:31:30 INFO::Getting Pesticides indicator from DataCommons... +#> 2021-12-30 09:31:31 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:31:31 INFO::Getting Renewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:31:31 INFO::Getting Energy Use indicator from DataCommons... +#> 2021-12-30 09:31:31 INFO::Getting Minerals and Metals Use indicator from DataCommons... +#> 2021-12-30 09:31:31 INFO::Getting Value Added indicator from useeior... +#> 2021-12-30 09:31:31 INFO::Getting Jobs Supported indicator from useeior... +#> 2021-12-30 09:31:31 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... +#> 2021-12-30 09:31:32 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... +#> 2021-12-30 09:31:32 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... +#> 2021-12-30 09:31:32 INFO::Loading demand vectors ... +#> 2021-12-30 09:31:32 INFO::Loading CompleteProduction demand vector... +#> 2021-12-30 09:31:32 INFO::Loading DomesticProduction demand vector... +#> 2021-12-30 09:31:32 INFO::Loading CompleteConsumption demand vector... +#> 2021-12-30 09:31:32 INFO::Loading DomesticConsumption demand vector... +#> 2021-12-30 09:31:36 INFO::Building commodity-by-commodity A matrix (direct requirements)... +#> 2021-12-30 09:31:36 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... +#> 2021-12-30 09:31:36 INFO::Calculating L matrix (total requirements)... +#> 2021-12-30 09:31:36 INFO::Calculating L_d matrix (domestic total requirements)... +#> 2021-12-30 09:31:36 INFO::Building B matrix (direct emissions and resource use per dollar)... +#> 2021-12-30 09:31:39 INFO::Building C matrix (characterization factors for model indicators)... +#> 2021-12-30 09:31:45 INFO::Calculating D matrix (direct environmental impacts per dollar)... +#> 2021-12-30 09:31:45 INFO::Calculating M matrix (total emissions and resource use per dollar)... +#> 2021-12-30 09:31:45 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... +#> 2021-12-30 09:31:45 INFO::Calculating N matrix (total environmental impacts per dollar)... +#> 2021-12-30 09:31:45 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... +#> 2021-12-30 09:31:45 INFO::Calculating Rho matrix (price year ratio)... +#> 2021-12-30 09:31:45 INFO::Calculating Phi matrix (producer over purchaser price ratio)... +#> 2021-12-30 09:31:45 INFO::Model build complete. +``` + +### Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production + +```r +econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01) +cat(paste("Number of sectors passing:",econval$N_Pass)) +``` + +Number of sectors passing: 409 + +```r +cat(paste("Number of sectors failing:",econval$N_Fail)) +``` + +Number of sectors failing: 2 + +```r +cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +``` + +Sectors failing: S00402/US, S00300/US + +### Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production + +```r +econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01) +cat(paste("Number of sectors passing:",econval$N_Pass)) +``` + +Number of sectors passing: 409 + +```r +cat(paste("Number of sectors failing:",econval$N_Fail)) +``` + +Number of sectors failing: 2 + +```r +cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +``` + +Sectors failing: S00402/US, S00300/US + +### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production + +```r +modelval <- compareEandLCIResult(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass)) +``` + +Number of flow totals by commodity passing: 1118742 + +```r +cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail)) +``` + +Number of flow totals by commodity failing: 0 + +```r +#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", "))) +``` + +### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production + +```r +dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 1118742 + +```r +cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 0 + +```r +cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", "))) +``` + +Sectors with flow totals failing: + +### Validate that commodity output are properly transformed to industry output via MarketShare + +```r +q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 409 + +```r +cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 2 + +```r +cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", "))) +``` + +Sectors with flow totals failing: S00402/US, S00300/US + +### Validate that commodity output equals to domestic use plus production demand + +```r +q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 410 + +```r +cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 1 + +```r +cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", "))) +``` + +Sectors with flow totals failing: S00300/US diff --git a/inst/doc/output/ValidateUSEEIOv2.0.1.md b/inst/doc/output/ValidateUSEEIOv2.0.1.md deleted file mode 100644 index 65a6018c..00000000 --- a/inst/doc/output/ValidateUSEEIOv2.0.1.md +++ /dev/null @@ -1,208 +0,0 @@ ---- -title: "Validating USEEIOv2.0.1 Model" -date: "2021-11-05" -output: - html_document: - keep_md: yes -editor_options: - chunk_output_type: console ---- - -This document presents validation results of USEEIOv2.0.1 model. - -### Build and Calculate Model - -```r -model <- buildModel(modelname) -#> 2021-11-05 13:54:36 INFO::Begin model initialization... -#> 2021-11-05 13:54:36 INFO::Initializing IO tables... -#> 2021-11-05 13:54:36 INFO::Initializing Gross Output tables... -#> 2021-11-05 13:54:37 INFO::Initializing Chain Price Index tables... -#> 2021-11-05 13:54:38 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... -#> 2021-11-05 13:54:38 INFO::Initializing Disaggregation of IO tables... -#> 2021-11-05 13:54:39 INFO::Initializing model satellite tables... -#> 2021-11-05 13:54:39 INFO::Loading Water withdrawals flows from DataCommons... -#> 2021-11-05 13:54:39 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... -#> 2021-11-05 13:54:45 INFO::Loading Point source industrial releases to ground flows from DataCommons... -#> 2021-11-05 13:54:45 INFO::Loading Point source releases to water flows from DataCommons... -#> 2021-11-05 13:54:46 INFO::Loading Greenhouse Gases flows from DataCommons... -#> 2021-11-05 13:54:46 INFO::Loading Land use flows from DataCommons... -#> 2021-11-05 13:54:46 INFO::Loading Mineral extraction flows from DataCommons... -#> 2021-11-05 13:54:46 INFO::Loading Energy extraction flows from DataCommons... -#> 2021-11-05 13:54:46 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation -#> 2021-11-05 13:54:46 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... -#> 2021-11-05 13:54:46 INFO::Loading Pesticide releases flows from DataCommons... -#> 2021-11-05 13:54:46 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... -#> 2021-11-05 13:54:46 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation -#> 2021-11-05 13:54:47 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... -#> 2021-11-05 13:54:47 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... -#> 2021-11-05 13:54:49 INFO::Loading Employment flows from DataCommons... -#> 2021-11-05 13:54:49 INFO::Generating Value Added flows... -#> 2021-11-05 13:54:49 INFO::Initializing model indicators... -#> 2021-11-05 13:54:49 INFO::Getting Greenhouse Gases indicator from DataCommons... -#> 2021-11-05 13:54:49 INFO::Getting Acidification Potential indicator from DataCommons... -#> 2021-11-05 13:54:49 INFO::Getting Eutrophication Potential indicator from DataCommons... -#> 2021-11-05 13:54:49 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... -#> 2021-11-05 13:54:53 INFO::Getting Human Health - Cancer indicator from DataCommons... -#> 2021-11-05 13:54:54 INFO::Getting Human Health - Noncancer indicator from DataCommons... -#> 2021-11-05 13:54:54 INFO::Getting Human Health Toxicity indicator from DataCommons... -#> 2021-11-05 13:54:56 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... -#> 2021-11-05 13:54:56 INFO::Getting Ozone Depletion indicator from DataCommons... -#> 2021-11-05 13:54:56 INFO::Getting Smog Formation Potential indicator from DataCommons... -#> 2021-11-05 13:54:57 INFO::Getting Freshwater withdrawals indicator from DataCommons... -#> 2021-11-05 13:54:57 INFO::Getting Land use indicator from DataCommons... -#> 2021-11-05 13:54:57 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... -#> 2021-11-05 13:54:57 INFO::Getting Pesticides indicator from DataCommons... -#> 2021-11-05 13:54:57 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... -#> 2021-11-05 13:54:57 INFO::Getting Renewable Energy Use indicator from DataCommons... -#> 2021-11-05 13:54:58 INFO::Getting Energy Use indicator from DataCommons... -#> 2021-11-05 13:54:58 INFO::Getting Minerals and Metals Use indicator from DataCommons... -#> 2021-11-05 13:54:58 INFO::Getting Value Added indicator from useeior... -#> 2021-11-05 13:54:58 INFO::Getting Jobs Supported indicator from useeior... -#> 2021-11-05 13:54:58 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... -#> 2021-11-05 13:54:58 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... -#> 2021-11-05 13:54:58 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... -#> 2021-11-05 13:54:58 INFO::Loading demand vectors from model spec... -#> 2021-11-05 13:54:58 INFO::Loading Consumption demand vector... -#> 2021-11-05 13:54:58 INFO::Loading Production demand vector... -#> 2021-11-05 13:54:58 INFO::Loading HouseholdConsumption demand vector... -#> 2021-11-05 13:54:58 INFO::Loading DomesticConsumption demand vector... -#> 2021-11-05 13:55:01 INFO::Building commodity-by-commodity A matrix (direct requirements)... -#> 2021-11-05 13:55:01 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... -#> 2021-11-05 13:55:01 INFO::Calculating L matrix (total requirements)... -#> 2021-11-05 13:55:01 INFO::Calculating L_d matrix (domestic total requirements)... -#> 2021-11-05 13:55:01 INFO::Building B matrix (direct emissions and resource use per dollar)... -#> 2021-11-05 13:55:03 INFO::Building C matrix (characterization factors for model indicators)... -#> 2021-11-05 13:55:07 INFO::Calculating D matrix (direct environmental impacts per dollar)... -#> 2021-11-05 13:55:07 INFO::Calculating M matrix (total emissions and resource use per dollar)... -#> 2021-11-05 13:55:07 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... -#> 2021-11-05 13:55:07 INFO::Calculating N matrix (total environmental impacts per dollar)... -#> 2021-11-05 13:55:07 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... -#> 2021-11-05 13:55:07 INFO::Calculating Rho matrix (price year ratio)... -#> 2021-11-05 13:55:07 INFO::Calculating Phi matrix (producer over purchaser price ratio)... -#> 2021-11-05 13:55:07 INFO::Model build complete. -``` - -### Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production - -```r -econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01) -cat(paste("Number of sectors passing:",econval$N_Pass)) -``` - -Number of sectors passing: 409 - -```r -cat(paste("Number of sectors failing:",econval$N_Fail)) -``` - -Number of sectors failing: 2 - -```r -cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) -``` - -Sectors failing: S00402/US, S00300/US - -### Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production - -```r -econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01) -cat(paste("Number of sectors passing:",econval$N_Pass)) -``` - -Number of sectors passing: 408 - -```r -cat(paste("Number of sectors failing:",econval$N_Fail)) -``` - -Number of sectors failing: 3 - -```r -cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) -``` - -Sectors failing: 4200ID/US, S00402/US, S00300/US - -### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production - -```r -modelval <- compareEandLCIResult(model, tolerance = 0.01) -cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass)) -``` - -Number of flow totals by commodity passing: 1119564 - -```r -cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail)) -``` - -Number of flow totals by commodity failing: 0 - -```r -#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", "))) -``` - -### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production - -```r -dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01) -cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass)) -``` - -Number of flow totals by commodity passing: 1119501 - -```r -cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail)) -``` - -Number of flow totals by commodity failing: 63 - -```r -cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", "))) -``` - -Sectors with flow totals failing: 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US - -### Validate that commodity output are properly transformed to industry output via MarketShare - -```r -q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01) -cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass)) -``` - -Number of flow totals by commodity passing: 409 - -```r -cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) -``` - -Number of flow totals by commodity failing: 2 - -```r -cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", "))) -``` - -Sectors with flow totals failing: S00402/US, S00300/US - -### Validate that commodity output equals to domestic use plus production demand - -```r -q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01) -cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) -``` - -Number of flow totals by commodity passing: 409 - -```r -cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) -``` - -Number of flow totals by commodity failing: 2 - -```r -cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", "))) -``` - -Sectors with flow totals failing: 4200ID/US, S00300/US diff --git a/inst/doc/output/ValidateUSEEIOv2.0.md b/inst/doc/output/ValidateUSEEIOv2.0.md index e4c42686..f595ccbe 100644 --- a/inst/doc/output/ValidateUSEEIOv2.0.md +++ b/inst/doc/output/ValidateUSEEIOv2.0.md @@ -1,6 +1,6 @@ --- title: "Validating USEEIOv2.0 Model" -date: "2021-11-05" +date: "2021-12-30" output: html_document: keep_md: yes @@ -14,73 +14,69 @@ This document presents validation results of USEEIOv2.0 model. ```r model <- buildModel(modelname) -#> 2021-11-05 13:53:54 INFO::Begin model initialization... -#> 2021-11-05 13:53:54 INFO::Initializing IO tables... -#> 2021-11-05 13:53:54 INFO::Initializing Gross Output tables... -#> 2021-11-05 13:53:55 INFO::Initializing Chain Price Index tables... -#> 2021-11-05 13:53:56 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... -#> 2021-11-05 13:53:56 INFO::Initializing Disaggregation of IO tables... -#> 2021-11-05 13:53:57 INFO::Initializing model satellite tables... -#> 2021-11-05 13:53:57 INFO::Loading Water withdrawals flows from DataCommons... -#> 2021-11-05 13:53:57 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... -#> 2021-11-05 13:54:03 INFO::Loading Point source industrial releases to ground flows from DataCommons... -#> 2021-11-05 13:54:03 INFO::Loading Point source releases to water flows from DataCommons... -#> 2021-11-05 13:54:04 INFO::Loading Greenhouse Gases flows from DataCommons... -#> 2021-11-05 13:54:04 INFO::Loading Land use flows from DataCommons... -#> 2021-11-05 13:54:04 INFO::Loading Mineral extraction flows from DataCommons... -#> 2021-11-05 13:54:04 INFO::Loading Energy extraction flows from DataCommons... -#> 2021-11-05 13:54:04 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation -#> 2021-11-05 13:54:04 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... -#> 2021-11-05 13:54:04 INFO::Loading Pesticide releases flows from DataCommons... -#> 2021-11-05 13:54:04 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... -#> 2021-11-05 13:54:05 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation -#> 2021-11-05 13:54:05 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... -#> 2021-11-05 13:54:05 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... -#> 2021-11-05 13:54:07 INFO::Loading Employment flows from DataCommons... -#> 2021-11-05 13:54:07 INFO::Generating Value Added flows... -#> 2021-11-05 13:54:07 INFO::Initializing model indicators... -#> 2021-11-05 13:54:07 INFO::Getting Greenhouse Gases indicator from DataCommons... -#> 2021-11-05 13:54:07 INFO::Getting Acidification Potential indicator from DataCommons... -#> 2021-11-05 13:54:07 INFO::Getting Eutrophication Potential indicator from DataCommons... -#> 2021-11-05 13:54:07 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... -#> 2021-11-05 13:54:11 INFO::Getting Human Health - Cancer indicator from DataCommons... -#> 2021-11-05 13:54:12 INFO::Getting Human Health - Noncancer indicator from DataCommons... -#> 2021-11-05 13:54:12 INFO::Getting Human Health Toxicity indicator from DataCommons... -#> 2021-11-05 13:54:14 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... -#> 2021-11-05 13:54:14 INFO::Getting Ozone Depletion indicator from DataCommons... -#> 2021-11-05 13:54:14 INFO::Getting Smog Formation Potential indicator from DataCommons... -#> 2021-11-05 13:54:15 INFO::Getting Freshwater withdrawals indicator from DataCommons... -#> 2021-11-05 13:54:15 INFO::Getting Land use indicator from DataCommons... -#> 2021-11-05 13:54:15 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... -#> 2021-11-05 13:54:15 INFO::Getting Pesticides indicator from DataCommons... -#> 2021-11-05 13:54:15 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... -#> 2021-11-05 13:54:15 INFO::Getting Renewable Energy Use indicator from DataCommons... -#> 2021-11-05 13:54:16 INFO::Getting Energy Use indicator from DataCommons... -#> 2021-11-05 13:54:16 INFO::Getting Minerals and Metals Use indicator from DataCommons... -#> 2021-11-05 13:54:16 INFO::Getting Value Added indicator from useeior... -#> 2021-11-05 13:54:16 INFO::Getting Jobs Supported indicator from useeior... -#> 2021-11-05 13:54:16 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... -#> 2021-11-05 13:54:16 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... -#> 2021-11-05 13:54:16 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... -#> 2021-11-05 13:54:16 INFO::Loading demand vectors from model spec... -#> 2021-11-05 13:54:16 INFO::Loading Consumption demand vector... -#> 2021-11-05 13:54:16 INFO::Loading Production demand vector... -#> 2021-11-05 13:54:16 INFO::Loading HouseholdConsumption demand vector... -#> 2021-11-05 13:54:16 INFO::Loading DomesticConsumption demand vector... -#> 2021-11-05 13:54:19 INFO::Building commodity-by-commodity A matrix (direct requirements)... -#> 2021-11-05 13:54:19 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... -#> 2021-11-05 13:54:19 INFO::Calculating L matrix (total requirements)... -#> 2021-11-05 13:54:19 INFO::Calculating L_d matrix (domestic total requirements)... -#> 2021-11-05 13:54:19 INFO::Building B matrix (direct emissions and resource use per dollar)... -#> 2021-11-05 13:54:21 INFO::Building C matrix (characterization factors for model indicators)... -#> 2021-11-05 13:54:24 INFO::Calculating D matrix (direct environmental impacts per dollar)... -#> 2021-11-05 13:54:24 INFO::Calculating M matrix (total emissions and resource use per dollar)... -#> 2021-11-05 13:54:25 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... -#> 2021-11-05 13:54:25 INFO::Calculating N matrix (total environmental impacts per dollar)... -#> 2021-11-05 13:54:25 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... -#> 2021-11-05 13:54:25 INFO::Calculating Rho matrix (price year ratio)... -#> 2021-11-05 13:54:25 INFO::Calculating Phi matrix (producer over purchaser price ratio)... -#> 2021-11-05 13:54:25 INFO::Model build complete. +#> 2021-12-30 09:29:51 INFO::Begin model initialization... +#> 2021-12-30 09:29:52 INFO::Initializing IO tables... +#> 2021-12-30 09:29:52 INFO::Initializing Gross Output tables... +#> 2021-12-30 09:29:54 INFO::Initializing Chain Price Index tables... +#> 2021-12-30 09:29:55 INFO::Initializing model satellite tables... +#> 2021-12-30 09:29:55 INFO::Loading Water withdrawals flows from DataCommons... +#> 2021-12-30 09:29:55 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... +#> 2021-12-30 09:30:06 INFO::Loading Point source industrial releases to ground flows from DataCommons... +#> 2021-12-30 09:30:06 INFO::Loading Point source releases to water flows from DataCommons... +#> 2021-12-30 09:30:07 INFO::Loading Greenhouse Gases flows from DataCommons... +#> 2021-12-30 09:30:07 INFO::Loading Land use flows from DataCommons... +#> 2021-12-30 09:30:07 INFO::Loading Mineral extraction flows from DataCommons... +#> 2021-12-30 09:30:07 INFO::Loading Energy extraction flows from DataCommons... +#> 2021-12-30 09:30:08 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... +#> 2021-12-30 09:30:08 INFO::Loading Pesticide releases flows from DataCommons... +#> 2021-12-30 09:30:08 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... +#> 2021-12-30 09:30:09 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... +#> 2021-12-30 09:30:09 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... +#> 2021-12-30 09:30:11 INFO::Loading Employment flows from DataCommons... +#> 2021-12-30 09:30:12 INFO::Generating Value Added flows... +#> 2021-12-30 09:30:12 INFO::Initializing model indicators... +#> 2021-12-30 09:30:12 INFO::Getting Greenhouse Gases indicator from DataCommons... +#> 2021-12-30 09:30:12 INFO::Getting Acidification Potential indicator from DataCommons... +#> 2021-12-30 09:30:12 INFO::Getting Eutrophication Potential indicator from DataCommons... +#> 2021-12-30 09:30:12 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... +#> 2021-12-30 09:30:18 INFO::Getting Human Health - Cancer indicator from DataCommons... +#> 2021-12-30 09:30:20 INFO::Getting Human Health - Noncancer indicator from DataCommons... +#> 2021-12-30 09:30:21 INFO::Getting Human Health Toxicity indicator from DataCommons... +#> 2021-12-30 09:30:23 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... +#> 2021-12-30 09:30:24 INFO::Getting Ozone Depletion indicator from DataCommons... +#> 2021-12-30 09:30:24 INFO::Getting Smog Formation Potential indicator from DataCommons... +#> 2021-12-30 09:30:25 INFO::Getting Freshwater withdrawals indicator from DataCommons... +#> 2021-12-30 09:30:25 INFO::Getting Land use indicator from DataCommons... +#> 2021-12-30 09:30:25 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... +#> 2021-12-30 09:30:26 INFO::Getting Pesticides indicator from DataCommons... +#> 2021-12-30 09:30:26 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:30:26 INFO::Getting Renewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:30:26 INFO::Getting Energy Use indicator from DataCommons... +#> 2021-12-30 09:30:27 INFO::Getting Minerals and Metals Use indicator from DataCommons... +#> 2021-12-30 09:30:27 INFO::Getting Value Added indicator from useeior... +#> 2021-12-30 09:30:27 INFO::Getting Jobs Supported indicator from useeior... +#> 2021-12-30 09:30:27 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... +#> 2021-12-30 09:30:27 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... +#> 2021-12-30 09:30:28 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... +#> 2021-12-30 09:30:28 INFO::Loading demand vectors ... +#> 2021-12-30 09:30:28 INFO::Loading CompleteProduction demand vector... +#> 2021-12-30 09:30:28 INFO::Loading DomesticProduction demand vector... +#> 2021-12-30 09:30:28 INFO::Loading CompleteConsumption demand vector... +#> 2021-12-30 09:30:28 INFO::Loading DomesticConsumption demand vector... +#> 2021-12-30 09:30:33 INFO::Building commodity-by-commodity A matrix (direct requirements)... +#> 2021-12-30 09:30:33 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... +#> 2021-12-30 09:30:34 INFO::Calculating L matrix (total requirements)... +#> 2021-12-30 09:30:34 INFO::Calculating L_d matrix (domestic total requirements)... +#> 2021-12-30 09:30:34 INFO::Building B matrix (direct emissions and resource use per dollar)... +#> 2021-12-30 09:30:37 INFO::Building C matrix (characterization factors for model indicators)... +#> 2021-12-30 09:30:42 INFO::Calculating D matrix (direct environmental impacts per dollar)... +#> 2021-12-30 09:30:42 INFO::Calculating M matrix (total emissions and resource use per dollar)... +#> 2021-12-30 09:30:42 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... +#> 2021-12-30 09:30:42 INFO::Calculating N matrix (total environmental impacts per dollar)... +#> 2021-12-30 09:30:42 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... +#> 2021-12-30 09:30:42 INFO::Calculating Rho matrix (price year ratio)... +#> 2021-12-30 09:30:42 INFO::Calculating Phi matrix (producer over purchaser price ratio)... +#> 2021-12-30 09:30:42 INFO::Model build complete. ``` ### Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production @@ -90,7 +86,7 @@ econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01) cat(paste("Number of sectors passing:",econval$N_Pass)) ``` -Number of sectors passing: 409 +Number of sectors passing: 403 ```r cat(paste("Number of sectors failing:",econval$N_Fail)) @@ -111,19 +107,19 @@ econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = cat(paste("Number of sectors passing:",econval$N_Pass)) ``` -Number of sectors passing: 408 +Number of sectors passing: 403 ```r cat(paste("Number of sectors failing:",econval$N_Fail)) ``` -Number of sectors failing: 3 +Number of sectors failing: 2 ```r cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) ``` -Sectors failing: 4200ID/US, S00402/US, S00300/US +Sectors failing: S00402/US, S00300/US ### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production @@ -132,7 +128,7 @@ modelval <- compareEandLCIResult(model, tolerance = 0.01) cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass)) ``` -Number of flow totals by commodity passing: 1096548 +Number of flow totals by commodity passing: 1080540 ```r cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail)) @@ -151,19 +147,19 @@ dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01) cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass)) ``` -Number of flow totals by commodity passing: 1096485 +Number of flow totals by commodity passing: 1080540 ```r cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail)) ``` -Number of flow totals by commodity failing: 63 +Number of flow totals by commodity failing: 0 ```r cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", "))) ``` -Sectors with flow totals failing: 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US +Sectors with flow totals failing: ### Validate that commodity output are properly transformed to industry output via MarketShare @@ -172,7 +168,7 @@ q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformat cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass)) ``` -Number of flow totals by commodity passing: 409 +Number of flow totals by commodity passing: 403 ```r cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) @@ -193,16 +189,16 @@ q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, toleran cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) ``` -Number of flow totals by commodity passing: 409 +Number of flow totals by commodity passing: 404 ```r cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) ``` -Number of flow totals by commodity failing: 2 +Number of flow totals by commodity failing: 1 ```r cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", "))) ``` -Sectors with flow totals failing: 4200ID/US, S00300/US +Sectors with flow totals failing: S00300/US diff --git a/inst/doc/output/ValidateUSEEIOv2.1-422.md b/inst/doc/output/ValidateUSEEIOv2.1-422.md new file mode 100644 index 00000000..f88a9223 --- /dev/null +++ b/inst/doc/output/ValidateUSEEIOv2.1-422.md @@ -0,0 +1,212 @@ +--- +title: "Validating USEEIOv2.1-422 Model" +date: "2021-12-30" +output: + html_document: + keep_md: yes +editor_options: + chunk_output_type: console +--- + +This document presents validation results of USEEIOv2.1-422 model. + +### Build and Calculate Model + +```r +model <- buildModel(modelname) +#> 2021-12-30 09:31:59 INFO::Begin model initialization... +#> 2021-12-30 09:31:59 INFO::Initializing IO tables... +#> 2021-12-30 09:31:59 INFO::Initializing Gross Output tables... +#> 2021-12-30 09:32:00 INFO::Initializing Chain Price Index tables... +#> 2021-12-30 09:32:01 INFO::Loading aggregation specification file for ElectricityAggregationDetail... +#> 2021-12-30 09:32:01 INFO::Initializing Aggregation of IO tables... +#> 2021-12-30 09:32:02 INFO::Loading disaggregation specification file for ElectricityDisaggregationDetail... +#> 2021-12-30 09:32:02 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... +#> 2021-12-30 09:32:02 INFO::Initializing Disaggregation of IO tables... +#> 2021-12-30 09:32:03 INFO::Initializing model satellite tables... +#> 2021-12-30 09:32:03 INFO::Loading Water withdrawals flows from DataCommons... +#> 2021-12-30 09:32:04 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... +#> 2021-12-30 09:32:20 INFO::Loading Point source industrial releases to ground flows from DataCommons... +#> 2021-12-30 09:32:21 INFO::Loading Point source releases to water flows from DataCommons... +#> 2021-12-30 09:32:22 INFO::Loading Greenhouse Gases flows from DataCommons... +#> 2021-12-30 09:32:23 INFO::Loading Land use flows from DataCommons... +#> 2021-12-30 09:32:23 INFO::Loading Mineral extraction flows from DataCommons... +#> 2021-12-30 09:32:23 INFO::Loading Energy extraction flows from DataCommons... +#> 2021-12-30 09:32:23 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation +#> 2021-12-30 09:32:23 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... +#> 2021-12-30 09:32:23 INFO::Loading Pesticide releases flows from DataCommons... +#> 2021-12-30 09:32:23 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... +#> 2021-12-30 09:32:24 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation +#> 2021-12-30 09:32:24 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... +#> 2021-12-30 09:32:24 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... +#> 2021-12-30 09:32:27 INFO::Loading Employment flows from DataCommons... +#> 2021-12-30 09:32:28 INFO::Generating Value Added flows... +#> 2021-12-30 09:32:28 INFO::Initializing model indicators... +#> 2021-12-30 09:32:28 INFO::Getting Greenhouse Gases indicator from DataCommons... +#> 2021-12-30 09:32:28 INFO::Getting Acidification Potential indicator from DataCommons... +#> 2021-12-30 09:32:29 INFO::Getting Eutrophication Potential indicator from DataCommons... +#> 2021-12-30 09:32:29 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... +#> 2021-12-30 09:32:34 INFO::Getting Human Health - Cancer indicator from DataCommons... +#> 2021-12-30 09:32:35 INFO::Getting Human Health - Noncancer indicator from DataCommons... +#> 2021-12-30 09:32:37 INFO::Getting Human Health Toxicity indicator from DataCommons... +#> 2021-12-30 09:32:39 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... +#> 2021-12-30 09:32:39 INFO::Getting Ozone Depletion indicator from DataCommons... +#> 2021-12-30 09:32:40 INFO::Getting Smog Formation Potential indicator from DataCommons... +#> 2021-12-30 09:32:40 INFO::Getting Freshwater withdrawals indicator from DataCommons... +#> 2021-12-30 09:32:41 INFO::Getting Land use indicator from DataCommons... +#> 2021-12-30 09:32:41 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... +#> 2021-12-30 09:32:41 INFO::Getting Pesticides indicator from DataCommons... +#> 2021-12-30 09:32:41 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:32:41 INFO::Getting Renewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:32:41 INFO::Getting Energy Use indicator from DataCommons... +#> 2021-12-30 09:32:41 INFO::Getting Minerals and Metals Use indicator from DataCommons... +#> 2021-12-30 09:32:42 INFO::Getting Value Added indicator from useeior... +#> 2021-12-30 09:32:42 INFO::Getting Jobs Supported indicator from useeior... +#> 2021-12-30 09:32:42 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... +#> 2021-12-30 09:32:42 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... +#> 2021-12-30 09:32:42 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... +#> 2021-12-30 09:32:42 INFO::Loading demand vectors ... +#> 2021-12-30 09:32:42 INFO::Loading CompleteProduction demand vector... +#> 2021-12-30 09:32:42 INFO::Loading DomesticProduction demand vector... +#> 2021-12-30 09:32:42 INFO::Loading CompleteConsumption demand vector... +#> 2021-12-30 09:32:42 INFO::Loading DomesticConsumption demand vector... +#> 2021-12-30 09:32:42 INFO::Loading HouseholdConsumption demand vector... +#> 2021-12-30 09:32:46 INFO::Building commodity-by-commodity A matrix (direct requirements)... +#> 2021-12-30 09:32:46 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... +#> 2021-12-30 09:32:46 INFO::Calculating L matrix (total requirements)... +#> 2021-12-30 09:32:46 INFO::Calculating L_d matrix (domestic total requirements)... +#> 2021-12-30 09:32:46 INFO::Building B matrix (direct emissions and resource use per dollar)... +#> 2021-12-30 09:32:49 INFO::Building C matrix (characterization factors for model indicators)... +#> 2021-12-30 09:32:54 INFO::Calculating D matrix (direct environmental impacts per dollar)... +#> 2021-12-30 09:32:54 INFO::Calculating M matrix (total emissions and resource use per dollar)... +#> 2021-12-30 09:32:54 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... +#> 2021-12-30 09:32:54 INFO::Calculating N matrix (total environmental impacts per dollar)... +#> 2021-12-30 09:32:54 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... +#> 2021-12-30 09:32:54 INFO::Calculating Rho matrix (price year ratio)... +#> 2021-12-30 09:32:54 INFO::Calculating Phi matrix (producer over purchaser price ratio)... +#> 2021-12-30 09:32:54 INFO::Model build complete. +``` + +### Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production + +```r +econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01) +cat(paste("Number of sectors passing:",econval$N_Pass)) +``` + +Number of sectors passing: 420 + +```r +cat(paste("Number of sectors failing:",econval$N_Fail)) +``` + +Number of sectors failing: 2 + +```r +cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +``` + +Sectors failing: S00402/US, S00300/US + +### Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production + +```r +econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01) +cat(paste("Number of sectors passing:",econval$N_Pass)) +``` + +Number of sectors passing: 420 + +```r +cat(paste("Number of sectors failing:",econval$N_Fail)) +``` + +Number of sectors failing: 2 + +```r +cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) +``` + +Sectors failing: S00402/US, S00300/US + +### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production + +```r +modelval <- compareEandLCIResult(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass)) +``` + +Number of flow totals by commodity passing: 1148684 + +```r +cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail)) +``` + +Number of flow totals by commodity failing: 0 + +```r +#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", "))) +``` + +### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production + +```r +dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 1148684 + +```r +cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 0 + +```r +cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", "))) +``` + +Sectors with flow totals failing: + +### Validate that commodity output are properly transformed to industry output via MarketShare + +```r +q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 417 + +```r +cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 5 + +```r +cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", "))) +``` + +Sectors with flow totals failing: 562213/US, 562910/US, 562920/US, S00402/US, S00300/US + +### Validate that commodity output equals to domestic use plus production demand + +```r +q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01) +cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) +``` + +Number of flow totals by commodity passing: 421 + +```r +cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) +``` + +Number of flow totals by commodity failing: 1 + +```r +cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", "))) +``` + +Sectors with flow totals failing: S00300/US diff --git a/inst/doc/output/ValidateUSEEIOv2.1.md b/inst/doc/output/ValidateUSEEIOv2.1.md deleted file mode 100644 index 277dddfb..00000000 --- a/inst/doc/output/ValidateUSEEIOv2.1.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -title: "Validating USEEIOv2.1 Model" -date: "2021-11-05" -output: - html_document: - keep_md: yes -editor_options: - chunk_output_type: console ---- - -This document presents validation results of USEEIOv2.1 model. - -### Build and Calculate Model - -```r -model <- buildModel(modelname) -#> 2021-11-05 13:55:19 INFO::Begin model initialization... -#> 2021-11-05 13:55:19 INFO::Initializing IO tables... -#> 2021-11-05 13:55:19 INFO::Initializing Gross Output tables... -#> 2021-11-05 13:55:20 INFO::Initializing Chain Price Index tables... -#> 2021-11-05 13:55:21 INFO::Loading aggregation specification file for ElectricityAggregationDetail... -#> 2021-11-05 13:55:21 INFO::Initializing Aggregation of IO tables... -#> 2021-11-05 13:55:21 INFO::Loading disaggregation specification file for ElectricityDisaggregationDetail... -#> 2021-11-05 13:55:21 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... -#> 2021-11-05 13:55:21 INFO::Initializing Disaggregation of IO tables... -#> 2021-11-05 13:55:22 INFO::Initializing model satellite tables... -#> 2021-11-05 13:55:22 INFO::Loading Water withdrawals flows from DataCommons... -#> 2021-11-05 13:55:22 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... -#> 2021-11-05 13:55:31 INFO::Loading Point source industrial releases to ground flows from DataCommons... -#> 2021-11-05 13:55:32 INFO::Loading Point source releases to water flows from DataCommons... -#> 2021-11-05 13:55:33 INFO::Loading Greenhouse Gases flows from DataCommons... -#> 2021-11-05 13:55:33 INFO::Loading Land use flows from DataCommons... -#> 2021-11-05 13:55:33 INFO::Loading Mineral extraction flows from DataCommons... -#> 2021-11-05 13:55:33 INFO::Loading Energy extraction flows from DataCommons... -#> 2021-11-05 13:55:33 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation -#> 2021-11-05 13:55:33 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... -#> 2021-11-05 13:55:33 INFO::Loading Pesticide releases flows from DataCommons... -#> 2021-11-05 13:55:34 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... -#> 2021-11-05 13:55:34 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation -#> 2021-11-05 13:55:34 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... -#> 2021-11-05 13:55:34 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... -#> 2021-11-05 13:55:36 INFO::Loading Employment flows from DataCommons... -#> 2021-11-05 13:55:36 INFO::Generating Value Added flows... -#> 2021-11-05 13:55:36 INFO::Initializing model indicators... -#> 2021-11-05 13:55:36 INFO::Getting Greenhouse Gases indicator from DataCommons... -#> 2021-11-05 13:55:37 INFO::Getting Acidification Potential indicator from DataCommons... -#> 2021-11-05 13:55:37 INFO::Getting Eutrophication Potential indicator from DataCommons... -#> 2021-11-05 13:55:37 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... -#> 2021-11-05 13:55:40 INFO::Getting Human Health - Cancer indicator from DataCommons... -#> 2021-11-05 13:55:41 INFO::Getting Human Health - Noncancer indicator from DataCommons... -#> 2021-11-05 13:55:42 INFO::Getting Human Health Toxicity indicator from DataCommons... -#> 2021-11-05 13:55:43 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... -#> 2021-11-05 13:55:43 INFO::Getting Ozone Depletion indicator from DataCommons... -#> 2021-11-05 13:55:43 INFO::Getting Smog Formation Potential indicator from DataCommons... -#> 2021-11-05 13:55:44 INFO::Getting Freshwater withdrawals indicator from DataCommons... -#> 2021-11-05 13:55:44 INFO::Getting Land use indicator from DataCommons... -#> 2021-11-05 13:55:44 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... -#> 2021-11-05 13:55:44 INFO::Getting Pesticides indicator from DataCommons... -#> 2021-11-05 13:55:45 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... -#> 2021-11-05 13:55:45 INFO::Getting Renewable Energy Use indicator from DataCommons... -#> 2021-11-05 13:55:45 INFO::Getting Energy Use indicator from DataCommons... -#> 2021-11-05 13:55:45 INFO::Getting Minerals and Metals Use indicator from DataCommons... -#> 2021-11-05 13:55:45 INFO::Getting Value Added indicator from useeior... -#> 2021-11-05 13:55:45 INFO::Getting Jobs Supported indicator from useeior... -#> 2021-11-05 13:55:45 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... -#> 2021-11-05 13:55:45 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... -#> 2021-11-05 13:55:45 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... -#> 2021-11-05 13:55:45 INFO::Loading demand vectors from model spec... -#> 2021-11-05 13:55:45 INFO::Loading Consumption demand vector... -#> 2021-11-05 13:55:45 INFO::Loading Production demand vector... -#> 2021-11-05 13:55:45 INFO::Loading HouseholdConsumption demand vector... -#> 2021-11-05 13:55:45 INFO::Loading DomesticConsumption demand vector... -#> 2021-11-05 13:55:48 INFO::Building commodity-by-commodity A matrix (direct requirements)... -#> 2021-11-05 13:55:48 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... -#> 2021-11-05 13:55:48 INFO::Calculating L matrix (total requirements)... -#> 2021-11-05 13:55:48 INFO::Calculating L_d matrix (domestic total requirements)... -#> 2021-11-05 13:55:48 INFO::Building B matrix (direct emissions and resource use per dollar)... -#> 2021-11-05 13:55:50 INFO::Building C matrix (characterization factors for model indicators)... -#> 2021-11-05 13:55:53 INFO::Calculating D matrix (direct environmental impacts per dollar)... -#> 2021-11-05 13:55:53 INFO::Calculating M matrix (total emissions and resource use per dollar)... -#> 2021-11-05 13:55:54 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... -#> 2021-11-05 13:55:54 INFO::Calculating N matrix (total environmental impacts per dollar)... -#> 2021-11-05 13:55:54 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... -#> 2021-11-05 13:55:54 INFO::Calculating Rho matrix (price year ratio)... -#> 2021-11-05 13:55:54 INFO::Calculating Phi matrix (producer over purchaser price ratio)... -#> 2021-11-05 13:55:54 INFO::Model build complete. -``` - -### Validate that commodity output can be recalculated (within 1%) with the model total requirements matrix (L) and demand vector (y) for US production - -```r -econval <- compareOutputandLeontiefXDemand(model, tolerance = 0.01) -cat(paste("Number of sectors passing:",econval$N_Pass)) -``` - -Number of sectors passing: 420 - -```r -cat(paste("Number of sectors failing:",econval$N_Fail)) -``` - -Number of sectors failing: 2 - -```r -cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) -``` - -Sectors failing: S00402/US, S00300/US - -### Validate that commodity output can be recalculated (within 1%) with model total domestic requirements matrix (L_d) and model demand (y) for US production - -```r -econval <- compareOutputandLeontiefXDemand(model,use_domestic=TRUE, tolerance = 0.01) -cat(paste("Number of sectors passing:",econval$N_Pass)) -``` - -Number of sectors passing: 419 - -```r -cat(paste("Number of sectors failing:",econval$N_Fail)) -``` - -Number of sectors failing: 3 - -```r -cat(paste("Sectors failing:", paste(econval$Failure$rownames, collapse = ", "))) -``` - -Sectors failing: 4200ID/US, S00402/US, S00300/US - -### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total requirements matrix (L), and demand vector (y) for US production - -```r -modelval <- compareEandLCIResult(model, tolerance = 0.01) -cat(paste("Number of flow totals by commodity passing:",modelval$N_Pass)) -``` - -Number of flow totals by commodity passing: 1149106 - -```r -cat(paste("Number of flow totals by commodity failing:",modelval$N_Fail)) -``` - -Number of flow totals by commodity failing: 0 - -```r -#cat(paste("Sectors failing:", paste(modelval$Failure$variable, collapse = ", "))) -``` - -### Validate that flow totals by commodity (E_c) can be recalculated (within 1%) using the model satellite matrix (B), market shares matrix (V_n), total domestic requirements matrix (L_d), and demand vector (y) for US production - -```r -dom_val <- compareEandLCIResult(model,use_domestic=TRUE, tolerance = 0.01) -cat(paste("Number of flow totals by commodity passing:",dom_val$N_Pass)) -``` - -Number of flow totals by commodity passing: 1149043 - -```r -cat(paste("Number of flow totals by commodity failing:",dom_val$N_Fail)) -``` - -Number of flow totals by commodity failing: 63 - -```r -cat(paste("Sectors with flow totals failing:", paste(dom_val$Failure$variable, collapse = ", "))) -``` - -Sectors with flow totals failing: 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US, 4200ID/US - -### Validate that commodity output are properly transformed to industry output via MarketShare - -```r -q_x_val <- compareCommodityOutputXMarketShareandIndustryOutputwithCPITransformation(model, tolerance = 0.01) -cat(paste("Number of flow totals by commodity passing:",q_x_val$N_Pass)) -``` - -Number of flow totals by commodity passing: 417 - -```r -cat(paste("Number of flow totals by commodity failing:",q_x_val$N_Fail)) -``` - -Number of flow totals by commodity failing: 5 - -```r -cat(paste("Sectors with flow totals failing:", paste(q_x_val$Failure$rownames, collapse = ", "))) -``` - -Sectors with flow totals failing: 562213/US, 562910/US, 562920/US, S00402/US, S00300/US - -### Validate that commodity output equals to domestic use plus production demand - -```r -q_val <- compareCommodityOutputandDomesticUseplusProductionDemand(model, tolerance = 0.01) -cat(paste("Number of flow totals by commodity passing:",q_val$N_Pass)) -``` - -Number of flow totals by commodity passing: 420 - -```r -cat(paste("Number of flow totals by commodity failing:",q_val$N_Fail)) -``` - -Number of flow totals by commodity failing: 2 - -```r -cat(paste("Sectors with flow totals failing:", paste(q_val$Failure$rownames, collapse = ", "))) -``` - -Sectors with flow totals failing: 4200ID/US, S00300/US From 5f8c485d8cdcd4340fa1de34491d522ed49b5f71 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Thu, 30 Dec 2021 09:40:47 -0800 Subject: [PATCH 315/319] Add comparison of flow totals between models --- .../CompareUSEEIOv2.0-411&USEEIOv2.0.1-411.md | 241 ++++++++++++++++++ .../CompareUSEEIOv2.0.1-411&USEEIOv2.1-422.md | 186 ++++++++++++++ 2 files changed, 427 insertions(+) create mode 100644 inst/doc/CompareUSEEIOv2.0-411&USEEIOv2.0.1-411.md create mode 100644 inst/doc/CompareUSEEIOv2.0.1-411&USEEIOv2.1-422.md diff --git a/inst/doc/CompareUSEEIOv2.0-411&USEEIOv2.0.1-411.md b/inst/doc/CompareUSEEIOv2.0-411&USEEIOv2.0.1-411.md new file mode 100644 index 00000000..584b9629 --- /dev/null +++ b/inst/doc/CompareUSEEIOv2.0-411&USEEIOv2.0.1-411.md @@ -0,0 +1,241 @@ +--- +title: "Compare USEEIOv2.0-411 and USEEIOv2.0.1-411 Model" +date: "2021-12-30" +output: + html_document: + keep_md: yes +editor_options: + chunk_output_type: console +--- + +This document presents comparison results of USEEIOv2.0-411 and USEEIOv2.0.1-411 model. + +#### Compare flow totals between two models + +```r +mA <- buildModel(modelname_pair[1]) +#> 2021-12-30 09:35:34 INFO::Begin model initialization... +#> 2021-12-30 09:35:34 INFO::Initializing IO tables... +#> 2021-12-30 09:35:35 INFO::Initializing Gross Output tables... +#> 2021-12-30 09:35:36 INFO::Initializing Chain Price Index tables... +#> 2021-12-30 09:35:37 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... +#> 2021-12-30 09:35:37 INFO::Initializing Disaggregation of IO tables... +#> 2021-12-30 09:35:38 INFO::Initializing model satellite tables... +#> 2021-12-30 09:35:38 INFO::Loading Water withdrawals flows from DataCommons... +#> 2021-12-30 09:35:38 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... +#> 2021-12-30 09:35:49 INFO::Loading Point source industrial releases to ground flows from DataCommons... +#> 2021-12-30 09:35:49 INFO::Loading Point source releases to water flows from DataCommons... +#> 2021-12-30 09:35:50 INFO::Loading Greenhouse Gases flows from DataCommons... +#> 2021-12-30 09:35:50 INFO::Loading Land use flows from DataCommons... +#> 2021-12-30 09:35:51 INFO::Loading Mineral extraction flows from DataCommons... +#> 2021-12-30 09:35:51 INFO::Loading Energy extraction flows from DataCommons... +#> 2021-12-30 09:35:51 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation +#> 2021-12-30 09:35:51 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... +#> 2021-12-30 09:35:51 INFO::Loading Pesticide releases flows from DataCommons... +#> 2021-12-30 09:35:51 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... +#> 2021-12-30 09:35:51 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation +#> 2021-12-30 09:35:52 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... +#> 2021-12-30 09:35:52 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... +#> 2021-12-30 09:35:55 INFO::Loading Employment flows from DataCommons... +#> 2021-12-30 09:35:55 INFO::Generating Value Added flows... +#> 2021-12-30 09:35:56 INFO::Initializing model indicators... +#> 2021-12-30 09:35:56 INFO::Getting Greenhouse Gases indicator from DataCommons... +#> 2021-12-30 09:35:56 INFO::Getting Acidification Potential indicator from DataCommons... +#> 2021-12-30 09:35:56 INFO::Getting Eutrophication Potential indicator from DataCommons... +#> 2021-12-30 09:35:56 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... +#> 2021-12-30 09:36:02 INFO::Getting Human Health - Cancer indicator from DataCommons... +#> 2021-12-30 09:36:03 INFO::Getting Human Health - Noncancer indicator from DataCommons... +#> 2021-12-30 09:36:04 INFO::Getting Human Health Toxicity indicator from DataCommons... +#> 2021-12-30 09:36:07 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... +#> 2021-12-30 09:36:08 INFO::Getting Ozone Depletion indicator from DataCommons... +#> 2021-12-30 09:36:08 INFO::Getting Smog Formation Potential indicator from DataCommons... +#> 2021-12-30 09:36:09 INFO::Getting Freshwater withdrawals indicator from DataCommons... +#> 2021-12-30 09:36:09 INFO::Getting Land use indicator from DataCommons... +#> 2021-12-30 09:36:09 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... +#> 2021-12-30 09:36:09 INFO::Getting Pesticides indicator from DataCommons... +#> 2021-12-30 09:36:09 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:36:09 INFO::Getting Renewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:36:10 INFO::Getting Energy Use indicator from DataCommons... +#> 2021-12-30 09:36:10 INFO::Getting Minerals and Metals Use indicator from DataCommons... +#> 2021-12-30 09:36:10 INFO::Getting Value Added indicator from useeior... +#> 2021-12-30 09:36:10 INFO::Getting Jobs Supported indicator from useeior... +#> 2021-12-30 09:36:10 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... +#> 2021-12-30 09:36:10 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... +#> 2021-12-30 09:36:11 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... +#> 2021-12-30 09:36:11 INFO::Loading demand vectors ... +#> 2021-12-30 09:36:11 INFO::Loading CompleteProduction demand vector... +#> 2021-12-30 09:36:11 INFO::Loading DomesticProduction demand vector... +#> 2021-12-30 09:36:11 INFO::Loading CompleteConsumption demand vector... +#> 2021-12-30 09:36:11 INFO::Loading DomesticConsumption demand vector... +#> 2021-12-30 09:36:11 INFO::Loading HouseholdConsumption demand vector... +#> 2021-12-30 09:36:15 INFO::Building commodity-by-commodity A matrix (direct requirements)... +#> 2021-12-30 09:36:15 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... +#> 2021-12-30 09:36:15 INFO::Calculating L matrix (total requirements)... +#> 2021-12-30 09:36:15 INFO::Calculating L_d matrix (domestic total requirements)... +#> 2021-12-30 09:36:15 INFO::Building B matrix (direct emissions and resource use per dollar)... +#> 2021-12-30 09:36:18 INFO::Building C matrix (characterization factors for model indicators)... +#> 2021-12-30 09:36:23 INFO::Calculating D matrix (direct environmental impacts per dollar)... +#> 2021-12-30 09:36:23 INFO::Calculating M matrix (total emissions and resource use per dollar)... +#> 2021-12-30 09:36:23 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... +#> 2021-12-30 09:36:23 INFO::Calculating N matrix (total environmental impacts per dollar)... +#> 2021-12-30 09:36:23 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... +#> 2021-12-30 09:36:24 INFO::Calculating Rho matrix (price year ratio)... +#> 2021-12-30 09:36:24 INFO::Calculating Phi matrix (producer over purchaser price ratio)... +#> 2021-12-30 09:36:24 INFO::Model build complete. +mB <- buildModel(modelname_pair[2]) +#> 2021-12-30 09:36:24 INFO::Begin model initialization... +#> 2021-12-30 09:36:24 INFO::Initializing IO tables... +#> 2021-12-30 09:36:24 INFO::Initializing Gross Output tables... +#> 2021-12-30 09:36:26 INFO::Initializing Chain Price Index tables... +#> 2021-12-30 09:36:27 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... +#> 2021-12-30 09:36:27 INFO::Initializing Disaggregation of IO tables... +#> 2021-12-30 09:36:28 INFO::Initializing model satellite tables... +#> 2021-12-30 09:36:28 INFO::Loading Water withdrawals flows from DataCommons... +#> 2021-12-30 09:36:28 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... +#> 2021-12-30 09:36:39 INFO::Loading Point source industrial releases to ground flows from DataCommons... +#> 2021-12-30 09:36:39 INFO::Loading Point source releases to water flows from DataCommons... +#> 2021-12-30 09:36:41 INFO::Loading Greenhouse Gases flows from DataCommons... +#> 2021-12-30 09:36:41 INFO::Loading Land use flows from DataCommons... +#> 2021-12-30 09:36:41 INFO::Loading Mineral extraction flows from DataCommons... +#> 2021-12-30 09:36:41 INFO::Loading Energy extraction flows from DataCommons... +#> 2021-12-30 09:36:41 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation +#> 2021-12-30 09:36:41 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... +#> 2021-12-30 09:36:42 INFO::Loading Pesticide releases flows from DataCommons... +#> 2021-12-30 09:36:42 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... +#> 2021-12-30 09:36:42 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation +#> 2021-12-30 09:36:43 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... +#> 2021-12-30 09:36:43 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... +#> 2021-12-30 09:36:46 INFO::Loading Employment flows from DataCommons... +#> 2021-12-30 09:36:46 INFO::Generating Value Added flows... +#> 2021-12-30 09:36:47 INFO::Initializing model indicators... +#> 2021-12-30 09:36:47 INFO::Getting Greenhouse Gases indicator from DataCommons... +#> 2021-12-30 09:36:47 INFO::Getting Acidification Potential indicator from DataCommons... +#> 2021-12-30 09:36:47 INFO::Getting Eutrophication Potential indicator from DataCommons... +#> 2021-12-30 09:36:47 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... +#> 2021-12-30 09:36:53 INFO::Getting Human Health - Cancer indicator from DataCommons... +#> 2021-12-30 09:36:55 INFO::Getting Human Health - Noncancer indicator from DataCommons... +#> 2021-12-30 09:36:56 INFO::Getting Human Health Toxicity indicator from DataCommons... +#> 2021-12-30 09:36:58 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... +#> 2021-12-30 09:36:59 INFO::Getting Ozone Depletion indicator from DataCommons... +#> 2021-12-30 09:36:59 INFO::Getting Smog Formation Potential indicator from DataCommons... +#> 2021-12-30 09:37:00 INFO::Getting Freshwater withdrawals indicator from DataCommons... +#> 2021-12-30 09:37:00 INFO::Getting Land use indicator from DataCommons... +#> 2021-12-30 09:37:00 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... +#> 2021-12-30 09:37:00 INFO::Getting Pesticides indicator from DataCommons... +#> 2021-12-30 09:37:00 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:37:00 INFO::Getting Renewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:37:01 INFO::Getting Energy Use indicator from DataCommons... +#> 2021-12-30 09:37:01 INFO::Getting Minerals and Metals Use indicator from DataCommons... +#> 2021-12-30 09:37:01 INFO::Getting Value Added indicator from useeior... +#> 2021-12-30 09:37:01 INFO::Getting Jobs Supported indicator from useeior... +#> 2021-12-30 09:37:01 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... +#> 2021-12-30 09:37:01 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... +#> 2021-12-30 09:37:01 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... +#> 2021-12-30 09:37:02 INFO::Loading demand vectors ... +#> 2021-12-30 09:37:02 INFO::Loading CompleteProduction demand vector... +#> 2021-12-30 09:37:02 INFO::Loading DomesticProduction demand vector... +#> 2021-12-30 09:37:02 INFO::Loading CompleteConsumption demand vector... +#> 2021-12-30 09:37:02 INFO::Loading DomesticConsumption demand vector... +#> 2021-12-30 09:37:06 INFO::Building commodity-by-commodity A matrix (direct requirements)... +#> 2021-12-30 09:37:06 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... +#> 2021-12-30 09:37:06 INFO::Calculating L matrix (total requirements)... +#> 2021-12-30 09:37:06 INFO::Calculating L_d matrix (domestic total requirements)... +#> 2021-12-30 09:37:06 INFO::Building B matrix (direct emissions and resource use per dollar)... +#> 2021-12-30 09:37:09 INFO::Building C matrix (characterization factors for model indicators)... +#> 2021-12-30 09:37:14 INFO::Calculating D matrix (direct environmental impacts per dollar)... +#> 2021-12-30 09:37:14 INFO::Calculating M matrix (total emissions and resource use per dollar)... +#> 2021-12-30 09:37:14 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... +#> 2021-12-30 09:37:14 INFO::Calculating N matrix (total environmental impacts per dollar)... +#> 2021-12-30 09:37:14 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... +#> 2021-12-30 09:37:14 INFO::Calculating Rho matrix (price year ratio)... +#> 2021-12-30 09:37:14 INFO::Calculating Phi matrix (producer over purchaser price ratio)... +#> 2021-12-30 09:37:15 INFO::Model build complete. +``` + + +```r +# Compare flow totals +model_com <- compareFlowTotals(mA, mB) +cat(paste("Number of flow totals by commodity passing:",model_com$N_Pass)) +``` + +Number of flow totals by commodity passing: 2436 + +```r +cat(paste("Number of flow totals by commodity failing:",model_com$N_Fail)) +``` + +Number of flow totals by commodity failing: 289 + +```r +#cat(paste("Sectors with flow totals failing:", paste(model_com$Failure$rownames, collapse = ", "))) +``` + +There are flow differences between USEEIOv2.0-411 and USEEIOv2.0.1-411 + +Flows in USEEIOv2.0-411 not in USEEIOv2.0.1-411 are + +[1] "Thiabendazole/emission/air/kg/US" +[2] "Water, fresh/emission/air/troposphere/ground-level/kg/US" +[3] "Water/emission/air/troposphere/ground-level/kg/US" + + Flows in USEEIOv2.0.1-411 not in USEEIOv2.0-411 are + + [1] "1-Bromopropane/emission/ground/kg/US" + [2] "1,2-Dibromo-3-chloropropane/emission/water/kg/US" + [3] "2-(N-Methylperfluorooctanesulfonamido)acetic acid/emission/water/kg/US" + [4] "2,2'-Bioxirane/emission/air/kg/US" + [5] "2,4,4'-Trichlorobiphenyl/emission/air/kg/US" + [6] "3,3',4,4'-Tetrachlorobiphenyl/emission/air/kg/US" + [7] "4-Nitro-N-methylphthalimide/emission/water/kg/US" + [8] "4,4'-Dichlorobiphenyl/emission/air/kg/US" + [9] "4,4'-Methylenedi(phenyl isocyanate)/emission/air/kg/US" +[10] "Aromatics, purgeable/emission/water/kg/US" +[11] "Bentazon/emission/water/kg/US" +[12] "Benzo[c]phenanthrene/emission/air/kg/US" +[13] "BY-PRODUCT SALTS GENERATED IN THE PRODUCTION OF MSMA AND CACODYLIC ACID./Waste Flows/Hazardous Waste/kg/US" +[14] "Carbofuran/emission/water/kg/US" +[15] "Carbon black/emission/air/kg/US" +[16] "CFC-12/emission/water/kg/US" +[17] "cis-1,3-Dichloropropene/emission/water/kg/US" +[18] "Dalapon/emission/water/kg/US" +[19] "Di(2-ethylhexyl) adipate/emission/water/kg/US" +[20] "Dibromodichloromethane/emission/water/kg/US" +[21] "Dichlorobromomethane/emission/air/kg/US" +[22] "Diquat/emission/water/kg/US" +[23] "Dithiobiuret/emission/air/kg/US" +[24] "Endothall/emission/water/kg/US" +[25] "Ethylene glycol diethyl ether/emission/air/kg/US" +[26] "Glycine, N-ethyl-N-[(heptadecafluorooctyl)sulfonyl]-/emission/water/kg/US" +[27] "Hexazinone/emission/ground/kg/US" +[28] "Hydrocarbons, chlorinated/emission/air/kg/US" +[29] "Hydrogen peroxide/emission/water/kg/US" +[30] "Hydroxide/emission/water/kg/US" +[31] "Methoxychlor/emission/water/kg/US" +[32] "Nickel subsulfide/emission/air/kg/US" +[33] "Niobium/emission/water/kg/US" +[34] "o-Cresol/emission/ground/kg/US" +[35] "Organic carbon, PM2.5 LC/emission/air/kg/US" +[36] "Oxamyl/emission/water/kg/US" +[37] "Perfluorobutanesulfonate/emission/water/kg/US" +[38] "Perfluoroheptanoic acid/emission/water/kg/US" +[39] "Perfluorohexanesulfonate/emission/water/kg/US" +[40] "Perfluorohexanoic acid/emission/water/kg/US" +[41] "Perfluorooctanesulfonamide/emission/water/kg/US" +[42] "Perfluorooctanoic acid/emission/water/kg/US" +[43] "Polycyclic aromatic compounds/emission/air/kg/US" +[44] "Polycyclic aromatic compounds/emission/ground/kg/US" +[45] "Polycyclic aromatic compounds/emission/water/kg/US" +[46] "Potassium dimethyldithiocarbamate/emission/water/kg/US" +[47] "Silica/emission/water/kg/US" +[48] "Silvex/emission/water/kg/US" +[49] "Sulfite/emission/water/kg/US" +[50] "Tebuthiuron/emission/water/kg/US" +[51] "Terbacil/emission/air/kg/US" +[52] "Terbacil/emission/water/kg/US" +[53] "Terpineol/emission/water/kg/US" +[54] "Tetrachloroethane/emission/water/kg/US" +[55] "trans-1,3-Dichloropropene/emission/water/kg/US" +[56] "Triallate/emission/air/kg/US" +[57] "Tributlytin/emission/water/kg/US" + diff --git a/inst/doc/CompareUSEEIOv2.0.1-411&USEEIOv2.1-422.md b/inst/doc/CompareUSEEIOv2.0.1-411&USEEIOv2.1-422.md new file mode 100644 index 00000000..d7b18cf8 --- /dev/null +++ b/inst/doc/CompareUSEEIOv2.0.1-411&USEEIOv2.1-422.md @@ -0,0 +1,186 @@ +--- +title: "Compare USEEIOv2.0.1-411 and USEEIOv2.1-422 Model" +date: "2021-12-30" +output: + html_document: + keep_md: yes +editor_options: + chunk_output_type: console +--- + +This document presents comparison results of USEEIOv2.0.1-411 and USEEIOv2.1-422 model. + +#### Compare flow totals between two models + +```r +mA <- buildModel(modelname_pair[1]) +#> 2021-12-30 09:37:19 INFO::Begin model initialization... +#> 2021-12-30 09:37:20 INFO::Initializing IO tables... +#> 2021-12-30 09:37:20 INFO::Initializing Gross Output tables... +#> 2021-12-30 09:37:21 INFO::Initializing Chain Price Index tables... +#> 2021-12-30 09:37:22 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... +#> 2021-12-30 09:37:22 INFO::Initializing Disaggregation of IO tables... +#> 2021-12-30 09:37:23 INFO::Initializing model satellite tables... +#> 2021-12-30 09:37:23 INFO::Loading Water withdrawals flows from DataCommons... +#> 2021-12-30 09:37:23 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... +#> 2021-12-30 09:37:34 INFO::Loading Point source industrial releases to ground flows from DataCommons... +#> 2021-12-30 09:37:35 INFO::Loading Point source releases to water flows from DataCommons... +#> 2021-12-30 09:37:36 INFO::Loading Greenhouse Gases flows from DataCommons... +#> 2021-12-30 09:37:36 INFO::Loading Land use flows from DataCommons... +#> 2021-12-30 09:37:37 INFO::Loading Mineral extraction flows from DataCommons... +#> 2021-12-30 09:37:37 INFO::Loading Energy extraction flows from DataCommons... +#> 2021-12-30 09:37:37 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation +#> 2021-12-30 09:37:37 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... +#> 2021-12-30 09:37:37 INFO::Loading Pesticide releases flows from DataCommons... +#> 2021-12-30 09:37:37 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... +#> 2021-12-30 09:37:37 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation +#> 2021-12-30 09:37:38 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... +#> 2021-12-30 09:37:38 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... +#> 2021-12-30 09:37:41 INFO::Loading Employment flows from DataCommons... +#> 2021-12-30 09:37:41 INFO::Generating Value Added flows... +#> 2021-12-30 09:37:42 INFO::Initializing model indicators... +#> 2021-12-30 09:37:42 INFO::Getting Greenhouse Gases indicator from DataCommons... +#> 2021-12-30 09:37:42 INFO::Getting Acidification Potential indicator from DataCommons... +#> 2021-12-30 09:37:42 INFO::Getting Eutrophication Potential indicator from DataCommons... +#> 2021-12-30 09:37:43 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... +#> 2021-12-30 09:37:50 INFO::Getting Human Health - Cancer indicator from DataCommons... +#> 2021-12-30 09:37:51 INFO::Getting Human Health - Noncancer indicator from DataCommons... +#> 2021-12-30 09:37:52 INFO::Getting Human Health Toxicity indicator from DataCommons... +#> 2021-12-30 09:37:55 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... +#> 2021-12-30 09:37:55 INFO::Getting Ozone Depletion indicator from DataCommons... +#> 2021-12-30 09:37:55 INFO::Getting Smog Formation Potential indicator from DataCommons... +#> 2021-12-30 09:37:56 INFO::Getting Freshwater withdrawals indicator from DataCommons... +#> 2021-12-30 09:37:56 INFO::Getting Land use indicator from DataCommons... +#> 2021-12-30 09:37:56 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... +#> 2021-12-30 09:37:56 INFO::Getting Pesticides indicator from DataCommons... +#> 2021-12-30 09:37:56 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:37:57 INFO::Getting Renewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:37:57 INFO::Getting Energy Use indicator from DataCommons... +#> 2021-12-30 09:37:57 INFO::Getting Minerals and Metals Use indicator from DataCommons... +#> 2021-12-30 09:37:57 INFO::Getting Value Added indicator from useeior... +#> 2021-12-30 09:37:57 INFO::Getting Jobs Supported indicator from useeior... +#> 2021-12-30 09:37:57 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... +#> 2021-12-30 09:37:57 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... +#> 2021-12-30 09:37:57 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... +#> 2021-12-30 09:37:58 INFO::Loading demand vectors ... +#> 2021-12-30 09:37:58 INFO::Loading CompleteProduction demand vector... +#> 2021-12-30 09:37:58 INFO::Loading DomesticProduction demand vector... +#> 2021-12-30 09:37:58 INFO::Loading CompleteConsumption demand vector... +#> 2021-12-30 09:37:58 INFO::Loading DomesticConsumption demand vector... +#> 2021-12-30 09:38:01 INFO::Building commodity-by-commodity A matrix (direct requirements)... +#> 2021-12-30 09:38:01 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... +#> 2021-12-30 09:38:01 INFO::Calculating L matrix (total requirements)... +#> 2021-12-30 09:38:01 INFO::Calculating L_d matrix (domestic total requirements)... +#> 2021-12-30 09:38:01 INFO::Building B matrix (direct emissions and resource use per dollar)... +#> 2021-12-30 09:38:04 INFO::Building C matrix (characterization factors for model indicators)... +#> 2021-12-30 09:38:09 INFO::Calculating D matrix (direct environmental impacts per dollar)... +#> 2021-12-30 09:38:09 INFO::Calculating M matrix (total emissions and resource use per dollar)... +#> 2021-12-30 09:38:09 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... +#> 2021-12-30 09:38:10 INFO::Calculating N matrix (total environmental impacts per dollar)... +#> 2021-12-30 09:38:10 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... +#> 2021-12-30 09:38:10 INFO::Calculating Rho matrix (price year ratio)... +#> 2021-12-30 09:38:10 INFO::Calculating Phi matrix (producer over purchaser price ratio)... +#> 2021-12-30 09:38:10 INFO::Model build complete. +mB <- buildModel(modelname_pair[2]) +#> 2021-12-30 09:38:10 INFO::Begin model initialization... +#> 2021-12-30 09:38:10 INFO::Initializing IO tables... +#> 2021-12-30 09:38:10 INFO::Initializing Gross Output tables... +#> 2021-12-30 09:38:12 INFO::Initializing Chain Price Index tables... +#> 2021-12-30 09:38:13 INFO::Loading aggregation specification file for ElectricityAggregationDetail... +#> 2021-12-30 09:38:13 INFO::Initializing Aggregation of IO tables... +#> 2021-12-30 09:38:13 INFO::Loading disaggregation specification file for ElectricityDisaggregationDetail... +#> 2021-12-30 09:38:13 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... +#> 2021-12-30 09:38:13 INFO::Initializing Disaggregation of IO tables... +#> 2021-12-30 09:38:14 INFO::Initializing model satellite tables... +#> 2021-12-30 09:38:14 INFO::Loading Water withdrawals flows from DataCommons... +#> 2021-12-30 09:38:15 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... +#> 2021-12-30 09:38:30 INFO::Loading Point source industrial releases to ground flows from DataCommons... +#> 2021-12-30 09:38:30 INFO::Loading Point source releases to water flows from DataCommons... +#> 2021-12-30 09:38:32 INFO::Loading Greenhouse Gases flows from DataCommons... +#> 2021-12-30 09:38:32 INFO::Loading Land use flows from DataCommons... +#> 2021-12-30 09:38:32 INFO::Loading Mineral extraction flows from DataCommons... +#> 2021-12-30 09:38:32 INFO::Loading Energy extraction flows from DataCommons... +#> 2021-12-30 09:38:32 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation +#> 2021-12-30 09:38:32 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... +#> 2021-12-30 09:38:32 INFO::Loading Pesticide releases flows from DataCommons... +#> 2021-12-30 09:38:33 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... +#> 2021-12-30 09:38:33 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation +#> 2021-12-30 09:38:34 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... +#> 2021-12-30 09:38:34 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... +#> 2021-12-30 09:38:36 INFO::Loading Employment flows from DataCommons... +#> 2021-12-30 09:38:37 INFO::Generating Value Added flows... +#> 2021-12-30 09:38:37 INFO::Initializing model indicators... +#> 2021-12-30 09:38:37 INFO::Getting Greenhouse Gases indicator from DataCommons... +#> 2021-12-30 09:38:38 INFO::Getting Acidification Potential indicator from DataCommons... +#> 2021-12-30 09:38:38 INFO::Getting Eutrophication Potential indicator from DataCommons... +#> 2021-12-30 09:38:38 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... +#> 2021-12-30 09:38:43 INFO::Getting Human Health - Cancer indicator from DataCommons... +#> 2021-12-30 09:38:45 INFO::Getting Human Health - Noncancer indicator from DataCommons... +#> 2021-12-30 09:38:46 INFO::Getting Human Health Toxicity indicator from DataCommons... +#> 2021-12-30 09:38:48 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... +#> 2021-12-30 09:38:49 INFO::Getting Ozone Depletion indicator from DataCommons... +#> 2021-12-30 09:38:49 INFO::Getting Smog Formation Potential indicator from DataCommons... +#> 2021-12-30 09:38:50 INFO::Getting Freshwater withdrawals indicator from DataCommons... +#> 2021-12-30 09:38:50 INFO::Getting Land use indicator from DataCommons... +#> 2021-12-30 09:38:50 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... +#> 2021-12-30 09:38:50 INFO::Getting Pesticides indicator from DataCommons... +#> 2021-12-30 09:38:50 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:38:50 INFO::Getting Renewable Energy Use indicator from DataCommons... +#> 2021-12-30 09:38:50 INFO::Getting Energy Use indicator from DataCommons... +#> 2021-12-30 09:38:51 INFO::Getting Minerals and Metals Use indicator from DataCommons... +#> 2021-12-30 09:38:51 INFO::Getting Value Added indicator from useeior... +#> 2021-12-30 09:38:51 INFO::Getting Jobs Supported indicator from useeior... +#> 2021-12-30 09:38:51 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... +#> 2021-12-30 09:38:51 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... +#> 2021-12-30 09:38:51 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... +#> 2021-12-30 09:38:51 INFO::Loading demand vectors ... +#> 2021-12-30 09:38:51 INFO::Loading CompleteProduction demand vector... +#> 2021-12-30 09:38:51 INFO::Loading DomesticProduction demand vector... +#> 2021-12-30 09:38:51 INFO::Loading CompleteConsumption demand vector... +#> 2021-12-30 09:38:51 INFO::Loading DomesticConsumption demand vector... +#> 2021-12-30 09:38:51 INFO::Loading HouseholdConsumption demand vector... +#> 2021-12-30 09:38:55 INFO::Building commodity-by-commodity A matrix (direct requirements)... +#> 2021-12-30 09:38:55 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... +#> 2021-12-30 09:38:55 INFO::Calculating L matrix (total requirements)... +#> 2021-12-30 09:38:55 INFO::Calculating L_d matrix (domestic total requirements)... +#> 2021-12-30 09:38:55 INFO::Building B matrix (direct emissions and resource use per dollar)... +#> 2021-12-30 09:38:58 INFO::Building C matrix (characterization factors for model indicators)... +#> 2021-12-30 09:39:03 INFO::Calculating D matrix (direct environmental impacts per dollar)... +#> 2021-12-30 09:39:03 INFO::Calculating M matrix (total emissions and resource use per dollar)... +#> 2021-12-30 09:39:04 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... +#> 2021-12-30 09:39:04 INFO::Calculating N matrix (total environmental impacts per dollar)... +#> 2021-12-30 09:39:04 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... +#> 2021-12-30 09:39:04 INFO::Calculating Rho matrix (price year ratio)... +#> 2021-12-30 09:39:04 INFO::Calculating Phi matrix (producer over purchaser price ratio)... +#> 2021-12-30 09:39:04 INFO::Model build complete. +``` + + +```r +# Compare flow totals +model_com <- compareFlowTotals(mA, mB) +cat(paste("Number of flow totals by commodity passing:",model_com$N_Pass)) +``` + +Number of flow totals by commodity passing: 2722 + +```r +cat(paste("Number of flow totals by commodity failing:",model_com$N_Fail)) +``` + +Number of flow totals by commodity failing: 0 + +```r +#cat(paste("Sectors with flow totals failing:", paste(model_com$Failure$rownames, collapse = ", "))) +``` + +There are flow differences between USEEIOv2.0.1-411 and USEEIOv2.1-422 + +Flows in USEEIOv2.0.1-411 not in USEEIOv2.1-422 are + +character(0) + + Flows in USEEIOv2.1-422 not in USEEIOv2.0.1-411 are + +character(0) + From ebf11da15d9537b1a14a7ff16fc480da9d75dac7 Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Thu, 30 Dec 2021 13:23:19 -0500 Subject: [PATCH 316/319] README - update example model name to tack on -411 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index df97ccee..8e85ca18 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,10 @@ View all models with existing config files that can be built using useeior useeior::seeAvailableModels() ``` -Build a model that is available in useeior (e.g. the USEEIOv2.0.1 model) +Build a model that is available in useeior (e.g. the USEEIOv2.0.1-411 model) ``` -model <- useeior::buildModel('USEEIOv2.0.1') +model <- useeior::buildModel('USEEIOv2.0.1-411') ``` To build a customized model, refer to [Advanced Uses](https://github.com/USEPA/useeior/wiki/Using-useeior#advanced-uses) in Wiki. From 9d8022f6a136931013de41906427907400bbb2f6 Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Thu, 30 Dec 2021 13:55:02 -0500 Subject: [PATCH 317/319] Address #204 --- README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8e85ca18..9953820c 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ N_adj <- useeior::adjustResultMatrixPrice("N", ### Calculate Model LCI and LCIA -Calculate model life cycle inventory (LCI) and life cycle impact assessment (LCIA) results with a user-specified [calculation perspective](format_specs/Calculation.md#calculation-perspectives), [demand vector](https://github.com/USEPA/useeior/blob/develop/format_specs/Model.md#demandvectors) (from `DemandVectors` in the model object, which includes four [default vectors](https://github.com/USEPA/useeior/blob/develop/format_specs/ModelSpecification.md#demand-vector-specifications), or a user-provided vector) and a model [direct requirements matrix](format_specs/Model.md#a). +Calculate model life cycle inventory (LCI) and life cycle impact assessment (LCIA) results with a user-specified [calculation perspective](format_specs/Calculation.md#calculation-perspectives), [demand vector](format_specs/Model.md#demandvectors) (from `DemandVectors` in the model object, which includes four [default vectors](format_specs/ModelSpecification.md#demand-vector-specifications), or a user-provided vector) and a model [direct requirements matrix](format_specs/Model.md#a). ``` result <- useeior::calculateEEIOModel(model, @@ -86,9 +86,9 @@ useeior::writeModelMatrices(model, to_format = "csv", outputfolder) ### Validate Model -Complete model validation checks can be found in [ValidateModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel.Rmd). -Knit [ValidateModel_render.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel_render.Rmd) to perform all validation checks on selected models (specified under the [YAML header](https://github.com/USEPA/useeior/blob/develop/inst/doc/ValidateModel_render.Rmd#L5)). -This will return an `.html` and a `.md` file in [inst/doc/output/](https://github.com/USEPA/useeior/tree/develop/inst/doc/output) containing validation results for each model. +Complete model validation checks can be found in [ValidateModel.Rmd](inst/doc/ValidateModel.Rmd). +Knit [ValidateModel_render.Rmd](inst/doc/ValidateModel_render.Rmd) to perform all validation checks on selected models (specified under the [YAML header](inst/doc/ValidateModel_render.Rmd#L5)). +This will generate an `.html` and a `.md` file containing validation results for each model. See example output in [inst/doc/output/](inst/doc/output). #### Examples @@ -120,7 +120,6 @@ Note: `S00402/US - Used and secondhand goods` and `S00300/US - Noncomparable imp #### Examples Rank sectors based a composite score of selected total impacts (LCIA_d or LCIA_f) associated with total US demand (US production or consumption vector). -The ranking is an effective means to identify prioritization opportunity in practices like the EPA's [Sustainable Materials Management program](https://www.epa.gov/smm). Comparing rankings may also be used as another form of model validation that incorporates the demand vectors and the indicators as well as the model result matrices. ``` @@ -149,9 +148,9 @@ useeior::heatmapSectorRanking(model, x_title = "LCIA_f (FINAL perspective) & US consumption demand") ``` -![](https://github.com/USEPA/useeior/blob/develop/inst/img/ranking_direct_prod_final_cons_v2.0.1.png) +![](inst/img/ranking_direct_prod_final_cons_v2.0.1.png) -More visualization examples are available in [Example.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/Example.Rmd). +More visualization examples are available in [Example.Rmd](inst/doc/Example.Rmd). ### Analyze Flow and Sector Contribution to Impact @@ -185,13 +184,13 @@ Analyze `sector` contribution to total (direct+indirect) `Human Health - Respira 1111A0/US - Fresh soybeans, canola, flaxseeds, and other oilseeds 0.8% ``` -More analysis examples are available in [Example.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/Example.Rmd). +More analysis examples are available in [Example.Rmd](inst/doc/Example.Rmd). ### Compare Model Results -Comparison betwen two models can be found in [CompareModel.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModels.Rmd). -Knit [CompareModel_render.Rmd](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModels_render.Rmd) to perform comparison on selected models (specified under the [YAML header](https://github.com/USEPA/useeior/blob/develop/inst/doc/CompareModels_render.Rmd#L5)). -This will return an `.html` and a `.md` file in [inst/doc/output/](https://github.com/USEPA/useeior/tree/develop/inst/doc/output) containing comparison results for each model. +Comparison betwen two models can be found in [CompareModel.Rmd](inst/doc/CompareModels.Rmd). +Knit [CompareModel_render.Rmd](inst/doc/CompareModels_render.Rmd) to perform comparison on selected models (specified under the [YAML header](hinst/doc/CompareModels_render.Rmd#L5)). +This will return an `.html` and a `.md` file containing comparison results for each model specified in the header. An example can be found [inst/doc/output/](inst/doc/output) Currently, it only compares flow totals between two models. More comparisons will be added in the future. From 90f784db9aeede82517084b96a9d4172150063c4 Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Thu, 30 Dec 2021 13:59:54 -0500 Subject: [PATCH 318/319] Add missing example of compare md output to inst/doc/output --- .../CompareUSEEIOv2.0.1-411&USEEIOv2.1-422.md | 186 ++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 inst/doc/output/CompareUSEEIOv2.0.1-411&USEEIOv2.1-422.md diff --git a/inst/doc/output/CompareUSEEIOv2.0.1-411&USEEIOv2.1-422.md b/inst/doc/output/CompareUSEEIOv2.0.1-411&USEEIOv2.1-422.md new file mode 100644 index 00000000..617e6731 --- /dev/null +++ b/inst/doc/output/CompareUSEEIOv2.0.1-411&USEEIOv2.1-422.md @@ -0,0 +1,186 @@ +--- +title: "Compare USEEIOv2.0.1-411 and USEEIOv2.1-422 Model" +date: "2021-12-30" +output: + html_document: + keep_md: yes +editor_options: + chunk_output_type: console +--- + +This document presents comparison results of USEEIOv2.0.1-411 and USEEIOv2.1-422 model. + +#### Compare flow totals between two models + +```r +mA <- buildModel(modelname_pair[1]) +#> 2021-12-30 13:31:34 INFO::Begin model initialization... +#> 2021-12-30 13:31:34 INFO::Initializing IO tables... +#> 2021-12-30 13:31:35 INFO::Initializing Gross Output tables... +#> 2021-12-30 13:31:37 INFO::Initializing Chain Price Index tables... +#> 2021-12-30 13:31:37 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... +#> 2021-12-30 13:31:38 INFO::Initializing Disaggregation of IO tables... +#> 2021-12-30 13:31:38 INFO::Initializing model satellite tables... +#> 2021-12-30 13:31:38 INFO::Loading Water withdrawals flows from DataCommons... +#> 2021-12-30 13:31:39 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... +#> 2021-12-30 13:31:55 INFO::Loading Point source industrial releases to ground flows from DataCommons... +#> 2021-12-30 13:31:55 INFO::Loading Point source releases to water flows from DataCommons... +#> 2021-12-30 13:31:57 INFO::Loading Greenhouse Gases flows from DataCommons... +#> 2021-12-30 13:31:58 INFO::Loading Land use flows from DataCommons... +#> 2021-12-30 13:31:58 INFO::Loading Mineral extraction flows from DataCommons... +#> 2021-12-30 13:31:58 INFO::Loading Energy extraction flows from DataCommons... +#> 2021-12-30 13:31:58 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation +#> 2021-12-30 13:31:58 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... +#> 2021-12-30 13:31:58 INFO::Loading Pesticide releases flows from DataCommons... +#> 2021-12-30 13:31:58 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... +#> 2021-12-30 13:31:59 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation +#> 2021-12-30 13:32:00 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... +#> 2021-12-30 13:32:00 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... +#> 2021-12-30 13:32:06 INFO::Loading Employment flows from DataCommons... +#> 2021-12-30 13:32:06 INFO::Generating Value Added flows... +#> 2021-12-30 13:32:07 INFO::Initializing model indicators... +#> 2021-12-30 13:32:07 INFO::Getting Greenhouse Gases indicator from DataCommons... +#> 2021-12-30 13:32:08 INFO::Getting Acidification Potential indicator from DataCommons... +#> 2021-12-30 13:32:08 INFO::Getting Eutrophication Potential indicator from DataCommons... +#> 2021-12-30 13:32:08 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... +#> 2021-12-30 13:32:14 INFO::Getting Human Health - Cancer indicator from DataCommons... +#> 2021-12-30 13:32:16 INFO::Getting Human Health - Noncancer indicator from DataCommons... +#> 2021-12-30 13:32:18 INFO::Getting Human Health Toxicity indicator from DataCommons... +#> 2021-12-30 13:32:21 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... +#> 2021-12-30 13:32:22 INFO::Getting Ozone Depletion indicator from DataCommons... +#> 2021-12-30 13:32:22 INFO::Getting Smog Formation Potential indicator from DataCommons... +#> 2021-12-30 13:32:23 INFO::Getting Freshwater withdrawals indicator from DataCommons... +#> 2021-12-30 13:32:24 INFO::Getting Land use indicator from DataCommons... +#> 2021-12-30 13:32:24 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... +#> 2021-12-30 13:32:24 INFO::Getting Pesticides indicator from DataCommons... +#> 2021-12-30 13:32:25 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... +#> 2021-12-30 13:32:25 INFO::Getting Renewable Energy Use indicator from DataCommons... +#> 2021-12-30 13:32:25 INFO::Getting Energy Use indicator from DataCommons... +#> 2021-12-30 13:32:26 INFO::Getting Minerals and Metals Use indicator from DataCommons... +#> 2021-12-30 13:32:26 INFO::Getting Value Added indicator from useeior... +#> 2021-12-30 13:32:26 INFO::Getting Jobs Supported indicator from useeior... +#> 2021-12-30 13:32:26 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... +#> 2021-12-30 13:32:26 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... +#> 2021-12-30 13:32:27 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... +#> 2021-12-30 13:32:27 INFO::Loading demand vectors ... +#> 2021-12-30 13:32:27 INFO::Loading CompleteProduction demand vector... +#> 2021-12-30 13:32:27 INFO::Loading DomesticProduction demand vector... +#> 2021-12-30 13:32:27 INFO::Loading CompleteConsumption demand vector... +#> 2021-12-30 13:32:27 INFO::Loading DomesticConsumption demand vector... +#> 2021-12-30 13:32:34 INFO::Building commodity-by-commodity A matrix (direct requirements)... +#> 2021-12-30 13:32:34 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... +#> 2021-12-30 13:32:34 INFO::Calculating L matrix (total requirements)... +#> 2021-12-30 13:32:34 INFO::Calculating L_d matrix (domestic total requirements)... +#> 2021-12-30 13:32:34 INFO::Building B matrix (direct emissions and resource use per dollar)... +#> 2021-12-30 13:32:39 INFO::Building C matrix (characterization factors for model indicators)... +#> 2021-12-30 13:32:50 INFO::Calculating D matrix (direct environmental impacts per dollar)... +#> 2021-12-30 13:32:50 INFO::Calculating M matrix (total emissions and resource use per dollar)... +#> 2021-12-30 13:32:50 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... +#> 2021-12-30 13:32:51 INFO::Calculating N matrix (total environmental impacts per dollar)... +#> 2021-12-30 13:32:51 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... +#> 2021-12-30 13:32:51 INFO::Calculating Rho matrix (price year ratio)... +#> 2021-12-30 13:32:51 INFO::Calculating Phi matrix (producer over purchaser price ratio)... +#> 2021-12-30 13:32:51 INFO::Model build complete. +mB <- buildModel(modelname_pair[2]) +#> 2021-12-30 13:32:51 INFO::Begin model initialization... +#> 2021-12-30 13:32:51 INFO::Initializing IO tables... +#> 2021-12-30 13:32:51 INFO::Initializing Gross Output tables... +#> 2021-12-30 13:32:53 INFO::Initializing Chain Price Index tables... +#> 2021-12-30 13:32:54 INFO::Loading aggregation specification file for ElectricityAggregationDetail... +#> 2021-12-30 13:32:54 INFO::Initializing Aggregation of IO tables... +#> 2021-12-30 13:32:54 INFO::Loading disaggregation specification file for ElectricityDisaggregationDetail... +#> 2021-12-30 13:32:54 INFO::Loading disaggregation specification file for WasteDisaggregationDetail... +#> 2021-12-30 13:32:55 INFO::Initializing Disaggregation of IO tables... +#> 2021-12-30 13:32:56 INFO::Initializing model satellite tables... +#> 2021-12-30 13:32:56 INFO::Loading Water withdrawals flows from DataCommons... +#> 2021-12-30 13:32:57 INFO::Loading Criteria and Hazardous Air Emissions flows from DataCommons... +#> 2021-12-30 13:33:21 INFO::Loading Point source industrial releases to ground flows from DataCommons... +#> 2021-12-30 13:33:21 INFO::Loading Point source releases to water flows from DataCommons... +#> 2021-12-30 13:33:24 INFO::Loading Greenhouse Gases flows from DataCommons... +#> 2021-12-30 13:33:25 INFO::Loading Land use flows from DataCommons... +#> 2021-12-30 13:33:26 INFO::Loading Mineral extraction flows from DataCommons... +#> 2021-12-30 13:33:26 INFO::Loading Energy extraction flows from DataCommons... +#> 2021-12-30 13:33:26 WARNING::No data found for disaggregation of ENERGY for 562000/US - applying default allocation +#> 2021-12-30 13:33:26 INFO::Loading Nitrogen and Phosphorus Releases from Agriculture flows from DataCommons... +#> 2021-12-30 13:33:26 INFO::Loading Pesticide releases flows from DataCommons... +#> 2021-12-30 13:33:26 INFO::Loading Commercial non-hazardous waste excluding construction activities flows from DataCommons... +#> 2021-12-30 13:33:27 WARNING::No data found for disaggregation of CNHW for 562000/US - applying default allocation +#> 2021-12-30 13:33:28 INFO::Loading Commercial non-hazardous waste from construction activities flows from DataCommons... +#> 2021-12-30 13:33:28 INFO::Loading Commercial RCRA-defined hazardous waste flows from DataCommons... +#> 2021-12-30 13:33:34 INFO::Loading Employment flows from DataCommons... +#> 2021-12-30 13:33:34 INFO::Generating Value Added flows... +#> 2021-12-30 13:33:35 INFO::Initializing model indicators... +#> 2021-12-30 13:33:35 INFO::Getting Greenhouse Gases indicator from DataCommons... +#> 2021-12-30 13:33:36 INFO::Getting Acidification Potential indicator from DataCommons... +#> 2021-12-30 13:33:36 INFO::Getting Eutrophication Potential indicator from DataCommons... +#> 2021-12-30 13:33:36 INFO::Getting Freshwater Ecotoxicity Potential indicator from DataCommons... +#> 2021-12-30 13:33:43 INFO::Getting Human Health - Cancer indicator from DataCommons... +#> 2021-12-30 13:33:44 INFO::Getting Human Health - Noncancer indicator from DataCommons... +#> 2021-12-30 13:33:46 INFO::Getting Human Health Toxicity indicator from DataCommons... +#> 2021-12-30 13:33:50 INFO::Getting Human Health - Respiratory Effects indicator from DataCommons... +#> 2021-12-30 13:33:50 INFO::Getting Ozone Depletion indicator from DataCommons... +#> 2021-12-30 13:33:51 INFO::Getting Smog Formation Potential indicator from DataCommons... +#> 2021-12-30 13:33:52 INFO::Getting Freshwater withdrawals indicator from DataCommons... +#> 2021-12-30 13:33:52 INFO::Getting Land use indicator from DataCommons... +#> 2021-12-30 13:33:52 INFO::Getting Hazardous Air Pollutants indicator from DataCommons... +#> 2021-12-30 13:33:53 INFO::Getting Pesticides indicator from DataCommons... +#> 2021-12-30 13:33:53 INFO::Getting Nonrenewable Energy Use indicator from DataCommons... +#> 2021-12-30 13:33:53 INFO::Getting Renewable Energy Use indicator from DataCommons... +#> 2021-12-30 13:33:53 INFO::Getting Energy Use indicator from DataCommons... +#> 2021-12-30 13:33:53 INFO::Getting Minerals and Metals Use indicator from DataCommons... +#> 2021-12-30 13:33:54 INFO::Getting Value Added indicator from useeior... +#> 2021-12-30 13:33:54 INFO::Getting Jobs Supported indicator from useeior... +#> 2021-12-30 13:33:54 INFO::Getting Commercial RCRA Hazardous Waste indicator from useeior... +#> 2021-12-30 13:33:54 INFO::Getting Commercial Municipal Solid Waste indicator from useeior... +#> 2021-12-30 13:33:55 INFO::Getting Commercial Construction and Demolition Debris indicator from useeior... +#> 2021-12-30 13:33:55 INFO::Loading demand vectors ... +#> 2021-12-30 13:33:55 INFO::Loading CompleteProduction demand vector... +#> 2021-12-30 13:33:55 INFO::Loading DomesticProduction demand vector... +#> 2021-12-30 13:33:55 INFO::Loading CompleteConsumption demand vector... +#> 2021-12-30 13:33:55 INFO::Loading DomesticConsumption demand vector... +#> 2021-12-30 13:33:55 INFO::Loading HouseholdConsumption demand vector... +#> 2021-12-30 13:34:03 INFO::Building commodity-by-commodity A matrix (direct requirements)... +#> 2021-12-30 13:34:03 INFO::Building commodity-by-commodity A_d matrix (domestic direct requirements)... +#> 2021-12-30 13:34:03 INFO::Calculating L matrix (total requirements)... +#> 2021-12-30 13:34:03 INFO::Calculating L_d matrix (domestic total requirements)... +#> 2021-12-30 13:34:03 INFO::Building B matrix (direct emissions and resource use per dollar)... +#> 2021-12-30 13:34:10 INFO::Building C matrix (characterization factors for model indicators)... +#> 2021-12-30 13:34:21 INFO::Calculating D matrix (direct environmental impacts per dollar)... +#> 2021-12-30 13:34:21 INFO::Calculating M matrix (total emissions and resource use per dollar)... +#> 2021-12-30 13:34:21 INFO::Calculating M_d matrix (total emissions and resource use per dollar from domestic activity)... +#> 2021-12-30 13:34:22 INFO::Calculating N matrix (total environmental impacts per dollar)... +#> 2021-12-30 13:34:22 INFO::Calculating N_d matrix (total environmental impacts per dollar from domestic activity)... +#> 2021-12-30 13:34:22 INFO::Calculating Rho matrix (price year ratio)... +#> 2021-12-30 13:34:22 INFO::Calculating Phi matrix (producer over purchaser price ratio)... +#> 2021-12-30 13:34:22 INFO::Model build complete. +``` + + +```r +# Compare flow totals +model_com <- compareFlowTotals(mA, mB) +cat(paste("Number of flow totals by commodity passing:",model_com$N_Pass)) +``` + +Number of flow totals by commodity passing: 2722 + +```r +cat(paste("Number of flow totals by commodity failing:",model_com$N_Fail)) +``` + +Number of flow totals by commodity failing: 0 + +```r +#cat(paste("Sectors with flow totals failing:", paste(model_com$Failure$rownames, collapse = ", "))) +``` + +There are flow differences between USEEIOv2.0.1-411 and USEEIOv2.1-422 + +Flows in USEEIOv2.0.1-411 not in USEEIOv2.1-422 are + +character(0) + + Flows in USEEIOv2.1-422 not in USEEIOv2.0.1-411 are + +character(0) + From 73c6f3b4516403b52294c1ad7549a9a5f9a0074e Mon Sep 17 00:00:00 2001 From: WesIngwersen Date: Thu, 30 Dec 2021 14:01:03 -0500 Subject: [PATCH 319/319] minor link fix in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9953820c..17d70137 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,7 @@ More analysis examples are available in [Example.Rmd](inst/doc/Example.Rmd). ### Compare Model Results Comparison betwen two models can be found in [CompareModel.Rmd](inst/doc/CompareModels.Rmd). -Knit [CompareModel_render.Rmd](inst/doc/CompareModels_render.Rmd) to perform comparison on selected models (specified under the [YAML header](hinst/doc/CompareModels_render.Rmd#L5)). +Knit [CompareModel_render.Rmd](inst/doc/CompareModels_render.Rmd) to perform comparison on selected models (specified under the [YAML header](inst/doc/CompareModels_render.Rmd#L5)). This will return an `.html` and a `.md` file containing comparison results for each model specified in the header. An example can be found [inst/doc/output/](inst/doc/output) Currently, it only compares flow totals between two models. More comparisons will be added in the future.