From 95d2169e1fc752bccee07bc1f82f4c6baa6bf024 Mon Sep 17 00:00:00 2001 From: MoLi7 Date: Tue, 3 May 2022 14:21:53 -0700 Subject: [PATCH 001/121] Add initial model specs --- inst/extdata/modelspecs/StateIOv1.0.0-75.yml | 27 ++++++++++++++++++++ inst/extdata/modelspecs/StateIOv1.0.0-s.yml | 27 ++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 inst/extdata/modelspecs/StateIOv1.0.0-75.yml create mode 100644 inst/extdata/modelspecs/StateIOv1.0.0-s.yml diff --git a/inst/extdata/modelspecs/StateIOv1.0.0-75.yml b/inst/extdata/modelspecs/StateIOv1.0.0-75.yml new file mode 100644 index 00000000..8634ba2f --- /dev/null +++ b/inst/extdata/modelspecs/StateIOv1.0.0-75.yml @@ -0,0 +1,27 @@ +Model: "StateIOv1.0.0-75" # 75 represents Summary level disaggregated model (73 + 2 = 75 commodities & 71 + 2 = 73 industries) +BaseIOSchema: 2012 +BaseIOLevel: &BaseIOLevel "Summary" +IOYear: + - 2012 + - 2013 + - 2014 + - 2015 + - 2016 + - 2017 +GeoScale: + - "State" + - "TwoRegion" # SoI and RoUS +IODataSource: "BEA" +BasePriceType: "PRO" +BasewithRedefinitions: FALSE +ScrapIncluded: FALSE +DisaggregationSpecs: TBD + +DataProduct: + - "Make" + - "Use" + - "DomesticUse" + - "DomesticUsewithTrade" + - "InternationalTradeAdjustment" + - "CommodityOutput" + - "IndustryOutput" diff --git a/inst/extdata/modelspecs/StateIOv1.0.0-s.yml b/inst/extdata/modelspecs/StateIOv1.0.0-s.yml new file mode 100644 index 00000000..1bb89fb9 --- /dev/null +++ b/inst/extdata/modelspecs/StateIOv1.0.0-s.yml @@ -0,0 +1,27 @@ +Model: "StateIOv1.0.0-s" # s represents Summary level (73 commodities & 71 industries) +BaseIOSchema: 2012 +BaseIOLevel: &BaseIOLevel "Summary" +IOYear: + - 2012 + - 2013 + - 2014 + - 2015 + - 2016 + - 2017 +GeoScale: + - "State" + - "TwoRegion" # SoI and RoUS +IODataSource: "BEA" +BasePriceType: "PRO" +BasewithRedefinitions: FALSE +ScrapIncluded: FALSE +DisaggregationSpecs: null + +DataProduct: + - "Make" + - "Use" + - "DomesticUse" + - "DomesticUsewithTrade" + - "InternationalTradeAdjustment" + - "CommodityOutput" + - "IndustryOutput" From d3d25ec40a70337bb04fee2e9b9bdf5a5117bb9c Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 23 May 2022 14:37:40 -0400 Subject: [PATCH 002/121] identify location for disaggregation --- R/BuildModel.R | 15 ++++++++++++++- R/InteregionalCommodityFlowFunctions.R | 5 +++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 5b53f02f..bba469ba 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -285,6 +285,10 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, # international trade adjustment column commodities <- getVectorOfCodes(iolevel, "Commodity") industries <- getVectorOfCodes(iolevel, "Industry") + + ## Disaggregate objects: + # commodities, industries + FD_cols <- getFinalDemandCodes(iolevel) import_col <- getVectorOfCodes(iolevel, "Import") # All tradable sectors @@ -302,6 +306,8 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, "_DomesticUse_", year))[[state]][commodities, ] + # Disaggregate SoI_DomesticUse + # 2 - Generate 2-region ICFs logging::loginfo("Generating two-region interregional commodity flow (ICF) ratios...") ICF <- generateDomestic2RegionICFs(state, year, ioschema, iolevel, @@ -507,10 +513,11 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, #' @param year A numeric value between 2007 and 2017 specifying the year of interest. #' @param iolevel BEA sector level of detail, currently can only be "Summary", #' theoretically can be "Detail", or "Sector" in future versions. +#' @param disagg TEMPORARY boolean to trigger disaggregation. #' @return A list of two-region make, use, domestic use, and Use tables #' as well as commodity and industry outputs by state. #' @export -assembleTwoRegionIO <- function(year, iolevel) { +assembleTwoRegionIO <- function(year, iolevel, disagg=FALSE) { startLogging() # Define industries, commodities, value added rows, final demand columns, # international trade adjustment column, and non-import columns @@ -535,6 +542,12 @@ assembleTwoRegionIO <- function(year, iolevel) { iolevel, "_CommodityOutput_", year)) + + ## Disaggregate model objects: + # State_CommodityOutput_ls, State_IndustryOutput_ls, State_Make_ls, State_Use_ls + # US_Make, US_DomesticUse + # commodities, industries + # Assemble two-region IO tables TwoRegionIO <- list() for (state in sort(c(state.name, "District of Columbia"))) { diff --git a/R/InteregionalCommodityFlowFunctions.R b/R/InteregionalCommodityFlowFunctions.R index 57dd746c..37c0d073 100644 --- a/R/InteregionalCommodityFlowFunctions.R +++ b/R/InteregionalCommodityFlowFunctions.R @@ -147,8 +147,13 @@ generateDomestic2RegionICFs <- function(state, year, ioschema, iolevel, all.y = TRUE) if (iolevel == "Summary") { # Adjust utilities + + ## Adjust for disaggregation: + + ICF[ICF[, bea] == "22", cols] <- calculateUtilitiesFlowRatios(state, year)[, cols] ICF[ICF[, bea] == "22", "source"] <- "EIA" + # Adjust waste management and remediation services ICF[ICF[, bea] == "562", cols] <- calculateWasteManagementServiceFlowRatios(state, year)[, cols] ICF[ICF[, bea] == "562", "source"] <- "RCRAInfo and SMP" From c8492f0bef592005de06e60cff698225256efe8c Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 3 Jun 2022 18:25:45 -0400 Subject: [PATCH 003/121] Added StateDisaggFunctions.R, a script to hold the disaggregation functions specific for stateior --- R/StateDisaggFunctions.R | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 R/StateDisaggFunctions.R diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R new file mode 100644 index 00000000..aab8b258 --- /dev/null +++ b/R/StateDisaggFunctions.R @@ -0,0 +1,40 @@ +# Need to insert following code in appropriate script": + +# # Check for disaggregation +# model <- getStateDisaggregationSpecs(model, configpaths) +# if(length(model$DisaggregationSpecs)!=0){ +# model <- disaggregateModel(model) +# } + + +## TODO: Note that this is an outline of the expected sequence of steps to load the data and disaggregation specs into R. Need to incorporate in +## correct places within stateior code + +#' Obtain disaggregation specs for each state and year from input files. +#' Assumes buildStateSupplyModel and buildStateUseModel have been called and the data generated for each state. +#' @param model An stateior 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. +stateDisaggregationSpecs <- function(model, configpaths){ + + # Get State list + states <- unique(StateUS_VA_Ratio$GeoName) # Taken from buildStateSupplyModel function. Unsure if this variable will be globally available. + stateModel <- list() + + for (year in 2012:2017) { + + for(state in states){ + stateMode$Use <- loadStateIODataFile(paste0("State_Summary_Use_", + year))[[state]] # Need to very parameters and adequacy of function call + stateModel$Make <- loadStateIODataFile(paste0("State_Summary_Use_", + year))[[state]] # Need to very parameters and adequacy of function call + # Check for disaggregation + stateModel <- getDisaggregationSpecs(stateModel, configpaths) + + } + + + }# end of for year loop + +} \ No newline at end of file From d6ceec6cd2e5a8671a9689141ed925364bd4817b Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 3 Jun 2022 18:26:08 -0400 Subject: [PATCH 004/121] added template disaggregation files for the utility sectors --- .../UtilityDisaggregationSummary_Env.csv | 1180 +++++++++++++++++ .../UtilityDisaggregationSummary_Make.csv | 46 + .../UtilityDisaggregationSummary_Use.csv | 397 ++++++ .../UtilityDisaggregation_Sectors.csv | 15 + 4 files changed, 1638 insertions(+) create mode 100644 inst/extdata/disaggspecs/UtilityDisaggregationSummary_Env.csv create mode 100644 inst/extdata/disaggspecs/UtilityDisaggregationSummary_Make.csv create mode 100644 inst/extdata/disaggspecs/UtilityDisaggregationSummary_Use.csv create mode 100644 inst/extdata/disaggspecs/UtilityDisaggregation_Sectors.csv diff --git a/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Env.csv b/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Env.csv new file mode 100644 index 00000000..f087cb14 --- /dev/null +++ b/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Env.csv @@ -0,0 +1,1180 @@ +"Flowable","Context","FlowUUID","Sector","FlowRatio" +"Water","emission/air/troposphere/ground-level","","221100",1 +"Water, fresh","emission/air/troposphere/ground-level","","221100",1 +"Water, fresh","resource/water/fresh water body","","221100",0.907847888636718 +"Water, fresh","resource/water/fresh water body","","221300",0.0921521113632819 +"Water, fresh","resource/water/subterranean/fresh water body","","221100",0.0700765446579275 +"Water, fresh","resource/water/subterranean/fresh water body","","221300",0.929923455342073 +"Water, saline","resource/water/saline water body","","221100",1 +"Water, saline","resource/water/subterranean/saline water body","","221100",1 +"1,1-Dichloroethane","emission/air","","221100",0.623240890992679 +"1,1-Dichloroethane","emission/air","","221200",0.0255357966388812 +"1,1-Dichloroethane","emission/air","","221300",0.35122331236844 +"1,1-Dichloroethylene","emission/air","","221100",0.107341784437035 +"1,1-Dichloroethylene","emission/air","","221300",0.892658215562965 +"1,1-Dimethylhydrazine","emission/air","","221100",1 +"1,1,1-Trichloroethane","emission/air","","221100",0.218288244999612 +"1,1,1-Trichloroethane","emission/air","","221300",0.781711755000388 +"1,1,2-Trichloroethane","emission/air","","221100",0.426043113374257 +"1,1,2-Trichloroethane","emission/air","","221200",0.117527522802421 +"1,1,2-Trichloroethane","emission/air","","221300",0.456429363823322 +"1,1,2,2-Tetrachloroethane","emission/air","","221100",0.235799339929909 +"1,1,2,2-Tetrachloroethane","emission/air","","221200",0.0758213868023184 +"1,1,2,2-Tetrachloroethane","emission/air","","221300",0.688379273267773 +"1,2-Dichloroethane","emission/air","","221100",0.703198130352856 +"1,2-Dichloroethane","emission/air","","221200",0.00691521868732921 +"1,2-Dichloroethane","emission/air","","221300",0.289886650959814 +"1,2-Dichloropropane","emission/air","","221100",0.383310095438901 +"1,2-Dichloropropane","emission/air","","221200",0.0221168187960939 +"1,2-Dichloropropane","emission/air","","221300",0.594573085765005 +"1,2,4-Trichlorobenzene","emission/air","","221100",0.539050462943468 +"1,2,4-Trichlorobenzene","emission/air","","221300",0.460949537056532 +"1,2,4-Trimethylbenzene","emission/air","","221100",0.996494371518716 +"1,2,4-Trimethylbenzene","emission/air","","221300",0.00350562848128384 +"1,3-Butadiene","emission/air","","221100",0.717595194352346 +"1,3-Butadiene","emission/air","","221200",0.149200649935943 +"1,3-Butadiene","emission/air","","221300",0.133204155711711 +"1,3-Dichloropropene","emission/air","","221100",0.431393800568674 +"1,3-Dichloropropene","emission/air","","221200",0.12046858464949 +"1,3-Dichloropropene","emission/air","","221300",0.448137614781837 +"1,4-Dioxane","emission/air","","221100",0.00097388499783038 +"1,4-Dioxane","emission/air","","221300",0.99902611500217 +"2-Chloroacetophenone","emission/air","","221100",0.999534322944684 +"2-Chloroacetophenone","emission/air","","221300",0.000465677055315895 +"2-Chlorobiphenyl","emission/air","","221100",0.324194778144233 +"2-Chlorobiphenyl","emission/air","","221300",0.675805221855767 +"2-Chloronaphthalene","emission/air","","221100",0.750453786056516 +"2-Chloronaphthalene","emission/air","","221300",0.249546213943484 +"2-Methylnaphthalene","emission/air","","221100",0.707203180405566 +"2-Methylnaphthalene","emission/air","","221200",0.0442380037003079 +"2-Methylnaphthalene","emission/air","","221300",0.248558815894127 +"2,2,4-Trimethylpentane","emission/air","","221100",0.311890811283507 +"2,2,4-Trimethylpentane","emission/air","","221200",0.49820539840994 +"2,2,4-Trimethylpentane","emission/air","","221300",0.189903790306552 +"2,4-Dinitrophenol","emission/air","","221100",0.857877624521288 +"2,4-Dinitrophenol","emission/air","","221300",0.142122375478712 +"2,4-Dinitrotoluene","emission/air","","221100",0.671030815846188 +"2,4-Dinitrotoluene","emission/air","","221300",0.328969184153812 +"2,4,5-Trichlorophenol","emission/air","","221100",1 +"2,4,6-Trichlorophenol","emission/air","","221100",0.309174204077361 +"2,4,6-Trichlorophenol","emission/air","","221300",0.690825795922639 +"3-Methylcholanthrene","emission/air","","221100",0.962866833764136 +"3-Methylcholanthrene","emission/air","","221200",0.000498791677332626 +"3-Methylcholanthrene","emission/air","","221300",0.0366343745585315 +"5-Methylchrysene","emission/air","","221100",0.998428431681342 +"5-Methylchrysene","emission/air","","221300",0.00157156831865828 +"7,12-Dimethylbenz[a]anthracene","emission/air","","221100",0.970497834230408 +"7,12-Dimethylbenz[a]anthracene","emission/air","","221200",0.000332768062379497 +"7,12-Dimethylbenz[a]anthracene","emission/air","","221300",0.0291693977072126 +"Acenaphthene","emission/air","","221100",0.0590937141624503 +"Acenaphthene","emission/air","","221200",0.000251656724996389 +"Acenaphthene","emission/air","","221300",0.940654629112553 +"Acenaphthylene","emission/air","","221100",0.633134755117857 +"Acenaphthylene","emission/air","","221200",0.0460486545133872 +"Acenaphthylene","emission/air","","221300",0.320816590368756 +"Acetaldehyde","emission/air","","221100",0.823916640762069 +"Acetaldehyde","emission/air","","221200",0.0815065526280234 +"Acetaldehyde","emission/air","","221300",0.0945768066099078 +"Acetonitrile","emission/air","","221100",0.000248184025125329 +"Acetonitrile","emission/air","","221200",0.970864698028121 +"Acetonitrile","emission/air","","221300",0.028887117946754 +"Acetophenone","emission/air","","221100",0.984807047160379 +"Acetophenone","emission/air","","221300",0.015192952839621 +"Acrolein","emission/air","","221100",0.722005844221816 +"Acrolein","emission/air","","221200",0.110441124637758 +"Acrolein","emission/air","","221300",0.167553031140426 +"Acrylonitrile","emission/air","","221100",0.574779470509358 +"Acrylonitrile","emission/air","","221300",0.425220529490642 +"Allyl chloride","emission/air","","221100",0.977137897435704 +"Allyl chloride","emission/air","","221300",0.0228621025642957 +"Ammonia","emission/air","","221100",0.809458095211295 +"Ammonia","emission/air","","221200",0.0640775988631357 +"Ammonia","emission/air","","221300",0.12646430592557 +"Aniline","emission/air","","221100",0.81684070943146 +"Aniline","emission/air","","221300",0.18315929056854 +"Anthracene","emission/air","","221100",0.834141471381339 +"Anthracene","emission/air","","221200",0.0024788767332967 +"Anthracene","emission/air","","221300",0.163379651885364 +"Antimony","emission/air","","221100",0.970053294093946 +"Antimony","emission/air","","221300",0.0299467059060538 +"Antimony compounds","emission/air","","221100",1 +"Arsenic","emission/air","","221100",0.958627320389616 +"Arsenic","emission/air","","221200",7.38304745051349e-05 +"Arsenic","emission/air","","221300",0.0412988491358793 +"Arsenic compounds","emission/air","","221100",1 +"Asbestos","emission/air","","221100",0.999447887289797 +"Asbestos","emission/air","","221300",0.000552112710202651 +"Barium","emission/air","","221100",1 +"Barium compounds","emission/air","","221100",1 +"Benz[a]anthracene","emission/air","","221100",0.996219416718387 +"Benz[a]anthracene","emission/air","","221200",0.00206243850725712 +"Benz[a]anthracene","emission/air","","221300",0.00171814477435615 +"Benzene","emission/air","","221100",0.780410485736284 +"Benzene","emission/air","","221200",0.0401357517851054 +"Benzene","emission/air","","221300",0.179453762478611 +"Benzidine","emission/air","","221100",1 +"Benzo(b)fluoranthene","emission/air","","221100",0.784272707099009 +"Benzo(b)fluoranthene","emission/air","","221200",0.0140937430190534 +"Benzo(b)fluoranthene","emission/air","","221300",0.201633549881938 +"Benzo[a]pyrene","emission/air","","221100",0.992797761962282 +"Benzo[a]pyrene","emission/air","","221200",0.00270405076257185 +"Benzo[a]pyrene","emission/air","","221300",0.00449818727514633 +"Benzo[e]pyrene","emission/air","","221100",0.538581254692943 +"Benzo[e]pyrene","emission/air","","221200",0.103472053626217 +"Benzo[e]pyrene","emission/air","","221300",0.357946691680839 +"Benzo[ghi]perylene","emission/air","","221100",0.99298144383352 +"Benzo[ghi]perylene","emission/air","","221200",0.00114842784453017 +"Benzo[ghi]perylene","emission/air","","221300",0.00587012832194955 +"Benzo[k]fluoranthene","emission/air","","221100",0.913257035866361 +"Benzo[k]fluoranthene","emission/air","","221200",0.00102318029336661 +"Benzo[k]fluoranthene","emission/air","","221300",0.0857197838402728 +"Benzofluoranthene","emission/air","","221100",0.995550489863991 +"Benzofluoranthene","emission/air","","221300",0.0044495101360094 +"Benzyl chloride","emission/air","","221100",0.999014908717941 +"Benzyl chloride","emission/air","","221300",0.00098509128205888 +"Beryllium","emission/air","","221100",0.963452448361344 +"Beryllium","emission/air","","221200",9.29542913123354e-06 +"Beryllium","emission/air","","221300",0.0365382562095248 +"Beryllium compounds","emission/air","","221100",1 +"Biphenyl","emission/air","","221100",0.884907320525374 +"Biphenyl","emission/air","","221200",0.0746942833643919 +"Biphenyl","emission/air","","221300",0.0403983961102344 +"Bromine","emission/air","","221100",1 +"Cadmium","emission/air","","221100",0.961352387123784 +"Cadmium","emission/air","","221200",0.00128188102587004 +"Cadmium","emission/air","","221300",0.0373657318503456 +"Cadmium compounds","emission/air","","221100",1 +"Calcium cyanamide","emission/air","","221100",1 +"Carbon disulfide","emission/air","","221100",0.371224607154202 +"Carbon disulfide","emission/air","","221300",0.628775392845798 +"Carbon monoxide","emission/air","","221100",0.96063808111591 +"Carbon monoxide","emission/air","","221200",0.0145948848144748 +"Carbon monoxide","emission/air","","221300",0.0247670340696154 +"Carbon tetrachloride","emission/air","","221100",0.121635370306292 +"Carbon tetrachloride","emission/air","","221200",0.0155786432563091 +"Carbon tetrachloride","emission/air","","221300",0.862785986437399 +"Carbonyl sulfide","emission/air","","221100",0.364343002058295 +"Carbonyl sulfide","emission/air","","221300",0.635656997941704 +"Catechol","emission/air","","221100",0.11190053285968 +"Catechol","emission/air","","221200",0.88809946714032 +"Chlorine","emission/air","","221100",0.93529099930446 +"Chlorine","emission/air","","221300",0.0647090006955405 +"Chlorine dioxide","emission/air","","221100",1 +"Chlorobenzene","emission/air","","221100",0.496485013771821 +"Chlorobenzene","emission/air","","221200",0.00830709812026015 +"Chlorobenzene","emission/air","","221300",0.495207888107919 +"Chloroethane","emission/air","","221100",0.984161005893058 +"Chloroethane","emission/air","","221200",5.91322698524858e-05 +"Chloroethane","emission/air","","221300",0.0157798618370897 +"Chloroform","emission/air","","221100",0.348226429896114 +"Chloroform","emission/air","","221200",0.000659123082505304 +"Chloroform","emission/air","","221300",0.651114447021381 +"Chloromethane","emission/air","","221100",0.993665577030142 +"Chloromethane","emission/air","","221300",0.00633442296985765 +"Chromic(VI) acid","emission/air","","221100",0.995064964876999 +"Chromic(VI) acid","emission/air","","221300",0.00493503512300092 +"Chromium","emission/air","","221100",1 +"Chromium compounds","emission/air","","221100",1 +"Chromium(III)","emission/air","","221100",0.992320760586347 +"Chromium(III)","emission/air","","221200",0.000258272205009384 +"Chromium(III)","emission/air","","221300",0.00742096720864325 +"Chromium(VI)","emission/air","","221100",0.967651954936091 +"Chromium(VI)","emission/air","","221200",8.28013405114754e-05 +"Chromium(VI)","emission/air","","221300",0.0322652437233979 +"Chrysene","emission/air","","221100",0.997848328198706 +"Chrysene","emission/air","","221200",0.000667810576594857 +"Chrysene","emission/air","","221300",0.00148386122469901 +"Cobalt","emission/air","","221100",0.961698539219469 +"Cobalt","emission/air","","221200",5.69857812073088e-05 +"Cobalt","emission/air","","221300",0.0382444749993235 +"Cobalt compounds","emission/air","","221100",1 +"Copper","emission/air","","221100",1 +"Copper compounds","emission/air","","221100",1 +"Cresol","emission/air","","221100",0.977225356817737 +"Cresol","emission/air","","221300",0.0227746431822634 +"Cumene","emission/air","","221100",0.786552805576773 +"Cumene","emission/air","","221300",0.213447194423227 +"Cyanide","emission/air","","221100",0.998595102214601 +"Cyanide","emission/air","","221200",4.00237325504133e-06 +"Cyanide","emission/air","","221300",0.00140089541214392 +"Cyanide compounds","emission/air","","221100",1 +"Cyclohexane","emission/air","","221100",0.848360655737705 +"Cyclohexane","emission/air","","221300",0.151639344262295 +"Decachlorobiphenyl","emission/air","","221100",0.104881252624991 +"Decachlorobiphenyl","emission/air","","221300",0.895118747375009 +"Di(2-ethylhexyl) phthalate","emission/air","","221100",0.765227849661429 +"Di(2-ethylhexyl) phthalate","emission/air","","221300",0.234772150338571 +"Dibenz[a,h]acridine","emission/air","","221100",0.960336838748954 +"Dibenz[a,h]acridine","emission/air","","221300",0.0396631612510458 +"Dibenz[a,h]anthracene","emission/air","","221100",0.974110387430834 +"Dibenz[a,h]anthracene","emission/air","","221200",0.000199846786810686 +"Dibenz[a,h]anthracene","emission/air","","221300",0.0256897657823549 +"Dibenz[a,j]acridine","emission/air","","221100",1 +"Dibenzofuran","emission/air","","221100",0.645712085794709 +"Dibenzofuran","emission/air","","221200",0.345249286587739 +"Dibenzofuran","emission/air","","221300",0.00903862761755183 +"Dibutyl phthalate","emission/air","","221100",0.672836897723486 +"Dibutyl phthalate","emission/air","","221300",0.327163102276514 +"Dimethyl phthalate","emission/air","","221100",1 +"Dimethyl sulfate","emission/air","","221100",0.990496908082786 +"Dimethyl sulfate","emission/air","","221300",0.00950309191721369 +"Dioxins","emission/air","","221100",1 +"Ethylbenzene","emission/air","","221100",0.764996895938197 +"Ethylbenzene","emission/air","","221200",0.0152227069580685 +"Ethylbenzene","emission/air","","221300",0.219780397103735 +"Ethylene dibromide","emission/air","","221100",0.778731148025949 +"Ethylene dibromide","emission/air","","221200",0.0905176267024211 +"Ethylene dibromide","emission/air","","221300",0.13075122527163 +"Ethylene glycol","emission/air","","221100",0.0798295254736875 +"Ethylene glycol","emission/air","","221200",0.520503857754757 +"Ethylene glycol","emission/air","","221300",0.399666616771555 +"Ethylene glycol monobutyl ether acetate","emission/air","","221100",1 +"Fluoranthene","emission/air","","221100",0.95786370269218 +"Fluoranthene","emission/air","","221200",0.000506083961503605 +"Fluoranthene","emission/air","","221300",0.041630213346316 +"Fluorene","emission/air","","221100",0.779606788348136 +"Fluorene","emission/air","","221200",0.0348458420372702 +"Fluorene","emission/air","","221300",0.185547369614594 +"Fluorine","emission/air","","221100",1 +"Formaldehyde","emission/air","","221100",0.876407359533006 +"Formaldehyde","emission/air","","221200",0.0775326435602644 +"Formaldehyde","emission/air","","221300",0.0460599969067299 +"Formic acid","emission/air","","221100",1 +"Glycol ethers","emission/air","","221100",8.41814032983214e-06 +"Glycol ethers","emission/air","","221200",0.00149764589588874 +"Glycol ethers","emission/air","","221300",0.998493935963781 +"Glycol ethers, subset","emission/air","","221100",1 +"Heptachlorobiphenyl","emission/air","","221100",0.104888086115952 +"Heptachlorobiphenyl","emission/air","","221300",0.895111913884048 +"Hexachlorobenzene","emission/air","","221100",0.714505695049855 +"Hexachlorobenzene","emission/air","","221300",0.285494304950145 +"Hexachlorobiphenyl","emission/air","","221100",0.324214102514466 +"Hexachlorobiphenyl","emission/air","","221300",0.675785897485534 +"Hexachlorobutadiene","emission/air","","221100",0.460720341492598 +"Hexachlorobutadiene","emission/air","","221300",0.539279658507402 +"Hexachlorocyclopentadiene","emission/air","","221100",0.959793692929608 +"Hexachlorocyclopentadiene","emission/air","","221300",0.0402063070703914 +"Hexachloroethane","emission/air","","221100",0.989930351598557 +"Hexachloroethane","emission/air","","221300",0.0100696484014433 +"Hexamethylene-1,6-diisocyanate","emission/air","","221100",0.19000602980005 +"Hexamethylene-1,6-diisocyanate","emission/air","","221300",0.80999397019995 +"Hexane","emission/air","","221100",0.82540879959887 +"Hexane","emission/air","","221200",0.0866006555606553 +"Hexane","emission/air","","221300",0.0879905448404745 +"Hydrazine","emission/air","","221100",1 +"Hydrochloric acid","emission/air","","221100",0.943951112658544 +"Hydrochloric acid","emission/air","","221200",0.0015069920288635 +"Hydrochloric acid","emission/air","","221300",0.0545418953125926 +"Hydrofluoric acid","emission/air","","221100",0.997636324557212 +"Hydrofluoric acid","emission/air","","221300",0.00236367544278818 +"Hydrogen cyanide","emission/air","","221100",0.999327686515196 +"Hydrogen cyanide","emission/air","","221300",0.000672313484803894 +"Hydrogen sulfide","emission/air","","221100",0.705392973008274 +"Hydrogen sulfide","emission/air","","221200",0.00378010915429437 +"Hydrogen sulfide","emission/air","","221300",0.290826917837432 +"Indeno[1,2,3-cd]pyrene","emission/air","","221100",0.898922355718961 +"Indeno[1,2,3-cd]pyrene","emission/air","","221200",0.000986131887554662 +"Indeno[1,2,3-cd]pyrene","emission/air","","221300",0.100091512393485 +"Isophorone","emission/air","","221100",0.999585566848344 +"Isophorone","emission/air","","221300",0.000414433151655605 +"Lead","emission/air","","221100",0.884516882175613 +"Lead","emission/air","","221200",0.000134833232265916 +"Lead","emission/air","","221300",0.115348284592121 +"Lead compounds","emission/air","","221100",0.995956706481933 +"Lead compounds","emission/air","","221300",0.0040432935180671 +"m-Cresol","emission/air","","221100",0.0206488189338535 +"m-Cresol","emission/air","","221200",0.979348616105485 +"m-Cresol","emission/air","","221300",2.56496066122865e-06 +"m-Xylene","emission/air","","221100",0.74817044917603 +"m-Xylene","emission/air","","221300",0.25182955082397 +"Manganese","emission/air","","221100",0.958202926944397 +"Manganese","emission/air","","221200",0.000546114291429449 +"Manganese","emission/air","","221300",0.0412509587641739 +"Manganese compounds","emission/air","","221100",1 +"Mercury","emission/air","","221100",0.919855388490771 +"Mercury","emission/air","","221200",0.00123826748288416 +"Mercury","emission/air","","221300",0.0789063440263448 +"Mercury compounds","emission/air","","221100",1 +"Methanol","emission/air","","221100",0.159380251234089 +"Methanol","emission/air","","221200",0.620257075510572 +"Methanol","emission/air","","221300",0.220362673255339 +"Methyl bromide","emission/air","","221100",0.976154981049565 +"Methyl bromide","emission/air","","221300",0.0238450189504347 +"Methyl hydrazine","emission/air","","221100",0.999656494477333 +"Methyl hydrazine","emission/air","","221300",0.000343505522666656 +"Methyl iodide","emission/air","","221100",0.70207499697692 +"Methyl iodide","emission/air","","221300",0.29792500302308 +"Methyl isobutyl ketone","emission/air","","221100",0.162874936278984 +"Methyl isobutyl ketone","emission/air","","221200",0.00340895256286349 +"Methyl isobutyl ketone","emission/air","","221300",0.833716111158153 +"Methyl methacrylate","emission/air","","221100",0.573471316697697 +"Methyl methacrylate","emission/air","","221300",0.426528683302303 +"Methyl tert-butyl ether","emission/air","","221100",0.525154336277499 +"Methyl tert-butyl ether","emission/air","","221300",0.474845663722501 +"Methylene chloride","emission/air","","221100",0.658835961681127 +"Methylene chloride","emission/air","","221200",0.00149005964898226 +"Methylene chloride","emission/air","","221300",0.33967397866989 +"Molybdenum trioxide","emission/air","","221100",1 +"N-Nitrosodimethylamine","emission/air","","221100",1 +"N-Nitrosomorpholine","emission/air","","221100",1 +"Naphthalene","emission/air","","221100",0.663289681448239 +"Naphthalene","emission/air","","221200",0.0393003395047109 +"Naphthalene","emission/air","","221300",0.29740997904705 +"Nickel","emission/air","","221100",0.957935398271312 +"Nickel","emission/air","","221200",0.0207514591212107 +"Nickel","emission/air","","221300",0.0213131426074776 +"Nickel compounds","emission/air","","221100",1 +"Nitrobenzene","emission/air","","221100",0.44855224161089 +"Nitrobenzene","emission/air","","221300",0.55144775838911 +"Nitrogen dioxide","emission/air","","221100",0.97626464991262 +"Nitrogen dioxide","emission/air","","221200",0.0108561941361575 +"Nitrogen dioxide","emission/air","","221300",0.0128791559512226 +"o-Cresol","emission/air","","221100",0.508424966624193 +"o-Cresol","emission/air","","221200",0.491456784696026 +"o-Cresol","emission/air","","221300",0.000118248679780534 +"o-Xylene","emission/air","","221100",0.717254448039029 +"o-Xylene","emission/air","","221300",0.282745551960971 +"p-Cresol","emission/air","","221100",0.408893694198862 +"p-Cresol","emission/air","","221200",0.590669017495041 +"p-Cresol","emission/air","","221300",0.00043728830609634 +"p-Dichlorobenzene","emission/air","","221100",0.25527787607066 +"p-Dichlorobenzene","emission/air","","221300",0.74472212392934 +"p-Nitrophenol","emission/air","","221100",0.11222894218564 +"p-Nitrophenol","emission/air","","221300",0.88777105781436 +"p-Xylene","emission/air","","221100",0.784430816276126 +"p-Xylene","emission/air","","221300",0.215569183723874 +"PAH/POM, unspecified","emission/air","","221100",0.975954577902492 +"PAH/POM, unspecified","emission/air","","221200",0.0188132579825469 +"PAH/POM, unspecified","emission/air","","221300",0.00523216411496078 +"Particulate matter, = 2.5µm","emission/air","","221100",0.978362321284935 +"Particulate matter, = 2.5µm","emission/air","","221200",0.00770148430558551 +"Particulate matter, = 2.5µm","emission/air","","221300",0.0139361944094798 +"Particulate matter, > 2.5µm and = 10µm","emission/air","","221100",0.990606680033475 +"Particulate matter, > 2.5µm and = 10µm","emission/air","","221200",0.00047286075736233 +"Particulate matter, > 2.5µm and = 10µm","emission/air","","221300",0.00892045920916243 +"Pentachlorobiphenyl","emission/air","","221100",0.324176008264763 +"Pentachlorobiphenyl","emission/air","","221300",0.675823991735237 +"Pentachlorophenol","emission/air","","221100",0.115761021226301 +"Pentachlorophenol","emission/air","","221300",0.884238978773699 +"Perylene","emission/air","","221100",0.722544165706923 +"Perylene","emission/air","","221200",0.00777369527794853 +"Perylene","emission/air","","221300",0.269682139015128 +"Phenanthrene","emission/air","","221100",0.884486273521378 +"Phenanthrene","emission/air","","221200",0.0136871471667281 +"Phenanthrene","emission/air","","221300",0.101826579311894 +"Phenol","emission/air","","221100",0.516296804597348 +"Phenol","emission/air","","221200",0.192864998495272 +"Phenol","emission/air","","221300",0.29083819690738 +"Phosphorus","emission/air","","221100",0.835567629634426 +"Phosphorus","emission/air","","221200",4.32789732011043e-05 +"Phosphorus","emission/air","","221300",0.164389091392373 +"Phthalic anhydride","emission/air","","221100",1 +"Polychlorinated biphenyls","emission/air","","221100",0.257958862389887 +"Polychlorinated biphenyls","emission/air","","221300",0.742041137610113 +"Polycyclic aromatic hydrocarbons","emission/air","","221100",0.146129980409218 +"Polycyclic aromatic hydrocarbons","emission/air","","221200",0.784175847103961 +"Polycyclic aromatic hydrocarbons","emission/air","","221300",0.0696941724868214 +"Propionaldehyde","emission/air","","221100",0.965631466362563 +"Propionaldehyde","emission/air","","221300",0.0343685336374372 +"Propylene","emission/air","","221100",1 +"Propylene oxide","emission/air","","221100",0.946192933425549 +"Propylene oxide","emission/air","","221200",0.0115517159279884 +"Propylene oxide","emission/air","","221300",0.0422553506464625 +"Pyrene","emission/air","","221100",0.871626496386317 +"Pyrene","emission/air","","221200",0.00288057571794611 +"Pyrene","emission/air","","221300",0.125492927895737 +"Quinoline","emission/air","","221100",0.00544430132832143 +"Quinoline","emission/air","","221200",0.994555698671679 +"Selenium","emission/air","","221100",0.997655447300439 +"Selenium","emission/air","","221200",1.16018275006751e-07 +"Selenium","emission/air","","221300",0.00234443668128606 +"Selenium compounds","emission/air","","221100",1 +"Styrene","emission/air","","221100",0.675900695772747 +"Styrene","emission/air","","221200",0.00115646759118074 +"Styrene","emission/air","","221300",0.322942836636072 +"Styrene oxide","emission/air","","221100",1 +"Sulfur dioxide","emission/air","","221100",0.993405239007915 +"Sulfur dioxide","emission/air","","221200",0.00402681499905937 +"Sulfur dioxide","emission/air","","221300",0.00256794599302598 +"Sulfuric acid","emission/air","","221100",1 +"Tetrachlorobiphenyl","emission/air","","221100",0.324231547730229 +"Tetrachlorobiphenyl","emission/air","","221300",0.675768452269771 +"Tetrachloroethylene","emission/air","","221100",0.147077970292167 +"Tetrachloroethylene","emission/air","","221200",1.49062653001911e-05 +"Tetrachloroethylene","emission/air","","221300",0.852907123442532 +"Thallium compounds","emission/air","","221100",1 +"Toluene","emission/air","","221100",0.85188174759143 +"Toluene","emission/air","","221200",0.0264020164315515 +"Toluene","emission/air","","221300",0.121716235977019 +"Tribromomethane","emission/air","","221100",0.990647417399612 +"Tribromomethane","emission/air","","221300",0.0093525826003876 +"Trichloroethylene","emission/air","","221100",0.224095565830913 +"Trichloroethylene","emission/air","","221300",0.775904434169087 +"Vanadium","emission/air","","221100",1 +"Vanadium compounds","emission/air","","221100",1 +"Vinyl acetate","emission/air","","221100",0.777048549839004 +"Vinyl acetate","emission/air","","221300",0.222951450160996 +"Vinyl chloride","emission/air","","221100",0.547823985636961 +"Vinyl chloride","emission/air","","221200",0.0134839300643513 +"Vinyl chloride","emission/air","","221300",0.438692084298688 +"Volatile organic compounds","emission/air","","221100",0.767291401384913 +"Volatile organic compounds","emission/air","","221200",0.0329516908175736 +"Volatile organic compounds","emission/air","","221300",0.199756907797513 +"Xylene","emission/air","","221100",0.47752880226004 +"Xylene","emission/air","","221200",0.0151892446003544 +"Xylene","emission/air","","221300",0.507281953139605 +"Zinc","emission/air","","221100",1 +"Zinc compounds","emission/air","","221100",1 +"Diethanolamine","emission/air","","221200",0.574707083772465 +"Diethanolamine","emission/air","","221300",0.425292916227535 +"2-Methoxyethanol","emission/air","","221300",1 +"2-Nitropropane","emission/air","","221300",1 +"4,6-Dinitro-o-cresol","emission/air","","221300",1 +"Acrylic acid","emission/air","","221300",1 +"Benzo[ghi]fluoranthene","emission/air","","221300",1 +"Benzo[j]fluoranthene","emission/air","","221300",1 +"Chloroprene","emission/air","","221300",1 +"Dichlorvos","emission/air","","221300",1 +"Epichlorohydrin","emission/air","","221300",1 +"Ethyl acrylate","emission/air","","221300",1 +"Ethylene glycol monopropyl ether","emission/air","","221300",1 +"Ethylene oxide","emission/air","","221300",1 +"Heptachlor","emission/air","","221300",1 +"Hydroquinone","emission/air","","221300",1 +"Maleic anhydride","emission/air","","221300",1 +"N,N-Dimethylaniline","emission/air","","221300",1 +"N,N-Dimethylformamide","emission/air","","221300",1 +"o-Toluidine","emission/air","","221300",1 +"Phosgene","emission/air","","221300",1 +"Quinone","emission/air","","221300",1 +"Toxaphene","emission/air","","221300",1 +"Triethylamine","emission/air","","221300",1 +"Ammonia","emission/ground","","221100",1 +"Anthracene","emission/ground","","221100",1 +"Antimony compounds","emission/ground","","221100",1 +"Arsenic compounds","emission/ground","","221100",1 +"Barium compounds","emission/ground","","221100",1 +"Benzo[ghi]perylene","emission/ground","","221100",1 +"Beryllium compounds","emission/ground","","221100",1 +"Chromium compounds","emission/ground","","221100",0.999982897798094 +"Chromium compounds","emission/ground","","221300",1.7102201905759e-05 +"Cobalt","emission/ground","","221100",1 +"Cobalt compounds","emission/ground","","221100",0.999896945463539 +"Cobalt compounds","emission/ground","","221300",0.000103054536460695 +"Copper compounds","emission/ground","","221100",0.998405239498309 +"Copper compounds","emission/ground","","221300",0.00159476050169137 +"Dioxins","emission/ground","","221100",1 +"Formic acid","emission/ground","","221100",1 +"Lead","emission/ground","","221100",0.510388208097512 +"Lead","emission/ground","","221300",0.489611791902488 +"Lead compounds","emission/ground","","221100",0.997548583551255 +"Lead compounds","emission/ground","","221300",0.00245141644874504 +"Manganese","emission/ground","","221100",1 +"Manganese compounds","emission/ground","","221100",1 +"Mercury","emission/ground","","221100",1 +"Mercury compounds","emission/ground","","221100",1 +"Naphthalene","emission/ground","","221100",1 +"Nickel compounds","emission/ground","","221100",0.999872955823917 +"Nickel compounds","emission/ground","","221300",0.000127044176083228 +"Phenanthrene","emission/ground","","221100",1 +"Selenium compounds","emission/ground","","221100",1 +"Thallium compounds","emission/ground","","221100",1 +"Vanadium","emission/ground","","221100",1 +"Vanadium compounds","emission/ground","","221100",1 +"Zinc compounds","emission/ground","","221100",0.998797428190524 +"Zinc compounds","emission/ground","","221300",0.0012025718094764 +"Copper","emission/ground","","221300",1 +"Hydrogen sulfide","emission/ground","","221300",1 +"1,2-Dichloroethane","emission/water","","221100",0.0356407264705551 +"1,2-Dichloroethane","emission/water","","221300",0.964359273529445 +"Aluminum","emission/water","","221100",0.748543992874645 +"Aluminum","emission/water","","221300",0.251456007125355 +"Ammonia","emission/water","","221100",1 +"Antimony","emission/water","","221100",0.284055519919786 +"Antimony","emission/water","","221300",0.715944480080214 +"Antimony compounds","emission/water","","221100",1 +"Arsenic","emission/water","","221100",0.416015249439957 +"Arsenic","emission/water","","221300",0.583984750560043 +"Arsenic compounds","emission/water","","221100",1 +"Barium","emission/water","","221100",0.110999371245549 +"Barium","emission/water","","221300",0.889000628754451 +"Barium compounds","emission/water","","221100",1 +"Benzene","emission/water","","221100",0.0183775210670722 +"Benzene","emission/water","","221200",0.00111922350885353 +"Benzene","emission/water","","221300",0.980503255424074 +"Benzo[ghi]perylene","emission/water","","221100",0.00167035604716825 +"Benzo[ghi]perylene","emission/water","","221300",0.998329643952832 +"Beryllium","emission/water","","221100",0.0971306320125592 +"Beryllium","emission/water","","221300",0.902869367987441 +"Beryllium compounds","emission/water","","221100",1 +"Biological Oxygen Demand","emission/water","","221100",0.000391807771238533 +"Biological Oxygen Demand","emission/water","","221300",0.999608192228762 +"Boron","emission/water","","221100",0.956514048918537 +"Boron","emission/water","","221300",0.0434859510814635 +"Bromide","emission/water","","221100",0.00876724520587406 +"Bromide","emission/water","","221300",0.991232754794126 +"Cadmium","emission/water","","221100",0.000826311015402505 +"Cadmium","emission/water","","221300",0.999173688984598 +"Chemical Oxygen Demand","emission/water","","221100",0.988541880567035 +"Chemical Oxygen Demand","emission/water","","221300",0.0114581194329653 +"Chloride","emission/water","","221100",0.0214004458573142 +"Chloride","emission/water","","221300",0.978599554142686 +"Chlorides and sulfates, total","emission/water","","221100",1 +"Chlorine","emission/water","","221100",0.0931204723881564 +"Chlorine","emission/water","","221200",4.68868677608197e-08 +"Chlorine","emission/water","","221300",0.906879480724976 +"Chloroform","emission/water","","221100",0.0389729846356503 +"Chloroform","emission/water","","221300",0.96102701536435 +"Chromium","emission/water","","221100",0.0572770315784793 +"Chromium","emission/water","","221300",0.942722968421521 +"Chromium compounds","emission/water","","221100",0.983100872615757 +"Chromium compounds","emission/water","","221300",0.0168991273842427 +"Chromium(III)","emission/water","","221100",0.0212449852350946 +"Chromium(III)","emission/water","","221300",0.978755014764905 +"Chromium(VI)","emission/water","","221100",0.0399448721827804 +"Chromium(VI)","emission/water","","221300",0.96005512781722 +"Cobalt compounds","emission/water","","221100",0.849462365591398 +"Cobalt compounds","emission/water","","221300",0.150537634408602 +"Copper","emission/water","","221100",0.18550069924345 +"Copper","emission/water","","221300",0.81449930075655 +"Copper compounds","emission/water","","221100",0.995465479482424 +"Copper compounds","emission/water","","221300",0.00453452051757599 +"Cyanide","emission/water","","221100",0.00260179891997081 +"Cyanide","emission/water","","221300",0.997398201080029 +"Di(2-ethylhexyl) phthalate","emission/water","","221100",0.00108768727904124 +"Di(2-ethylhexyl) phthalate","emission/water","","221300",0.998912312720959 +"Dioxins","emission/water","","221100",1 +"Ethylbenzene","emission/water","","221100",0.00104480878250932 +"Ethylbenzene","emission/water","","221200",0.00077258096656405 +"Ethylbenzene","emission/water","","221300",0.998182610250927 +"Fluoride","emission/water","","221100",0.109556579794518 +"Fluoride","emission/water","","221300",0.890443420205482 +"Formic acid","emission/water","","221100",1 +"Hydrazine","emission/water","","221100",1 +"Hydrocarbons","emission/water","","221100",0.999442183760607 +"Hydrocarbons","emission/water","","221300",0.000557816239393137 +"Hydrocarbons, petroleum","emission/water","","221100",0.968455785305763 +"Hydrocarbons, petroleum","emission/water","","221300",0.0315442146942367 +"Iron","emission/water","","221100",0.963185866469421 +"Iron","emission/water","","221300",0.0368141335305793 +"Lead","emission/water","","221100",0.0106572701684001 +"Lead","emission/water","","221300",0.9893427298316 +"Lead compounds","emission/water","","221100",0.960676674091761 +"Lead compounds","emission/water","","221300",0.0393233259082392 +"Manganese","emission/water","","221100",0.192944586425856 +"Manganese","emission/water","","221300",0.807055413574144 +"Manganese compounds","emission/water","","221100",1 +"Mercury","emission/water","","221100",0.00157205727740415 +"Mercury","emission/water","","221300",0.998427942722596 +"Mercury compounds","emission/water","","221100",1 +"Methanol","emission/water","","221100",1 +"Molybdenum","emission/water","","221100",0.0237201859411087 +"Molybdenum","emission/water","","221300",0.976279814058891 +"Molybdenum trioxide","emission/water","","221100",1 +"Nickel","emission/water","","221100",0.00734455472535467 +"Nickel","emission/water","","221300",0.992655445274645 +"Nickel compounds","emission/water","","221100",0.992549347496182 +"Nickel compounds","emission/water","","221300",0.00745065250381763 +"Nitrate compounds","emission/water","","221100",1 +"Nitrogen","emission/water","","221100",0.0271047491808082 +"Nitrogen","emission/water","","221300",0.972895250819192 +"Oxygen","emission/water","","221100",0.314407090239892 +"Oxygen","emission/water","","221300",0.685592909760108 +"Phosphorus","emission/water","","221100",0.000169080341574315 +"Phosphorus","emission/water","","221300",0.999830919658426 +"Selenium","emission/water","","221100",0.679915602729808 +"Selenium","emission/water","","221300",0.320084397270192 +"Selenium compounds","emission/water","","221100",1 +"Silver","emission/water","","221100",0.432663871415449 +"Silver","emission/water","","221300",0.567336128584551 +"Sulfate","emission/water","","221100",0.486243101495168 +"Sulfate","emission/water","","221300",0.513756898504832 +"Thallium","emission/water","","221100",0.129476802682787 +"Thallium","emission/water","","221300",0.870523197317213 +"Thallium compounds","emission/water","","221100",1 +"Titanium","emission/water","","221100",1 +"Total dissolved solids","emission/water","","221100",0.857414387088286 +"Total dissolved solids","emission/water","","221300",0.142585612911714 +"Total metals","emission/water","","221100",1 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","","221100",0.653873869000955 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","","221200",5.915330107257e-05 +"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","","221300",0.346066977697973 +"Total Organic Carbon","emission/water","","221100",0.115235840253257 +"Total Organic Carbon","emission/water","","221200",0.000629972795052456 +"Total Organic Carbon","emission/water","","221300",0.88413418695169 +"Total suspended solids","emission/water","","221100",0.276813897168242 +"Total suspended solids","emission/water","","221200",5.5040851823331e-05 +"Total suspended solids","emission/water","","221300",0.723131061979935 +"Vanadium","emission/water","","221100",1 +"Vanadium compounds","emission/water","","221100",1 +"Zinc","emission/water","","221100",0.0608217141295712 +"Zinc","emission/water","","221200",1.18286434635222e-08 +"Zinc","emission/water","","221300",0.939178274041785 +"Zinc compounds","emission/water","","221100",0.995345355441044 +"Zinc compounds","emission/water","","221300",0.00465464455895608 +"Toluene","emission/water","","221200",0.000554540207029098 +"Toluene","emission/water","","221300",0.999445459792971 +"Xylene","emission/water","","221200",0.00537775995302217 +"Xylene","emission/water","","221300",0.994622240046978 +".alpha.-Endosulfan","emission/water","","221300",1 +".alpha.-Hexachlorocyclohexane","emission/water","","221300",1 +".beta.-Endosulfan","emission/water","","221300",1 +".beta.-Hexachlorocyclohexane","emission/water","","221300",1 +".delta.-Hexachlorocyclohexane","emission/water","","221300",1 +"1,1-Dichloroethane","emission/water","","221300",1 +"1,1-Dichloroethylene","emission/water","","221300",1 +"1,1,1-Trichloroethane","emission/water","","221300",1 +"1,1,2-Trichloroethane","emission/water","","221300",1 +"1,1,2,2-Tetrachloroethane","emission/water","","221300",1 +"1,2-Dichloropropane","emission/water","","221300",1 +"1,2-Diphenylhydrazine","emission/water","","221300",1 +"1,2,4-Trichlorobenzene","emission/water","","221300",1 +"1,2,4-Trimethylbenzene","emission/water","","221300",1 +"1,3-Dichloropropene","emission/water","","221300",1 +"2-Chloroethyl vinyl ether","emission/water","","221300",1 +"2-Chloronaphthalene","emission/water","","221300",1 +"2,3,7,8-Tetrachlorodibenzo-p-dioxin","emission/water","","221300",1 +"2,4-Dichlorophenol","emission/water","","221300",1 +"2,4-Dimethylphenol","emission/water","","221300",1 +"2,4-Dinitrophenol","emission/water","","221300",1 +"2,4-Dinitrotoluene","emission/water","","221300",1 +"2,4,6-Trichlorophenol","emission/water","","221300",1 +"2,6-Dinitrotoluene","emission/water","","221300",1 +"3,3'-Dichlorobenzidine","emission/water","","221300",1 +"4,6-Dinitro-o-cresol","emission/water","","221300",1 +"Acenaphthene","emission/water","","221300",1 +"Acenaphthylene","emission/water","","221300",1 +"Acetaldehyde","emission/water","","221300",1 +"Acrolein","emission/water","","221300",1 +"Acrylonitrile","emission/water","","221300",1 +"Aldrin","emission/water","","221300",1 +"Anthracene","emission/water","","221300",1 +"Aroclor 1016","emission/water","","221300",1 +"Aroclor 1221","emission/water","","221300",1 +"Aroclor 1232","emission/water","","221300",1 +"Aroclor 1242","emission/water","","221300",1 +"Aroclor 1248","emission/water","","221300",1 +"Aroclor 1254","emission/water","","221300",1 +"Aroclor 1260","emission/water","","221300",1 +"Aromatic hydrocarbons","emission/water","","221300",1 +"Atrazine","emission/water","","221300",1 +"Benz[a]anthracene","emission/water","","221300",1 +"Benzidine","emission/water","","221300",1 +"Benzo(b)fluoranthene","emission/water","","221300",1 +"Benzo[a]pyrene","emission/water","","221300",1 +"Benzo[k]fluoranthene","emission/water","","221300",1 +"Bicarbonate","emission/water","","221300",1 +"Bis(2-chloroethoxy)methane","emission/water","","221300",1 +"Bis(2-chloroethyl) ether","emission/water","","221300",1 +"Bis(2-chloroisopropyl) ether","emission/water","","221300",1 +"Bromine","emission/water","","221300",1 +"Butyl benzyl phthalate","emission/water","","221300",1 +"Carbon tetrachloride","emission/water","","221300",1 +"Carbonate","emission/water","","221300",1 +"Chlordane, technical","emission/water","","221300",1 +"Chlorobenzene","emission/water","","221300",1 +"Chlorodibromomethane","emission/water","","221300",1 +"Chloroethane","emission/water","","221300",1 +"Chloromethane","emission/water","","221300",1 +"Chlorophyll a","emission/water","","221300",1 +"Chrysene","emission/water","","221300",1 +"Cyclohexane","emission/water","","221300",1 +"Di-n-octyl phthalate","emission/water","","221300",1 +"Dibenz[a,h]anthracene","emission/water","","221300",1 +"Dibutyl phthalate","emission/water","","221300",1 +"Dichlorobromomethane","emission/water","","221300",1 +"Dieldrin","emission/water","","221300",1 +"Diethanolamine","emission/water","","221300",1 +"Diethyl phthalate","emission/water","","221300",1 +"Dimethyl phthalate","emission/water","","221300",1 +"Endosulfan sulfate","emission/water","","221300",1 +"Endrin","emission/water","","221300",1 +"Endrin aldehyde","emission/water","","221300",1 +"Ethylene glycol","emission/water","","221300",1 +"Fluoranthene","emission/water","","221300",1 +"Fluorene","emission/water","","221300",1 +"Heptachlor","emission/water","","221300",1 +"Heptachlor epoxide","emission/water","","221300",1 +"Hexachlorobenzene","emission/water","","221300",1 +"Hexachlorobutadiene","emission/water","","221300",1 +"Hexachlorocyclopentadiene","emission/water","","221300",1 +"Hexachloroethane","emission/water","","221300",1 +"Hydrocarbons, halogenated","emission/water","","221300",1 +"Hydrogen sulfide","emission/water","","221300",1 +"Indeno[1,2,3-cd]pyrene","emission/water","","221300",1 +"Isophorone","emission/water","","221300",1 +"Lindane","emission/water","","221300",1 +"m-Dichlorobenzene","emission/water","","221300",1 +"Magnesium","emission/water","","221300",1 +"Methyl bromide","emission/water","","221300",1 +"Methyl tert-butyl ether","emission/water","","221300",1 +"Methylene chloride","emission/water","","221300",1 +"N-Nitrosodi-n-propylamine","emission/water","","221300",1 +"N-Nitrosodimethylamine","emission/water","","221300",1 +"N-Nitrosodiphenylamine","emission/water","","221300",1 +"Naphthalene","emission/water","","221300",1 +"Nitrobenzene","emission/water","","221300",1 +"Nonylphenol","emission/water","","221300",1 +"o-Chlorophenol","emission/water","","221300",1 +"o-Dichlorobenzene","emission/water","","221300",1 +"o-Nitrophenol","emission/water","","221300",1 +"p-Bromophenyl phenyl ether","emission/water","","221300",1 +"p-Chloro-m-cresol","emission/water","","221300",1 +"p-Chlorophenyl phenyl ether","emission/water","","221300",1 +"p-Dichlorobenzene","emission/water","","221300",1 +"p-Nitrophenol","emission/water","","221300",1 +"p,p'-DDD","emission/water","","221300",1 +"p,p'-DDE","emission/water","","221300",1 +"p,p'-DDT","emission/water","","221300",1 +"Pentachlorophenol","emission/water","","221300",1 +"Peracetic acid","emission/water","","221300",1 +"Phenanthrene","emission/water","","221300",1 +"Phenol","emission/water","","221300",1 +"Phenols","emission/water","","221300",1 +"Polychlorinated biphenyls","emission/water","","221300",1 +"Potassium","emission/water","","221300",1 +"Pyrene","emission/water","","221300",1 +"Sodium","emission/water","","221300",1 +"Strontium","emission/water","","221300",1 +"Styrene","emission/water","","221300",1 +"Tetrachloroethylene","emission/water","","221300",1 +"Toxaphene","emission/water","","221300",1 +"trans-1,2-Dichloroethylene","emission/water","","221300",1 +"Tribromomethane","emission/water","","221300",1 +"Trichloroethylene","emission/water","","221300",1 +"Uranium","emission/water","","221300",1 +"Vinyl chloride","emission/water","","221300",1 +"Hexafluoroethane","emission/air","","221100",NA +"Hexafluoroethane","emission/air","","221200",NA +"Hexafluoroethane","emission/air","","221300",NA +"Perfluoropropane","emission/air","","221100",NA +"Perfluoropropane","emission/air","","221200",NA +"Perfluoropropane","emission/air","","221300",NA +"Perfluorocyclobutane","emission/air","","221100",NA +"Perfluorocyclobutane","emission/air","","221200",NA +"Perfluorocyclobutane","emission/air","","221300",NA +"Carbon tetrafluoride","emission/air","","221100",NA +"Carbon tetrafluoride","emission/air","","221200",NA +"Carbon tetrafluoride","emission/air","","221300",NA +"Methane","emission/air","","221100",0.0329263408794968 +"Methane","emission/air","","221200",0.433008844967677 +"Methane","emission/air","","221300",0.534064814152826 +"Carbon dioxide","emission/air","","221100",0.999356984296759 +"Carbon dioxide","emission/air","","221200",0.000423787656543493 +"Carbon dioxide","emission/air","","221300",0.000219228046697633 +"HFC-125","emission/air","","221100",NA +"HFC-125","emission/air","","221200",NA +"HFC-125","emission/air","","221300",NA +"HFC-134a","emission/air","","221100",NA +"HFC-134a","emission/air","","221200",NA +"HFC-134a","emission/air","","221300",NA +"HFC-143a","emission/air","","221100",NA +"HFC-143a","emission/air","","221200",NA +"HFC-143a","emission/air","","221300",NA +"HFC-23","emission/air","","221100",NA +"HFC-23","emission/air","","221200",NA +"HFC-23","emission/air","","221300",NA +"HFC-236fa","emission/air","","221100",NA +"HFC-236fa","emission/air","","221200",NA +"HFC-236fa","emission/air","","221300",NA +"HFC-32","emission/air","","221100",NA +"HFC-32","emission/air","","221200",NA +"HFC-32","emission/air","","221300",NA +"Nitrous oxide","emission/air","","221100",0.711955430410141 +"Nitrous oxide","emission/air","","221200",2.59631897100034e-05 +"Nitrous oxide","emission/air","","221300",0.288018606400149 +"Nitrogen trifluoride","emission/air","","221100",NA +"Nitrogen trifluoride","emission/air","","221200",NA +"Nitrogen trifluoride","emission/air","","221300",NA +"Sulfur hexafluoride","emission/air","","221100",1 +"Sulfur hexafluoride","emission/air","","221200",0 +"Sulfur hexafluoride","emission/air","","221300",0 +"Land use","resource/ground/human-dominated/industrial","","221100",1 +"Uranium","resource/ground","","221100",1 +"Energy, geothermal","resource/ground","","221100",1 +"Biomass","resource/biotic","","221100",0.999239672579092 +"Biomass","resource/biotic","","221300",0.000760327420907702 +"Energy, hydro","resource/water","","221100",0.999890504140938 +"Energy, hydro","resource/water","","221300",0.000109495859062353 +"Energy, solar","resource/air","","221100",0.999526211082044 +"Energy, solar","resource/air","","221300",0.000473788917955755 +"Energy, wind","resource/air","","221100",0.999937732386147 +"Energy, wind","resource/air","","221300",6.2267613852585e-05 +"Aluminum Cans","Waste Flows/MSW","","221100",0.752368580191692 +"Aluminum Cans","Waste Flows/MSW","","221300",0.034731710229525 +"Aluminum Cans","Waste Flows/MSW","","221200",0.212899709578783 +"Ash","Waste Flows/MSW","","221200",0.212899709616764 +"Ash","Waste Flows/MSW","","221100",0.752368580151817 +"Ash","Waste Flows/MSW","","221300",0.0347317102314194 +"Asphalt Shingles","Waste Flows/CDD","","221200",0.212899709548641 +"Asphalt Shingles","Waste Flows/CDD","","221100",0.752368580216653 +"Asphalt Shingles","Waste Flows/CDD","","221300",0.034731710234706 +"Batteries","Waste Flows/MSW","","221200",0.21289970955127 +"Batteries","Waste Flows/MSW","","221100",0.752368580221996 +"Batteries","Waste Flows/MSW","","221300",0.0347317102267343 +"Brown Glass Bottles and Containers","Waste Flows/MSW","","221200",0.212899709600987 +"Brown Glass Bottles and Containers","Waste Flows/MSW","","221100",0.752368580161846 +"Brown Glass Bottles and Containers","Waste Flows/MSW","","221300",0.0347317102371668 +"Brown Goods","Waste Flows/MSW","","221200",0.21289970958599 +"Brown Goods","Waste Flows/MSW","","221100",0.752368580191653 +"Brown Goods","Waste Flows/MSW","","221300",0.0347317102223574 +"Bulky Items","Waste Flows/MSW","","221100",0.752368580253461 +"Bulky Items","Waste Flows/MSW","","221300",0.034731710225405 +"Bulky Items","Waste Flows/MSW","","221200",0.212899709521134 +"Carpet","Waste Flows/MSW","","221100",0.752368580195973 +"Carpet","Waste Flows/MSW","","221200",0.212899709577876 +"Carpet","Waste Flows/MSW","","221300",0.0347317102261517 +"Wood","Waste Flows/CDD","","221100",0.0360977517941775 +"Wood","Waste Flows/CDD","","221300",0.00166638624776546 +"Wood","Waste Flows/CDD","","221200",0.0102146754611644 +"Wood","Waste Flows/CDD","","221100",0.353968343893987 +"Wood","Waste Flows/CDD","","221200",0.100163350272452 +"Wood","Waste Flows/CDD","","221300",0.0163402968662859 +"Wood","Waste Flows/CDD","","221200",0.079808412777503 +"Wood","Waste Flows/CDD","","221100",0.282035810848575 +"Wood","Waste Flows/CDD","","221300",0.0130196639169939 +"Wood","Waste Flows/CDD","","221300",0.00370536320061601 +"Wood","Waste Flows/CDD","","221100",0.0802666736419143 +"Wood","Waste Flows/CDD","","221200",0.0227132710785651 +"Clear Glass Bottles and Containers","Waste Flows/MSW","","221200",0.212899709547647 +"Clear Glass Bottles and Containers","Waste Flows/MSW","","221300",0.03473171022134 +"Clear Glass Bottles and Containers","Waste Flows/MSW","","221100",0.752368580231013 +"Computer-related Electronics","Waste Flows/MSW","","221300",0.034731710230177 +"Computer-related Electronics","Waste Flows/MSW","","221200",0.212899709561897 +"Computer-related Electronics","Waste Flows/MSW","","221100",0.752368580207926 +"Concrete","Waste Flows/CDD","","221300",0.0347317102414778 +"Concrete","Waste Flows/CDD","","221200",0.212899709573186 +"Concrete","Waste Flows/CDD","","221100",0.752368580185336 +"Durable Plastic Items - Number 2 and 5 Bulky Rigids","Waste Flows/MSW","","221300",0.0347317102297259 +"Durable Plastic Items - Number 2 and 5 Bulky Rigids","Waste Flows/MSW","","221100",0.752368580190669 +"Durable Plastic Items - Number 2 and 5 Bulky Rigids","Waste Flows/MSW","","221200",0.212899709579605 +"Durable Plastic Items - Other","Waste Flows/MSW","","221200",0.212899709614063 +"Durable Plastic Items - Other","Waste Flows/MSW","","221300",0.0347317102326581 +"Durable Plastic Items - Other","Waste Flows/MSW","","221100",0.752368580153279 +"Film Products","Waste Flows/MSW","","221100",0.752368580155251 +"Film Products","Waste Flows/MSW","","221300",0.0347317102259393 +"Film Products","Waste Flows/MSW","","221200",0.212899709618809 +"Flat Glass","Waste Flows/MSW","","221300",0.0347317102246929 +"Flat Glass","Waste Flows/MSW","","221100",0.752368580176105 +"Flat Glass","Waste Flows/MSW","","221200",0.212899709599202 +"Food","Waste Flows/MSW","","221100",0.752368580230101 +"Food","Waste Flows/MSW","","221300",0.0347317102248209 +"Food","Waste Flows/MSW","","221200",0.212899709545079 +"Green Glass Bottles and Containers","Waste Flows/MSW","","221100",0.752368580135576 +"Green Glass Bottles and Containers","Waste Flows/MSW","","221300",0.0347317102378338 +"Green Glass Bottles and Containers","Waste Flows/MSW","","221200",0.21289970962659 +"Gypsum Drywall","Waste Flows/CDD","","221100",0.752368580230285 +"Gypsum Drywall","Waste Flows/CDD","","221200",0.212899709539935 +"Gypsum Drywall","Waste Flows/CDD","","221300",0.0347317102297802 +"HDPE Plastic Containers","Waste Flows/MSW","","221200",0.212899709635968 +"HDPE Plastic Containers","Waste Flows/MSW","","221300",0.0347317102450287 +"HDPE Plastic Containers","Waste Flows/MSW","","221100",0.752368580119004 +"Leaves and Grass","Waste Flows/MSW","","221300",0.0347317102300042 +"Leaves and Grass","Waste Flows/MSW","","221100",0.752368580192246 +"Leaves and Grass","Waste Flows/MSW","","221200",0.21289970957775 +"Magazines and Catalogs","Waste Flows/MSW","","221200",0.212899709610666 +"Magazines and Catalogs","Waste Flows/MSW","","221100",0.752368580159833 +"Magazines and Catalogs","Waste Flows/MSW","","221300",0.0347317102295015 +"Manures","Waste Flows/MSW","","221200",0.212899709534226 +"Manures","Waste Flows/MSW","","221100",0.752368580246013 +"Manures","Waste Flows/MSW","","221300",0.0347317102197609 +"Miscellaneous Plastic Containers","Waste Flows/MSW","","221300",0.0347317102257506 +"Miscellaneous Plastic Containers","Waste Flows/MSW","","221200",0.212899709551021 +"Miscellaneous Plastic Containers","Waste Flows/MSW","","221100",0.752368580223228 +"Mixed Residue","Waste Flows/MSW","","221100",0.752368580192374 +"Mixed Residue","Waste Flows/MSW","","221300",0.0347317102333691 +"Mixed Residue","Waste Flows/MSW","","221200",0.212899709574256 +"Newspaper","Waste Flows/MSW","","221100",0.752368580195454 +"Newspaper","Waste Flows/MSW","","221300",0.0347317102271221 +"Newspaper","Waste Flows/MSW","","221200",0.212899709577424 +"Non-Bag Commercial and Industrial Packaging Film","Waste Flows/MSW","","221100",0.752368580216081 +"Non-Bag Commercial and Industrial Packaging Film","Waste Flows/MSW","","221300",0.034731710223812 +"Non-Bag Commercial and Industrial Packaging Film","Waste Flows/MSW","","221200",0.212899709560107 +"Other Ferrous","Waste Flows/MSW","","221100",0.752368580173383 +"Other Ferrous","Waste Flows/MSW","","221300",0.0347317102276057 +"Other Ferrous","Waste Flows/MSW","","221200",0.212899709599011 +"Other Film - Other","Waste Flows/MSW","","221100",0.752368580151488 +"Other Film - Other","Waste Flows/MSW","","221300",0.0347317102330971 +"Other Film - Other","Waste Flows/MSW","","221200",0.212899709615415 +"Other Miscellaneous Paper - Compostable","Waste Flows/MSW","","221100",0.752368580210728 +"Other Miscellaneous Paper - Compostable","Waste Flows/MSW","","221300",0.0347317102352825 +"Other Miscellaneous Paper - Compostable","Waste Flows/MSW","","221200",0.212899709553989 +"Other Miscellaneous Paper - Other","Waste Flows/MSW","","221100",0.752368580190779 +"Other Miscellaneous Paper - Other","Waste Flows/MSW","","221200",0.212899709580379 +"Other Miscellaneous Paper - Other","Waste Flows/MSW","","221300",0.0347317102288422 +"Other Non-Ferrous","Waste Flows/MSW","","221300",0.0347317102301099 +"Other Non-Ferrous","Waste Flows/MSW","","221100",0.752368580216978 +"Other Non-Ferrous","Waste Flows/MSW","","221200",0.212899709552912 +"Other Office Paper","Waste Flows/MSW","","221100",0.752368580151028 +"Other Office Paper","Waste Flows/MSW","","221300",0.0347317102293382 +"Other Office Paper","Waste Flows/MSW","","221200",0.212899709619634 +"Other Small Consumer Electronics","Waste Flows/MSW","","221100",0.752368580229723 +"Other Small Consumer Electronics","Waste Flows/MSW","","221200",0.212899709545158 +"Other Small Consumer Electronics","Waste Flows/MSW","","221300",0.0347317102251191 +"Paper Bags","Waste Flows/MSW","","221100",0.752368580172896 +"Paper Bags","Waste Flows/MSW","","221200",0.21289970959618 +"Paper Bags","Waste Flows/MSW","","221300",0.0347317102309238 +"PETE Plastic Containers","Waste Flows/MSW","","221200",0.212899709545876 +"PETE Plastic Containers","Waste Flows/MSW","","221100",0.752368580228084 +"PETE Plastic Containers","Waste Flows/MSW","","221300",0.0347317102260394 +"Phone Books and Directories","Waste Flows/MSW","","221100",0.75236858020103 +"Phone Books and Directories","Waste Flows/MSW","","221200",0.212899709565836 +"Phone Books and Directories","Waste Flows/MSW","","221300",0.034731710233134 +"Plastic Grocery and Other Merchandise Bags","Waste Flows/MSW","","221100",0.752368580167092 +"Plastic Grocery and Other Merchandise Bags","Waste Flows/MSW","","221200",0.212899709606903 +"Plastic Grocery and Other Merchandise Bags","Waste Flows/MSW","","221300",0.0347317102260051 +"Plastic Trash Bags","Waste Flows/MSW","","221300",0.0347317102280166 +"Plastic Trash Bags","Waste Flows/MSW","","221200",0.212899709593981 +"Plastic Trash Bags","Waste Flows/MSW","","221100",0.752368580178003 +"Prunings and Trimmings","Waste Flows/MSW","","221300",0.0347317102352355 +"Prunings and Trimmings","Waste Flows/MSW","","221200",0.212899709607407 +"Prunings and Trimmings","Waste Flows/MSW","","221100",0.752368580157357 +"Glass","Waste Flows/MSW","","221100",0.752368580252491 +"Glass","Waste Flows/MSW","","221200",0.212899709514388 +"Glass","Waste Flows/MSW","","221300",0.0347317102331214 +"Remainder/Composite Household Hazardous","Waste Flows/MSW","","221200",0.212899709566948 +"Remainder/Composite Household Hazardous","Waste Flows/MSW","","221100",0.752368580202784 +"Remainder/Composite Household Hazardous","Waste Flows/MSW","","221300",0.0347317102302683 +"Other","Waste Flows/CDD","","221200",0.2128997095422 +"Other","Waste Flows/CDD","","221300",0.0347317102385463 +"Other","Waste Flows/CDD","","221100",0.752368580219253 +"Remainder/Composite Metal","Waste Flows/MSW","","221200",0.212899709561764 +"Remainder/Composite Metal","Waste Flows/MSW","","221100",0.752368580201816 +"Remainder/Composite Metal","Waste Flows/MSW","","221300",0.0347317102364207 +"Organics","Waste Flows/MSW","","221300",0.0347317102268485 +"Organics","Waste Flows/MSW","","221200",0.212899709532057 +"Organics","Waste Flows/MSW","","221100",0.752368580241094 +"Remainder/Composite Paper - Compostable","Waste Flows/MSW","","221300",0.0347317102247669 +"Remainder/Composite Paper - Compostable","Waste Flows/MSW","","221200",0.212899709575381 +"Remainder/Composite Paper - Compostable","Waste Flows/MSW","","221100",0.752368580199852 +"Remainder/Composite Paper - Other","Waste Flows/MSW","","221100",0.752368580181532 +"Remainder/Composite Paper - Other","Waste Flows/MSW","","221200",0.212899709589114 +"Remainder/Composite Paper - Other","Waste Flows/MSW","","221300",0.0347317102293542 +"Plastic","Waste Flows/MSW","","221200",0.21289970962566 +"Plastic","Waste Flows/MSW","","221300",0.0347317102358545 +"Plastic","Waste Flows/MSW","","221100",0.752368580138486 +"Fines","Waste Flows/MSW","","221100",0.752368580213215 +"Fines","Waste Flows/MSW","","221200",0.212899709554519 +"Fines","Waste Flows/MSW","","221300",0.0347317102322659 +"Textiles","Waste Flows/MSW","","221200",0.21289970954735 +"Textiles","Waste Flows/MSW","","221300",0.0347317102335842 +"Textiles","Waste Flows/MSW","","221100",0.752368580219065 +"Tin/Steel Cans","Waste Flows/MSW","","221200",0.212899709542798 +"Tin/Steel Cans","Waste Flows/MSW","","221100",0.752368580225801 +"Tin/Steel Cans","Waste Flows/MSW","","221300",0.0347317102314009 +"Tires","Waste Flows/MSW","","221200",0.212899709579604 +"Tires","Waste Flows/MSW","","221100",0.752368580197955 +"Tires","Waste Flows/MSW","","221300",0.0347317102224411 +"Cardboard","Waste Flows/MSW","","221200",0.212899709547421 +"Cardboard","Waste Flows/MSW","","221300",0.0347317102284273 +"Cardboard","Waste Flows/MSW","","221100",0.752368580224152 +"Used Oil","Waste Flows/MSW","","221200",0.212899709551767 +"Used Oil","Waste Flows/MSW","","221300",0.0347317102333282 +"Used Oil","Waste Flows/MSW","","221100",0.752368580214905 +"Used Oil Filters","Waste Flows/MSW","","221300",0.0347317102400359 +"Used Oil Filters","Waste Flows/MSW","","221200",0.212899709585852 +"Used Oil Filters","Waste Flows/MSW","","221100",0.752368580174112 +"Video Display Devices","Waste Flows/MSW","","221100",0.752368580241927 +"Video Display Devices","Waste Flows/MSW","","221200",0.21289970953275 +"Video Display Devices","Waste Flows/MSW","","221300",0.034731710225323 +"White Ledger Paper","Waste Flows/MSW","","221100",0.752368580256075 +"White Ledger Paper","Waste Flows/MSW","","221300",0.0347317102339967 +"White Ledger Paper","Waste Flows/MSW","","221200",0.212899709509928 +"1,2-BENZENEDICARBOXYLIC ACID, DIBUTYL ESTER (OR) DIBUTYL PHTHALATE","Waste Flows/Hazardous Waste","","221100",1 +"1,2-DICHLOROETHANE","Waste Flows/Hazardous Waste","","221300",1 +"1,2,3-PROPANETRIOL, TRINITRATE (R) (OR) NITROGLYCERINE (R)","Waste Flows/Hazardous Waste","","221100",1 +"1,4-DICHLOROBENZENE","Waste Flows/Hazardous Waste","","221200",1 +"2-BUTANONE (I,T) (OR) METHYL ETHYL KETONE (MEK) (I,T)","Waste Flows/Hazardous Waste","","221100",1 +"2-BUTANONE, PEROXIDE (R,T) (OR) METHYL ETHYL KETONE PEROXIDE (R,T)","Waste Flows/Hazardous Waste","","221100",1 +"2-PROPANONE (I) (OR) ACETONE (I)","Waste Flows/Hazardous Waste","","221100",1 +"2-PROPENAMIDE (OR) ACRYLAMIDE","Waste Flows/Hazardous Waste","","221100",1 +"2-PROPENOIC ACID (I) (OR) ACRYLIC ACID (I)","Waste Flows/Hazardous Waste","","221100",1 +"2,4-D (2,4-DICHLOROPHENOXYACETIC ACID)","Waste Flows/Hazardous Waste","","221100",1 +"2,4-D, SALTS & ESTERS (OR) ACETIC ACID, (2,4-DICHLOROPHENOXY)-, SALTS & ESTERS (OR) DICHLOROPHENOXYACETIC ACID 2,4-D","Waste Flows/Hazardous Waste","","221100",1 +"2,4-DINITROPHENOL (OR) PHENOL, 2,4-DINITRO-","Waste Flows/Hazardous Waste","","221100",1 +"ACETIC ACID, LEAD(2+) SALT (OR) LEAD ACETATE","Waste Flows/Hazardous Waste","","221300",1 +"ACIDIC AQUEOUS WST","Waste Flows/Hazardous Waste","","221300",0.0609072835712995 +"ACIDIC AQUEOUS WST","Waste Flows/Hazardous Waste","","221100",0.939092716428701 +"ALPHA,ALPHA-DIMETHYLBENZYLHYDROPEROXIDE (R) (OR) HYDROPEROXIDE, 1-METHYL-1-PHENYLETHYL- (R)","Waste Flows/Hazardous Waste","","221100",1 +"ANILINE (I,T) (OR) BENZENAMINE (I,T)","Waste Flows/Hazardous Waste","","221100",1 +"AQUEOUS W/O CYANIDES","Waste Flows/Hazardous Waste","","221300",0.0144328002486448 +"AQUEOUS W/O CYANIDES","Waste Flows/Hazardous Waste","","221100",0.985567199751355 +"AQUEOUS/CYANIDES","Waste Flows/Hazardous Waste","","221300",0.00170164492342598 +"AQUEOUS/CYANIDES","Waste Flows/Hazardous Waste","","221100",0.998298355076574 +"ARSENIC","Waste Flows/Hazardous Waste","","221300",0.00418967469407883 +"ARSENIC","Waste Flows/Hazardous Waste","","221200",0.197899463272437 +"ARSENIC","Waste Flows/Hazardous Waste","","221100",0.797910862033484 +"ASH","Waste Flows/Hazardous Waste","","221100",0.385142878614237 +"ASH","Waste Flows/Hazardous Waste","","221300",0.614857121385763 +"BARIUM","Waste Flows/Hazardous Waste","","221200",0.240677966101695 +"BARIUM","Waste Flows/Hazardous Waste","","221300",0.0277966101694915 +"BARIUM","Waste Flows/Hazardous Waste","","221100",0.731525423728814 +"BENZENE","Waste Flows/Hazardous Waste","","221100",0.340964259072098 +"BENZENE","Waste Flows/Hazardous Waste","","221200",0.658881330530499 +"BENZENE","Waste Flows/Hazardous Waste","","221300",0.000154410397403398 +"BENZENE (I,T)","Waste Flows/Hazardous Waste","","221200",1 +"BENZENE, 1,3-DIISOCYANATOMETHYL- (R,T) (OR) TOLUENE DIISOCYANATE (R,T)","Waste Flows/Hazardous Waste","","221100",1 +"BENZENE, DIMETHYL- (I,T) (OR) XYLENE (I)","Waste Flows/Hazardous Waste","","221100",1 +"BENZENE, METHYL- (OR) TOLUENE","Waste Flows/Hazardous Waste","","221100",1 +"BENZENEDIAMINE, AR-METHYL- (OR) TOLUENEDIAMINE","Waste Flows/Hazardous Waste","","221200",1 +"CADMIUM","Waste Flows/Hazardous Waste","","221200",0.125432208577037 +"CADMIUM","Waste Flows/Hazardous Waste","","221100",0.848961600215172 +"CADMIUM","Waste Flows/Hazardous Waste","","221300",0.0256061912077912 +"CARBON TETRACHLORIDE","Waste Flows/Hazardous Waste","","221100",1 +"CARBON TETRACHLORIDE (OR) METHANE, TETRACHLORO-","Waste Flows/Hazardous Waste","","221100",1 +"CHLOROFORM","Waste Flows/Hazardous Waste","","221300",1 +"CHLOROFORM (OR) METHANE, TRICHLORO-","Waste Flows/Hazardous Waste","","221300",0.153846153846154 +"CHLOROFORM (OR) METHANE, TRICHLORO-","Waste Flows/Hazardous Waste","","221100",0.846153846153846 +"CHROMIUM","Waste Flows/Hazardous Waste","","221200",0.0174997826009602 +"CHROMIUM","Waste Flows/Hazardous Waste","","221100",0.590126611379664 +"CHROMIUM","Waste Flows/Hazardous Waste","","221300",0.392373606019376 +"COMPRESSED GAS","Waste Flows/Hazardous Waste","","221200",0.477937565766398 +"COMPRESSED GAS","Waste Flows/Hazardous Waste","","221100",0.519326552086987 +"COMPRESSED GAS","Waste Flows/Hazardous Waste","","221300",0.00273588214661522 +"CONT. DEBRIS","Waste Flows/Hazardous Waste","","221200",0.594329424075642 +"CONT. DEBRIS","Waste Flows/Hazardous Waste","","221300",0.0365845154239022 +"CONT. DEBRIS","Waste Flows/Hazardous Waste","","221100",0.369086060500456 +"CONTAMINATED SOIL","Waste Flows/Hazardous Waste","","221200",0.000393776342162883 +"CONTAMINATED SOIL","Waste Flows/Hazardous Waste","","221300",0.87753663066436 +"CONTAMINATED SOIL","Waste Flows/Hazardous Waste","","221100",0.122069592993477 +"CORROSIVE WASTE","Waste Flows/Hazardous Waste","","221200",0.105118030565648 +"CORROSIVE WASTE","Waste Flows/Hazardous Waste","","221300",0.546573487322911 +"CORROSIVE WASTE","Waste Flows/Hazardous Waste","","221100",0.348308482111442 +"CRESOL","Waste Flows/Hazardous Waste","","221200",1 +"CYANIDE","Waste Flows/Hazardous Waste","","221100",1 +"CYANIDES (SOLUBLE CYANIDE SALTS), NOT OTHERWISE SPECIFIED","Waste Flows/Hazardous Waste","","221100",1 +"CYANOGEN BROMIDE (CN)BR","Waste Flows/Hazardous Waste","","221300",1 +"DICHLORODIFLUOROMETHANE (OR) METHANE, DICHLORODIFLUORO-","Waste Flows/Hazardous Waste","","221100",1 +"DILUTE AQUEOUS WST","Waste Flows/Hazardous Waste","","221200",0.00181994343772913 +"DILUTE AQUEOUS WST","Waste Flows/Hazardous Waste","","221100",0.998180056562271 +"DRIED PAINT","Waste Flows/Hazardous Waste","","221200",0.671851368101491 +"DRIED PAINT","Waste Flows/Hazardous Waste","","221100",0.328148631898509 +"ELECTRICAL DEVICES","Waste Flows/Hazardous Waste","","221100",1 +"ETHANE, 1,1,1-TRICHLORO- (OR) METHYL CHLOROFORM","Waste Flows/Hazardous Waste","","221100",1 +"ETHANE, 1,2-DICHLORO- (OR) ETHYLENE DICHLORIDE","Waste Flows/Hazardous Waste","","221100",1 +"EXPLOSIVES, ETC.","Waste Flows/Hazardous Waste","","221200",0.911214953271028 +"EXPLOSIVES, ETC.","Waste Flows/Hazardous Waste","","221100",0.0887850467289719 +"FORMIC ACID (C,T)","Waste Flows/Hazardous Waste","","221100",1 +"HALOGENATED SOLVENT","Waste Flows/Hazardous Waste","","221300",0.00929091719934592 +"HALOGENATED SOLVENT","Waste Flows/Hazardous Waste","","221100",0.904563698528319 +"HALOGENATED SOLVENT","Waste Flows/Hazardous Waste","","221200",0.0861453842723354 +"HYDRAZINE (R,T)","Waste Flows/Hazardous Waste","","221100",1 +"HYDROFLUORIC ACID (C,T) (OR) HYDROGEN FLUORIDE (C,T)","Waste Flows/Hazardous Waste","","221300",1 +"HYDROGEN SULFIDE (OR) HYDROGEN SULFIDE H2S","Waste Flows/Hazardous Waste","","221100",1 +"IGNITABLE WASTE","Waste Flows/Hazardous Waste","","221200",0.112008365739537 +"IGNITABLE WASTE","Waste Flows/Hazardous Waste","","221100",0.802825594462651 +"IGNITABLE WASTE","Waste Flows/Hazardous Waste","","221300",0.0851660397978119 +"LAB PACK","Waste Flows/Hazardous Waste","","221100",1 +"LAB PACKS/ACUTE","Waste Flows/Hazardous Waste","","221100",0.806912991656734 +"LAB PACKS/ACUTE","Waste Flows/Hazardous Waste","","221300",0.193087008343266 +"LAB PACKS/NO ACUTE","Waste Flows/Hazardous Waste","","221200",0.150758894432306 +"LAB PACKS/NO ACUTE","Waste Flows/Hazardous Waste","","221100",0.669505305100102 +"LAB PACKS/NO ACUTE","Waste Flows/Hazardous Waste","","221300",0.179735800467592 +"LEAD","Waste Flows/Hazardous Waste","","221200",0.0948920855335172 +"LEAD","Waste Flows/Hazardous Waste","","221100",0.890913158388566 +"LEAD","Waste Flows/Hazardous Waste","","221300",0.0141947560779172 +"MERCURY","Waste Flows/Hazardous Waste","","221100",0.984049433554063 +"MERCURY","Waste Flows/Hazardous Waste","","221200",0.000590360158264397 +"MERCURY","Waste Flows/Hazardous Waste","","221300",0.0153602062876724 +"METAL BEARING SLUDGE","Waste Flows/Hazardous Waste","","221100",1 +"METAL SALTS/CHEM.","Waste Flows/Hazardous Waste","","221100",1 +"METAL SCALE, ETC.","Waste Flows/Hazardous Waste","","221100",1 +"METHANE, DICHLORO- (OR) METHYLENE CHLORIDE","Waste Flows/Hazardous Waste","","221100",1 +"METHANE, TRICHLOROFLUORO- (OR) TRICHLOROMONOFLUOROMETHANE","Waste Flows/Hazardous Waste","","221100",1 +"METHANOL (I) (OR) METHYL ALCOHOL (I)","Waste Flows/Hazardous Waste","","221100",1 +"METHYL ETHYL KETONE","Waste Flows/Hazardous Waste","","221100",1 +"NAPHTHALENE","Waste Flows/Hazardous Waste","","221200",0.39160218191044 +"NAPHTHALENE","Waste Flows/Hazardous Waste","","221100",0.60839781808956 +"NONHALOGEN. SOLVENT","Waste Flows/Hazardous Waste","","221100",0.928323391722217 +"NONHALOGEN. SOLVENT","Waste Flows/Hazardous Waste","","221200",0.0514313648422982 +"NONHALOGEN. SOLVENT","Waste Flows/Hazardous Waste","","221300",0.0202452434354851 +"OIL-WATER EMULSION","Waste Flows/Hazardous Waste","","221100",0.0887138254187054 +"OIL-WATER EMULSION","Waste Flows/Hazardous Waste","","221300",0.0892992119038422 +"OIL-WATER EMULSION","Waste Flows/Hazardous Waste","","221200",0.821986962677452 +"OILY SLUDGE","Waste Flows/Hazardous Waste","","221300",0.712810770628562 +"OILY SLUDGE","Waste Flows/Hazardous Waste","","221200",0.287189229371438 +"OTH INORGANIC LIQUID","Waste Flows/Hazardous Waste","","221200",0.419418590234943 +"OTH INORGANIC LIQUID","Waste Flows/Hazardous Waste","","221100",0.353447219994932 +"OTH INORGANIC LIQUID","Waste Flows/Hazardous Waste","","221300",0.227134189770126 +"OTH INORGANIC SLUDGE","Waste Flows/Hazardous Waste","","221100",1 +"OTH INORGANIC SOLIDS","Waste Flows/Hazardous Waste","","221100",0.873850197109067 +"OTH INORGANIC SOLIDS","Waste Flows/Hazardous Waste","","221300",0.00171963465874986 +"OTH INORGANIC SOLIDS","Waste Flows/Hazardous Waste","","221200",0.124430168232183 +"OTH ORGANIC LIQUID","Waste Flows/Hazardous Waste","","221100",0.232168658353881 +"OTH ORGANIC LIQUID","Waste Flows/Hazardous Waste","","221200",0.114657269427326 +"OTH ORGANIC LIQUID","Waste Flows/Hazardous Waste","","221300",0.653174072218793 +"OTH ORGANIC SOLIDS","Waste Flows/Hazardous Waste","","221200",0.477197221383268 +"OTH ORGANIC SOLIDS","Waste Flows/Hazardous Waste","","221300",0.0151011778918756 +"OTH ORGANIC SOLIDS","Waste Flows/Hazardous Waste","","221100",0.507701600724856 +"OTHER AQUEOUS WST","Waste Flows/Hazardous Waste","","221200",0.496688609430238 +"OTHER AQUEOUS WST","Waste Flows/Hazardous Waste","","221300",0.00249597121781433 +"OTHER AQUEOUS WST","Waste Flows/Hazardous Waste","","221100",0.500815419351948 +"OTHER ORGANIC SLUDGE","Waste Flows/Hazardous Waste","","221100",0.0547913906835733 +"OTHER ORGANIC SLUDGE","Waste Flows/Hazardous Waste","","221200",0.945208609316427 +"OTHER SLUDGES","Waste Flows/Hazardous Waste","","221200",0.570753001091306 +"OTHER SLUDGES","Waste Flows/Hazardous Waste","","221100",0.429246998908694 +"PAINT THINNER","Waste Flows/Hazardous Waste","","221300",0.0160299645744285 +"PAINT THINNER","Waste Flows/Hazardous Waste","","221200",0.0251192439883047 +"PAINT THINNER","Waste Flows/Hazardous Waste","","221100",0.958850791437267 +"PAINT, INK SLUDGE","Waste Flows/Hazardous Waste","","221300",1 +"PAINT, INK, ETC.","Waste Flows/Hazardous Waste","","221100",0.818077790897941 +"PAINT, INK, ETC.","Waste Flows/Hazardous Waste","","221300",0.0297826082049426 +"PAINT, INK, ETC.","Waste Flows/Hazardous Waste","","221200",0.152139600897116 +"PESTICIDE SOLIDS","Waste Flows/Hazardous Waste","","221100",1 +"PHENOL","Waste Flows/Hazardous Waste","","221200",0.851063829787234 +"PHENOL","Waste Flows/Hazardous Waste","","221300",0.148936170212766 +"POTASSIUM CYANIDE (OR) POTASSIUM CYANIDE K(CN)","Waste Flows/Hazardous Waste","","221300",1 +"PYRIDINE","Waste Flows/Hazardous Waste","","221300",1 +"REACTIVE ORG. LIQUID","Waste Flows/Hazardous Waste","","221200",0.319936012797441 +"REACTIVE ORG. LIQUID","Waste Flows/Hazardous Waste","","221100",0.678664267146571 +"REACTIVE ORG. LIQUID","Waste Flows/Hazardous Waste","","221300",0.0013997200559888 +"REACTIVE WASTE","Waste Flows/Hazardous Waste","","221300",0.000778434965635227 +"REACTIVE WASTE","Waste Flows/Hazardous Waste","","221100",0.999221565034365 +"SELENIUM","Waste Flows/Hazardous Waste","","221300",0.540896785163106 +"SELENIUM","Waste Flows/Hazardous Waste","","221200",0.000316495563336822 +"SELENIUM","Waste Flows/Hazardous Waste","","221100",0.458786719273557 +"SILVER","Waste Flows/Hazardous Waste","","221300",0.072490253411306 +"SILVER","Waste Flows/Hazardous Waste","","221100",0.927509746588694 +"SODIUM AZIDE","Waste Flows/Hazardous Waste","","221300",1 +"SODIUM CYANIDE (OR) SODIUM CYANIDE NA(CN)","Waste Flows/Hazardous Waste","","221300",1 +"SOLVENT MIXTURE","Waste Flows/Hazardous Waste","","221200",0.973978442680729 +"SOLVENT MIXTURE","Waste Flows/Hazardous Waste","","221100",0.0260215573192707 +"SPENT ACID","Waste Flows/Hazardous Waste","","221300",0.985030867383809 +"SPENT ACID","Waste Flows/Hazardous Waste","","221100",0.0149691326161914 +"SPENT CYANIDE PLATING BATH SOLUTIONS FROM ELECTROPLATING OPERATIONS.","Waste Flows/Hazardous Waste","","221100",1 +"SPENT FILTERS","Waste Flows/Hazardous Waste","","221300",0.0353961812510624 +"SPENT FILTERS","Waste Flows/Hazardous Waste","","221200",0.853827129373111 +"SPENT FILTERS","Waste Flows/Hazardous Waste","","221100",0.110776689375827 +"STILL BOTTOMS","Waste Flows/Hazardous Waste","","221300",1 +"TETRACHLOROETHYLENE","Waste Flows/Hazardous Waste","","221300",0.00549833512752085 +"TETRACHLOROETHYLENE","Waste Flows/Hazardous Waste","","221200",0.00194361862698472 +"TETRACHLOROETHYLENE","Waste Flows/Hazardous Waste","","221100",0.992558046245494 +"THE FOLLOWING SPENT HALOGENATED SOLVENTS USED IN DEGREASING: TETRACHLOROETHYLENE, TRICHLORETHYLENE, METHYLENE CHLORIDE, 1,1,1-TRICHLOROETHANE, CARBON TETRACHLORIDE AND CHLORINATED FLUOROCARBONS; ALL SPENT SOLVENT MIXTURES/BLENDS USED IN DEGREASING CONTAIN","Waste Flows/Hazardous Waste","","221300",0.10623070026214 +"THE FOLLOWING SPENT HALOGENATED SOLVENTS USED IN DEGREASING: TETRACHLOROETHYLENE, TRICHLORETHYLENE, METHYLENE CHLORIDE, 1,1,1-TRICHLOROETHANE, CARBON TETRACHLORIDE AND CHLORINATED FLUOROCARBONS; ALL SPENT SOLVENT MIXTURES/BLENDS USED IN DEGREASING CONTAIN","Waste Flows/Hazardous Waste","","221100",0.89376929973786 +"THE FOLLOWING SPENT HALOGENATED SOLVENTS: TETRACHLOROETHYLENE, METHYLENE CHLORIDE, TRICHLOROETHYLENE, 1,1,1-TRICHLOROETHANE, CHLOROBENZENE, 1,1,2-TRICHLORO-1,2,2-TRIFLUOROETHANE, ORTHO-DICHLOROBENZENE, TRICHLOROFLUOROMETHANE, AND 1,1,2, TRICHLOROETHANE; A","Waste Flows/Hazardous Waste","","221300",0.00405100238179835 +"THE FOLLOWING SPENT HALOGENATED SOLVENTS: TETRACHLOROETHYLENE, METHYLENE CHLORIDE, TRICHLOROETHYLENE, 1,1,1-TRICHLOROETHANE, CHLOROBENZENE, 1,1,2-TRICHLORO-1,2,2-TRIFLUOROETHANE, ORTHO-DICHLOROBENZENE, TRICHLOROFLUOROMETHANE, AND 1,1,2, TRICHLOROETHANE; A","Waste Flows/Hazardous Waste","","221200",0.741885695402534 +"THE FOLLOWING SPENT HALOGENATED SOLVENTS: TETRACHLOROETHYLENE, METHYLENE CHLORIDE, TRICHLOROETHYLENE, 1,1,1-TRICHLOROETHANE, CHLOROBENZENE, 1,1,2-TRICHLORO-1,2,2-TRIFLUOROETHANE, ORTHO-DICHLOROBENZENE, TRICHLOROFLUOROMETHANE, AND 1,1,2, TRICHLOROETHANE; A","Waste Flows/Hazardous Waste","","221100",0.254063302215668 +"THE FOLLOWING SPENT NONHALOGENATED SOLVENTS: CRESOLS, CRESYLIC ACID, AND NITROBENZENE; AND THE STILL BOTTOMS FROM THE RECOVERY OF THESE SOLVENTS; ALL SPENT SOLVENT MIXTURES/BLENDS CONTAINING, BEFORE USE, A TOTAL OF TEN PERCENT OR MORE (BY VOLUME) OF ONE O","Waste Flows/Hazardous Waste","","221100",1 +"THE FOLLOWING SPENT NONHALOGENATED SOLVENTS: TOLUENE, METHYL ETHYL KETONE, CARBON DISULFIDE, ISOBUTANOL, PYRIDINE, BENZENE, 2-ETHOXYETHANOL, AND 2-NITROPROPANE; ALL SPENT SOLVENT MIXTURES/BLENDS CONTAINING, BEFORE USE, A TOTAL OF TEN PERCENT OR MORE (BY V","Waste Flows/Hazardous Waste","","221300",0.00504023667607368 +"THE FOLLOWING SPENT NONHALOGENATED SOLVENTS: TOLUENE, METHYL ETHYL KETONE, CARBON DISULFIDE, ISOBUTANOL, PYRIDINE, BENZENE, 2-ETHOXYETHANOL, AND 2-NITROPROPANE; ALL SPENT SOLVENT MIXTURES/BLENDS CONTAINING, BEFORE USE, A TOTAL OF TEN PERCENT OR MORE (BY V","Waste Flows/Hazardous Waste","","221100",0.994959763323926 +"THE FOLLOWING SPENT NONHALOGENATED SOLVENTS: XYLENE, ACETONE, ETHYL ACETATE, ETHYL BENZENE, ETHYL ETHER, METHYL ISOBUTYL KETONE, N-BUTYL ALCOHOL, CYCLOHEXANONE, AND METHANOL; ALL SPENT SOLVENT MIXTURES/BLENDS CONTAINING, BEFORE USE, ONLY THE ABOVE SPENT N","Waste Flows/Hazardous Waste","","221100",0.608334511954014 +"THE FOLLOWING SPENT NONHALOGENATED SOLVENTS: XYLENE, ACETONE, ETHYL ACETATE, ETHYL BENZENE, ETHYL ETHER, METHYL ISOBUTYL KETONE, N-BUTYL ALCOHOL, CYCLOHEXANONE, AND METHANOL; ALL SPENT SOLVENT MIXTURES/BLENDS CONTAINING, BEFORE USE, ONLY THE ABOVE SPENT N","Waste Flows/Hazardous Waste","","221200",0.335545442342479 +"THE FOLLOWING SPENT NONHALOGENATED SOLVENTS: XYLENE, ACETONE, ETHYL ACETATE, ETHYL BENZENE, ETHYL ETHER, METHYL ISOBUTYL KETONE, N-BUTYL ALCOHOL, CYCLOHEXANONE, AND METHANOL; ALL SPENT SOLVENT MIXTURES/BLENDS CONTAINING, BEFORE USE, ONLY THE ABOVE SPENT N","Waste Flows/Hazardous Waste","","221300",0.0561200457035062 +"TRICHLORETHYLENE","Waste Flows/Hazardous Waste","","221100",1 +"VANADIUM OXIDE V2O5 (OR) VANADIUM PENTOXIDE","Waste Flows/Hazardous Waste","","221100",1 +"VINYL CHLORIDE","Waste Flows/Hazardous Waste","","221100",1 +"WASTE OIL","Waste Flows/Hazardous Waste","","221200",0.429970151838564 +"WASTE OIL","Waste Flows/Hazardous Waste","","221300",0.0892240028427213 +"WASTE OIL","Waste Flows/Hazardous Waste","","221100",0.480805845318715 +"Jobs","","","221100",0.589698645245311 +"Jobs","","","221200",0.145652746560184 +"Jobs","","","221300",0.264648608194506 +"Compensation of employees","","","221100",0.780805619266055 +"Compensation of employees","","","221200",0.161983944954128 +"Compensation of employees","","","221300",0.0572104357798165 +"Gross operating surplus","","","221100",0.786933022467147 +"Gross operating surplus","","","221200",0.191248940228911 +"Gross operating surplus","","","221300",0.0218180373039423 +"Taxes on production and imports, less subsidies","","","221100",0.838787426166067 +"Taxes on production and imports, less subsidies","","","221200",0.141574444972503 +"Taxes on production and imports, less subsidies","","","221300",0.0196381288614298 diff --git a/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Make.csv b/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Make.csv new file mode 100644 index 00000000..5cd96400 --- /dev/null +++ b/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Make.csv @@ -0,0 +1,46 @@ +"IndustryCode","CommodityCode","PercentMake","Note" +"221100/US","221100/US",0.781090503048714,"IntersectionDisagg" +"221200/US","221100/US",0.000439612613365103,"IntersectionDisagg" +"221300/US","221100/US",0.00055830801897368,"IntersectionDisagg" +"221100/US","221200/US",0.0170679597139001,"IntersectionDisagg" +"221200/US","221200/US",0.174154734847652,"IntersectionDisagg" +"221300/US","221200/US",0.000153864414677786,"IntersectionDisagg" +"221100/US","221300/US",0.00225521270656298,"IntersectionDisagg" +"221200/US","221300/US",0,"IntersectionDisagg" +"221300/US","221300/US",0.0242798046361546,"IntersectionDisagg" +"486/US","221100/US",0,"CommodityDisagg" +"486/US","221200/US",1,"CommodityDisagg" +"486/US","221300/US",0,"CommodityDisagg" +"GFE/US","221100/US",1,"CommodityDisagg" +"GFE/US","221200/US",0,"CommodityDisagg" +"GFE/US","221300/US",0,"CommodityDisagg" +"GSLG/US","221100/US",0,"CommodityDisagg" +"GSLG/US","221200/US",0,"CommodityDisagg" +"GSLG/US","221300/US",1,"CommodityDisagg" +"GSLE/US","221100/US",0.485727541327864,"CommodityDisagg" +"GSLE/US","221200/US",0.0557712499694772,"CommodityDisagg" +"GSLE/US","221300/US",0.458501208702659,"CommodityDisagg" +"GFGN/US","221100/US",0,"CommodityDisagg" +"GFGN/US","221200/US",0,"CommodityDisagg" +"GFGN/US","221300/US",1,"CommodityDisagg" +"221100/US","211/US",0,"IndustryDisagg" +"221200/US","211/US",1,"IndustryDisagg" +"221300/US","211/US",0,"IndustryDisagg" +"221100/US","23/US",0.86417221937468,"IndustryDisagg" +"221200/US","23/US",0.13070220399795,"IndustryDisagg" +"221300/US","23/US",0.00512557662737058,"IndustryDisagg" +"221100/US","4A0/US",0.722222222222222,"IndustryDisagg" +"221200/US","4A0/US",0.222222222222222,"IndustryDisagg" +"221300/US","4A0/US",0.0555555555555556,"IndustryDisagg" +"221100/US","486/US",0.281609195402299,"IndustryDisagg" +"221200/US","486/US",0.718390804597701,"IndustryDisagg" +"221300/US","486/US",0,"IndustryDisagg" +"221100/US","5412OP/US",0.811023622047244,"IndustryDisagg" +"221200/US","5412OP/US",0.165354330708661,"IndustryDisagg" +"221300/US","5412OP/US",0.0236220472440945,"IndustryDisagg" +"221100/US","5415/US",0.748815165876777,"IndustryDisagg" +"221200/US","5415/US",0.23696682464455,"IndustryDisagg" +"221300/US","5415/US",0.014218009478673,"IndustryDisagg" +"221100/US","GSLE/US",0,"IndustryDisagg" +"221200/US","GSLE/US",0,"IndustryDisagg" +"221300/US","GSLE/US",1,"IndustryDisagg" diff --git a/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Use.csv b/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Use.csv new file mode 100644 index 00000000..a43b5019 --- /dev/null +++ b/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Use.csv @@ -0,0 +1,397 @@ +"IndustryCode","CommodityCode","PercentUse","Note" +"221100/US","221100/US",0.558191280736159,"IntersectionDisagg" +"221100/US","221200/US",0.0356388595564942,"IntersectionDisagg" +"221100/US","221300/US",0.00365816865288882,"IntersectionDisagg" +"221200/US","221100/US",0.00577010107105144,"IntersectionDisagg" +"221200/US","221200/US",0.000339417710061849,"IntersectionDisagg" +"221200/US","221300/US",0.00109367928797707,"IntersectionDisagg" +"221300/US","221100/US",0.388897269573088,"IntersectionDisagg" +"221300/US","221200/US",0.00241363704932871,"IntersectionDisagg" +"221300/US","221300/US",0.00399758636295067,"IntersectionDisagg" +"221100/US","211/US",0.412882745318653,"IndustryDisagg" +"221200/US","211/US",0.586474322912481,"IndustryDisagg" +"221300/US","211/US",0.000642931768866029,"IndustryDisagg" +"221100/US","212/US",0.985088536812675,"IndustryDisagg" +"221200/US","212/US",9.31966449207829e-05,"IndustryDisagg" +"221300/US","212/US",0.0148182665424045,"IndustryDisagg" +"221100/US","23/US",0.941456126052703,"IndustryDisagg" +"221200/US","23/US",0.0468622656886716,"IndustryDisagg" +"221300/US","23/US",0.0116816082586254,"IndustryDisagg" +"221100/US","315AL/US",1,"IndustryDisagg" +"221200/US","315AL/US",0,"IndustryDisagg" +"221300/US","315AL/US",0,"IndustryDisagg" +"221100/US","322/US",1,"IndustryDisagg" +"221200/US","322/US",0,"IndustryDisagg" +"221300/US","322/US",0,"IndustryDisagg" +"221100/US","323/US",0,"IndustryDisagg" +"221200/US","323/US",1,"IndustryDisagg" +"221300/US","323/US",0,"IndustryDisagg" +"221100/US","324/US",0.989391588745859,"IndustryDisagg" +"221200/US","324/US",0.00109019246089983,"IndustryDisagg" +"221300/US","324/US",0.00951821879324081,"IndustryDisagg" +"221100/US","325/US",0.890488431876607,"IndustryDisagg" +"221200/US","325/US",0.00359897172236504,"IndustryDisagg" +"221300/US","325/US",0.105912596401028,"IndustryDisagg" +"221100/US","326/US",1,"IndustryDisagg" +"221200/US","326/US",0,"IndustryDisagg" +"221300/US","326/US",0,"IndustryDisagg" +"221100/US","327/US",0.849056603773585,"IndustryDisagg" +"221200/US","327/US",0,"IndustryDisagg" +"221300/US","327/US",0.150943396226415,"IndustryDisagg" +"221100/US","331/US",1,"IndustryDisagg" +"221200/US","331/US",0,"IndustryDisagg" +"221300/US","331/US",0,"IndustryDisagg" +"221100/US","332/US",0.290960451977401,"IndustryDisagg" +"221200/US","332/US",0.703389830508475,"IndustryDisagg" +"221300/US","332/US",0.00564971751412429,"IndustryDisagg" +"221100/US","333/US",0.994953742640875,"IndustryDisagg" +"221200/US","333/US",0.00504625735912532,"IndustryDisagg" +"221300/US","333/US",0,"IndustryDisagg" +"221100/US","334/US",0.789473684210526,"IndustryDisagg" +"221200/US","334/US",0.0701754385964912,"IndustryDisagg" +"221300/US","334/US",0.140350877192982,"IndustryDisagg" +"221100/US","335/US",0.866666666666667,"IndustryDisagg" +"221200/US","335/US",0,"IndustryDisagg" +"221300/US","335/US",0.133333333333333,"IndustryDisagg" +"221100/US","3361MV/US",1,"IndustryDisagg" +"221200/US","3361MV/US",0,"IndustryDisagg" +"221300/US","3361MV/US",0,"IndustryDisagg" +"221100/US","42/US",0.784766013939595,"IndustryDisagg" +"221200/US","42/US",0.177729837371391,"IndustryDisagg" +"221300/US","42/US",0.0375041486890143,"IndustryDisagg" +"221100/US","441/US",1,"IndustryDisagg" +"221200/US","441/US",0,"IndustryDisagg" +"221300/US","441/US",0,"IndustryDisagg" +"221100/US","4A0/US",0.997142857142857,"IndustryDisagg" +"221200/US","4A0/US",0.000952380952380952,"IndustryDisagg" +"221300/US","4A0/US",0.0019047619047619,"IndustryDisagg" +"221100/US","445/US",1,"IndustryDisagg" +"221200/US","445/US",0,"IndustryDisagg" +"221300/US","445/US",0,"IndustryDisagg" +"221100/US","452/US",1,"IndustryDisagg" +"221200/US","452/US",0,"IndustryDisagg" +"221300/US","452/US",0,"IndustryDisagg" +"221100/US","481/US",0.768856447688564,"IndustryDisagg" +"221200/US","481/US",0.218978102189781,"IndustryDisagg" +"221300/US","481/US",0.0121654501216545,"IndustryDisagg" +"221100/US","482/US",0.952900232018561,"IndustryDisagg" +"221200/US","482/US",0.0299303944315545,"IndustryDisagg" +"221300/US","482/US",0.017169373549884,"IndustryDisagg" +"221100/US","483/US",0.934472934472934,"IndustryDisagg" +"221200/US","483/US",0.0142450142450142,"IndustryDisagg" +"221300/US","483/US",0.0512820512820513,"IndustryDisagg" +"221100/US","484/US",0.896374622356495,"IndustryDisagg" +"221200/US","484/US",0.00241691842900302,"IndustryDisagg" +"221300/US","484/US",0.101208459214502,"IndustryDisagg" +"221100/US","485/US",0.267195767195767,"IndustryDisagg" +"221200/US","485/US",0.73015873015873,"IndustryDisagg" +"221300/US","485/US",0.00264550264550265,"IndustryDisagg" +"221100/US","486/US",0.42875137773579,"IndustryDisagg" +"221200/US","486/US",0.570303889151315,"IndustryDisagg" +"221300/US","486/US",0.000944733112895607,"IndustryDisagg" +"221100/US","487OS/US",0.885228095582911,"IndustryDisagg" +"221200/US","487OS/US",0.112599565532223,"IndustryDisagg" +"221300/US","487OS/US",0.00217233888486604,"IndustryDisagg" +"221100/US","GFE/US",0.625,"IndustryDisagg" +"221200/US","GFE/US",0.318548387096774,"IndustryDisagg" +"221300/US","GFE/US",0.0564516129032258,"IndustryDisagg" +"221100/US","493/US",0.787003610108303,"IndustryDisagg" +"221200/US","493/US",0.117328519855596,"IndustryDisagg" +"221300/US","493/US",0.0956678700361011,"IndustryDisagg" +"221100/US","511/US",0.393162393162393,"IndustryDisagg" +"221200/US","511/US",0.606837606837607,"IndustryDisagg" +"221300/US","511/US",0,"IndustryDisagg" +"221100/US","513/US",0.859226379201015,"IndustryDisagg" +"221200/US","513/US",0.0792644261255548,"IndustryDisagg" +"221300/US","513/US",0.0615091946734306,"IndustryDisagg" +"221100/US","514/US",0.95013357079252,"IndustryDisagg" +"221200/US","514/US",0.04986642920748,"IndustryDisagg" +"221300/US","514/US",0,"IndustryDisagg" +"221100/US","521CI/US",0.591959658215436,"IndustryDisagg" +"221200/US","521CI/US",0.388009525143578,"IndustryDisagg" +"221300/US","521CI/US",0.0200308166409861,"IndustryDisagg" +"221100/US","523/US",0.655502392344498,"IndustryDisagg" +"221200/US","523/US",0.330143540669856,"IndustryDisagg" +"221300/US","523/US",0.0143540669856459,"IndustryDisagg" +"221100/US","524/US",0.704225352112676,"IndustryDisagg" +"221200/US","524/US",0.123239436619718,"IndustryDisagg" +"221300/US","524/US",0.172535211267606,"IndustryDisagg" +"221100/US","ORE/US",0.647714175950826,"IndustryDisagg" +"221200/US","ORE/US",0.316941990011525,"IndustryDisagg" +"221300/US","ORE/US",0.0353438340376489,"IndustryDisagg" +"221100/US","532RL/US",0.79110251450677,"IndustryDisagg" +"221200/US","532RL/US",0.163442940038685,"IndustryDisagg" +"221300/US","532RL/US",0.0454545454545455,"IndustryDisagg" +"221100/US","5411/US",0.810946358482338,"IndustryDisagg" +"221200/US","5411/US",0.171173135630179,"IndustryDisagg" +"221300/US","5411/US",0.0178805058874836,"IndustryDisagg" +"221100/US","5412OP/US",0.690796277145812,"IndustryDisagg" +"221200/US","5412OP/US",0.234934662028768,"IndustryDisagg" +"221300/US","5412OP/US",0.0742690608254207,"IndustryDisagg" +"221100/US","5415/US",0.519497686715136,"IndustryDisagg" +"221200/US","5415/US",0.434897554527429,"IndustryDisagg" +"221300/US","5415/US",0.0456047587574356,"IndustryDisagg" +"221100/US","55/US",0.842105263157895,"IndustryDisagg" +"221200/US","55/US",0.157894736842105,"IndustryDisagg" +"221300/US","55/US",0,"IndustryDisagg" +"221100/US","561/US",0.856304463809354,"IndustryDisagg" +"221200/US","561/US",0.1364929752801,"IndustryDisagg" +"221300/US","561/US",0.00720256091054597,"IndustryDisagg" +"221100/US","562/US",0.668587896253602,"IndustryDisagg" +"221200/US","562/US",0.239193083573487,"IndustryDisagg" +"221300/US","562/US",0.0922190201729107,"IndustryDisagg" +"221100/US","61/US",0.590717299578059,"IndustryDisagg" +"221200/US","61/US",0.409282700421941,"IndustryDisagg" +"221300/US","61/US",0,"IndustryDisagg" +"221100/US","711AS/US",0.767605633802817,"IndustryDisagg" +"221200/US","711AS/US",0.105633802816901,"IndustryDisagg" +"221300/US","711AS/US",0.126760563380282,"IndustryDisagg" +"221100/US","713/US",0.763157894736842,"IndustryDisagg" +"221200/US","713/US",0.236842105263158,"IndustryDisagg" +"221300/US","713/US",0,"IndustryDisagg" +"221100/US","721/US",0.807737397420867,"IndustryDisagg" +"221200/US","721/US",0.184056271981243,"IndustryDisagg" +"221300/US","721/US",0.0082063305978898,"IndustryDisagg" +"221100/US","722/US",0.873963515754561,"IndustryDisagg" +"221200/US","722/US",0.121614151464898,"IndustryDisagg" +"221300/US","722/US",0.00442233278054174,"IndustryDisagg" +"221100/US","81/US",0.358255451713396,"IndustryDisagg" +"221200/US","81/US",0.389408099688474,"IndustryDisagg" +"221300/US","81/US",0.252336448598131,"IndustryDisagg" +"221100/US","GSLE/US",0.941885187810064,"IndustryDisagg" +"221200/US","GSLE/US",0.00744153082919915,"IndustryDisagg" +"221300/US","GSLE/US",0.0506732813607371,"IndustryDisagg" +"221100/US","Other/US",0.897243107769424,"IndustryDisagg" +"221200/US","Other/US",0.0910609857978279,"IndustryDisagg" +"221300/US","Other/US",0.0116959064327485,"IndustryDisagg" +"221100/US","Used/US",0.815425769059296,"IndustryDisagg" +"221200/US","Used/US",0,"IndustryDisagg" +"221300/US","Used/US",0.184574230940704,"IndustryDisagg" +"221100/US","V001/US",0.780805619266055,"IndustryDisagg" +"221200/US","V001/US",0.161983944954128,"IndustryDisagg" +"221300/US","V001/US",0.0572104357798165,"IndustryDisagg" +"221100/US","V002/US",0.838787426166067,"IndustryDisagg" +"221200/US","V002/US",0.141574444972503,"IndustryDisagg" +"221300/US","V002/US",0.0196381288614298,"IndustryDisagg" +"221100/US","V003/US",0.786933022467147,"IndustryDisagg" +"221200/US","V003/US",0.191248940228911,"IndustryDisagg" +"221300/US","V003/US",0.0218180373039423,"IndustryDisagg" +"111CA/US","221100/US",0.352619589977221,"CommodityDisagg" +"111CA/US","221200/US",0.287243735763098,"CommodityDisagg" +"111CA/US","221300/US",0.360136674259681,"CommodityDisagg" +"113FF/US","221100/US",0.577464788732394,"CommodityDisagg" +"113FF/US","221200/US",0.338028169014085,"CommodityDisagg" +"113FF/US","221300/US",0.0845070422535211,"CommodityDisagg" +"211/US","221100/US",0.545832545832546,"CommodityDisagg" +"211/US","221200/US",0.110754110754111,"CommodityDisagg" +"211/US","221300/US",0.343413343413343,"CommodityDisagg" +"212/US","221100/US",0.894676192671122,"CommodityDisagg" +"212/US","221200/US",0.0988707075362987,"CommodityDisagg" +"212/US","221300/US",0.00645309979257894,"CommodityDisagg" +"213/US","221100/US",0.51980198019802,"CommodityDisagg" +"213/US","221200/US",0.336633663366337,"CommodityDisagg" +"213/US","221300/US",0.143564356435644,"CommodityDisagg" +"23/US","221100/US",0.802140433307231,"CommodityDisagg" +"23/US","221200/US",0.0694335682589402,"CommodityDisagg" +"23/US","221300/US",0.128425998433829,"CommodityDisagg" +"311FT/US","221100/US",0.712621970412339,"CommodityDisagg" +"311FT/US","221200/US",0.22851746931067,"CommodityDisagg" +"311FT/US","221300/US",0.0588605602769909,"CommodityDisagg" +"313TT/US","221100/US",0.832472324723247,"CommodityDisagg" +"313TT/US","221200/US",0.136531365313653,"CommodityDisagg" +"313TT/US","221300/US",0.0309963099630996,"CommodityDisagg" +"315AL/US","221100/US",0.805970149253731,"CommodityDisagg" +"315AL/US","221200/US",0.119402985074627,"CommodityDisagg" +"315AL/US","221300/US",0.0746268656716418,"CommodityDisagg" +"321/US","221100/US",0.881005586592179,"CommodityDisagg" +"321/US","221200/US",0.0988826815642458,"CommodityDisagg" +"321/US","221300/US",0.0201117318435754,"CommodityDisagg" +"322/US","221100/US",0.738459063857166,"CommodityDisagg" +"322/US","221200/US",0.240630529194145,"CommodityDisagg" +"322/US","221300/US",0.0209104069486891,"CommodityDisagg" +"323/US","221100/US",0.923022598870056,"CommodityDisagg" +"323/US","221200/US",0.0529661016949153,"CommodityDisagg" +"323/US","221300/US",0.0240112994350282,"CommodityDisagg" +"324/US","221100/US",0.610388000495847,"CommodityDisagg" +"324/US","221200/US",0.357010040907401,"CommodityDisagg" +"324/US","221300/US",0.0326019585967522,"CommodityDisagg" +"325/US","221100/US",0.633123814041746,"CommodityDisagg" +"325/US","221200/US",0.310661764705882,"CommodityDisagg" +"325/US","221300/US",0.0562144212523719,"CommodityDisagg" +"326/US","221100/US",0.909072539907052,"CommodityDisagg" +"326/US","221200/US",0.0703172358052132,"CommodityDisagg" +"326/US","221300/US",0.0206102242877349,"CommodityDisagg" +"327/US","221100/US",0.712587790383576,"CommodityDisagg" +"327/US","221200/US",0.262020529443544,"CommodityDisagg" +"327/US","221300/US",0.0253916801728795,"CommodityDisagg" +"331/US","221100/US",0.85470719051149,"CommodityDisagg" +"331/US","221200/US",0.127131208302446,"CommodityDisagg" +"331/US","221300/US",0.0181616011860638,"CommodityDisagg" +"332/US","221100/US",0.787292188567524,"CommodityDisagg" +"332/US","221200/US",0.178091550899567,"CommodityDisagg" +"332/US","221300/US",0.0346162605329082,"CommodityDisagg" +"333/US","221100/US",0.811825434068512,"CommodityDisagg" +"333/US","221200/US",0.142186766776161,"CommodityDisagg" +"333/US","221300/US",0.0459877991553261,"CommodityDisagg" +"334/US","221100/US",0.886104783599089,"CommodityDisagg" +"334/US","221200/US",0.067577828397874,"CommodityDisagg" +"334/US","221300/US",0.0463173880030372,"CommodityDisagg" +"335/US","221100/US",0.806889352818372,"CommodityDisagg" +"335/US","221200/US",0.154488517745303,"CommodityDisagg" +"335/US","221300/US",0.0386221294363257,"CommodityDisagg" +"3361MV/US","221100/US",0.781538461538462,"CommodityDisagg" +"3361MV/US","221200/US",0.121923076923077,"CommodityDisagg" +"3361MV/US","221300/US",0.0965384615384615,"CommodityDisagg" +"3364OT/US","221100/US",0.872968980797637,"CommodityDisagg" +"3364OT/US","221200/US",0.0878877400295421,"CommodityDisagg" +"3364OT/US","221300/US",0.0391432791728213,"CommodityDisagg" +"337/US","221100/US",0.800327332242226,"CommodityDisagg" +"337/US","221200/US",0.153846153846154,"CommodityDisagg" +"337/US","221300/US",0.0458265139116203,"CommodityDisagg" +"339/US","221100/US",0.828774062816616,"CommodityDisagg" +"339/US","221200/US",0.115501519756839,"CommodityDisagg" +"339/US","221300/US",0.0557244174265451,"CommodityDisagg" +"42/US","221100/US",0.943946471405126,"CommodityDisagg" +"42/US","221200/US",0.0201363464209065,"CommodityDisagg" +"42/US","221300/US",0.0359171821739679,"CommodityDisagg" +"441/US","221100/US",0.904614191547111,"CommodityDisagg" +"441/US","221200/US",0.0473051570376115,"CommodityDisagg" +"441/US","221300/US",0.0480806514152772,"CommodityDisagg" +"4A0/US","221100/US",0.956473297184877,"CommodityDisagg" +"4A0/US","221200/US",0.0110673698284186,"CommodityDisagg" +"4A0/US","221300/US",0.0324593329867043,"CommodityDisagg" +"445/US","221100/US",0.973806405524467,"CommodityDisagg" +"445/US","221200/US",0.00619121323967139,"CommodityDisagg" +"445/US","221300/US",0.0200023812358614,"CommodityDisagg" +"452/US","221100/US",0.979179424372321,"CommodityDisagg" +"452/US","221200/US",0.00489895897121862,"CommodityDisagg" +"452/US","221300/US",0.0159216166564605,"CommodityDisagg" +"481/US","221100/US",0.57843137254902,"CommodityDisagg" +"481/US","221200/US",0.411764705882353,"CommodityDisagg" +"481/US","221300/US",0.00980392156862745,"CommodityDisagg" +"482/US","221100/US",0.306122448979592,"CommodityDisagg" +"482/US","221200/US",0.561224489795918,"CommodityDisagg" +"482/US","221300/US",0.13265306122449,"CommodityDisagg" +"483/US","221100/US",0.375,"CommodityDisagg" +"483/US","221200/US",0.590909090909091,"CommodityDisagg" +"483/US","221300/US",0.0340909090909091,"CommodityDisagg" +"484/US","221100/US",0.908296943231441,"CommodityDisagg" +"484/US","221200/US",0.0655021834061135,"CommodityDisagg" +"484/US","221300/US",0.0262008733624454,"CommodityDisagg" +"485/US","221100/US",0.694444444444444,"CommodityDisagg" +"485/US","221200/US",0.166666666666667,"CommodityDisagg" +"485/US","221300/US",0.138888888888889,"CommodityDisagg" +"486/US","221100/US",0.481265611990008,"CommodityDisagg" +"486/US","221200/US",0.513738551207327,"CommodityDisagg" +"486/US","221300/US",0.00499583680266445,"CommodityDisagg" +"487OS/US","221100/US",0.728855721393035,"CommodityDisagg" +"487OS/US","221200/US",0.232587064676617,"CommodityDisagg" +"487OS/US","221300/US",0.0385572139303483,"CommodityDisagg" +"GFE/US","221100/US",0.516831683168317,"CommodityDisagg" +"GFE/US","221200/US",0.310891089108911,"CommodityDisagg" +"GFE/US","221300/US",0.172277227722772,"CommodityDisagg" +"493/US","221100/US",0.990376638460262,"CommodityDisagg" +"493/US","221200/US",0.0037332005973121,"CommodityDisagg" +"493/US","221300/US",0.00589016094242575,"CommodityDisagg" +"511/US","221100/US",0.914444444444444,"CommodityDisagg" +"511/US","221200/US",0.0355555555555556,"CommodityDisagg" +"511/US","221300/US",0.05,"CommodityDisagg" +"512/US","221100/US",0.958868894601542,"CommodityDisagg" +"512/US","221200/US",0.0205655526992288,"CommodityDisagg" +"512/US","221300/US",0.0205655526992288,"CommodityDisagg" +"513/US","221100/US",0.771506038945033,"CommodityDisagg" +"513/US","221200/US",0.00566921370470791,"CommodityDisagg" +"513/US","221300/US",0.222824747350259,"CommodityDisagg" +"514/US","221100/US",0.974603174603175,"CommodityDisagg" +"514/US","221200/US",0.0019047619047619,"CommodityDisagg" +"514/US","221300/US",0.0234920634920635,"CommodityDisagg" +"521CI/US","221100/US",0.849512505298855,"CommodityDisagg" +"521CI/US","221200/US",0.112759643916914,"CommodityDisagg" +"521CI/US","221300/US",0.0377278507842306,"CommodityDisagg" +"523/US","221100/US",0.951639344262295,"CommodityDisagg" +"523/US","221200/US",0.0188524590163934,"CommodityDisagg" +"523/US","221300/US",0.0295081967213115,"CommodityDisagg" +"524/US","221100/US",0.833819241982507,"CommodityDisagg" +"524/US","221200/US",0.0845481049562682,"CommodityDisagg" +"524/US","221300/US",0.0816326530612245,"CommodityDisagg" +"525/US","221100/US",0.00492914356130622,"CommodityDisagg" +"525/US","221200/US",0.634011090573013,"CommodityDisagg" +"525/US","221300/US",0.361059765865681,"CommodityDisagg" +"HS/US","221100/US",1,"CommodityDisagg" +"HS/US","221200/US",0,"CommodityDisagg" +"HS/US","221300/US",0,"CommodityDisagg" +"ORE/US","221100/US",0.794424843679044,"CommodityDisagg" +"ORE/US","221200/US",0.201156251091627,"CommodityDisagg" +"ORE/US","221300/US",0.00441890522932896,"CommodityDisagg" +"532RL/US","221100/US",0.432680538555692,"CommodityDisagg" +"532RL/US","221200/US",0.531211750305998,"CommodityDisagg" +"532RL/US","221300/US",0.0361077111383109,"CommodityDisagg" +"5411/US","221100/US",0.934782608695652,"CommodityDisagg" +"5411/US","221200/US",0.00668896321070234,"CommodityDisagg" +"5411/US","221300/US",0.0585284280936455,"CommodityDisagg" +"5412OP/US","221100/US",0.940514075887393,"CommodityDisagg" +"5412OP/US","221200/US",0.0186046511627907,"CommodityDisagg" +"5412OP/US","221300/US",0.0408812729498164,"CommodityDisagg" +"5415/US","221100/US",0.935593220338983,"CommodityDisagg" +"5415/US","221200/US",0.0135593220338983,"CommodityDisagg" +"5415/US","221300/US",0.0508474576271186,"CommodityDisagg" +"55/US","221100/US",0.970925879710507,"CommodityDisagg" +"55/US","221200/US",0.0232093835787372,"CommodityDisagg" +"55/US","221300/US",0.00586473671075618,"CommodityDisagg" +"561/US","221100/US",0.74942316566682,"CommodityDisagg" +"561/US","221200/US",0.0544531610521458,"CommodityDisagg" +"561/US","221300/US",0.196123673281034,"CommodityDisagg" +"562/US","221100/US",0.751012145748988,"CommodityDisagg" +"562/US","221200/US",0.119433198380567,"CommodityDisagg" +"562/US","221300/US",0.129554655870445,"CommodityDisagg" +"61/US","221100/US",0.480550484482516,"CommodityDisagg" +"61/US","221200/US",0.243083836539812,"CommodityDisagg" +"61/US","221300/US",0.276365678977672,"CommodityDisagg" +"621/US","221100/US",0.916407706650093,"CommodityDisagg" +"621/US","221200/US",0.0295214418893723,"CommodityDisagg" +"621/US","221300/US",0.0540708514605345,"CommodityDisagg" +"622/US","221100/US",0.865446478092069,"CommodityDisagg" +"622/US","221200/US",0.070216306156406,"CommodityDisagg" +"622/US","221300/US",0.0643372157515252,"CommodityDisagg" +"623/US","221100/US",0.890833333333333,"CommodityDisagg" +"623/US","221200/US",0.0383333333333333,"CommodityDisagg" +"623/US","221300/US",0.0708333333333333,"CommodityDisagg" +"624/US","221100/US",0.886942675159236,"CommodityDisagg" +"624/US","221200/US",0.0501592356687898,"CommodityDisagg" +"624/US","221300/US",0.0628980891719745,"CommodityDisagg" +"711AS/US","221100/US",0.928251121076233,"CommodityDisagg" +"711AS/US","221200/US",0.0269058295964126,"CommodityDisagg" +"711AS/US","221300/US",0.0448430493273543,"CommodityDisagg" +"713/US","221100/US",0.890376569037657,"CommodityDisagg" +"713/US","221200/US",0.0338912133891213,"CommodityDisagg" +"713/US","221300/US",0.0757322175732218,"CommodityDisagg" +"721/US","221100/US",0.897150799166088,"CommodityDisagg" +"721/US","221200/US",0.0363099374565671,"CommodityDisagg" +"721/US","221300/US",0.0665392633773454,"CommodityDisagg" +"722/US","221100/US",0.92534289276808,"CommodityDisagg" +"722/US","221200/US",0.0270157938487116,"CommodityDisagg" +"722/US","221300/US",0.0476413133832086,"CommodityDisagg" +"81/US","221100/US",0.764238711141366,"CommodityDisagg" +"81/US","221200/US",0.113002042205582,"CommodityDisagg" +"81/US","221300/US",0.122759246653052,"CommodityDisagg" +"GSLG/US","221100/US",0.255670456493173,"CommodityDisagg" +"GSLG/US","221200/US",0.452893789636062,"CommodityDisagg" +"GSLG/US","221300/US",0.291435753870765,"CommodityDisagg" +"GSLE/US","221100/US",0.390254237288136,"CommodityDisagg" +"GSLE/US","221200/US",0.215254237288136,"CommodityDisagg" +"GSLE/US","221300/US",0.394491525423729,"CommodityDisagg" +"GFGD/US","221100/US",0.418676019289785,"CommodityDisagg" +"GFGD/US","221200/US",0.306882946076282,"CommodityDisagg" +"GFGD/US","221300/US",0.274441034633932,"CommodityDisagg" +"GFGN/US","221100/US",0.223946784922395,"CommodityDisagg" +"GFGN/US","221200/US",0.404656319290466,"CommodityDisagg" +"GFGN/US","221300/US",0.37139689578714,"CommodityDisagg" +"F010/US","221100/US",0.673479322749926,"CommodityDisagg" +"F010/US","221200/US",0.182819565002145,"CommodityDisagg" +"F010/US","221300/US",0.143701112247929,"CommodityDisagg" +"F040/US","221100/US",0.691597414589104,"CommodityDisagg" +"F040/US","221200/US",0.12927054478301,"CommodityDisagg" +"F040/US","221300/US",0.179132040627886,"CommodityDisagg" +"F050/US","221100/US",1,"CommodityDisagg" +"F050/US","221200/US",0,"CommodityDisagg" +"F050/US","221300/US",0,"CommodityDisagg" diff --git a/inst/extdata/disaggspecs/UtilityDisaggregation_Sectors.csv b/inst/extdata/disaggspecs/UtilityDisaggregation_Sectors.csv new file mode 100644 index 00000000..38ce652a --- /dev/null +++ b/inst/extdata/disaggspecs/UtilityDisaggregation_Sectors.csv @@ -0,0 +1,15 @@ +NAICS_2012_Code,USEEIO_Code,USEEIO_Name,Category,Subcategory,Description +221111,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." +221112,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." +221113,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." +221114,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." +221115,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." +221116,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." +221117,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." +221118,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." +221121,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." +221122,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." +221210,221200/US,Natural gas distribution,22: Utilities,2212: Natural Gas Distribution,"BEA Code & Name is '221200:Natural gas distribution'. This industry comprises: (1) establishments primarily engaged in operating gas distribution systems (e.g., mains, meters); (2) establishments known as gas marketers that buy gas from the well and sell it to a distribution system; (3) establishments known as gas brokers or agents that arrange the sale of gas over gas distribution systems operated by others; and (4) establishments primarily engaged in transmitting and distributing gas to final consumers." +221310,221300/US,"Water, sewage and other systems",22: Utilities,"2213: Water, Sewage and Other Systems","BEA Code & Name is '221300:Water, sewage and other systems'. This industry comprises establishments primarily engaged in operating water treatment plants and/or operating water supply systems. The water supply system may include pumping stations, aqueducts, and/or distribution mains. The water may be used for drinking, irrigation, or other uses." +221320,221300/US,"Water, sewage and other systems",22: Utilities,"2213: Water, Sewage and Other Systems","BEA Code & Name is '221300:Water, sewage and other systems'. This industry comprises establishments primarily engaged in operating water treatment plants and/or operating water supply systems. The water supply system may include pumping stations, aqueducts, and/or distribution mains. The water may be used for drinking, irrigation, or other uses." +221330,221300/US,"Water, sewage and other systems",22: Utilities,"2213: Water, Sewage and Other Systems","BEA Code & Name is '221300:Water, sewage and other systems'. This industry comprises establishments primarily engaged in operating water treatment plants and/or operating water supply systems. The water supply system may include pumping stations, aqueducts, and/or distribution mains. The water may be used for drinking, irrigation, or other uses." From 8fa376909aa8e645a3b1ff75e65eb5c9a9de96de Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 3 Jun 2022 20:58:54 -0400 Subject: [PATCH 005/121] added a template utility disaggregation yml file --- inst/extdata/disaggspecs/UtilityDisaggregation.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 inst/extdata/disaggspecs/UtilityDisaggregation.yml diff --git a/inst/extdata/disaggspecs/UtilityDisaggregation.yml b/inst/extdata/disaggspecs/UtilityDisaggregation.yml new file mode 100644 index 00000000..efcdcb65 --- /dev/null +++ b/inst/extdata/disaggspecs/UtilityDisaggregation.yml @@ -0,0 +1,9 @@ +Disaggregation: + 22/US: + OriginalSectorCode: "22/US" + OrignalSectorName: "Utilities" + DisaggregationType: "Userdefined" + SectorFile: UtilityDisaggregation_Sectors.csv + MakeFile: UtilityDisaggregationDetail_Make.csv + UseFile: UtilityDisaggregationDetail_Use.csv + EnvFile: UtilityDisaggregation_Env.csv From f900401a416004f26676b318715d80ded82b4e06 Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 3 Jun 2022 21:15:20 -0400 Subject: [PATCH 006/121] added code block where calls to disaggregation functions will happen within assembleTwoRegionIO.r --- R/BuildModel.R | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index bba469ba..28d2035d 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -513,11 +513,11 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, #' @param year A numeric value between 2007 and 2017 specifying the year of interest. #' @param iolevel BEA sector level of detail, currently can only be "Summary", #' theoretically can be "Detail", or "Sector" in future versions. -#' @param disagg TEMPORARY boolean to trigger disaggregation. +#' @param disaggState TEMPORARY boolean to trigger disaggregation. #' @return A list of two-region make, use, domestic use, and Use tables #' as well as commodity and industry outputs by state. #' @export -assembleTwoRegionIO <- function(year, iolevel, disagg=FALSE) { +assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { startLogging() # Define industries, commodities, value added rows, final demand columns, # international trade adjustment column, and non-import columns @@ -547,8 +547,21 @@ assembleTwoRegionIO <- function(year, iolevel, disagg=FALSE) { # State_CommodityOutput_ls, State_IndustryOutput_ls, State_Make_ls, State_Use_ls # US_Make, US_DomesticUse # commodities, industries + temp <- 1 # for debugging + if(disaggState == TRUE){ + + configfile <- "UtilityDisaggregation.yml" + disaggConfigpath <- system.file(paste0("extdata/disaggspecs/"), configfile, package = "stateior") + # Disaggregate each state + for (state in sort(c(state.name, "District of Columbia"))) { + + + } + temp <- 2 # for debugging, end of code for disagg + # Assemble two-region IO tables + + }# End of Disagg if - # Assemble two-region IO tables TwoRegionIO <- list() for (state in sort(c(state.name, "District of Columbia"))) { ## Two-region Make From bda407087dae3155c44b368555f2e0e5e75357f8 Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 3 Jun 2022 21:16:03 -0400 Subject: [PATCH 007/121] Organization edits to StateDisaggFunctions.R --- R/StateDisaggFunctions.R | 74 +++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 32 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index aab8b258..959f13c9 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -1,40 +1,50 @@ -# Need to insert following code in appropriate script": +#' # Need to insert following code in appropriate script": +#' +#' # # Check for disaggregation +#' # model <- getStateDisaggregationSpecs(model, configpaths) +#' # if(length(model$DisaggregationSpecs)!=0){ +#' # model <- disaggregateModel(model) +#' # } +#' +#' +#' ## TODO: Note that this is an outline of the expected sequence of steps to load the data and disaggregation specs into R. Need to incorporate in +#' ## correct places within stateior code +#' +#' #' Obtain disaggregation specs for each state and year from input files. +#' #' Assumes buildStateSupplyModel and buildStateUseModel have been called and the data generated for each state. +#' #' @param model An stateior 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. +#' stateDisaggregationSpecs <- function(model, configpaths){ +#' +#' # Get State list +#' states <- unique(StateUS_VA_Ratio$GeoName) # Taken from buildStateSupplyModel function. Unsure if this variable will be globally available. +#' stateModel <- list() +#' +#' for (year in 2012:2017) { +#' +#' for(state in states){ +#' stateMode$Use <- loadStateIODataFile(paste0("State_Summary_Use_", +#' year))[[state]] # Need to very parameters and adequacy of function call +#' stateModel$Make <- loadStateIODataFile(paste0("State_Summary_Use_", +#' year))[[state]] # Need to very parameters and adequacy of function call +#' # Check for disaggregation +#' stateModel <- getDisaggregationSpecs(stateModel, configpaths) +#' +#' } +#' +#' +#' }# end of for year loop +#' +#' } -# # Check for disaggregation -# model <- getStateDisaggregationSpecs(model, configpaths) -# if(length(model$DisaggregationSpecs)!=0){ -# model <- disaggregateModel(model) -# } - -## TODO: Note that this is an outline of the expected sequence of steps to load the data and disaggregation specs into R. Need to incorporate in -## correct places within stateior code - -#' Obtain disaggregation specs for each state and year from input files. -#' Assumes buildStateSupplyModel and buildStateUseModel have been called and the data generated for each state. #' @param model An stateior 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. -stateDisaggregationSpecs <- function(model, configpaths){ - - # Get State list - states <- unique(StateUS_VA_Ratio$GeoName) # Taken from buildStateSupplyModel function. Unsure if this variable will be globally available. - stateModel <- list() - - for (year in 2012:2017) { - - for(state in states){ - stateMode$Use <- loadStateIODataFile(paste0("State_Summary_Use_", - year))[[state]] # Need to very parameters and adequacy of function call - stateModel$Make <- loadStateIODataFile(paste0("State_Summary_Use_", - year))[[state]] # Need to very parameters and adequacy of function call - # Check for disaggregation - stateModel <- getDisaggregationSpecs(stateModel, configpaths) - - } - - - }# end of for year loop +getStateDisaggregationSpecs <- function(model, configpaths){ + #TODO: Need to make this work with calls to useeior:: } \ No newline at end of file From 312a98e0c12b3c82ca5379045e3cfeb2cbf03606 Mon Sep 17 00:00:00 2001 From: jvendries Date: Sat, 4 Jun 2022 19:28:10 -0400 Subject: [PATCH 008/121] added functionality to start disaggregating the state make tables --- R/BuildModel.R | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 28d2035d..85b8690e 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -550,18 +550,39 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { temp <- 1 # for debugging if(disaggState == TRUE){ - configfile <- "UtilityDisaggregation.yml" - disaggConfigpath <- system.file(paste0("extdata/disaggspecs/"), configfile, package = "stateior") + # Functions that need to be exported from useeior package? + getDisaggregationSpecs <- utils::getFromNamespace("getDisaggregationSpecs","useeior") + # Disaggregate each state for (state in sort(c(state.name, "District of Columbia"))) { + + # Initialize model for every state + model <- list() + configfile <- "UtilityDisaggregation" + disaggConfigpath <- system.file(paste0("extdata/disaggspecs/"), paste0(configfile,".yml"), package = "stateior") + + model$specs$DisaggregationSpecs <- configfile + + #model <- getStateDisaggregationSpecs(model, disaggConfigpath) + model <- getDisaggregationSpecs(model, disaggConfigpath) + if(length(model$DisaggregationSpecs)!=0){ + + model$MakeTransactions <- State_Make_ls[[state]] + model$UseTransactions <- State_Use_ls[[state]] + #assign other model objects to disaggregate... + + model <- disaggregateStateModel(model, state) + } + + temp <- 2 # for debugging, end of for loop } - temp <- 2 # for debugging, end of code for disagg - # Assemble two-region IO tables - - }# End of Disagg if + + temp <- 3 # for debugging, end of code for disagg + }# End of Disagg } + # Assemble two-region IO tables TwoRegionIO <- list() for (state in sort(c(state.name, "District of Columbia"))) { ## Two-region Make From 49a8e64e61e8bb49f44f4b3ac632b3ab2c41d87e Mon Sep 17 00:00:00 2001 From: jvendries Date: Sat, 4 Jun 2022 19:28:35 -0400 Subject: [PATCH 009/121] added functionality to start disaggregating the state make tables in the stateDisaggFunctions.R script --- R/StateDisaggFunctions.R | 67 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 6 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 959f13c9..e3d8670a 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -40,11 +40,66 @@ #' } -#' @param model An stateior 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. -getStateDisaggregationSpecs <- function(model, configpaths){ - #TODO: Need to make this work with calls to useeior:: + +#' 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 used. +#' @return A list of model specifications. +getConfigurationStateior <- function(configname, configtype, configpaths = NULL) { + configfile <- paste0(configname, ".yml") + if (is.null(configpaths)) { + configpath <- system.file(paste0("extdata/", configtype, "specs/"), configfile, package = "stateior") + } 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) +} + + +#' @param model An stateior model object with model specs and specific IO tables loaded +#' @param state A string value that indicates the state model being disaggregated +#' @return A stateior model with the disaggregateed objects +disaggregateStateModel <- function(model, state){ + + temp <- 1 + # Need to export all disagg functions from useeior package? + disaggregateMakeTable <- utils::getFromNamespace("disaggregateMakeTable","useeior") + + + + for (disagg in model$DisaggregationSpecs){ + # TODO: add call to other disaggregation functions + + + # Format stateior model objects to conform to useeior disaggregation formats + # Format for MakeFileDF + oldIndIndeces <- which(!(disagg$MakeFileDF$IndustryCode %in% disagg$DisaggregatedSectorCodes)) # Find Ind indeces for MakeFileDF which do not contain new sectors + disagg$MakeFileDF$IndustryCode[oldIndIndeces] <- gsub("\\/.*", "",disagg$MakeFileDF$IndustryCode[oldIndIndeces]) # remove the /US from oldIndIndces + disagg$MakeFileDF$IndustryCode[oldIndIndeces] <- paste0(state,".",disagg$MakeFileDF$IndustryCode[oldIndIndeces]) # add state name to oldIndIndeces sectors + + #same as above, but for commodity codes in the make table + oldComIndeces <- which(!(disagg$MakeFileDF$CommodityCode %in% disagg$DisaggregatedSectorCodes)) + disagg$MakeFileDF$CommodityCode[oldComIndeces] <- gsub("\\/.*", "",disagg$MakeFileDF$CommodityCode[oldComIndeces]) # remove the /US from oldIndIndces + + # Format for UseFileDF... + + model$MakeTransactions <- disaggregateMakeTable(model, disagg) + + } + + + + + temp <- 2 + + return(model) + } \ No newline at end of file From bf6c5fd57f585a2475c654c76161bb650c5f4e16 Mon Sep 17 00:00:00 2001 From: jvendries Date: Sat, 4 Jun 2022 19:29:22 -0400 Subject: [PATCH 010/121] edited the names of the Make, Use, and Env file included in this file to match the actual names of the files included in the disaggspecs folder --- inst/extdata/disaggspecs/UtilityDisaggregation.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inst/extdata/disaggspecs/UtilityDisaggregation.yml b/inst/extdata/disaggspecs/UtilityDisaggregation.yml index efcdcb65..1e92939f 100644 --- a/inst/extdata/disaggspecs/UtilityDisaggregation.yml +++ b/inst/extdata/disaggspecs/UtilityDisaggregation.yml @@ -4,6 +4,6 @@ Disaggregation: OrignalSectorName: "Utilities" DisaggregationType: "Userdefined" SectorFile: UtilityDisaggregation_Sectors.csv - MakeFile: UtilityDisaggregationDetail_Make.csv - UseFile: UtilityDisaggregationDetail_Use.csv - EnvFile: UtilityDisaggregation_Env.csv + MakeFile: UtilityDisaggregationSummary_Make.csv + UseFile: UtilityDisaggregationSummary_Use.csv + EnvFile: UtilityDisaggregationSummary_Env.csv From 3228cca6698ca77c0a529e438488d09b4473ccd6 Mon Sep 17 00:00:00 2001 From: jvendries Date: Sat, 4 Jun 2022 19:32:30 -0400 Subject: [PATCH 011/121] added note regarding formatting error currently being worked on that needs to be fixed for using useeior Disaggregation functions in stateior --- R/StateDisaggFunctions.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index e3d8670a..75aeb79b 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -91,6 +91,8 @@ disaggregateStateModel <- function(model, state){ # Format for UseFileDF... model$MakeTransactions <- disaggregateMakeTable(model, disagg) + # TODO: Fix error in above function call: there is a formatting error due to the abscence of /US in the Make table row/column names. + # Happens in the applyAllocation function in the useeior DisaggregateFunctions.R script. } From 42b0305df22e5bb2fdaa82385fc2ed29b187c86b Mon Sep 17 00:00:00 2001 From: jvendries Date: Sun, 5 Jun 2022 10:47:41 -0400 Subject: [PATCH 012/121] formatted the state make tables to conform with useeior disaggregation functions --- R/StateDisaggFunctions.R | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 75aeb79b..c1c0f3f7 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -78,22 +78,40 @@ disaggregateStateModel <- function(model, state){ # TODO: add call to other disaggregation functions - # Format stateior model objects to conform to useeior disaggregation formats - # Format for MakeFileDF - oldIndIndeces <- which(!(disagg$MakeFileDF$IndustryCode %in% disagg$DisaggregatedSectorCodes)) # Find Ind indeces for MakeFileDF which do not contain new sectors - disagg$MakeFileDF$IndustryCode[oldIndIndeces] <- gsub("\\/.*", "",disagg$MakeFileDF$IndustryCode[oldIndIndeces]) # remove the /US from oldIndIndces - disagg$MakeFileDF$IndustryCode[oldIndIndeces] <- paste0(state,".",disagg$MakeFileDF$IndustryCode[oldIndIndeces]) # add state name to oldIndIndeces sectors + # # Format stateior model objects to conform to useeior disaggregation formats + # # Format for MakeFileDF + # oldIndIndeces <- which(!(disagg$MakeFileDF$IndustryCode %in% disagg$DisaggregatedSectorCodes)) # Find Ind indeces for MakeFileDF which do not contain new sectors + # disagg$MakeFileDF$IndustryCode[oldIndIndeces] <- gsub("\\/.*", "",disagg$MakeFileDF$IndustryCode[oldIndIndeces]) # remove the /US from oldIndIndces + # disagg$MakeFileDF$IndustryCode[oldIndIndeces] <- paste0(state,".",disagg$MakeFileDF$IndustryCode[oldIndIndeces]) # add state name to oldIndIndeces sectors + # + # #same as above, but for commodity codes in the make table + # oldComIndeces <- which(!(disagg$MakeFileDF$CommodityCode %in% disagg$DisaggregatedSectorCodes)) + # disagg$MakeFileDF$CommodityCode[oldComIndeces] <- gsub("\\/.*", "",disagg$MakeFileDF$CommodityCode[oldComIndeces]) # remove the /US from oldIndIndces + # + # # Format for UseFileDF... - #same as above, but for commodity codes in the make table - oldComIndeces <- which(!(disagg$MakeFileDF$CommodityCode %in% disagg$DisaggregatedSectorCodes)) - disagg$MakeFileDF$CommodityCode[oldComIndeces] <- gsub("\\/.*", "",disagg$MakeFileDF$CommodityCode[oldComIndeces]) # remove the /US from oldIndIndces + logging::loginfo(paste0("Disaggregating ", disagg$OrignalSectorName," for ", state)) + + # For make rows + rowLabels <- rownames(model$MakeTransactions) + rowLabels <- gsub(".*\\.", "", rowLabels) + rowLabels <- paste0(rowLabels, "/US") + + # For make cols + colLabels <- colnames(model$MakeTransactions) + colLabels <- paste0(colLabels, "/US") + + # Replace names with new labels + rownames(model$MakeTransactions) <- rowLabels + colnames(model$MakeTransactions) <- colLabels - # Format for UseFileDF... model$MakeTransactions <- disaggregateMakeTable(model, disagg) # TODO: Fix error in above function call: there is a formatting error due to the abscence of /US in the Make table row/column names. # Happens in the applyAllocation function in the useeior DisaggregateFunctions.R script. + temp <- 1 + } From a1f1efe09ba5e44604595e1177d520e96e050742 Mon Sep 17 00:00:00 2001 From: jvendries Date: Sun, 5 Jun 2022 10:48:47 -0400 Subject: [PATCH 013/121] removed old comments --- R/StateDisaggFunctions.R | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index c1c0f3f7..34135efe 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -77,21 +77,9 @@ disaggregateStateModel <- function(model, state){ for (disagg in model$DisaggregationSpecs){ # TODO: add call to other disaggregation functions - - # # Format stateior model objects to conform to useeior disaggregation formats - # # Format for MakeFileDF - # oldIndIndeces <- which(!(disagg$MakeFileDF$IndustryCode %in% disagg$DisaggregatedSectorCodes)) # Find Ind indeces for MakeFileDF which do not contain new sectors - # disagg$MakeFileDF$IndustryCode[oldIndIndeces] <- gsub("\\/.*", "",disagg$MakeFileDF$IndustryCode[oldIndIndeces]) # remove the /US from oldIndIndces - # disagg$MakeFileDF$IndustryCode[oldIndIndeces] <- paste0(state,".",disagg$MakeFileDF$IndustryCode[oldIndIndeces]) # add state name to oldIndIndeces sectors - # - # #same as above, but for commodity codes in the make table - # oldComIndeces <- which(!(disagg$MakeFileDF$CommodityCode %in% disagg$DisaggregatedSectorCodes)) - # disagg$MakeFileDF$CommodityCode[oldComIndeces] <- gsub("\\/.*", "",disagg$MakeFileDF$CommodityCode[oldComIndeces]) # remove the /US from oldIndIndces - # - # # Format for UseFileDF... - logging::loginfo(paste0("Disaggregating ", disagg$OrignalSectorName," for ", state)) + # Formatting Make row and column names according to useeior disaggregation formats # For make rows rowLabels <- rownames(model$MakeTransactions) rowLabels <- gsub(".*\\.", "", rowLabels) @@ -107,8 +95,6 @@ disaggregateStateModel <- function(model, state){ model$MakeTransactions <- disaggregateMakeTable(model, disagg) - # TODO: Fix error in above function call: there is a formatting error due to the abscence of /US in the Make table row/column names. - # Happens in the applyAllocation function in the useeior DisaggregateFunctions.R script. temp <- 1 From e2f72d9a84681a8efd57bde4d76dd16ed0421d5d Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 10 Jun 2022 14:47:13 -0400 Subject: [PATCH 014/121] removed old comments from stateDisaggFunctions.R Moved get disagg specs for state models from BuildModel.R to StateDisaggFunctions.R --- R/BuildModel.R | 13 ++----- R/StateDisaggFunctions.R | 76 ++++++++-------------------------------- 2 files changed, 17 insertions(+), 72 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 85b8690e..9f70a081 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -550,21 +550,11 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { temp <- 1 # for debugging if(disaggState == TRUE){ - # Functions that need to be exported from useeior package? - getDisaggregationSpecs <- utils::getFromNamespace("getDisaggregationSpecs","useeior") - # Disaggregate each state for (state in sort(c(state.name, "District of Columbia"))) { # Initialize model for every state - model <- list() - configfile <- "UtilityDisaggregation" - disaggConfigpath <- system.file(paste0("extdata/disaggspecs/"), paste0(configfile,".yml"), package = "stateior") - - model$specs$DisaggregationSpecs <- configfile - - #model <- getStateDisaggregationSpecs(model, disaggConfigpath) - model <- getDisaggregationSpecs(model, disaggConfigpath) + model <- getStateModelDisaggSpecs() if(length(model$DisaggregationSpecs)!=0){ @@ -581,6 +571,7 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { temp <- 3 # for debugging, end of code for disagg }# End of Disagg } + temp <- 4 # Assemble two-region IO tables TwoRegionIO <- list() diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 34135efe..d2979889 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -1,65 +1,18 @@ -#' # Need to insert following code in appropriate script": -#' -#' # # Check for disaggregation -#' # model <- getStateDisaggregationSpecs(model, configpaths) -#' # if(length(model$DisaggregationSpecs)!=0){ -#' # model <- disaggregateModel(model) -#' # } -#' -#' -#' ## TODO: Note that this is an outline of the expected sequence of steps to load the data and disaggregation specs into R. Need to incorporate in -#' ## correct places within stateior code -#' -#' #' Obtain disaggregation specs for each state and year from input files. -#' #' Assumes buildStateSupplyModel and buildStateUseModel have been called and the data generated for each state. -#' #' @param model An stateior 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. -#' stateDisaggregationSpecs <- function(model, configpaths){ -#' -#' # Get State list -#' states <- unique(StateUS_VA_Ratio$GeoName) # Taken from buildStateSupplyModel function. Unsure if this variable will be globally available. -#' stateModel <- list() -#' -#' for (year in 2012:2017) { -#' -#' for(state in states){ -#' stateMode$Use <- loadStateIODataFile(paste0("State_Summary_Use_", -#' year))[[state]] # Need to very parameters and adequacy of function call -#' stateModel$Make <- loadStateIODataFile(paste0("State_Summary_Use_", -#' year))[[state]] # Need to very parameters and adequacy of function call -#' # Check for disaggregation -#' stateModel <- getDisaggregationSpecs(stateModel, configpaths) -#' -#' } -#' -#' -#' }# end of for year loop -#' -#' } +#' @return A stateior model object with the disaggregation specs loaded. +getStateModelDisaggSpecs <- function(){ -#' 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 used. -#' @return A list of model specifications. -getConfigurationStateior <- function(configname, configtype, configpaths = NULL) { - configfile <- paste0(configname, ".yml") - if (is.null(configpaths)) { - configpath <- system.file(paste0("extdata/", configtype, "specs/"), configfile, package = "stateior") - } 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) + # Initialize model for every state + model <- list() + configfile <- "UtilityDisaggregation" + disaggConfigpath <- system.file(paste0("extdata/disaggspecs/"), paste0(configfile,".yml"), package = "stateior") + + model$specs$DisaggregationSpecs <- configfile + + model <- useeior:::getDisaggregationSpecs(model, disaggConfigpath) + return(model) + } @@ -70,7 +23,7 @@ disaggregateStateModel <- function(model, state){ temp <- 1 # Need to export all disagg functions from useeior package? - disaggregateMakeTable <- utils::getFromNamespace("disaggregateMakeTable","useeior") +# disaggregateMakeTable <- utils::getFromNamespace("disaggregateMakeTable","useeior") @@ -94,7 +47,8 @@ disaggregateStateModel <- function(model, state){ colnames(model$MakeTransactions) <- colLabels - model$MakeTransactions <- disaggregateMakeTable(model, disagg) + #model$MakeTransactions <- disaggregateMakeTable(model, disagg) + model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) temp <- 1 From 8f5f673d8a0e60ac6fe03026d61ffa1855f2e179 Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 10 Jun 2022 19:49:33 -0400 Subject: [PATCH 015/121] moved formatting code for Make transactions to their own functions --- R/StateDisaggFunctions.R | 50 +++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index d2979889..834ca122 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -25,41 +25,53 @@ disaggregateStateModel <- function(model, state){ # Need to export all disagg functions from useeior package? # disaggregateMakeTable <- utils::getFromNamespace("disaggregateMakeTable","useeior") - - for (disagg in model$DisaggregationSpecs){ # TODO: add call to other disaggregation functions logging::loginfo(paste0("Disaggregating ", disagg$OrignalSectorName," for ", state)) # Formatting Make row and column names according to useeior disaggregation formats - # For make rows - rowLabels <- rownames(model$MakeTransactions) - rowLabels <- gsub(".*\\.", "", rowLabels) - rowLabels <- paste0(rowLabels, "/US") - - # For make cols - colLabels <- colnames(model$MakeTransactions) - colLabels <- paste0(colLabels, "/US") - - # Replace names with new labels - rownames(model$MakeTransactions) <- rowLabels - colnames(model$MakeTransactions) <- colLabels - - - #model$MakeTransactions <- disaggregateMakeTable(model, disagg) + model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) temp <- 1 } + temp <- 2 + + return(model) + +} + +#' @param model An stateior model object with model specs and specific IO tables loaded +#' @param state A string value that indicates the state model being disaggregated +#' @return A stateior make table formatted for disaggregation with useeior functions +formatMakeFromStateToUSEEIO <- function(model, state){ + # Formatting Make row and column names according to useeior disaggregation formats + # For make rows + rowLabels <- rownames(model$MakeTransactions) + rowLabels <- gsub(".*\\.", "", rowLabels) + rowLabels <- paste0(rowLabels, "/US") - temp <- 2 + # For make cols + colLabels <- colnames(model$MakeTransactions) + colLabels <- paste0(colLabels, "/US") + + # Replace names with new labels + rownames(model$MakeTransactions) <- rowLabels + colnames(model$MakeTransactions) <- colLabels + + return(model$MakeTransactions) +} + +#' @param model An stateior model object with model specs and specific IO tables loaded +#' @param state A string value that indicates the state model being disaggregated +#' @return A stateior make table formatted according to stateior specifications +formatMakeFromUSEEIOtoState <- function(model, state){ - return(model) } \ No newline at end of file From dd7793b316f8cf423c5dbd0e0e59339f39992c97 Mon Sep 17 00:00:00 2001 From: jvendries Date: Sun, 12 Jun 2022 12:31:48 -0400 Subject: [PATCH 016/121] added function to format MakeTransactions back to stateior formats after disaggregation --- R/StateDisaggFunctions.R | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 834ca122..a027a1bb 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -30,10 +30,16 @@ disaggregateStateModel <- function(model, state){ logging::loginfo(paste0("Disaggregating ", disagg$OrignalSectorName," for ", state)) - # Formatting Make row and column names according to useeior disaggregation formats + # Formatting model objects according to useeior disaggregation formats model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) + + + # Disaggregating specified model objects model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) + # Formatting disaggregated model objects back to stateior formats + model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state) + temp <- 1 } @@ -72,6 +78,14 @@ formatMakeFromStateToUSEEIO <- function(model, state){ #' @return A stateior make table formatted according to stateior specifications formatMakeFromUSEEIOtoState <- function(model, state){ + rowLabels <- rownames(model$MakeTransactions) + rowLabels <- gsub("\\/.*","",rowLabels) # remove everything after "/" + rowLabels <- paste0(state,".",rowLabels) # add state and . before sector name to match original format + rownames(model$MakeTransactions) <- rowLabels # Replace old row labels with new ones + columnLabels <- colnames(model$MakeTransactions) + columnLabels <- gsub("\\/.*","",columnLabels) # remove everything after "/" + colnames(model$MakeTransactions) <- columnLabels # replace old column labels with new ones + return(model$MakeTransactions) } \ No newline at end of file From 8f1d89149eb8a36844381f9a01fd8dd484ec179c Mon Sep 17 00:00:00 2001 From: jvendries Date: Sun, 12 Jun 2022 14:47:54 -0400 Subject: [PATCH 017/121] added lines in BuildModel.R to initiate the disaggregation of Full Use, Commodity and IndustryOUtput model objects --- R/BuildModel.R | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 9f70a081..0137d68c 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -550,17 +550,31 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { temp <- 1 # for debugging if(disaggState == TRUE){ - # Disaggregate each state + # # Disaggregate objects once #TODO: Need to finish this part for US_Make, US_DomesticUse, commodities, and industries objects + # for(disagg in model$DisaggregationSpecs){ + # industries <- useeior:::disaggregateSectorDFs(model, disagg, "Industry") + # + # } + + + # Disaggregate objects for each state for (state in sort(c(state.name, "District of Columbia"))) { # Initialize model for every state model <- getStateModelDisaggSpecs() + + #### TODO: Ask if Will we have industry models in stateior? #### + model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior + if(length(model$DisaggregationSpecs)!=0){ model$MakeTransactions <- State_Make_ls[[state]] - model$UseTransactions <- State_Use_ls[[state]] - #assign other model objects to disaggregate... + model$FullUse <- State_Use_ls[[state]] + + model$CommodityOutput <- State_CommodityOutput_ls[[state]] + model$IndustryOutput <- State_IndustryOutput_ls[[state]] + model <- disaggregateStateModel(model, state) } From a944ac541b0e43139a0a8bd347b824ad048acaf4 Mon Sep 17 00:00:00 2001 From: jvendries Date: Sun, 12 Jun 2022 14:49:04 -0400 Subject: [PATCH 018/121] added functions in StateDisaggFunctions.R to split and format FullUse object into the distinct objects required for disaggregation in USEEIOr --- R/StateDisaggFunctions.R | 66 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index a027a1bb..ba72f9b2 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -26,19 +26,24 @@ disaggregateStateModel <- function(model, state){ # disaggregateMakeTable <- utils::getFromNamespace("disaggregateMakeTable","useeior") for (disagg in model$DisaggregationSpecs){ - # TODO: add call to other disaggregation functions - + logging::loginfo(paste0("Disaggregating ", disagg$OrignalSectorName," for ", state)) # Formatting model objects according to useeior disaggregation formats - model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) - - + model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object + model$FullUse <- formatFullUseFromStateToUSEEIO(model, state) # Formatting row/column names in FullUse object + model <- splitFullUse(model, state) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects + # Disaggregating specified model objects model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) + model$UseTransactions <- useeior:::disaggregateUseTable(model, disagg) + model$FinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = FALSE) + model$UseValueAdded <- useeior:::disaggregateVA(model, disagg) + # Formatting disaggregated model objects back to stateior formats model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state) + model$FullUse <- formatFullUseFromUSEEIOToState(model, state) temp <- 1 @@ -73,6 +78,23 @@ formatMakeFromStateToUSEEIO <- function(model, state){ return(model$MakeTransactions) } +#' @param model An stateior model object with model specs and specific IO tables loaded +#' @param state A string value that indicates the state model being disaggregated +#' @return The FullUse model object with useeior formatting fit for disaggregation functions +formatFullUseFromStateToUSEEIO <- function(model, state){ + temp <- 1 + + rowLabels <- rownames(model$FullUse) + rowLabels <- paste0(rowLabels, "/US") + rownames(model$FullUse) <- rowLabels + + columnLabels <- colnames(model$FullUse) + columnLabels <- paste0(columnLabels, "/US") + colnames(model$FullUse) <- columnLabels + + return(model$FullUse) +} + #' @param model An stateior model object with model specs and specific IO tables loaded #' @param state A string value that indicates the state model being disaggregated #' @return A stateior make table formatted according to stateior specifications @@ -88,4 +110,36 @@ formatMakeFromUSEEIOtoState <- function(model, state){ colnames(model$MakeTransactions) <- columnLabels # replace old column labels with new ones return(model$MakeTransactions) -} \ No newline at end of file +} + +#' @param model An stateior model object with model specs and specific IO tables loaded +#' @param state A string value that indicates the state model being disaggregated +#' @return A stateior FullUse table formatted according to stateior specifications +formatFullUseFromUSEEIOtoState <- function(model, state){ + + # rowLabels <- rownames(model$MakeTransactions) + # rowLabels <- gsub("\\/.*","",rowLabels) # remove everything after "/" + # rowLabels <- paste0(state,".",rowLabels) # add state and . before sector name to match original format + # rownames(model$MakeTransactions) <- rowLabels # Replace old row labels with new ones + # + # columnLabels <- colnames(model$MakeTransactions) + # columnLabels <- gsub("\\/.*","",columnLabels) # remove everything after "/" + # colnames(model$MakeTransactions) <- columnLabels # replace old column labels with new ones + + return(model$FullUse) +} +#' @param model An stateior model object with model specs and specific IO tables loaded +#' @param state A string value that indicates the state model being disaggregated +#' @return A model object with FullUse split into UseTransactions, FinalDemand, and UseValueAdded objects +splitFullUse <- function(model, state){ + numCommodities <- dim(model$CommodityOutput)[1] # Find number of commodities + numIndustries <- dim(model$IndustryOutput)[1] # Find number of industries + model$UseTransactions <- model$FullUse[1:numCommodities, 1:numIndustries] # Get subset of FullUse with numCommodities rows and numIndustries columns + model$UseValueAdded <- model$FullUse[-(1:numCommodities),1:numIndustries] # Get subset of FullUse, starting from rows after numCommodities, with numIndustries columns + model$FinalDemand <- model$FullUse[1:numCommodities,-(1:numIndustries)] # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries + + return(model) + +} + + From 82f984b8cd0f475dcbc35988842824edc4d5e577 Mon Sep 17 00:00:00 2001 From: jvendries Date: Sun, 12 Jun 2022 16:19:39 -0400 Subject: [PATCH 019/121] added statements for assigning disaggregated model objects back to stateior objects (e.g. State_Make_ls) --- R/BuildModel.R | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 0137d68c..b1a14164 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -575,17 +575,24 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { model$CommodityOutput <- State_CommodityOutput_ls[[state]] model$IndustryOutput <- State_IndustryOutput_ls[[state]] - model <- disaggregateStateModel(model, state) + + # Assign the disaggregated model objects to the stateior lists + State_Make_ls[[state]] <- model$MakeTransactions + State_Use_ls[[state]] <- model$FullUse + State_CommodityOutput_ls[[state]] <- model$CommodityOutput + State_IndustryOutput_ls[[state]] <- model$IndustryOutput + + temp <- 2 # for debugging } - temp <- 2 # for debugging, end of for loop + temp <- 3 # for debugging, end of for loop } - temp <- 3 # for debugging, end of code for disagg + temp <- 4 # for debugging, end of code for disagg }# End of Disagg } - temp <- 4 + temp <- 5 # Assemble two-region IO tables TwoRegionIO <- list() From 6e2a2d05b786911852a8ef1b2e59a1e1dd6898f3 Mon Sep 17 00:00:00 2001 From: jvendries Date: Sun, 12 Jun 2022 16:20:53 -0400 Subject: [PATCH 020/121] added functions to -calculate disaggregated state industry and commodity output totals -assemble full use table after disaggregating the individual components (UseTransactions, FinalDemand, UseValueAdded) --- R/StateDisaggFunctions.R | 57 +++++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 12 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index ba72f9b2..02352955 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -22,8 +22,6 @@ getStateModelDisaggSpecs <- function(){ disaggregateStateModel <- function(model, state){ temp <- 1 - # Need to export all disagg functions from useeior package? -# disaggregateMakeTable <- utils::getFromNamespace("disaggregateMakeTable","useeior") for (disagg in model$DisaggregationSpecs){ @@ -41,9 +39,14 @@ disaggregateStateModel <- function(model, state){ model$FinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = FALSE) model$UseValueAdded <- useeior:::disaggregateVA(model, disagg) + if(model$specs$CommodityorIndustryType=="Commodity") { + model <- calculateStateIndustryCommodityOuput(model) # Also formats the disaggregated industry and commodity outputs to stateior formats + + } + # Formatting disaggregated model objects back to stateior formats model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state) - model$FullUse <- formatFullUseFromUSEEIOToState(model, state) + model$FullUse <- formatFullUseFromUSEEIOtoState(model, state) temp <- 1 @@ -116,15 +119,24 @@ formatMakeFromUSEEIOtoState <- function(model, state){ #' @param state A string value that indicates the state model being disaggregated #' @return A stateior FullUse table formatted according to stateior specifications formatFullUseFromUSEEIOtoState <- function(model, state){ + temp <- 1 + + tempFullUse <- cbind(model$UseTransactions, model$FinalDemand) # combine UseTransactions and FinalDemand columns + + # Create the empty section of FullUse that is VA rows by FD columns (NA values) + VAbyFDSection <- data.frame(matrix(nrow = dim(model$UseValueAdded)[1], + ncol = ncol(tempFullUse) - ncol(model$UseTransactions))) + + # Rename rows and cols of new dataframe to allow cbind operation + colnames(VAbyFDSection) <- colnames(model$FinalDemand) + rownames(VAbyFDSection) <- rownames(model$UseValueAdded) - # rowLabels <- rownames(model$MakeTransactions) - # rowLabels <- gsub("\\/.*","",rowLabels) # remove everything after "/" - # rowLabels <- paste0(state,".",rowLabels) # add state and . before sector name to match original format - # rownames(model$MakeTransactions) <- rowLabels # Replace old row labels with new ones - # - # columnLabels <- colnames(model$MakeTransactions) - # columnLabels <- gsub("\\/.*","",columnLabels) # remove everything after "/" - # colnames(model$MakeTransactions) <- columnLabels # replace old column labels with new ones + tempVA <- cbind(model$UseValueAdded, VAbyFDSection) # combine UseValueAdded and VAbyFDSection columns + + # Assemble FullUse table and remane according to stateior formats + model$FullUse <- rbind(tempFullUse, tempVA) + rownames(model$FullUse) <- gsub("\\/.*","",rownames(model$FullUse)) # remove everything after "/" + colnames(model$FullUse) <- gsub("\\/.*","",colnames(model$FullUse)) # remove everything after "/" return(model$FullUse) } @@ -142,4 +154,25 @@ splitFullUse <- function(model, state){ } - +#' @param model An stateior model object with model specs and specific IO tables loaded +#' @return A model object with disaggregated IndustryOutput and CommodityOutput objects +calculateStateIndustryCommodityOuput <- function(model){ + + temp <- 1 + + # Calculating and formatting IndustryOutput + model$IndustryOutput <- data.frame(colSums(model$UseTransactions) + colSums(model$UseValueAdded)) + colnames(model$IndustryOutput) <- "Output" + rowLabels <- rownames(model$IndustryOutput) + rowLabels <- gsub("\\/.*","",rowLabels) # remove everything after "/" + rownames(model$IndustryOutput) <- rowLabels + + # Calculating and formatting CommodityOuput + model$CommodityOutput <- data.frame(rowSums(model$UseTransactions) + rowSums(model$FinalDemand)) + colnames(model$CommodityOutput) <- "Output" + rowLabels <- rownames(model$CommodityOutput) + rowLabels <- gsub("\\/.*","",rowLabels) # remove everything after "/" + rownames(model$CommodityOutput) <- rowLabels + + return(model) +} From 60446d4354763c1b680e4285ef932b502a8bc719 Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 17 Jun 2022 18:05:53 -0400 Subject: [PATCH 021/121] began edits to disaggregate the US_Make and US_DomesticUse objects --- R/BuildModel.R | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index b1a14164..280a9251 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -544,26 +544,48 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { year)) ## Disaggregate model objects: - # State_CommodityOutput_ls, State_IndustryOutput_ls, State_Make_ls, State_Use_ls + # State_CommodityOutput_ls, State_IndustryOutput_ls, State_Make_ls, State_Use_ls --> disagg code in place for these objects # US_Make, US_DomesticUse # commodities, industries temp <- 1 # for debugging if(disaggState == TRUE){ - + + # Initialize model + model <- getStateModelDisaggSpecs() + # # Disaggregate objects once #TODO: Need to finish this part for US_Make, US_DomesticUse, commodities, and industries objects - # for(disagg in model$DisaggregationSpecs){ - # industries <- useeior:::disaggregateSectorDFs(model, disagg, "Industry") - # - # } - + for(disagg in model$DisaggregationSpecs){ + + model$Industries <- industries + model$Commodities <- commodities + + model$US_DomesticFullUse <- US_DomesticUse + model$US_DomesticFullUse <- formatFullUseFromStateToUSEEIO(model, state, domestic = TRUE) + model <- splitFullUse(model, state, domestic = TRUE) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects + model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior + + model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) + model$DomesticFinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = TRUE) + model$UseValueAdded <- useeior:::disaggregateVA(model, disagg) + + #STOPPED HERE. NEXT STEP: MODIFY formatFullUseFromUSEEIOtoState function to accomodate domestic tables + + model$US_Make <- US_Make + + + +# industries <- useeior:::disaggregateSectorDFs(model, disagg, "Industry") + + } + model <- NULL # Delete disaggregated National model to make way for individual state models + # Disaggregate objects for each state for (state in sort(c(state.name, "District of Columbia"))) { # Initialize model for every state model <- getStateModelDisaggSpecs() - #### TODO: Ask if Will we have industry models in stateior? #### model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior From b91f2b91e9031b2cf27a4572f8e01857ecea5105 Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 17 Jun 2022 18:06:41 -0400 Subject: [PATCH 022/121] Edits in functions of the StateDisaggFunctions script where relevant to enable the disaggregation of the Use table elements when domestic flag is true --- R/StateDisaggFunctions.R | 49 ++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 02352955..8ec74d5e 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -21,6 +21,9 @@ getStateModelDisaggSpecs <- function(){ #' @return A stateior model with the disaggregateed objects disaggregateStateModel <- function(model, state){ + # TODO: Include disaggregation of domestic use for each state + # TODO: Include validation checks for row/column sums - note that there may be unexpected results due to existing negative values in state use tables. + temp <- 1 for (disagg in model$DisaggregationSpecs){ @@ -83,19 +86,26 @@ formatMakeFromStateToUSEEIO <- function(model, state){ #' @param model An stateior model object with model specs and specific IO tables loaded #' @param state A string value that indicates the state model being disaggregated +#' @param domestic A boolean that indicates whether the table to format is the domesticUse table or not #' @return The FullUse model object with useeior formatting fit for disaggregation functions -formatFullUseFromStateToUSEEIO <- function(model, state){ +formatFullUseFromStateToUSEEIO <- function(model, state, domestic = FALSE){ temp <- 1 - rowLabels <- rownames(model$FullUse) + if(domestic == TRUE){ + table <- model$US_DomesticFullUse + }else{ + table <- model$FullUse + } + + rowLabels <- rownames(table) rowLabels <- paste0(rowLabels, "/US") - rownames(model$FullUse) <- rowLabels + rownames(table) <- rowLabels - columnLabels <- colnames(model$FullUse) + columnLabels <- colnames(table) columnLabels <- paste0(columnLabels, "/US") - colnames(model$FullUse) <- columnLabels + colnames(table) <- columnLabels - return(model$FullUse) + return(table) } #' @param model An stateior model object with model specs and specific IO tables loaded @@ -142,13 +152,28 @@ formatFullUseFromUSEEIOtoState <- function(model, state){ } #' @param model An stateior model object with model specs and specific IO tables loaded #' @param state A string value that indicates the state model being disaggregated +#' @param domestic A boolean that indicates whether the table to format is the domesticUse table or not #' @return A model object with FullUse split into UseTransactions, FinalDemand, and UseValueAdded objects -splitFullUse <- function(model, state){ - numCommodities <- dim(model$CommodityOutput)[1] # Find number of commodities - numIndustries <- dim(model$IndustryOutput)[1] # Find number of industries - model$UseTransactions <- model$FullUse[1:numCommodities, 1:numIndustries] # Get subset of FullUse with numCommodities rows and numIndustries columns - model$UseValueAdded <- model$FullUse[-(1:numCommodities),1:numIndustries] # Get subset of FullUse, starting from rows after numCommodities, with numIndustries columns - model$FinalDemand <- model$FullUse[1:numCommodities,-(1:numIndustries)] # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries +splitFullUse <- function(model, state, domestic = FALSE){ + + + if(domestic == TRUE){ + numCommodities <- length(model$Commodities) # Find number of commodities + numIndustries <- length(model$Industries) # Find number of industries + + model$DomesticUseTransactions <- model$US_DomesticFullUse[1:numCommodities, 1:numIndustries] # Get subset of FullUse with numCommodities rows and numIndustries columns + model$UseValueAdded <- model$US_DomesticFullUse[-(1:numCommodities),1:numIndustries] # Get subset of FullUse, starting from rows after numCommodities, with numIndustries columns + model$DomesticFinalDemand <- model$US_DomesticFullUse[1:numCommodities,-(1:numIndustries)] # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries + + }else{ + numCommodities <- dim(model$CommodityOutput)[1] # Find number of commodities + numIndustries <- dim(model$IndustryOutput)[1] # Find number of industries + + model$UseTransactions <- model$FullUse[1:numCommodities, 1:numIndustries] # Get subset of FullUse with numCommodities rows and numIndustries columns + model$UseValueAdded <- model$FullUse[-(1:numCommodities),1:numIndustries] # Get subset of FullUse, starting from rows after numCommodities, with numIndustries columns + model$FinalDemand <- model$FullUse[1:numCommodities,-(1:numIndustries)] # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries + } + return(model) From 843483c3687b1d6c026106d7bb11be93c4e979e2 Mon Sep 17 00:00:00 2001 From: jvendries Date: Sat, 18 Jun 2022 15:16:23 -0400 Subject: [PATCH 023/121] Edited state disagg functions to handle disaggregation and formatting of non-state Make and Use tables (i.e., US_Make and US_DomesticUse objects) --- R/BuildModel.R | 28 ++++++++++++++++--- R/StateDisaggFunctions.R | 60 ++++++++++++++++++++++++++-------------- 2 files changed, 64 insertions(+), 24 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 280a9251..87c197d9 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -556,26 +556,46 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { # # Disaggregate objects once #TODO: Need to finish this part for US_Make, US_DomesticUse, commodities, and industries objects for(disagg in model$DisaggregationSpecs){ + model$Industries <- industries model$Commodities <- commodities - model$US_DomesticFullUse <- US_DomesticUse + # Assign and format specified national stateior objects to model to prepare for disaggregation + + # Assign Make + model$MakeTransactions <- US_Make + model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object + + + # Assign individual domestic use objects (DomesticUseTransactions, DomesticFinalDemand) + model$US_DomesticFullUse <- US_DomesticUse # Note that the domestic full use object does not include value added rows model$US_DomesticFullUse <- formatFullUseFromStateToUSEEIO(model, state, domestic = TRUE) model <- splitFullUse(model, state, domestic = TRUE) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior + # Disaggregate model objects + model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) + model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) model$DomesticFinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = TRUE) - model$UseValueAdded <- useeior:::disaggregateVA(model, disagg) + + + # Convert disaggregated objects back to stateior formats + model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state = "National") + model$US_DomesticFullUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) - #STOPPED HERE. NEXT STEP: MODIFY formatFullUseFromUSEEIOtoState function to accomodate domestic tables - model$US_Make <- US_Make + # industries <- useeior:::disaggregateSectorDFs(model, disagg, "Industry") + # Assign the disaggregated model objects to the original stateior objects + US_Make <- model$MakeTransactions + US_DomesticUse <- model$US_DomesticFullUse + + } model <- NULL # Delete disaggregated National model to make way for individual state models diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 8ec74d5e..e4acfa25 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -113,9 +113,14 @@ formatFullUseFromStateToUSEEIO <- function(model, state, domestic = FALSE){ #' @return A stateior make table formatted according to stateior specifications formatMakeFromUSEEIOtoState <- function(model, state){ + + rowLabels <- rownames(model$MakeTransactions) rowLabels <- gsub("\\/.*","",rowLabels) # remove everything after "/" - rowLabels <- paste0(state,".",rowLabels) # add state and . before sector name to match original format + if(state != "National"){ + rowLabels <- paste0(state,".",rowLabels) # add state and . before sector name to match original format for state models only + } + rownames(model$MakeTransactions) <- rowLabels # Replace old row labels with new ones columnLabels <- colnames(model$MakeTransactions) @@ -127,28 +132,44 @@ formatMakeFromUSEEIOtoState <- function(model, state){ #' @param model An stateior model object with model specs and specific IO tables loaded #' @param state A string value that indicates the state model being disaggregated +#' @param domestic A boolean that indicates whether the table to format is the domesticUse table or not #' @return A stateior FullUse table formatted according to stateior specifications -formatFullUseFromUSEEIOtoState <- function(model, state){ +formatFullUseFromUSEEIOtoState <- function(model, state, domestic = FALSE){ temp <- 1 - tempFullUse <- cbind(model$UseTransactions, model$FinalDemand) # combine UseTransactions and FinalDemand columns - # Create the empty section of FullUse that is VA rows by FD columns (NA values) - VAbyFDSection <- data.frame(matrix(nrow = dim(model$UseValueAdded)[1], - ncol = ncol(tempFullUse) - ncol(model$UseTransactions))) - - # Rename rows and cols of new dataframe to allow cbind operation - colnames(VAbyFDSection) <- colnames(model$FinalDemand) - rownames(VAbyFDSection) <- rownames(model$UseValueAdded) - - tempVA <- cbind(model$UseValueAdded, VAbyFDSection) # combine UseValueAdded and VAbyFDSection columns - - # Assemble FullUse table and remane according to stateior formats - model$FullUse <- rbind(tempFullUse, tempVA) - rownames(model$FullUse) <- gsub("\\/.*","",rownames(model$FullUse)) # remove everything after "/" - colnames(model$FullUse) <- gsub("\\/.*","",colnames(model$FullUse)) # remove everything after "/" - - return(model$FullUse) + if(domestic == TRUE){ + temp <-2 + + model$US_DomesticFullUse <- cbind(model$DomesticUseTransactions, model$DomesticFinalDemand) # combine UseTransactions and FinalDemand columns + + # Format row and column names + rownames(model$US_DomesticFullUse) <- gsub("\\/.*","",rownames(model$US_DomesticFullUse)) # remove everything after "/" + colnames(model$US_DomesticFullUse) <- gsub("\\/.*","",colnames(model$US_DomesticFullUse)) # remove everything after "/" + + return(model$US_DomesticFullUse) + + }else{ + tempFullUse <- cbind(model$UseTransactions, model$FinalDemand) # combine UseTransactions and FinalDemand columns + + # Create the empty section of FullUse that is VA rows by FD columns (NA values) + VAbyFDSection <- data.frame(matrix(nrow = dim(model$UseValueAdded)[1], + ncol = ncol(tempFullUse) - ncol(model$UseTransactions))) + + # Rename rows and cols of new dataframe to allow cbind operation + colnames(VAbyFDSection) <- colnames(model$FinalDemand) + rownames(VAbyFDSection) <- rownames(model$UseValueAdded) + + tempVA <- cbind(model$UseValueAdded, VAbyFDSection) # combine UseValueAdded and VAbyFDSection columns + + # Assemble FullUse table and remane according to stateior formats + model$FullUse <- rbind(tempFullUse, tempVA) + rownames(model$FullUse) <- gsub("\\/.*","",rownames(model$FullUse)) # remove everything after "/" + colnames(model$FullUse) <- gsub("\\/.*","",colnames(model$FullUse)) # remove everything after "/" + + return(model$FullUse) + } + } #' @param model An stateior model object with model specs and specific IO tables loaded #' @param state A string value that indicates the state model being disaggregated @@ -162,7 +183,6 @@ splitFullUse <- function(model, state, domestic = FALSE){ numIndustries <- length(model$Industries) # Find number of industries model$DomesticUseTransactions <- model$US_DomesticFullUse[1:numCommodities, 1:numIndustries] # Get subset of FullUse with numCommodities rows and numIndustries columns - model$UseValueAdded <- model$US_DomesticFullUse[-(1:numCommodities),1:numIndustries] # Get subset of FullUse, starting from rows after numCommodities, with numIndustries columns model$DomesticFinalDemand <- model$US_DomesticFullUse[1:numCommodities,-(1:numIndustries)] # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries }else{ From c23a42fa3f4707121b9e0729f037512820771429 Mon Sep 17 00:00:00 2001 From: jvendries Date: Sat, 18 Jun 2022 16:14:01 -0400 Subject: [PATCH 024/121] In StateDisaggFunctions.R, added: disaggregateStateSectorLists function for disaggregating the commodity and industry lists disaggregateNationalObjectsInStateModel function to organize the disaggregation flow for objects that only have to be disaggregated once --- R/StateDisaggFunctions.R | 88 +++++++++++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 23 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index e4acfa25..cc3d5eb5 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -15,7 +15,6 @@ getStateModelDisaggSpecs <- function(){ } - #' @param model An stateior model object with model specs and specific IO tables loaded #' @param state A string value that indicates the state model being disaggregated #' @return A stateior model with the disaggregateed objects @@ -23,9 +22,7 @@ disaggregateStateModel <- function(model, state){ # TODO: Include disaggregation of domestic use for each state # TODO: Include validation checks for row/column sums - note that there may be unexpected results due to existing negative values in state use tables. - - temp <- 1 - + for (disagg in model$DisaggregationSpecs){ logging::loginfo(paste0("Disaggregating ", disagg$OrignalSectorName," for ", state)) @@ -51,18 +48,49 @@ disaggregateStateModel <- function(model, state){ model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state) model$FullUse <- formatFullUseFromUSEEIOtoState(model, state) - temp <- 1 - } - temp <- 2 - return(model) } +#' @param model An stateior model object with model specs and specific IO tables loaded +#' @param disagg Specifications for model disaggregation +#' @return A stateior model with the disaggregateed objects +disaggregateNationalObjectsInStateModel <- function(model, disagg){ + + # Format specified national stateior objects to model to prepare for disaggregation + + # Format Make + model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object + + # Format individual domestic use objects (DomesticUseTransactions, DomesticFinalDemand) + model$US_DomesticFullUse <- formatFullUseFromStateToUSEEIO(model, state, domestic = TRUE) # Note that the domestic full use object does not include value added rows + model <- splitFullUse(model, state, domestic = TRUE) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects + model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior + + # Disaggregate model objects + + model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) + model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) + model$DomesticFinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = TRUE) + # Disaggregate industry and commodity lists last because the original lists are used in the disaggregation of the other obejcts + model$Industries <- disaggregateStateSectorLists(model, disagg, "Industry") + model$Commodities <- disaggregateStateSectorLists(model, disagg, "Commodity") + + # Convert disaggregated objects back to stateior formats. Note that commodities and industries did not change format in disaggregation. + + model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state = "National") + model$US_DomesticFullUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) + + + return(model) + + +} + #' @param model An stateior model object with model specs and specific IO tables loaded #' @param state A string value that indicates the state model being disaggregated #' @return A stateior make table formatted for disaggregation with useeior functions @@ -89,8 +117,7 @@ formatMakeFromStateToUSEEIO <- function(model, state){ #' @param domestic A boolean that indicates whether the table to format is the domesticUse table or not #' @return The FullUse model object with useeior formatting fit for disaggregation functions formatFullUseFromStateToUSEEIO <- function(model, state, domestic = FALSE){ - temp <- 1 - + if(domestic == TRUE){ table <- model$US_DomesticFullUse }else{ @@ -113,8 +140,6 @@ formatFullUseFromStateToUSEEIO <- function(model, state, domestic = FALSE){ #' @return A stateior make table formatted according to stateior specifications formatMakeFromUSEEIOtoState <- function(model, state){ - - rowLabels <- rownames(model$MakeTransactions) rowLabels <- gsub("\\/.*","",rowLabels) # remove everything after "/" if(state != "National"){ @@ -135,12 +160,8 @@ formatMakeFromUSEEIOtoState <- function(model, state){ #' @param domestic A boolean that indicates whether the table to format is the domesticUse table or not #' @return A stateior FullUse table formatted according to stateior specifications formatFullUseFromUSEEIOtoState <- function(model, state, domestic = FALSE){ - temp <- 1 - - + if(domestic == TRUE){ - temp <-2 - model$US_DomesticFullUse <- cbind(model$DomesticUseTransactions, model$DomesticFinalDemand) # combine UseTransactions and FinalDemand columns # Format row and column names @@ -176,8 +197,7 @@ formatFullUseFromUSEEIOtoState <- function(model, state, domestic = FALSE){ #' @param domestic A boolean that indicates whether the table to format is the domesticUse table or not #' @return A model object with FullUse split into UseTransactions, FinalDemand, and UseValueAdded objects splitFullUse <- function(model, state, domestic = FALSE){ - - + if(domestic == TRUE){ numCommodities <- length(model$Commodities) # Find number of commodities numIndustries <- length(model$Industries) # Find number of industries @@ -194,7 +214,6 @@ splitFullUse <- function(model, state, domestic = FALSE){ model$FinalDemand <- model$FullUse[1:numCommodities,-(1:numIndustries)] # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries } - return(model) } @@ -202,9 +221,7 @@ splitFullUse <- function(model, state, domestic = FALSE){ #' @param model An stateior model object with model specs and specific IO tables loaded #' @return A model object with disaggregated IndustryOutput and CommodityOutput objects calculateStateIndustryCommodityOuput <- function(model){ - - temp <- 1 - + # Calculating and formatting IndustryOutput model$IndustryOutput <- data.frame(colSums(model$UseTransactions) + colSums(model$UseValueAdded)) colnames(model$IndustryOutput) <- "Output" @@ -221,3 +238,28 @@ calculateStateIndustryCommodityOuput <- function(model){ return(model) } + +#' Disaggregate model$Commodity or model$Industry dataframes 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 list_type string indicating whether to disaggregate model$Industry or model$Commodity dataframe. +#' @return newList A list which contain the disaggregated model$Commodity or model$Industry objects +disaggregateStateSectorLists <- function(model, disagg, list_type) { + + originalSectorCode <- gsub("\\/.*","",disagg$OriginalSectorCode) # remove everything after "/" + disaggCodes <- gsub("\\/.*","",disagg$DisaggregatedSectorCodes) # remove everything after "/" + + if(list_type == "Commodity") { + originalList <- model$Commodities + originalIndex <- grep(paste0("^",originalSectorCode,"$"), model$Commodities) # the ^ and $ are required to find an exact match + } else { + #assume industry if not specified + originalList <- model$Industries + originalIndex <- grep(paste0("^",originalSectorCode,"$"), model$Industries) # the ^ and $ are required to find an exact match + } + + newList <- append(originalList[1:originalIndex -1], disaggCodes) + newList <- append(newList, originalList[-(1:originalIndex)] ) # have to do this in two steps otherwise get an error + + return(newList) +} From 9dfe1685cd0c1492d7c90aac73f0b80ddcb24790 Mon Sep 17 00:00:00 2001 From: jvendries Date: Sat, 18 Jun 2022 16:14:24 -0400 Subject: [PATCH 025/121] In BuildModel.R, organized disaggregation code flow for objects that only have to be disaggregated once --- R/BuildModel.R | 83 ++++++++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 37 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 87c197d9..a92f28b3 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -556,47 +556,59 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { # # Disaggregate objects once #TODO: Need to finish this part for US_Make, US_DomesticUse, commodities, and industries objects for(disagg in model$DisaggregationSpecs){ - + # # Assign and format specified national stateior objects to model to prepare for disaggregation + # + # # Assign industry and commodity lists + # model$Industries <- industries + # model$Commodities <- commodities + # + # # Assign Make + # model$MakeTransactions <- US_Make + # model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object + # + # # Assign individual domestic use objects (DomesticUseTransactions, DomesticFinalDemand) + # model$US_DomesticFullUse <- US_DomesticUse # Note that the domestic full use object does not include value added rows + # model$US_DomesticFullUse <- formatFullUseFromStateToUSEEIO(model, state, domestic = TRUE) + # model <- splitFullUse(model, state, domestic = TRUE) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects + # model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior + # + # # Disaggregate model objects + # + # model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) + # model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) + # model$DomesticFinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = TRUE) + # # Disaggregate industry and commodity lists last because the original lists are used in the disaggregation of the other obejcts + # model$Industries <- disaggregateStateSectorLists(model, disagg, "Industry") + # model$Commodities <- disaggregateStateSectorLists(model, disagg, "Commodity") + # + # # Convert disaggregated objects back to stateior formats. Note that commodities and industries did not change format in disaggregation. + # + # model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state = "National") + # model$US_DomesticFullUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) + # + # # Assign the disaggregated model objects to the original stateior objects + # + # US_Make <- model$MakeTransactions + # US_DomesticUse <- model$US_DomesticFullUse + # industries <- model$Industries + # commodities <- model$Commodities + + # Assign model objects model$Industries <- industries model$Commodities <- commodities - - # Assign and format specified national stateior objects to model to prepare for disaggregation - - # Assign Make model$MakeTransactions <- US_Make - model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object - - - # Assign individual domestic use objects (DomesticUseTransactions, DomesticFinalDemand) model$US_DomesticFullUse <- US_DomesticUse # Note that the domestic full use object does not include value added rows - model$US_DomesticFullUse <- formatFullUseFromStateToUSEEIO(model, state, domestic = TRUE) - model <- splitFullUse(model, state, domestic = TRUE) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects - model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior - - # Disaggregate model objects - model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) - model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) - model$DomesticFinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = TRUE) - - - # Convert disaggregated objects back to stateior formats - model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state = "National") - model$US_DomesticFullUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) - - - - - - -# industries <- useeior:::disaggregateSectorDFs(model, disagg, "Industry") + # Disaggregate national model objects once (i.e. not for each state) + model <- disaggregateNationalObjectsInStateModel(model, disagg) # Assign the disaggregated model objects to the original stateior objects US_Make <- model$MakeTransactions US_DomesticUse <- model$US_DomesticFullUse + industries <- model$Industries + commodities <- model$Commodities - - } + } # end of one-time object disaggregations model <- NULL # Delete disaggregated National model to make way for individual state models @@ -626,14 +638,11 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { State_IndustryOutput_ls[[state]] <- model$IndustryOutput temp <- 2 # for debugging - } + } #end of if disaggregationSpecs is not empty statement - - temp <- 3 # for debugging, end of for loop - } + } #end of for each state loop - temp <- 4 # for debugging, end of code for disagg - }# End of Disagg } + }# End of Disaggregation for state model obstcs temp <- 5 # Assemble two-region IO tables From 257f26235573790d78b23ac381ba824a47e94fea Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 20 Jun 2022 13:44:54 -0400 Subject: [PATCH 026/121] remove unneeded comments --- R/BuildModel.R | 42 ++---------------------------------------- 1 file changed, 2 insertions(+), 40 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index a92f28b3..3533bb90 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -553,46 +553,9 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { # Initialize model model <- getStateModelDisaggSpecs() - # # Disaggregate objects once #TODO: Need to finish this part for US_Make, US_DomesticUse, commodities, and industries objects + # Loop for objects that need to be disaggregated only once for(disagg in model$DisaggregationSpecs){ - # # Assign and format specified national stateior objects to model to prepare for disaggregation - # - # # Assign industry and commodity lists - # model$Industries <- industries - # model$Commodities <- commodities - # - # # Assign Make - # model$MakeTransactions <- US_Make - # model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object - # - # # Assign individual domestic use objects (DomesticUseTransactions, DomesticFinalDemand) - # model$US_DomesticFullUse <- US_DomesticUse # Note that the domestic full use object does not include value added rows - # model$US_DomesticFullUse <- formatFullUseFromStateToUSEEIO(model, state, domestic = TRUE) - # model <- splitFullUse(model, state, domestic = TRUE) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects - # model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior - # - # # Disaggregate model objects - # - # model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) - # model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) - # model$DomesticFinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = TRUE) - # # Disaggregate industry and commodity lists last because the original lists are used in the disaggregation of the other obejcts - # model$Industries <- disaggregateStateSectorLists(model, disagg, "Industry") - # model$Commodities <- disaggregateStateSectorLists(model, disagg, "Commodity") - # - # # Convert disaggregated objects back to stateior formats. Note that commodities and industries did not change format in disaggregation. - # - # model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state = "National") - # model$US_DomesticFullUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) - # - # # Assign the disaggregated model objects to the original stateior objects - # - # US_Make <- model$MakeTransactions - # US_DomesticUse <- model$US_DomesticFullUse - # industries <- model$Industries - # commodities <- model$Commodities - # Assign model objects model$Industries <- industries model$Commodities <- commodities @@ -612,7 +575,7 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { model <- NULL # Delete disaggregated National model to make way for individual state models - # Disaggregate objects for each state + # Loop for obejcts that need to be disaggregated objects for each state for (state in sort(c(state.name, "District of Columbia"))) { # Initialize model for every state @@ -643,7 +606,6 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { } #end of for each state loop }# End of Disaggregation for state model obstcs - temp <- 5 # Assemble two-region IO tables TwoRegionIO <- list() From 0dd0fd55fe973759b3d63f0dce2181242950cf58 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 20 Jun 2022 13:52:02 -0400 Subject: [PATCH 027/121] simplify disaggregateStateSectorLists --- R/StateDisaggFunctions.R | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index cc3d5eb5..ecc93729 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -77,8 +77,8 @@ disaggregateNationalObjectsInStateModel <- function(model, disagg){ model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) model$DomesticFinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = TRUE) # Disaggregate industry and commodity lists last because the original lists are used in the disaggregation of the other obejcts - model$Industries <- disaggregateStateSectorLists(model, disagg, "Industry") - model$Commodities <- disaggregateStateSectorLists(model, disagg, "Commodity") + model$Industries <- disaggregateStateSectorLists(model$Industries, disagg) + model$Commodities <- disaggregateStateSectorLists(model$Commodities, disagg) # Convert disaggregated objects back to stateior formats. Note that commodities and industries did not change format in disaggregation. @@ -240,23 +240,14 @@ calculateStateIndustryCommodityOuput <- function(model){ } #' Disaggregate model$Commodity or model$Industry dataframes in the main model object -#' @param model A complete EEIO model: a list with USEEIO model components and attributes. +#' @param code_vector A list of sector codes (industry or commodity) #' @param disagg Specifications for disaggregating the current Table -#' @param list_type string indicating whether to disaggregate model$Industry or model$Commodity dataframe. #' @return newList A list which contain the disaggregated model$Commodity or model$Industry objects -disaggregateStateSectorLists <- function(model, disagg, list_type) { +disaggregateStateSectorLists <- function(code_vector, disagg) { originalSectorCode <- gsub("\\/.*","",disagg$OriginalSectorCode) # remove everything after "/" disaggCodes <- gsub("\\/.*","",disagg$DisaggregatedSectorCodes) # remove everything after "/" - - if(list_type == "Commodity") { - originalList <- model$Commodities - originalIndex <- grep(paste0("^",originalSectorCode,"$"), model$Commodities) # the ^ and $ are required to find an exact match - } else { - #assume industry if not specified - originalList <- model$Industries - originalIndex <- grep(paste0("^",originalSectorCode,"$"), model$Industries) # the ^ and $ are required to find an exact match - } + originalIndex <- grep(paste0("^",originalSectorCode,"$"), code_vector) # the ^ and $ are required to find an exact match newList <- append(originalList[1:originalIndex -1], disaggCodes) newList <- append(newList, originalList[-(1:originalIndex)] ) # have to do this in two steps otherwise get an error From 4bc12d6b6970aa62cf405fb1211bc47d205f0a76 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 20 Jun 2022 14:07:04 -0400 Subject: [PATCH 028/121] minor re-org of disagg code flow --- R/BuildModel.R | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 3533bb90..bb755412 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -552,10 +552,11 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { # Initialize model model <- getStateModelDisaggSpecs() - - # Loop for objects that need to be disaggregated only once - for(disagg in model$DisaggregationSpecs){ - + + if(length(model$DisaggregationSpecs)!=0){ + model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior + + # Disaggregate national model objects # Assign model objects model$Industries <- industries model$Commodities <- commodities @@ -563,32 +564,18 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { model$US_DomesticFullUse <- US_DomesticUse # Note that the domestic full use object does not include value added rows # Disaggregate national model objects once (i.e. not for each state) - model <- disaggregateNationalObjectsInStateModel(model, disagg) - + model <- disaggregateNationalObjectsInStateModel(model, model$DisaggregationSpecs) + # Assign the disaggregated model objects to the original stateior objects US_Make <- model$MakeTransactions US_DomesticUse <- model$US_DomesticFullUse industries <- model$Industries commodities <- model$Commodities - - } # end of one-time object disaggregations - - model <- NULL # Delete disaggregated National model to make way for individual state models - - # Loop for obejcts that need to be disaggregated objects for each state - for (state in sort(c(state.name, "District of Columbia"))) { - - # Initialize model for every state - model <- getStateModelDisaggSpecs() - - model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior - - - if(length(model$DisaggregationSpecs)!=0){ + # Loop for obejcts that need to be disaggregated objects for each state + for (state in sort(c(state.name, "District of Columbia"))) { model$MakeTransactions <- State_Make_ls[[state]] model$FullUse <- State_Use_ls[[state]] - model$CommodityOutput <- State_CommodityOutput_ls[[state]] model$IndustryOutput <- State_IndustryOutput_ls[[state]] @@ -599,13 +586,12 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { State_Use_ls[[state]] <- model$FullUse State_CommodityOutput_ls[[state]] <- model$CommodityOutput State_IndustryOutput_ls[[state]] <- model$IndustryOutput + + } #end of for each state loop - temp <- 2 # for debugging - } #end of if disaggregationSpecs is not empty statement - - } #end of for each state loop + } #end of if disaggregationSpecs is not empty statement - }# End of Disaggregation for state model obstcs + } #End of Disaggregation for state model obstcs # Assemble two-region IO tables TwoRegionIO <- list() From 9bc9def35e4fef97731ee153c928dcd1616c7a44 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 20 Jun 2022 14:18:10 -0400 Subject: [PATCH 029/121] disaggregate sector codes --- R/BuildModel.R | 19 ++++++++----------- R/StateDisaggFunctions.R | 4 ++-- R/UtilityFunctions.R | 5 ++++- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index bb755412..b1541707 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -543,17 +543,14 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { "_CommodityOutput_", year)) - ## Disaggregate model objects: - # State_CommodityOutput_ls, State_IndustryOutput_ls, State_Make_ls, State_Use_ls --> disagg code in place for these objects - # US_Make, US_DomesticUse - # commodities, industries - temp <- 1 # for debugging + disagg <- NULL # Initialization if(disaggState == TRUE){ # Initialize model model <- getStateModelDisaggSpecs() if(length(model$DisaggregationSpecs)!=0){ + disagg <- model$DisaggregationSpecs[[1]] model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior # Disaggregate national model objects @@ -564,7 +561,7 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { model$US_DomesticFullUse <- US_DomesticUse # Note that the domestic full use object does not include value added rows # Disaggregate national model objects once (i.e. not for each state) - model <- disaggregateNationalObjectsInStateModel(model, model$DisaggregationSpecs) + model <- disaggregateNationalObjectsInStateModel(model, disagg) # Assign the disaggregated model objects to the original stateior objects US_Make <- model$MakeTransactions @@ -592,17 +589,17 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { } #end of if disaggregationSpecs is not empty statement } #End of Disaggregation for state model obstcs - + # Assemble two-region IO tables TwoRegionIO <- list() for (state in sort(c(state.name, "District of Columbia"))) { ## Two-region Make SoI_Make <- State_Make_ls[[state]] - rownames(SoI_Make) <- getBEASectorCodeLocation("Industry", state, iolevel) - colnames(SoI_Make) <- getBEASectorCodeLocation("Commodity", state, iolevel) + rownames(SoI_Make) <- getBEASectorCodeLocation("Industry", state, iolevel, disagg) + colnames(SoI_Make) <- getBEASectorCodeLocation("Commodity", state, iolevel, disagg) RoUS_Make <- US_Make - SoI_Make - rownames(RoUS_Make) <- getBEASectorCodeLocation("Industry", "RoUS", iolevel) - colnames(RoUS_Make) <- getBEASectorCodeLocation("Commodity", "RoUS", iolevel) + rownames(RoUS_Make) <- getBEASectorCodeLocation("Industry", "RoUS", iolevel, disagg) + colnames(RoUS_Make) <- getBEASectorCodeLocation("Commodity", "RoUS", iolevel, disagg) # Form two-region Make TwoRegionMake <- SoI_Make TwoRegionMake[rownames(RoUS_Make), colnames(RoUS_Make)] <- RoUS_Make diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index ecc93729..09e3969e 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -249,8 +249,8 @@ disaggregateStateSectorLists <- function(code_vector, disagg) { disaggCodes <- gsub("\\/.*","",disagg$DisaggregatedSectorCodes) # remove everything after "/" originalIndex <- grep(paste0("^",originalSectorCode,"$"), code_vector) # the ^ and $ are required to find an exact match - newList <- append(originalList[1:originalIndex -1], disaggCodes) - newList <- append(newList, originalList[-(1:originalIndex)] ) # have to do this in two steps otherwise get an error + newList <- append(code_vector[1:originalIndex -1], disaggCodes) + newList <- append(newList, code_vector[-(1:originalIndex)] ) # have to do this in two steps otherwise get an error return(newList) } diff --git a/R/UtilityFunctions.R b/R/UtilityFunctions.R index e1a5040f..aa936c8b 100644 --- a/R/UtilityFunctions.R +++ b/R/UtilityFunctions.R @@ -105,13 +105,16 @@ loadBEAStateDatatoBEASummaryMapping <- function(dataname) { #' can be state name like "Georgia" or "RoUS" representing Rest of US. #' @param iolevel Level of detail, can be "Sector", "Summary, "Detail". #' @return A text value in the format of code/location. -getBEASectorCodeLocation <- function(sector_type, location, iolevel) { +getBEASectorCodeLocation <- function(sector_type, location, iolevel, disagg=NULL) { # Get code if (sector_type != "FinalDemand") { if (sector_type == "InternationalTradeAdjustment") { code <- ifelse(iolevel == "Detail", "F05100", "F051") } else { code <- getVectorOfCodes(iolevel, sector_type) + if (!is.null(disagg)) { + code <- disaggregateStateSectorLists(code, disagg) + } } } else { code <- getFinalDemandCodes(iolevel) From 7d56e3cb86d87e64d1f32c0771b85eefd5ea2a92 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 20 Jun 2022 14:33:32 -0400 Subject: [PATCH 030/121] pass disagg into buildTwoRegionUseModel --- R/BuildModel.R | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index b1541707..5587416c 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -279,15 +279,13 @@ buildStateUseModel <- function(year) { #' @export buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, ICF_sensitivity_analysis = FALSE, - adjust_by = 0, domestic = TRUE) { + adjust_by = 0, domestic = TRUE, + disagg = NULL) { startLogging() # 0 - Define commodities, industries, final demand columns, import column, and # international trade adjustment column commodities <- getVectorOfCodes(iolevel, "Commodity") industries <- getVectorOfCodes(iolevel, "Industry") - - ## Disaggregate objects: - # commodities, industries FD_cols <- getFinalDemandCodes(iolevel) import_col <- getVectorOfCodes(iolevel, "Import") @@ -296,6 +294,13 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, getVectorOfCodes, iolevel = iolevel)), FD_cols[substr(FD_cols, nchar(FD_cols), nchar(FD_cols)) %in% c("C", "E", "R", "N")]) + + if(!is.null(disagg)){ + commodities <- disaggregateStateSectorLists(commodities, disagg) + industries <- disaggregateStateSectorLists(industries, disagg) + tradable_cols <- disaggregateStateSectorLists(tradable_cols, disagg) + } + # All sectors except international imports nonimport_cols <- c(industries, FD_cols[-which(FD_cols %in% import_col)]) @@ -609,23 +614,25 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { ## Two-region Use and Domestic Use table TwoRegionUseModel <- buildTwoRegionUseModel(state, year, ioschema = 2012, - iolevel = iolevel, domestic = FALSE) + iolevel = iolevel, domestic = FALSE, + disagg = disagg) TwoRegionUse <- cbind(rbind(TwoRegionUseModel[["SoI2SoI"]][commodities, c(industries, FD_cols)], TwoRegionUseModel[["RoUS2SoI"]][commodities, c(industries, FD_cols)]), rbind(TwoRegionUseModel[["SoI2RoUS"]][commodities, c(industries, FD_cols)], TwoRegionUseModel[["RoUS2RoUS"]][commodities, c(industries, FD_cols)])) TwoRegionDomesticUseModel <- buildTwoRegionUseModel(state, year, ioschema = 2012, - iolevel = iolevel, domestic = TRUE) + iolevel = iolevel, domestic = TRUE, + disagg = disagg) TwoRegionDomesticUse <- cbind(rbind(TwoRegionDomesticUseModel[["SoI2SoI"]][commodities, c(industries, FD_cols)], TwoRegionDomesticUseModel[["RoUS2SoI"]][commodities, c(industries, FD_cols)]), rbind(TwoRegionDomesticUseModel[["SoI2RoUS"]][commodities, c(industries, FD_cols)], TwoRegionDomesticUseModel[["RoUS2RoUS"]][commodities, c(industries, FD_cols)])) - rownames(TwoRegionUse) <- c(getBEASectorCodeLocation("Commodity", state, iolevel), - getBEASectorCodeLocation("Commodity", "RoUS", iolevel)) + rownames(TwoRegionUse) <- c(getBEASectorCodeLocation("Commodity", state, iolevel, disagg), + getBEASectorCodeLocation("Commodity", "RoUS", iolevel, disagg)) rownames(TwoRegionDomesticUse) <- rownames(TwoRegionUse) - colnames(TwoRegionUse) <- c(getBEASectorCodeLocation("Industry", state, iolevel), + colnames(TwoRegionUse) <- c(getBEASectorCodeLocation("Industry", state, iolevel, disagg), getBEASectorCodeLocation("FinalDemand", state, iolevel), - getBEASectorCodeLocation("Industry", "RoUS", iolevel), + getBEASectorCodeLocation("Industry", "RoUS", iolevel, disagg), getBEASectorCodeLocation("FinalDemand", "RoUS", iolevel)) colnames(TwoRegionDomesticUse) <- colnames(TwoRegionUse) TwoRegionIO[["Use"]][[state]] <- TwoRegionUse @@ -634,7 +641,7 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { ## Two-region Value Added SoI_VA <- State_Use_ls[[state]][VA_rows, industries] rownames(SoI_VA) <- getBEASectorCodeLocation("ValueAdded", state, iolevel) - colnames(SoI_VA) <- getBEASectorCodeLocation("Industry", state, iolevel) + colnames(SoI_VA) <- getBEASectorCodeLocation("Industry", state, iolevel, disagg) RoUS_VA <- (Reduce("+", State_Use_ls) - State_Use_ls[[state]])[VA_rows, industries] rownames(RoUS_VA) <- apply(cbind(VA_rows, "RoUS"), 1, joinStringswithSlashes) colnames(RoUS_VA) <- apply(cbind(industries, "RoUS"), 1, joinStringswithSlashes) @@ -653,22 +660,22 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { MakeUseDiff <- colSums(US_Make) - rowSums(US_DomesticUse[, nonimport_cols]) RoUS_CommodityOutput$Output <- RoUS_CommodityOutput$Output - MakeUseDiff TwoRegionCommodityOutput <- c(SoI_CommodityOutput$Output, RoUS_CommodityOutput$Output) - names(TwoRegionCommodityOutput) <- c(getBEASectorCodeLocation("Commodity", state, iolevel), - getBEASectorCodeLocation("Commodity", "RoUS", iolevel)) + names(TwoRegionCommodityOutput) <- c(getBEASectorCodeLocation("Commodity", state, iolevel, disagg), + getBEASectorCodeLocation("Commodity", "RoUS", iolevel, disagg)) TwoRegionIO[["CommodityOutput"]][[state]] <- TwoRegionCommodityOutput ## Two-region Industry Output TwoRegionIndustryOutput <- c(State_IndustryOutput_ls[[state]][, "Output"], rowSums(US_Make) - State_IndustryOutput_ls[[state]][, "Output"]) - names(TwoRegionIndustryOutput) <- c(getBEASectorCodeLocation("Industry", state, iolevel), - getBEASectorCodeLocation("Industry", "RoUS", iolevel)) + names(TwoRegionIndustryOutput) <- c(getBEASectorCodeLocation("Industry", state, iolevel, disagg), + getBEASectorCodeLocation("Industry", "RoUS", iolevel, disagg)) TwoRegionIO[["IndustryOutput"]][[state]] <- TwoRegionIndustryOutput ## Two-region International Trade Adjustment SoI_ITA <- State_Use_ls[[state]][commodities, ITA_col] - names(SoI_ITA) <- getBEASectorCodeLocation("Commodity", state, iolevel) + names(SoI_ITA) <- getBEASectorCodeLocation("Commodity", state, iolevel, disagg) RoUS_ITA <- Reduce("+", State_Use_ls)[commodities, ITA_col] - SoI_ITA - names(RoUS_ITA) <- getBEASectorCodeLocation("Commodity", "RoUS", iolevel) + names(RoUS_ITA) <- getBEASectorCodeLocation("Commodity", "RoUS", iolevel, disagg) TwoRegionIO[["InternationalTradeAdjustment"]][[state]] <- c(SoI_ITA, RoUS_ITA) print(state) From 12bf67ca315464c779ddaad776a30bab604f360a Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 20 Jun 2022 14:58:16 -0400 Subject: [PATCH 031/121] consolidate functions to remove passed parameters --- R/StateDisaggFunctions.R | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 09e3969e..2f93cac3 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -29,8 +29,8 @@ disaggregateStateModel <- function(model, state){ # Formatting model objects according to useeior disaggregation formats model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object - model$FullUse <- formatFullUseFromStateToUSEEIO(model, state) # Formatting row/column names in FullUse object - model <- splitFullUse(model, state) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects + model$FullUse <- formatFullUseFromStateToUSEEIO(model$FullUse) # Formatting row/column names in FullUse object + model <- splitFullUse(model) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects # Disaggregating specified model objects model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) @@ -67,8 +67,8 @@ disaggregateNationalObjectsInStateModel <- function(model, disagg){ model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object # Format individual domestic use objects (DomesticUseTransactions, DomesticFinalDemand) - model$US_DomesticFullUse <- formatFullUseFromStateToUSEEIO(model, state, domestic = TRUE) # Note that the domestic full use object does not include value added rows - model <- splitFullUse(model, state, domestic = TRUE) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects + model$US_DomesticFullUse <- formatFullUseFromStateToUSEEIO(model$US_DomesticFullUse) # Note that the domestic full use object does not include value added rows + model <- splitFullUse(model, domestic = TRUE) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior # Disaggregate model objects @@ -112,18 +112,10 @@ formatMakeFromStateToUSEEIO <- function(model, state){ return(model$MakeTransactions) } -#' @param model An stateior model object with model specs and specific IO tables loaded -#' @param state A string value that indicates the state model being disaggregated -#' @param domestic A boolean that indicates whether the table to format is the domesticUse table or not +#' @param table FullUse table #' @return The FullUse model object with useeior formatting fit for disaggregation functions -formatFullUseFromStateToUSEEIO <- function(model, state, domestic = FALSE){ +formatFullUseFromStateToUSEEIO <- function(table){ - if(domestic == TRUE){ - table <- model$US_DomesticFullUse - }else{ - table <- model$FullUse - } - rowLabels <- rownames(table) rowLabels <- paste0(rowLabels, "/US") rownames(table) <- rowLabels @@ -193,10 +185,9 @@ formatFullUseFromUSEEIOtoState <- function(model, state, domestic = FALSE){ } #' @param model An stateior model object with model specs and specific IO tables loaded -#' @param state A string value that indicates the state model being disaggregated #' @param domestic A boolean that indicates whether the table to format is the domesticUse table or not #' @return A model object with FullUse split into UseTransactions, FinalDemand, and UseValueAdded objects -splitFullUse <- function(model, state, domestic = FALSE){ +splitFullUse <- function(model, domestic = FALSE){ if(domestic == TRUE){ numCommodities <- length(model$Commodities) # Find number of commodities From aae791938b6f28e324f2ecea4e99ae13bdbb06e0 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 20 Jun 2022 15:14:56 -0400 Subject: [PATCH 032/121] initial disaggregation of SoI_DomesticUse --- R/BuildModel.R | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 5587416c..901ac9b4 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -309,7 +309,19 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, SoI_DomesticUse <- loadStateIODataFile(paste0("State_", iolevel, "_DomesticUse_", - year))[[state]][commodities, ] + year))[[state]] + + # Need to re-disaggregate the Use table + if(!is.null(diagg)){ + model <- list() + model$DisaggregationSpecs[[1]] <- disagg + model$DomesticUseTransactions <- formatFullUseFromStateToUSEEIO( + SoI_DomesticUse[1:length(getVectorOfCodes(iolevel, "Commodity")), + 1:length(getVectorOfCodes(iolevel, "Industry"))]) + SoI_DomesticUse <- useeior:::disaggregateUseTable(model, disagg) + } else { + SoI_DomesticUse <- SoI_DomesticUse[commodities, ] + } # Disaggregate SoI_DomesticUse From 08b24989a15a9135ab90d96dbfc2567bb31449e8 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 20 Jun 2022 15:17:42 -0400 Subject: [PATCH 033/121] fix typos --- R/BuildModel.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 901ac9b4..0cb8cb2c 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -312,13 +312,13 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, year))[[state]] # Need to re-disaggregate the Use table - if(!is.null(diagg)){ + if(!is.null(disagg)){ model <- list() model$DisaggregationSpecs[[1]] <- disagg model$DomesticUseTransactions <- formatFullUseFromStateToUSEEIO( SoI_DomesticUse[1:length(getVectorOfCodes(iolevel, "Commodity")), 1:length(getVectorOfCodes(iolevel, "Industry"))]) - SoI_DomesticUse <- useeior:::disaggregateUseTable(model, disagg) + SoI_DomesticUse <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) } else { SoI_DomesticUse <- SoI_DomesticUse[commodities, ] } From 5952bb8940249b7de3c6ddae4cd9c7d10852170f Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 20 Jun 2022 15:42:16 -0400 Subject: [PATCH 034/121] update handling of SoIDomesticUse --- R/BuildModel.R | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 0cb8cb2c..fb583788 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -295,12 +295,6 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, FD_cols[substr(FD_cols, nchar(FD_cols), nchar(FD_cols)) %in% c("C", "E", "R", "N")]) - if(!is.null(disagg)){ - commodities <- disaggregateStateSectorLists(commodities, disagg) - industries <- disaggregateStateSectorLists(industries, disagg) - tradable_cols <- disaggregateStateSectorLists(tradable_cols, disagg) - } - # All sectors except international imports nonimport_cols <- c(industries, FD_cols[-which(FD_cols %in% import_col)]) @@ -315,10 +309,21 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, if(!is.null(disagg)){ model <- list() model$DisaggregationSpecs[[1]] <- disagg - model$DomesticUseTransactions <- formatFullUseFromStateToUSEEIO( - SoI_DomesticUse[1:length(getVectorOfCodes(iolevel, "Commodity")), - 1:length(getVectorOfCodes(iolevel, "Industry"))]) - SoI_DomesticUse <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) + m <- formatFullUseFromStateToUSEEIO(SoI_DomesticUse) + + model$DomesticUseTransactions <- m[1:length(commodities), 1:length(industries)] + model$DomesticFinalDemand <- m[1:length(commodities),-(1:length(industries))] + + model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) + model$DomesticFinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = TRUE) + + SoI_DomesticUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) + + commodities <- disaggregateStateSectorLists(commodities, disagg) + industries <- disaggregateStateSectorLists(industries, disagg) + tradable_cols <- disaggregateStateSectorLists(tradable_cols, disagg) + nonimport_cols <- disaggregateStateSectorLists(nonimport_cols, disagg) + } else { SoI_DomesticUse <- SoI_DomesticUse[commodities, ] } From c6058f9ae6f0b3f87dc2bcba288a2aa8889a304c Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 20 Jun 2022 19:46:49 -0400 Subject: [PATCH 035/121] added Employment_ratios.csv to begin testing state-specific data in the disagg --- .../extdata/disaggspecs/Employment_ratios.csv | 460 ++++++++++++++++++ 1 file changed, 460 insertions(+) create mode 100644 inst/extdata/disaggspecs/Employment_ratios.csv diff --git a/inst/extdata/disaggspecs/Employment_ratios.csv b/inst/extdata/disaggspecs/Employment_ratios.csv new file mode 100644 index 00000000..f1b97880 --- /dev/null +++ b/inst/extdata/disaggspecs/Employment_ratios.csv @@ -0,0 +1,460 @@ +State,ActivityProducedBy,Share,Year +Alabama,221100,0.6958398066632142,2016 +Alabama,221200,0.09999136889349215,2016 +Alabama,221300,0.20416882444329362,2016 +Alaska,221100,0.714622641509434,2016 +Alaska,221200,0.13726415094339622,2016 +Alaska,221300,0.1481132075471698,2016 +Arizona,221100,0.992974695895401,2016 +Arizona,221200,0.0,2016 +Arizona,221300,0.007025304104598972,2016 +Arkansas,221100,0.5329691032403918,2016 +Arkansas,221200,0.10437076111529767,2016 +Arkansas,221300,0.3626601356443105,2016 +California,221100,0.36238932052002404,2016 +California,221200,0.0,2016 +California,221300,0.637610679479976,2016 +Colorado,221100,0.795752427184466,2016 +Colorado,221200,0.10631067961165049,2016 +Colorado,221300,0.09793689320388349,2016 +Connecticut,221100,0.5514211886304909,2016 +Connecticut,221200,0.10904392764857881,2016 +Connecticut,221300,0.3395348837209302,2016 +Delaware,221100,1.0,2016 +Delaware,221200,0.0,2016 +Delaware,221300,0.0,2016 +District Of Columbia,221100,,2016 +District Of Columbia,221200,,2016 +District Of Columbia,221300,,2016 +Florida,221100,0.7706402987138709,2016 +Florida,221200,0.05514451666436178,2016 +Florida,221300,0.17421518462176738,2016 +Georgia,221100,0.8420134562671319,2016 +Georgia,221200,0.10037378519810615,2016 +Georgia,221300,0.057612758534762026,2016 +Hawaii,221100,1.0,2016 +Hawaii,221200,0.0,2016 +Hawaii,221300,0.0,2016 +Idaho,221100,0.7653611210923464,2016 +Idaho,221200,0.0,2016 +Idaho,221300,0.23463887890765361,2016 +Illinois,221100,0.6695485457965562,2016 +Illinois,221200,0.1605049920416727,2016 +Illinois,221300,0.1699464621617711,2016 +Indiana,221100,0.7111716621253406,2016 +Indiana,221200,0.11371037416096232,2016 +Indiana,221300,0.1751179637136971,2016 +Iowa,221100,0.78442521631644,2016 +Iowa,221200,0.07045735475896168,2016 +Iowa,221300,0.14511742892459828,2016 +Kansas,221100,0.6157773806484554,2016 +Kansas,221200,0.2221087567015573,2016 +Kansas,221300,0.16211386264998723,2016 +Kentucky,221100,0.5581913708008279,2016 +Kentucky,221200,0.0728387199490527,2016 +Kentucky,221300,0.3689699092501194,2016 +Louisiana,221100,0.46906069149725477,2016 +Louisiana,221200,0.10023742395014097,2016 +Louisiana,221300,0.4307018845526042,2016 +Maine,221100,0.4832146490335707,2016 +Maine,221200,0.05188199389623601,2016 +Maine,221300,0.4649033570701933,2016 +Maryland,221100,0.8927008750994431,2016 +Maryland,221200,0.056881463802704854,2016 +Maryland,221300,0.05041766109785203,2016 +Massachusetts,221100,0.5553125706960259,2016 +Massachusetts,221200,0.20843073674685167,2016 +Massachusetts,221300,0.2362566925571224,2016 +Michigan,221100,0.8395624002253733,2016 +Michigan,221200,0.11343788149121983,2016 +Michigan,221300,0.04699971828340689,2016 +Minnesota,221100,0.8326792722083483,2016 +Minnesota,221200,0.11202283267927221,2016 +Minnesota,221300,0.05529789511237959,2016 +Mississippi,221100,0.7192065692652234,2016 +Mississippi,221200,0.0681454623013757,2016 +Mississippi,221300,0.21264796843340086,2016 +Missouri,221100,0.5129345409187049,2016 +Missouri,221200,0.14458484733445415,2016 +Missouri,221300,0.3424806117468409,2016 +Montana,221100,0.7471230451460608,2016 +Montana,221200,0.1106521097668929,2016 +Montana,221300,0.14222484508704633,2016 +Nebraska,221100,0.7716777834787071,2016 +Nebraska,221200,0.10582349923037455,2016 +Nebraska,221300,0.12249871729091842,2016 +Nevada,221100,0.674134926562111,2016 +Nevada,221200,0.0,2016 +Nevada,221300,0.32586507343788895,2016 +New Hampshire,221100,0.7365319865319865,2016 +New Hampshire,221200,0.10311447811447812,2016 +New Hampshire,221300,0.16035353535353536,2016 +New Jersey,221100,0.5394820858460447,2016 +New Jersey,221200,0.3054274565448741,2016 +New Jersey,221300,0.15509045760908124,2016 +New Mexico,221100,0.5263325377883851,2016 +New Mexico,221200,0.1858392999204455,2016 +New Mexico,221300,0.2878281622911695,2016 +New York,221100,0.755165113279634,2016 +New York,221200,0.17307083931569853,2016 +New York,221300,0.07176404740466746,2016 +North Carolina,221100,0.7246435027113878,2016 +North Carolina,221200,0.1404565843208141,2016 +North Carolina,221300,0.13489991296779807,2016 +North Dakota,221100,0.9337368588722523,2016 +North Dakota,221200,0.0,2016 +North Dakota,221300,0.06626314112774769,2016 +Ohio,221100,0.4720680083275503,2016 +Ohio,221200,0.19059680777238028,2016 +Ohio,221300,0.3373351839000694,2016 +Oklahoma,221100,0.43917603466683414,2016 +Oklahoma,221200,0.28757143754317654,2016 +Oklahoma,221300,0.2732525277899893,2016 +Oregon,221100,0.5220414752266236,2016 +Oregon,221200,0.14801937166273438,2016 +Oregon,221300,0.329939153110642,2016 +Pennsylvania,221100,0.4958280508299673,2016 +Pennsylvania,221200,0.14113866202789163,2016 +Pennsylvania,221300,0.3630332871421411,2016 +Rhode Island,221100,1.0,2016 +Rhode Island,221200,0.0,2016 +Rhode Island,221300,0.0,2016 +South Carolina,221100,0.7359536246655625,2016 +South Carolina,221200,0.059752834756019876,2016 +South Carolina,221300,0.20429354057841764,2016 +South Dakota,221100,0.784051510648836,2016 +South Dakota,221200,0.09806835066864784,2016 +South Dakota,221300,0.1178801386825161,2016 +Tennessee,221100,0.7305083974329798,2016 +Tennessee,221200,0.08178963178735606,2016 +Tennessee,221300,0.1877019707796641,2016 +Texas,221100,0.5552512985497993,2016 +Texas,221200,0.09005734494148851,2016 +Texas,221300,0.35469135650871225,2016 +Utah,221100,0.45968441130570487,2016 +Utah,221200,0.1321310906883995,2016 +Utah,221300,0.4081844980058956,2016 +Vermont,221100,0.8427037271004422,2016 +Vermont,221200,0.0,2016 +Vermont,221300,0.1572962728995578,2016 +Virginia,221100,0.48124616842222595,2016 +Virginia,221200,0.08755503538984562,2016 +Virginia,221300,0.43119879618792845,2016 +Washington,221100,0.659468438538206,2016 +Washington,221200,0.03590183260100739,2016 +Washington,221300,0.30462972886078665,2016 +West Virginia,221100,0.734571483846005,2016 +West Virginia,221200,0.1408396208164055,2016 +West Virginia,221300,0.12458889533758948,2016 +Wisconsin,221100,0.7481797639969872,2016 +Wisconsin,221200,0.06477529500376601,2016 +Wisconsin,221300,0.1870449409992468,2016 +Wyoming,221100,0.8633516053249805,2016 +Wyoming,221200,0.09162098668754894,2016 +Wyoming,221300,0.04502740798747063,2016 +Alabama,221100,0.6855893267361725,2017 +Alabama,221200,0.10134299346174236,2017 +Alabama,221300,0.21306767980208519,2017 +Alaska,221100,0.7170524326877658,2017 +Alaska,221200,0.1350968351440718,2017 +Alaska,221300,0.1478507321681625,2017 +Arizona,221100,0.9929194256867502,2017 +Arizona,221200,0.0,2017 +Arizona,221300,0.007080574313249852,2017 +Arkansas,221100,0.5367757712565839,2017 +Arkansas,221200,0.09951091045899173,2017 +Arkansas,221300,0.3637133182844244,2017 +California,221100,0.36999005660088724,2017 +California,221200,0.0,2017 +California,221300,0.6300099433991128,2017 +Colorado,221100,0.7925485827453893,2017 +Colorado,221200,0.10521104097041713,2017 +Colorado,221300,0.1022403762841936,2017 +Connecticut,221100,0.547513141932875,2017 +Connecticut,221200,0.10540504111066182,2017 +Connecticut,221300,0.3470818169564631,2017 +Delaware,221100,1.0,2017 +Delaware,221200,0.0,2017 +Delaware,221300,0.0,2017 +District Of Columbia,221100,,2017 +District Of Columbia,221200,,2017 +District Of Columbia,221300,,2017 +Florida,221100,0.7621745999038395,2017 +Florida,221200,0.05608214849921011,2017 +Florida,221300,0.18174325159695034,2017 +Georgia,221100,0.8309082554755706,2017 +Georgia,221200,0.10603972022259663,2017 +Georgia,221300,0.06305202430183285,2017 +Hawaii,221100,1.0,2017 +Hawaii,221200,0.0,2017 +Hawaii,221300,0.0,2017 +Idaho,221100,0.7651128914785142,2017 +Idaho,221200,0.0,2017 +Idaho,221300,0.2348871085214858,2017 +Illinois,221100,0.6565946897567636,2017 +Illinois,221200,0.16713972622426615,2017 +Illinois,221300,0.1762655840189703,2017 +Indiana,221100,0.7114345935976815,2017 +Indiana,221200,0.11632196021604532,2017 +Indiana,221300,0.1722434461862732,2017 +Iowa,221100,0.7845847341551488,2017 +Iowa,221200,0.07022786701531565,2017 +Iowa,221300,0.14518739882953555,2017 +Kansas,221100,0.6113695090439276,2017 +Kansas,221200,0.22080103359173125,2017 +Kansas,221300,0.16782945736434107,2017 +Kentucky,221100,0.552446446921192,2017 +Kentucky,221200,0.07390720101177772,2017 +Kentucky,221300,0.3736463520670303,2017 +Louisiana,221100,0.47029226785053646,2017 +Louisiana,221200,0.09655937846836848,2017 +Louisiana,221300,0.43314835368109506,2017 +Maine,221100,0.4952861952861953,2017 +Maine,221200,0.04276094276094276,2017 +Maine,221300,0.46195286195286195,2017 +Maryland,221100,0.8908489525909592,2017 +Maryland,221200,0.05883532123884935,2017 +Maryland,221300,0.05031572617019144,2017 +Massachusetts,221100,0.5584020842379505,2017 +Massachusetts,221200,0.2134896511796208,2017 +Massachusetts,221300,0.22810826458242872,2017 +Michigan,221100,0.8070104391648668,2017 +Michigan,221200,0.10920626349892008,2017 +Michigan,221300,0.0837832973362131,2017 +Minnesota,221100,0.8255193306405078,2017 +Minnesota,221200,0.1154068090017311,2017 +Minnesota,221300,0.05907386035776111,2017 +Mississippi,221100,0.7129931614939505,2017 +Mississippi,221200,0.06596528143082588,2017 +Mississippi,221300,0.22104155707522358,2017 +Missouri,221100,0.5108607334380586,2017 +Missouri,221200,0.14945019229727532,2017 +Missouri,221300,0.33968907426466605,2017 +Montana,221100,0.8063973063973064,2017 +Montana,221200,0.12558922558922558,2017 +Montana,221300,0.06801346801346801,2017 +Nebraska,221100,0.8951612903225806,2017 +Nebraska,221200,0.10483870967741936,2017 +Nebraska,221300,0.0,2017 +Nevada,221100,0.6723880597014925,2017 +Nevada,221200,0.0,2017 +Nevada,221300,0.3276119402985075,2017 +New Hampshire,221100,0.731433506044905,2017 +New Hampshire,221200,0.1157167530224525,2017 +New Hampshire,221300,0.15284974093264247,2017 +New Jersey,221100,0.5199914778779916,2017 +New Jersey,221200,0.32533200766990983,2017 +New Jersey,221300,0.15467651445209857,2017 +New Mexico,221100,0.5248955991005461,2017 +New Mexico,221200,0.1864760681015098,2017 +New Mexico,221300,0.2886283327979441,2017 +New York,221100,0.7557050836905247,2017 +New York,221200,0.17023059792629486,2017 +New York,221300,0.07406431838318048,2017 +North Carolina,221100,0.7267047363117232,2017 +North Carolina,221200,0.1394020826335237,2017 +North Carolina,221300,0.13389318105475312,2017 +North Dakota,221100,0.9312134977287476,2017 +North Dakota,221200,0.0,2017 +North Dakota,221300,0.06878650227125244,2017 +Ohio,221100,0.46731707317073173,2017 +Ohio,221200,0.1937630662020906,2017 +Ohio,221300,0.3389198606271777,2017 +Oklahoma,221100,0.4646304376570144,2017 +Oklahoma,221200,0.2499669443342589,2017 +Oklahoma,221300,0.2854026180087267,2017 +Oregon,221100,0.693427677234998,2017 +Oregon,221200,0.0,2017 +Oregon,221300,0.306572322765002,2017 +Pennsylvania,221100,0.48789112411969215,2017 +Pennsylvania,221200,0.1445933497756515,2017 +Pennsylvania,221300,0.3675155261046563,2017 +Rhode Island,221100,0.6435733819507748,2017 +Rhode Island,221200,0.0,2017 +Rhode Island,221300,0.35642661804922515,2017 +South Carolina,221100,0.7256625891946993,2017 +South Carolina,221200,0.059441896024464834,2017 +South Carolina,221300,0.21489551478083588,2017 +South Dakota,221100,0.7812343201204215,2017 +South Dakota,221200,0.09834420471650777,2017 +South Dakota,221300,0.12042147516307075,2017 +Tennessee,221100,0.7257370590100086,2017 +Tennessee,221200,0.08523164711743128,2017 +Tennessee,221300,0.18903129387256012,2017 +Texas,221100,0.5520989095152996,2017 +Texas,221200,0.09049685741031159,2017 +Texas,221300,0.3574042330743888,2017 +Utah,221100,0.45615528690618085,2017 +Utah,221200,0.13638685509960838,2017 +Utah,221300,0.4074578579942108,2017 +Vermont,221100,0.8371161548731643,2017 +Vermont,221200,0.0,2017 +Vermont,221300,0.1628838451268358,2017 +Virginia,221100,0.4747101327507982,2017 +Virginia,221200,0.09074105192404638,2017 +Virginia,221300,0.43454881532515544,2017 +Washington,221100,0.6614720438033063,2017 +Washington,221200,0.0368537432873539,2017 +Washington,221300,0.30167421290933977,2017 +West Virginia,221100,0.7480181200453001,2017 +West Virginia,221200,0.135522838807097,2017 +West Virginia,221300,0.11645904114760287,2017 +Wisconsin,221100,0.74617917757325,2017 +Wisconsin,221200,0.06400405302710462,2017 +Wisconsin,221300,0.18981676939964537,2017 +Wyoming,221100,0.8638007231820009,2017 +Wyoming,221200,0.09722780233025312,2017 +Wyoming,221300,0.038971474487746086,2017 +Alabama,221100,0.684650792245729,2018 +Alabama,221200,0.1001150747986191,2018 +Alabama,221300,0.21523413295565194,2018 +Alaska,221100,0.7220956719817767,2018 +Alaska,221200,0.13302961275626424,2018 +Alaska,221300,0.144874715261959,2018 +Arizona,221100,0.9928778686362437,2018 +Arizona,221200,0.0,2018 +Arizona,221300,0.007122131363756265,2018 +Arkansas,221100,0.5392538975501113,2018 +Arkansas,221200,0.09669636228656273,2018 +Arkansas,221300,0.3640497401633259,2018 +California,221100,0.3679787085025914,2018 +California,221200,0.0,2018 +California,221300,0.6320212914974086,2018 +Colorado,221100,0.7866749688667497,2018 +Colorado,221200,0.10859277708592777,2018 +Colorado,221300,0.10473225404732255,2018 +Connecticut,221100,0.5422583758444781,2018 +Connecticut,221200,0.10106162967048118,2018 +Connecticut,221300,0.3566799944850407,2018 +Delaware,221100,1.0,2018 +Delaware,221200,0.0,2018 +Delaware,221300,0.0,2018 +District Of Columbia,221100,1.0,2018 +District Of Columbia,221200,0.0,2018 +District Of Columbia,221300,0.0,2018 +Florida,221100,0.7543787909766237,2018 +Florida,221200,0.0585429019287126,2018 +Florida,221300,0.18707830709466367,2018 +Georgia,221100,0.822259484384825,2018 +Georgia,221200,0.10348983441626493,2018 +Georgia,221300,0.07425068119891008,2018 +Hawaii,221100,1.0,2018 +Hawaii,221200,0.0,2018 +Hawaii,221300,0.0,2018 +Idaho,221100,0.7649802655184786,2018 +Idaho,221200,0.0,2018 +Idaho,221300,0.23501973448152136,2018 +Illinois,221100,0.6557065509699165,2018 +Illinois,221200,0.16519057692997238,2018 +Illinois,221300,0.17910287210011117,2018 +Indiana,221100,0.7139877460565767,2018 +Indiana,221200,0.11752053187328901,2018 +Indiana,221300,0.16849172207013427,2018 +Iowa,221100,0.7842645953395139,2018 +Iowa,221200,0.07166123778501629,2018 +Iowa,221300,0.1440741668754698,2018 +Kansas,221100,0.5979872881355932,2018 +Kansas,221200,0.22709216101694915,2018 +Kansas,221300,0.17492055084745764,2018 +Kentucky,221100,0.5511009391523952,2018 +Kentucky,221200,0.07584247494278273,2018 +Kentucky,221300,0.37305658590482205,2018 +Louisiana,221100,0.4765664985011333,2018 +Louisiana,221200,0.09417269869123346,2018 +Louisiana,221300,0.42926080280763323,2018 +Maine,221100,0.48547008547008547,2018 +Maine,221200,0.043076923076923075,2018 +Maine,221300,0.47145299145299147,2018 +Maryland,221100,0.8828856021732568,2018 +Maryland,221200,0.06177683871616863,2018 +Maryland,221300,0.0553375591105745,2018 +Massachusetts,221100,0.5764583796605144,2018 +Massachusetts,221200,0.1868653176191535,2018 +Massachusetts,221300,0.23667630272033208,2018 +Michigan,221100,0.805064308681672,2018 +Michigan,221200,0.11017327617006073,2018 +Michigan,221300,0.08476241514826724,2018 +Minnesota,221100,0.8236276503049667,2018 +Minnesota,221200,0.11581469648562301,2018 +Minnesota,221300,0.060557653209410395,2018 +Mississippi,221100,0.7066994337001816,2018 +Mississippi,221200,0.06731488406881077,2018 +Mississippi,221300,0.2259856822310076,2018 +Missouri,221100,0.6396913200846821,2018 +Missouri,221200,0.01611691593252749,2018 +Missouri,221300,0.3441917639827904,2018 +Montana,221100,0.8091812264474135,2018 +Montana,221200,0.12572798903734156,2018 +Montana,221300,0.06509078451524494,2018 +Nebraska,221100,0.763048558815892,2018 +Nebraska,221200,0.1043884705271358,2018 +Nebraska,221300,0.13256297065697223,2018 +Nevada,221100,0.7101637639719262,2018 +Nevada,221200,0.0,2018 +Nevada,221300,0.28983623602807385,2018 +New Hampshire,221100,0.7230565371024735,2018 +New Hampshire,221200,0.11704946996466431,2018 +New Hampshire,221300,0.1598939929328622,2018 +New Jersey,221100,0.4937734730183831,2018 +New Jersey,221200,0.3590960005271134,2018 +New Jersey,221300,0.14713052645450353,2018 +New Mexico,221100,0.5184113201479338,2018 +New Mexico,221200,0.18684675992924907,2018 +New Mexico,221300,0.2947419199228172,2018 +New York,221100,0.8069856193292391,2018 +New York,221200,0.11608158313746304,2018 +New York,221300,0.07693279753329794,2018 +North Carolina,221100,0.7362545172947857,2018 +North Carolina,221200,0.13177594217862673,2018 +North Carolina,221300,0.13196954052658752,2018 +North Dakota,221100,0.7068273092369478,2018 +North Dakota,221200,0.1932730923694779,2018 +North Dakota,221300,0.09989959839357429,2018 +Ohio,221100,0.46649008468964553,2018 +Ohio,221200,0.1936709301920329,2018 +Ohio,221300,0.33983898511832156,2018 +Oklahoma,221100,0.46574797932953493,2018 +Oklahoma,221200,0.24897310189479263,2018 +Oklahoma,221300,0.28527891877567246,2018 +Oregon,221100,0.6922244759972954,2018 +Oregon,221200,0.0,2018 +Oregon,221300,0.3077755240027045,2018 +Pennsylvania,221100,0.4811219946571683,2018 +Pennsylvania,221200,0.14663104778866132,2018 +Pennsylvania,221300,0.37224695755417037,2018 +Rhode Island,221100,1.0,2018 +Rhode Island,221200,0.0,2018 +Rhode Island,221300,0.0,2018 +South Carolina,221100,0.7369428656895004,2018 +South Carolina,221200,0.055698474424169905,2018 +South Carolina,221300,0.20735865988632965,2018 +South Dakota,221100,0.7770475227502528,2018 +South Dakota,221200,0.10313447927199192,2018 +South Dakota,221300,0.1198179979777553,2018 +Tennessee,221100,0.724128552649472,2018 +Tennessee,221200,0.08549023163047913,2018 +Tennessee,221300,0.19038121572004896,2018 +Texas,221100,0.5450825098397949,2018 +Texas,221200,0.09513607202609502,2018 +Texas,221300,0.3597814181341101,2018 +Utah,221100,0.45962417470797357,2018 +Utah,221200,0.1271372947350601,2018 +Utah,221300,0.4132385305569663,2018 +Vermont,221100,0.8345612860013396,2018 +Vermont,221200,0.0,2018 +Vermont,221300,0.16543871399866042,2018 +Virginia,221100,0.46573434365946065,2018 +Virginia,221200,0.09399375975039001,2018 +Virginia,221300,0.4402718965901493,2018 +Washington,221100,0.6638834145835494,2018 +Washington,221200,0.037288663001763304,2018 +Washington,221300,0.29882792241468725,2018 +West Virginia,221100,0.7449802964908988,2018 +West Virginia,221200,0.13773691124038281,2018 +West Virginia,221300,0.11728279226871834,2018 +Wisconsin,221100,0.7335944299390774,2018 +Wisconsin,221200,0.06892950391644909,2018 +Wisconsin,221300,0.19747606614447347,2018 +Wyoming,221100,0.8308852719333069,2018 +Wyoming,221200,0.13298928146089717,2018 +Wyoming,221300,0.036125446605795954,2018 From ed6ae85b0c18f94612b48d3490a64ebfa35845f1 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 27 Jun 2022 16:25:33 -0400 Subject: [PATCH 036/121] generalize model data to apply to states or national model --- R/StateDisaggFunctions.R | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 2f93cac3..aee045d9 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -67,7 +67,7 @@ disaggregateNationalObjectsInStateModel <- function(model, disagg){ model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object # Format individual domestic use objects (DomesticUseTransactions, DomesticFinalDemand) - model$US_DomesticFullUse <- formatFullUseFromStateToUSEEIO(model$US_DomesticFullUse) # Note that the domestic full use object does not include value added rows + model$DomesticFullUse <- formatFullUseFromStateToUSEEIO(model$DomesticFullUse) # Note that the domestic full use object does not include value added rows model <- splitFullUse(model, domestic = TRUE) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior @@ -83,7 +83,7 @@ disaggregateNationalObjectsInStateModel <- function(model, disagg){ # Convert disaggregated objects back to stateior formats. Note that commodities and industries did not change format in disaggregation. model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state = "National") - model$US_DomesticFullUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) + model$DomesticFullUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) return(model) @@ -154,13 +154,13 @@ formatMakeFromUSEEIOtoState <- function(model, state){ formatFullUseFromUSEEIOtoState <- function(model, state, domestic = FALSE){ if(domestic == TRUE){ - model$US_DomesticFullUse <- cbind(model$DomesticUseTransactions, model$DomesticFinalDemand) # combine UseTransactions and FinalDemand columns + model$DomesticFullUse <- cbind(model$DomesticUseTransactions, model$DomesticFinalDemand) # combine UseTransactions and FinalDemand columns # Format row and column names - rownames(model$US_DomesticFullUse) <- gsub("\\/.*","",rownames(model$US_DomesticFullUse)) # remove everything after "/" - colnames(model$US_DomesticFullUse) <- gsub("\\/.*","",colnames(model$US_DomesticFullUse)) # remove everything after "/" + rownames(model$DomesticFullUse) <- gsub("\\/.*","",rownames(model$DomesticFullUse)) # remove everything after "/" + colnames(model$DomesticFullUse) <- gsub("\\/.*","",colnames(model$DomesticFullUse)) # remove everything after "/" - return(model$US_DomesticFullUse) + return(model$DomesticFullUse) }else{ tempFullUse <- cbind(model$UseTransactions, model$FinalDemand) # combine UseTransactions and FinalDemand columns @@ -193,8 +193,8 @@ splitFullUse <- function(model, domestic = FALSE){ numCommodities <- length(model$Commodities) # Find number of commodities numIndustries <- length(model$Industries) # Find number of industries - model$DomesticUseTransactions <- model$US_DomesticFullUse[1:numCommodities, 1:numIndustries] # Get subset of FullUse with numCommodities rows and numIndustries columns - model$DomesticFinalDemand <- model$US_DomesticFullUse[1:numCommodities,-(1:numIndustries)] # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries + model$DomesticUseTransactions <- model$DomesticFullUse[1:numCommodities, 1:numIndustries] # Get subset of FullUse with numCommodities rows and numIndustries columns + model$DomesticFinalDemand <- model$DomesticFullUse[1:numCommodities,-(1:numIndustries)] # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries }else{ numCommodities <- dim(model$CommodityOutput)[1] # Find number of commodities From 5e0b8f5c10ea86f6925687929ff6a011ff73093c Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 27 Jun 2022 16:25:53 -0400 Subject: [PATCH 037/121] disaggregate domestic use table in state model --- R/StateDisaggFunctions.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index aee045d9..465b0d6c 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -30,13 +30,17 @@ disaggregateStateModel <- function(model, state){ # Formatting model objects according to useeior disaggregation formats model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object model$FullUse <- formatFullUseFromStateToUSEEIO(model$FullUse) # Formatting row/column names in FullUse object + model$DomesticFullUse <- formatFullUseFromStateToUSEEIO(model$DomesticFullUse) model <- splitFullUse(model) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects + model <- splitFullUse(model, domestic = TRUE) # Disaggregating specified model objects model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) model$UseTransactions <- useeior:::disaggregateUseTable(model, disagg) model$FinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = FALSE) + model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) + model$DomesticFinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = TRUE) model$UseValueAdded <- useeior:::disaggregateVA(model, disagg) if(model$specs$CommodityorIndustryType=="Commodity") { @@ -47,6 +51,7 @@ disaggregateStateModel <- function(model, state){ # Formatting disaggregated model objects back to stateior formats model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state) model$FullUse <- formatFullUseFromUSEEIOtoState(model, state) + model$DomesticFullUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) } From d995bdbd117a804b7798a5282156907fa3243ceb Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 27 Jun 2022 16:26:54 -0400 Subject: [PATCH 038/121] incorporate domestic use table into state disaggregation; pass disaggregated tables as model objects to `buildTwoRegionUseModel` --- R/BuildModel.R | 77 ++++++++++++++++++++------------------------------ 1 file changed, 30 insertions(+), 47 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index fb583788..f86e0af3 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -280,12 +280,12 @@ buildStateUseModel <- function(year) { buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, ICF_sensitivity_analysis = FALSE, adjust_by = 0, domestic = TRUE, - disagg = NULL) { + model, disagg = NULL) { startLogging() # 0 - Define commodities, industries, final demand columns, import column, and # international trade adjustment column - commodities <- getVectorOfCodes(iolevel, "Commodity") - industries <- getVectorOfCodes(iolevel, "Industry") + commodities <- model$Commodities + industries <- model$Industries FD_cols <- getFinalDemandCodes(iolevel) import_col <- getVectorOfCodes(iolevel, "Import") @@ -298,38 +298,15 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, # All sectors except international imports nonimport_cols <- c(industries, FD_cols[-which(FD_cols %in% import_col)]) - # 1 - Load state domestic Use for the specified year - logging::loginfo("Loading state Domestic Use table...") - SoI_DomesticUse <- loadStateIODataFile(paste0("State_", - iolevel, - "_DomesticUse_", - year))[[state]] - - # Need to re-disaggregate the Use table + # 1 - Load state domestic Use and commodity output for the specified year + SoI_DomesticUse <- model$DomesticFullUse[commodities, ] + SoI_CommodityOutput <- model$CommodityOutput + + # Disaggregate remaining objects if(!is.null(disagg)){ - model <- list() - model$DisaggregationSpecs[[1]] <- disagg - m <- formatFullUseFromStateToUSEEIO(SoI_DomesticUse) - - model$DomesticUseTransactions <- m[1:length(commodities), 1:length(industries)] - model$DomesticFinalDemand <- m[1:length(commodities),-(1:length(industries))] - - model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) - model$DomesticFinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = TRUE) - - SoI_DomesticUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) - - commodities <- disaggregateStateSectorLists(commodities, disagg) - industries <- disaggregateStateSectorLists(industries, disagg) tradable_cols <- disaggregateStateSectorLists(tradable_cols, disagg) - nonimport_cols <- disaggregateStateSectorLists(nonimport_cols, disagg) - - } else { - SoI_DomesticUse <- SoI_DomesticUse[commodities, ] } - # Disaggregate SoI_DomesticUse - # 2 - Generate 2-region ICFs logging::loginfo("Generating two-region interregional commodity flow (ICF) ratios...") ICF <- generateDomestic2RegionICFs(state, year, ioschema, iolevel, @@ -343,12 +320,7 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, logging::loginfo("Generating SoI2SoI Use table...") SoI2SoI_Use <- SoI_DomesticUse SoI2SoI_Use[, tradable_cols] <- SoI_DomesticUse[, tradable_cols] * ICF$SoI2SoI - # Load state commodity output - logging::loginfo("Loading state commodity output...") - SoI_CommodityOutput <- loadStateIODataFile(paste0("State_", - iolevel, - "_CommodityOutput_", - year))[[state]] + # Calculate Interregional Imports, Exports, and Net Exports logging::loginfo("Calculating SoI2SoI interregional imports and exports and net exports...") SoI2SoI_Use$InterregionalImports <- rowSums(SoI_DomesticUse[, tradable_cols]) - rowSums(SoI2SoI_Use[, tradable_cols]) @@ -556,6 +528,10 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { # Load state Make, industry and commodity output State_Make_ls <- loadStateIODataFile(paste0("State_", iolevel, "_Make_", year)) State_Use_ls <- loadStateIODataFile(paste0("State_", iolevel, "_Use_", year)) + State_DomesticUse_ls <- loadStateIODataFile(paste0("State_", + iolevel, + "_DomesticUse_", + year)) State_IndustryOutput_ls <- loadStateIODataFile(paste0("State_", iolevel, "_IndustryOutput_", @@ -580,14 +556,14 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { model$Industries <- industries model$Commodities <- commodities model$MakeTransactions <- US_Make - model$US_DomesticFullUse <- US_DomesticUse # Note that the domestic full use object does not include value added rows + model$DomesticFullUse <- US_DomesticUse # Note that the domestic full use object does not include value added rows # Disaggregate national model objects once (i.e. not for each state) model <- disaggregateNationalObjectsInStateModel(model, disagg) # Assign the disaggregated model objects to the original stateior objects US_Make <- model$MakeTransactions - US_DomesticUse <- model$US_DomesticFullUse + US_DomesticUse <- model$DomesticFullUse industries <- model$Industries commodities <- model$Commodities @@ -595,6 +571,7 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { for (state in sort(c(state.name, "District of Columbia"))) { model$MakeTransactions <- State_Make_ls[[state]] model$FullUse <- State_Use_ls[[state]] + model$DomesticFullUse <- State_DomesticUse_ls[[state]] model$CommodityOutput <- State_CommodityOutput_ls[[state]] model$IndustryOutput <- State_IndustryOutput_ls[[state]] @@ -603,6 +580,7 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { # Assign the disaggregated model objects to the stateior lists State_Make_ls[[state]] <- model$MakeTransactions State_Use_ls[[state]] <- model$FullUse + State_DomesticUse_ls[[state]] <- model$DomesticFullUse State_CommodityOutput_ls[[state]] <- model$CommodityOutput State_IndustryOutput_ls[[state]] <- model$IndustryOutput @@ -610,20 +588,25 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { } #end of if disaggregationSpecs is not empty statement - } #End of Disaggregation for state model obstcs + } #End of Disaggregation for state model objects # Assemble two-region IO tables TwoRegionIO <- list() for (state in sort(c(state.name, "District of Columbia"))) { ## Two-region Make - SoI_Make <- State_Make_ls[[state]] - rownames(SoI_Make) <- getBEASectorCodeLocation("Industry", state, iolevel, disagg) - colnames(SoI_Make) <- getBEASectorCodeLocation("Commodity", state, iolevel, disagg) - RoUS_Make <- US_Make - SoI_Make + model$MakeTransactions <- State_Make_ls[[state]] + model$FullUse <- State_Use_ls[[state]] + model$DomesticFullUse <- State_DomesticUse_ls[[state]] + model$CommodityOutput <- State_CommodityOutput_ls[[state]] + model$IndustryOutput <- State_IndustryOutput_ls[[state]] + + rownames(model$MakeTransactions) <- getBEASectorCodeLocation("Industry", state, iolevel, disagg) + colnames(model$MakeTransactions) <- getBEASectorCodeLocation("Commodity", state, iolevel, disagg) + RoUS_Make <- US_Make - model$MakeTransactions rownames(RoUS_Make) <- getBEASectorCodeLocation("Industry", "RoUS", iolevel, disagg) colnames(RoUS_Make) <- getBEASectorCodeLocation("Commodity", "RoUS", iolevel, disagg) # Form two-region Make - TwoRegionMake <- SoI_Make + TwoRegionMake <- model$MakeTransactions TwoRegionMake[rownames(RoUS_Make), colnames(RoUS_Make)] <- RoUS_Make # Replace NA with 0 in two-region Make TwoRegionMake[is.na(TwoRegionMake)] <- 0 @@ -632,14 +615,14 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { ## Two-region Use and Domestic Use table TwoRegionUseModel <- buildTwoRegionUseModel(state, year, ioschema = 2012, iolevel = iolevel, domestic = FALSE, - disagg = disagg) + model = model, disagg = disagg) TwoRegionUse <- cbind(rbind(TwoRegionUseModel[["SoI2SoI"]][commodities, c(industries, FD_cols)], TwoRegionUseModel[["RoUS2SoI"]][commodities, c(industries, FD_cols)]), rbind(TwoRegionUseModel[["SoI2RoUS"]][commodities, c(industries, FD_cols)], TwoRegionUseModel[["RoUS2RoUS"]][commodities, c(industries, FD_cols)])) TwoRegionDomesticUseModel <- buildTwoRegionUseModel(state, year, ioschema = 2012, iolevel = iolevel, domestic = TRUE, - disagg = disagg) + model = model, disagg = disagg) TwoRegionDomesticUse <- cbind(rbind(TwoRegionDomesticUseModel[["SoI2SoI"]][commodities, c(industries, FD_cols)], TwoRegionDomesticUseModel[["RoUS2SoI"]][commodities, c(industries, FD_cols)]), rbind(TwoRegionDomesticUseModel[["SoI2RoUS"]][commodities, c(industries, FD_cols)], From 2085db56f3d74a7e8860d23c206896f1455884a7 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 27 Jun 2022 16:33:55 -0400 Subject: [PATCH 039/121] use already disaggregated make and use --- R/BuildModel.R | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index f86e0af3..b6934795 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -329,11 +329,11 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, # 4 - Generate RoUS domestic Use and commodity output # Generate RoUS domestic Use logging::loginfo("Generating RoUS Domestic Use table...") - US_DomesticUse <- generateUSDomesticUse(iolevel, year) + US_DomesticUse <- model$US_DomesticUse RoUS_DomesticUse <- US_DomesticUse - SoI_DomesticUse # Calculate RoUS Commodity Output logging::loginfo("Generating RoUS commodity output...") - US_Make <- getNationalMake(iolevel, year) + US_Make <- model$US_Make US_CommodityOutput <- colSums(US_Make) RoUS_CommodityOutput <- US_CommodityOutput - SoI_CommodityOutput colnames(RoUS_CommodityOutput) <- "Output" @@ -561,9 +561,11 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { # Disaggregate national model objects once (i.e. not for each state) model <- disaggregateNationalObjectsInStateModel(model, disagg) - # Assign the disaggregated model objects to the original stateior objects + # Assign the disaggregated model objects to the original stateior objects, rename some as national US_Make <- model$MakeTransactions + model$US_Make <- model$MakeTransactions US_DomesticUse <- model$DomesticFullUse + model$US_DomesticUse <- model$DomesticFullUse industries <- model$Industries commodities <- model$Commodities From fd58780753b52c3b5b89791848e1abdfe1c75a90 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 27 Jun 2022 20:50:53 -0400 Subject: [PATCH 040/121] replace NA with 0 --- R/StateDisaggFunctions.R | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 465b0d6c..5e672633 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -20,7 +20,6 @@ getStateModelDisaggSpecs <- function(){ #' @return A stateior model with the disaggregateed objects disaggregateStateModel <- function(model, state){ - # TODO: Include disaggregation of domestic use for each state # TODO: Include validation checks for row/column sums - note that there may be unexpected results due to existing negative values in state use tables. for (disagg in model$DisaggregationSpecs){ @@ -36,12 +35,18 @@ disaggregateStateModel <- function(model, state){ # Disaggregating specified model objects model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) - + model$MakeTransactions[is.na(model$MakeTransactions)] <- 0 + model$UseTransactions <- useeior:::disaggregateUseTable(model, disagg) + model$UseTransactions[is.na(model$UseTransactions)] <- 0 model$FinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = FALSE) + model$FinalDemand[is.na(model$FinalDemand)] <- 0 model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) + model$DomesticUseTransactions[is.na(model$DomesticUseTransactions)] <- 0 model$DomesticFinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = TRUE) + model$DomesticFinalDemand[is.na(model$DomesticFinalDemand)] <- 0 model$UseValueAdded <- useeior:::disaggregateVA(model, disagg) + model$UseValueAdded[is.na(model$UseValueAdded)] <- 0 if(model$specs$CommodityorIndustryType=="Commodity") { model <- calculateStateIndustryCommodityOuput(model) # Also formats the disaggregated industry and commodity outputs to stateior formats @@ -70,23 +75,24 @@ disaggregateNationalObjectsInStateModel <- function(model, disagg){ # Format Make model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object - + # Format individual domestic use objects (DomesticUseTransactions, DomesticFinalDemand) model$DomesticFullUse <- formatFullUseFromStateToUSEEIO(model$DomesticFullUse) # Note that the domestic full use object does not include value added rows model <- splitFullUse(model, domestic = TRUE) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects - model$specs$CommodityorIndustryType <- "Commodity" # Needed for disaggregation of model$FinalDemand model object in useeior - + # Disaggregate model objects - model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) + model$MakeTransactions[is.na(model$MakeTransactions)] <- 0 + model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) + model$DomesticUseTransactions[is.na(model$DomesticUseTransactions)] <- 0 model$DomesticFinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = TRUE) - # Disaggregate industry and commodity lists last because the original lists are used in the disaggregation of the other obejcts + model$DomesticFinalDemand[is.na(model$DomesticFinalDemand)] <- 0 + model$Industries <- disaggregateStateSectorLists(model$Industries, disagg) model$Commodities <- disaggregateStateSectorLists(model$Commodities, disagg) # Convert disaggregated objects back to stateior formats. Note that commodities and industries did not change format in disaggregation. - model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state = "National") model$DomesticFullUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) @@ -148,7 +154,7 @@ formatMakeFromUSEEIOtoState <- function(model, state){ columnLabels <- colnames(model$MakeTransactions) columnLabels <- gsub("\\/.*","",columnLabels) # remove everything after "/" colnames(model$MakeTransactions) <- columnLabels # replace old column labels with new ones - + return(model$MakeTransactions) } @@ -164,7 +170,6 @@ formatFullUseFromUSEEIOtoState <- function(model, state, domestic = FALSE){ # Format row and column names rownames(model$DomesticFullUse) <- gsub("\\/.*","",rownames(model$DomesticFullUse)) # remove everything after "/" colnames(model$DomesticFullUse) <- gsub("\\/.*","",colnames(model$DomesticFullUse)) # remove everything after "/" - return(model$DomesticFullUse) }else{ @@ -184,7 +189,6 @@ formatFullUseFromUSEEIOtoState <- function(model, state, domestic = FALSE){ model$FullUse <- rbind(tempFullUse, tempVA) rownames(model$FullUse) <- gsub("\\/.*","",rownames(model$FullUse)) # remove everything after "/" colnames(model$FullUse) <- gsub("\\/.*","",colnames(model$FullUse)) # remove everything after "/" - return(model$FullUse) } From ae1e3bdca5c5febfe3182de424f7eb2fdd028461 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 27 Jun 2022 21:11:55 -0400 Subject: [PATCH 041/121] handle ICF separately for disaggregated utilities --- R/InteregionalCommodityFlowFunctions.R | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/R/InteregionalCommodityFlowFunctions.R b/R/InteregionalCommodityFlowFunctions.R index 37c0d073..125a9e6b 100644 --- a/R/InteregionalCommodityFlowFunctions.R +++ b/R/InteregionalCommodityFlowFunctions.R @@ -142,17 +142,27 @@ generateDomestic2RegionICFs <- function(state, year, ioschema, iolevel, CommodityCodeName <- loadDatafromUSEEIOR(paste(iolevel, "CommodityCodeName_2012", sep = "_")) + # Update commodities from disaggregation + disagg <- data.frame(BEA_2012_Summary_Commodity_Code = c("221100", "221200", "221300"), + BEA_2012_Summary_Commodity_Name = c("Elec", "NG", "Water")) + CommodityCodeName <- CommodityCodeName[CommodityCodeName$BEA_2012_Summary_Commodity_Code!="22",] + CommodityCodeName <- rbind(CommodityCodeName, disagg) + ICF <- merge(ICF_2r_wide, CommodityCodeName, by.x = bea, by.y = paste("BEA", ioschema, iolevel, "Commodity_Code", sep = "_"), all.y = TRUE) if (iolevel == "Summary") { # Adjust utilities + ICF[ICF[, bea] == "221100", cols] <- calculateElectricityFlowRatios(state, year)[, cols] + ICF[ICF[, bea] == "221100", "source"] <- "EIA" + ICF[ICF[, bea] %in% c("221200", "221300"), cols] <- data.frame("SoI2SoI" = 1, + "SoI2RoUS" = 0, + "RoUS2SoI" = 0, + "RoUS2RoUS" = 1) + ICF[ICF[, bea]%in% c("221200", "221300"), "source"] <- "Assuming no interregional trade" - ## Adjust for disaggregation: - - - ICF[ICF[, bea] == "22", cols] <- calculateUtilitiesFlowRatios(state, year)[, cols] - ICF[ICF[, bea] == "22", "source"] <- "EIA" + # ICF[ICF[, bea] == "22", cols] <- calculateUtilitiesFlowRatios(state, year)[, cols] + # ICF[ICF[, bea] == "22", "source"] <- "EIA" # Adjust waste management and remediation services ICF[ICF[, bea] == "562", cols] <- calculateWasteManagementServiceFlowRatios(state, year)[, cols] From 89f109e4c6c0018ca34a5e72e134e6dd4b5b3e6c Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 27 Jun 2022 21:26:25 -0400 Subject: [PATCH 042/121] make sure ICF order matches --- R/BuildModel.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/BuildModel.R b/R/BuildModel.R index b6934795..433157fb 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -311,6 +311,8 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, logging::loginfo("Generating two-region interregional commodity flow (ICF) ratios...") ICF <- generateDomestic2RegionICFs(state, year, ioschema, iolevel, ICF_sensitivity_analysis, adjust_by) + ICF <- ICF[match(rownames(SoI_CommodityOutput), ICF$BEA_2012_Summary_Code),] + # Only allocate "error" to rows (commodities) that does not have ICF of 1 or 0 commodities_notrade <- ICF[ICF$SoI2SoI == 1 & ICF$SoI2RoUS == 0 & ICF$RoUS2RoUS == 1 & ICF$RoUS2SoI == 0, 1] From ad023827d649cb7582be5125bd2e4b09c8db0291 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 27 Jun 2022 22:16:06 -0400 Subject: [PATCH 043/121] add disaggregated US_Use to model object --- R/BuildModel.R | 11 +++++++---- R/StateDisaggFunctions.R | 24 +++++++++++++++--------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 433157fb..63be27c0 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -477,8 +477,8 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, # to form two-region total Use table. if (!domestic) { # Load US and SoI Use, calcuate RoUS_Use - US_Use <- getNationalUse("Summary", year) - SoI_Use <- loadStateIODataFile(paste0("State_", iolevel, "_Use_", year))[[state]] + US_Use <- model$US_Use + SoI_Use <- model$FullUse RoUS_Use <- US_Use - SoI_Use[commodities, c(industries, FD_cols)] # Calculate SoI_Import and RoUS_Import SoI_Import <- SoI_Use[commodities, c(industries, FD_cols)] - SoI_DomesticUse[commodities, c(industries, FD_cols)] @@ -526,6 +526,7 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { nonimport_cols <- c(industries, FD_cols[-which(FD_cols %in% import_col)]) # Load US Make table US_Make <- getNationalMake(iolevel, year) + US_Use <- getNationalUse(iolevel, year) US_DomesticUse <- generateUSDomesticUse(iolevel, year) # Load state Make, industry and commodity output State_Make_ls <- loadStateIODataFile(paste0("State_", iolevel, "_Make_", year)) @@ -558,6 +559,7 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { model$Industries <- industries model$Commodities <- commodities model$MakeTransactions <- US_Make + model$FullUse <- US_Use model$DomesticFullUse <- US_DomesticUse # Note that the domestic full use object does not include value added rows # Disaggregate national model objects once (i.e. not for each state) @@ -568,10 +570,11 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { model$US_Make <- model$MakeTransactions US_DomesticUse <- model$DomesticFullUse model$US_DomesticUse <- model$DomesticFullUse + model$US_Use <- model$FullUse industries <- model$Industries commodities <- model$Commodities - - # Loop for obejcts that need to be disaggregated objects for each state + + # Loop for objects that need to be disaggregated objects for each state for (state in sort(c(state.name, "District of Columbia"))) { model$MakeTransactions <- State_Make_ls[[state]] model$FullUse <- State_Use_ls[[state]] diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 5e672633..7967375f 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -72,14 +72,17 @@ disaggregateStateModel <- function(model, state){ disaggregateNationalObjectsInStateModel <- function(model, disagg){ # Format specified national stateior objects to model to prepare for disaggregation - + model$origCommodities <- ncol(model$MakeTransactions) + model$origIndustries <- nrow(model$MakeTransactions) # Format Make model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object # Format individual domestic use objects (DomesticUseTransactions, DomesticFinalDemand) model$DomesticFullUse <- formatFullUseFromStateToUSEEIO(model$DomesticFullUse) # Note that the domestic full use object does not include value added rows model <- splitFullUse(model, domestic = TRUE) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects - + model$FullUse <- formatFullUseFromStateToUSEEIO(model$FullUse) + model <- splitFullUse(model, domestic = FALSE) + # Disaggregate model objects model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) model$MakeTransactions[is.na(model$MakeTransactions)] <- 0 @@ -87,7 +90,13 @@ disaggregateNationalObjectsInStateModel <- function(model, disagg){ model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) model$DomesticUseTransactions[is.na(model$DomesticUseTransactions)] <- 0 model$DomesticFinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = TRUE) - model$DomesticFinalDemand[is.na(model$DomesticFinalDemand)] <- 0 + model$DomesticFinalDemand[is.na(model$DomesticFinalDemand)] <- 0 + model$UseTransactions <- useeior:::disaggregateUseTable(model, disagg) + model$UseTransactions[is.na(model$UseTransactions)] <- 0 + model$FinalDemand <- useeior:::disaggregateFinalDemand(model, disagg, domestic = FALSE) + model$FinalDemand[is.na(model$FinalDemand)] <- 0 + model$UseValueAdded <- useeior:::disaggregateVA(model, disagg) + model$UseValueAdded[is.na(model$UseValueAdded)] <- 0 model$Industries <- disaggregateStateSectorLists(model$Industries, disagg) model$Commodities <- disaggregateStateSectorLists(model$Commodities, disagg) @@ -95,6 +104,7 @@ disaggregateNationalObjectsInStateModel <- function(model, disagg){ # Convert disaggregated objects back to stateior formats. Note that commodities and industries did not change format in disaggregation. model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state = "National") model$DomesticFullUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) + model$FullUse <- formatFullUseFromUSEEIOtoState(model, state) return(model) @@ -198,17 +208,13 @@ formatFullUseFromUSEEIOtoState <- function(model, state, domestic = FALSE){ #' @return A model object with FullUse split into UseTransactions, FinalDemand, and UseValueAdded objects splitFullUse <- function(model, domestic = FALSE){ + numCommodities <- model$origCommodities # Find number of commodities + numIndustries <- model$origIndustries # Find number of industries if(domestic == TRUE){ - numCommodities <- length(model$Commodities) # Find number of commodities - numIndustries <- length(model$Industries) # Find number of industries - model$DomesticUseTransactions <- model$DomesticFullUse[1:numCommodities, 1:numIndustries] # Get subset of FullUse with numCommodities rows and numIndustries columns model$DomesticFinalDemand <- model$DomesticFullUse[1:numCommodities,-(1:numIndustries)] # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries }else{ - numCommodities <- dim(model$CommodityOutput)[1] # Find number of commodities - numIndustries <- dim(model$IndustryOutput)[1] # Find number of industries - model$UseTransactions <- model$FullUse[1:numCommodities, 1:numIndustries] # Get subset of FullUse with numCommodities rows and numIndustries columns model$UseValueAdded <- model$FullUse[-(1:numCommodities),1:numIndustries] # Get subset of FullUse, starting from rows after numCommodities, with numIndustries columns model$FinalDemand <- model$FullUse[1:numCommodities,-(1:numIndustries)] # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries From 539183b1461a71a16db04ab8f1f8984e2b183fde Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 28 Jun 2022 08:15:54 -0400 Subject: [PATCH 044/121] disaggregate overseas to ensure all are equal size --- R/BuildModel.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 63be27c0..f527c5ee 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -575,7 +575,7 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { commodities <- model$Commodities # Loop for objects that need to be disaggregated objects for each state - for (state in sort(c(state.name, "District of Columbia"))) { + for (state in sort(c(state.name, "District of Columbia", "Overseas"))) { model$MakeTransactions <- State_Make_ls[[state]] model$FullUse <- State_Use_ls[[state]] model$DomesticFullUse <- State_DomesticUse_ls[[state]] From 6a672247b0c6ba278564e1120238b95197f2ab9b Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 28 Jun 2022 08:16:07 -0400 Subject: [PATCH 045/121] reassign nonimport cols after disaggregation --- R/BuildModel.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/BuildModel.R b/R/BuildModel.R index f527c5ee..99679e24 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -597,6 +597,9 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { } #End of Disaggregation for state model objects + # reassign nonimport cols after disaggregation + nonimport_cols <- c(industries, FD_cols[-which(FD_cols %in% import_col)]) + # Assemble two-region IO tables TwoRegionIO <- list() for (state in sort(c(state.name, "District of Columbia"))) { From 07d8ca0b7bd4040746809ca1209ca38dc41655ac Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 28 Jun 2022 08:30:45 -0400 Subject: [PATCH 046/121] assign model objects initially if model object is present --- R/BuildModel.R | 46 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 99679e24..89beb889 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -275,17 +275,47 @@ buildStateUseModel <- function(year) { #' to ICF if a sensitivity analysis is conducted, default is 0 due to no SA. #' @param domestic A logical value indicating whether to use Domestic Use tables, #' default is TRUE. +#' @param model +#' @param disagg #' @return A list of domestic two-region Use tables. #' @export buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, ICF_sensitivity_analysis = FALSE, adjust_by = 0, domestic = TRUE, - model, disagg = NULL) { + model = NULL, disagg = NULL) { startLogging() # 0 - Define commodities, industries, final demand columns, import column, and - # international trade adjustment column - commodities <- model$Commodities - industries <- model$Industries + # international trade adjustment column and + # 1 - Load state domestic Use and commodity output for the specified year + + if (is.null(model)) { + # If no model object is passed, generate these objects + commodities <- getVectorOfCodes(iolevel, "Commodity") + industries <- getVectorOfCodes(iolevel, "Industry") + SoI_DomesticUse <- loadStateIODataFile(paste0("State_", + iolevel, + "_DomesticUse_", + year))[[state]][commodities, ] + SoI_CommodityOutput <- loadStateIODataFile(paste0("State_", + iolevel, + "_CommodityOutput_", + year))[[state]] + US_DomesticUse <- generateUSDomesticUse(iolevel, year) + US_Make <- getNationalMake(iolevel, year) + US_Use <- getNationalUse("Summary", year) + SoI_Use <- loadStateIODataFile(paste0("State_", iolevel, "_Use_", year))[[state]] + + } else { + commodities <- model$Commodities + industries <- model$Industries + SoI_DomesticUse <- model$DomesticFullUse[commodities, ] + SoI_CommodityOutput <- model$CommodityOutput + US_DomesticUse <- model$US_DomesticUse + US_Make <- model$US_Make + US_Use <- model$US_Use + SoI_Use <- model$FullUse + } + FD_cols <- getFinalDemandCodes(iolevel) import_col <- getVectorOfCodes(iolevel, "Import") @@ -298,10 +328,6 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, # All sectors except international imports nonimport_cols <- c(industries, FD_cols[-which(FD_cols %in% import_col)]) - # 1 - Load state domestic Use and commodity output for the specified year - SoI_DomesticUse <- model$DomesticFullUse[commodities, ] - SoI_CommodityOutput <- model$CommodityOutput - # Disaggregate remaining objects if(!is.null(disagg)){ tradable_cols <- disaggregateStateSectorLists(tradable_cols, disagg) @@ -331,11 +357,9 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, # 4 - Generate RoUS domestic Use and commodity output # Generate RoUS domestic Use logging::loginfo("Generating RoUS Domestic Use table...") - US_DomesticUse <- model$US_DomesticUse RoUS_DomesticUse <- US_DomesticUse - SoI_DomesticUse # Calculate RoUS Commodity Output logging::loginfo("Generating RoUS commodity output...") - US_Make <- model$US_Make US_CommodityOutput <- colSums(US_Make) RoUS_CommodityOutput <- US_CommodityOutput - SoI_CommodityOutput colnames(RoUS_CommodityOutput) <- "Output" @@ -477,8 +501,6 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, # to form two-region total Use table. if (!domestic) { # Load US and SoI Use, calcuate RoUS_Use - US_Use <- model$US_Use - SoI_Use <- model$FullUse RoUS_Use <- US_Use - SoI_Use[commodities, c(industries, FD_cols)] # Calculate SoI_Import and RoUS_Import SoI_Import <- SoI_Use[commodities, c(industries, FD_cols)] - SoI_DomesticUse[commodities, c(industries, FD_cols)] From bc2e61b61a8e77b9137b7b79ad86f64240a85822 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 28 Jun 2022 08:38:54 -0400 Subject: [PATCH 047/121] update documentation --- R/BuildModel.R | 4 ++-- R/StateDisaggFunctions.R | 17 ++++++++++----- man/assembleTwoRegionIO.Rd | 4 +++- man/buildTwoRegionUseModel.Rd | 8 ++++++- man/calculateStateIndustryCommodityOuput.Rd | 17 +++++++++++++++ ...disaggregateNationalObjectsInStateModel.Rd | 19 +++++++++++++++++ man/disaggregateStateModel.Rd | 19 +++++++++++++++++ man/disaggregateStateSectorLists.Rd | 19 +++++++++++++++++ man/formatFullUseFromStateToUSEEIO.Rd | 17 +++++++++++++++ man/formatFullUseFromUSEEIOtoState.Rd | 21 +++++++++++++++++++ man/formatMakeFromStateToUSEEIO.Rd | 19 +++++++++++++++++ man/formatMakeFromUSEEIOtoState.Rd | 19 +++++++++++++++++ man/getBEASectorCodeLocation.Rd | 2 +- man/getStateModelDisaggSpecs.Rd | 14 +++++++++++++ man/splitFullUse.Rd | 19 +++++++++++++++++ 15 files changed, 208 insertions(+), 10 deletions(-) create mode 100644 man/calculateStateIndustryCommodityOuput.Rd create mode 100644 man/disaggregateNationalObjectsInStateModel.Rd create mode 100644 man/disaggregateStateModel.Rd create mode 100644 man/disaggregateStateSectorLists.Rd create mode 100644 man/formatFullUseFromStateToUSEEIO.Rd create mode 100644 man/formatFullUseFromUSEEIOtoState.Rd create mode 100644 man/formatMakeFromStateToUSEEIO.Rd create mode 100644 man/formatMakeFromUSEEIOtoState.Rd create mode 100644 man/getStateModelDisaggSpecs.Rd create mode 100644 man/splitFullUse.Rd diff --git a/R/BuildModel.R b/R/BuildModel.R index 89beb889..1e32b9e1 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -275,8 +275,8 @@ buildStateUseModel <- function(year) { #' to ICF if a sensitivity analysis is conducted, default is 0 due to no SA. #' @param domestic A logical value indicating whether to use Domestic Use tables, #' default is TRUE. -#' @param model -#' @param disagg +#' @param model optional, a model object with state tables +#' @param disagg optional, disaggregation specs #' @return A list of domestic two-region Use tables. #' @export buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 7967375f..36e1620e 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -1,5 +1,5 @@ - +#' Read and assign disaggregation specifications #' @return A stateior model object with the disaggregation specs loaded. getStateModelDisaggSpecs <- function(){ @@ -15,6 +15,7 @@ getStateModelDisaggSpecs <- function(){ } +#' Disaggregate state make and use tables #' @param model An stateior model object with model specs and specific IO tables loaded #' @param state A string value that indicates the state model being disaggregated #' @return A stateior model with the disaggregateed objects @@ -66,6 +67,7 @@ disaggregateStateModel <- function(model, state){ } +#' Disaggregate national make and use tables #' @param model An stateior model object with model specs and specific IO tables loaded #' @param disagg Specifications for model disaggregation #' @return A stateior model with the disaggregateed objects @@ -106,12 +108,11 @@ disaggregateNationalObjectsInStateModel <- function(model, disagg){ model$DomesticFullUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) model$FullUse <- formatFullUseFromUSEEIOtoState(model, state) - return(model) - - + } +#' Format model objects to prepare for use in useeior functions #' @param model An stateior model object with model specs and specific IO tables loaded #' @param state A string value that indicates the state model being disaggregated #' @return A stateior make table formatted for disaggregation with useeior functions @@ -133,6 +134,7 @@ formatMakeFromStateToUSEEIO <- function(model, state){ return(model$MakeTransactions) } +#' Format Use table objects to prepare for use in useeior functions #' @param table FullUse table #' @return The FullUse model object with useeior formatting fit for disaggregation functions formatFullUseFromStateToUSEEIO <- function(table){ @@ -148,6 +150,7 @@ formatFullUseFromStateToUSEEIO <- function(table){ return(table) } +#' Format Make table objects back to stateior format #' @param model An stateior model object with model specs and specific IO tables loaded #' @param state A string value that indicates the state model being disaggregated #' @return A stateior make table formatted according to stateior specifications @@ -168,6 +171,7 @@ formatMakeFromUSEEIOtoState <- function(model, state){ return(model$MakeTransactions) } +#' Format Use table objects back to stateior format #' @param model An stateior model object with model specs and specific IO tables loaded #' @param state A string value that indicates the state model being disaggregated #' @param domestic A boolean that indicates whether the table to format is the domesticUse table or not @@ -182,7 +186,7 @@ formatFullUseFromUSEEIOtoState <- function(model, state, domestic = FALSE){ colnames(model$DomesticFullUse) <- gsub("\\/.*","",colnames(model$DomesticFullUse)) # remove everything after "/" return(model$DomesticFullUse) - }else{ + } else { tempFullUse <- cbind(model$UseTransactions, model$FinalDemand) # combine UseTransactions and FinalDemand columns # Create the empty section of FullUse that is VA rows by FD columns (NA values) @@ -203,6 +207,8 @@ formatFullUseFromUSEEIOtoState <- function(model, state, domestic = FALSE){ } } + +#' Separate full use table into model components #' @param model An stateior model object with model specs and specific IO tables loaded #' @param domestic A boolean that indicates whether the table to format is the domesticUse table or not #' @return A model object with FullUse split into UseTransactions, FinalDemand, and UseValueAdded objects @@ -224,6 +230,7 @@ splitFullUse <- function(model, domestic = FALSE){ } +#' Calculate output from model objects #' @param model An stateior model object with model specs and specific IO tables loaded #' @return A model object with disaggregated IndustryOutput and CommodityOutput objects calculateStateIndustryCommodityOuput <- function(model){ diff --git a/man/assembleTwoRegionIO.Rd b/man/assembleTwoRegionIO.Rd index 947038fa..abd3e2c2 100644 --- a/man/assembleTwoRegionIO.Rd +++ b/man/assembleTwoRegionIO.Rd @@ -4,13 +4,15 @@ \alias{assembleTwoRegionIO} \title{Assemble two-region make, use, domestic use, and Use tables as well as commodity and industry outputs.} \usage{ -assembleTwoRegionIO(year, iolevel) +assembleTwoRegionIO(year, iolevel, disaggState = FALSE) } \arguments{ \item{year}{A numeric value between 2007 and 2017 specifying the year of interest.} \item{iolevel}{BEA sector level of detail, currently can only be "Summary", theoretically can be "Detail", or "Sector" in future versions.} + +\item{disaggState}{TEMPORARY boolean to trigger disaggregation.} } \value{ A list of two-region make, use, domestic use, and Use tables diff --git a/man/buildTwoRegionUseModel.Rd b/man/buildTwoRegionUseModel.Rd index d3ecf62b..d6694290 100644 --- a/man/buildTwoRegionUseModel.Rd +++ b/man/buildTwoRegionUseModel.Rd @@ -11,7 +11,9 @@ buildTwoRegionUseModel( iolevel, ICF_sensitivity_analysis = FALSE, adjust_by = 0, - domestic = TRUE + domestic = TRUE, + model = NULL, + disagg = NULL ) } \arguments{ @@ -32,6 +34,10 @@ to ICF if a sensitivity analysis is conducted, default is 0 due to no SA.} \item{domestic}{A logical value indicating whether to use Domestic Use tables, default is TRUE.} + +\item{model}{optional, a model object with state tables} + +\item{disagg}{optional, disaggregation specs} } \value{ A list of domestic two-region Use tables. diff --git a/man/calculateStateIndustryCommodityOuput.Rd b/man/calculateStateIndustryCommodityOuput.Rd new file mode 100644 index 00000000..0b5f46fa --- /dev/null +++ b/man/calculateStateIndustryCommodityOuput.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/StateDisaggFunctions.R +\name{calculateStateIndustryCommodityOuput} +\alias{calculateStateIndustryCommodityOuput} +\title{Calculate output from model objects} +\usage{ +calculateStateIndustryCommodityOuput(model) +} +\arguments{ +\item{model}{An stateior model object with model specs and specific IO tables loaded} +} +\value{ +A model object with disaggregated IndustryOutput and CommodityOutput objects +} +\description{ +Calculate output from model objects +} diff --git a/man/disaggregateNationalObjectsInStateModel.Rd b/man/disaggregateNationalObjectsInStateModel.Rd new file mode 100644 index 00000000..352b4f5b --- /dev/null +++ b/man/disaggregateNationalObjectsInStateModel.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/StateDisaggFunctions.R +\name{disaggregateNationalObjectsInStateModel} +\alias{disaggregateNationalObjectsInStateModel} +\title{Disaggregate national make and use tables} +\usage{ +disaggregateNationalObjectsInStateModel(model, disagg) +} +\arguments{ +\item{model}{An stateior model object with model specs and specific IO tables loaded} + +\item{disagg}{Specifications for model disaggregation} +} +\value{ +A stateior model with the disaggregateed objects +} +\description{ +Disaggregate national make and use tables +} diff --git a/man/disaggregateStateModel.Rd b/man/disaggregateStateModel.Rd new file mode 100644 index 00000000..2eed51a4 --- /dev/null +++ b/man/disaggregateStateModel.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/StateDisaggFunctions.R +\name{disaggregateStateModel} +\alias{disaggregateStateModel} +\title{Disaggregate state make and use tables} +\usage{ +disaggregateStateModel(model, state) +} +\arguments{ +\item{model}{An stateior model object with model specs and specific IO tables loaded} + +\item{state}{A string value that indicates the state model being disaggregated} +} +\value{ +A stateior model with the disaggregateed objects +} +\description{ +Disaggregate state make and use tables +} diff --git a/man/disaggregateStateSectorLists.Rd b/man/disaggregateStateSectorLists.Rd new file mode 100644 index 00000000..486e85ff --- /dev/null +++ b/man/disaggregateStateSectorLists.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/StateDisaggFunctions.R +\name{disaggregateStateSectorLists} +\alias{disaggregateStateSectorLists} +\title{Disaggregate model$Commodity or model$Industry dataframes in the main model object} +\usage{ +disaggregateStateSectorLists(code_vector, disagg) +} +\arguments{ +\item{code_vector}{A list of sector codes (industry or commodity)} + +\item{disagg}{Specifications for disaggregating the current Table} +} +\value{ +newList A list which contain the disaggregated model$Commodity or model$Industry objects +} +\description{ +Disaggregate model$Commodity or model$Industry dataframes in the main model object +} diff --git a/man/formatFullUseFromStateToUSEEIO.Rd b/man/formatFullUseFromStateToUSEEIO.Rd new file mode 100644 index 00000000..ea839913 --- /dev/null +++ b/man/formatFullUseFromStateToUSEEIO.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/StateDisaggFunctions.R +\name{formatFullUseFromStateToUSEEIO} +\alias{formatFullUseFromStateToUSEEIO} +\title{Format Use table objects to prepare for use in useeior functions} +\usage{ +formatFullUseFromStateToUSEEIO(table) +} +\arguments{ +\item{table}{FullUse table} +} +\value{ +The FullUse model object with useeior formatting fit for disaggregation functions +} +\description{ +Format Use table objects to prepare for use in useeior functions +} diff --git a/man/formatFullUseFromUSEEIOtoState.Rd b/man/formatFullUseFromUSEEIOtoState.Rd new file mode 100644 index 00000000..2e74c331 --- /dev/null +++ b/man/formatFullUseFromUSEEIOtoState.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/StateDisaggFunctions.R +\name{formatFullUseFromUSEEIOtoState} +\alias{formatFullUseFromUSEEIOtoState} +\title{Format Use table objects back to stateior format} +\usage{ +formatFullUseFromUSEEIOtoState(model, state, domestic = FALSE) +} +\arguments{ +\item{model}{An stateior model object with model specs and specific IO tables loaded} + +\item{state}{A string value that indicates the state model being disaggregated} + +\item{domestic}{A boolean that indicates whether the table to format is the domesticUse table or not} +} +\value{ +A stateior FullUse table formatted according to stateior specifications +} +\description{ +Format Use table objects back to stateior format +} diff --git a/man/formatMakeFromStateToUSEEIO.Rd b/man/formatMakeFromStateToUSEEIO.Rd new file mode 100644 index 00000000..6de3629c --- /dev/null +++ b/man/formatMakeFromStateToUSEEIO.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/StateDisaggFunctions.R +\name{formatMakeFromStateToUSEEIO} +\alias{formatMakeFromStateToUSEEIO} +\title{Format model objects to prepare for use in useeior functions} +\usage{ +formatMakeFromStateToUSEEIO(model, state) +} +\arguments{ +\item{model}{An stateior model object with model specs and specific IO tables loaded} + +\item{state}{A string value that indicates the state model being disaggregated} +} +\value{ +A stateior make table formatted for disaggregation with useeior functions +} +\description{ +Format model objects to prepare for use in useeior functions +} diff --git a/man/formatMakeFromUSEEIOtoState.Rd b/man/formatMakeFromUSEEIOtoState.Rd new file mode 100644 index 00000000..9635f48b --- /dev/null +++ b/man/formatMakeFromUSEEIOtoState.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/StateDisaggFunctions.R +\name{formatMakeFromUSEEIOtoState} +\alias{formatMakeFromUSEEIOtoState} +\title{Format Make table objects back to stateior format} +\usage{ +formatMakeFromUSEEIOtoState(model, state) +} +\arguments{ +\item{model}{An stateior model object with model specs and specific IO tables loaded} + +\item{state}{A string value that indicates the state model being disaggregated} +} +\value{ +A stateior make table formatted according to stateior specifications +} +\description{ +Format Make table objects back to stateior format +} diff --git a/man/getBEASectorCodeLocation.Rd b/man/getBEASectorCodeLocation.Rd index 045405e8..8c743a1a 100644 --- a/man/getBEASectorCodeLocation.Rd +++ b/man/getBEASectorCodeLocation.Rd @@ -4,7 +4,7 @@ \alias{getBEASectorCodeLocation} \title{Combine sector code and location to the form of code/location.} \usage{ -getBEASectorCodeLocation(sector_type, location, iolevel) +getBEASectorCodeLocation(sector_type, location, iolevel, disagg = NULL) } \arguments{ \item{sector_type}{A text value specifying desired sector type, diff --git a/man/getStateModelDisaggSpecs.Rd b/man/getStateModelDisaggSpecs.Rd new file mode 100644 index 00000000..bd1181a1 --- /dev/null +++ b/man/getStateModelDisaggSpecs.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/StateDisaggFunctions.R +\name{getStateModelDisaggSpecs} +\alias{getStateModelDisaggSpecs} +\title{Read and assign disaggregation specifications} +\usage{ +getStateModelDisaggSpecs() +} +\value{ +A stateior model object with the disaggregation specs loaded. +} +\description{ +Read and assign disaggregation specifications +} diff --git a/man/splitFullUse.Rd b/man/splitFullUse.Rd new file mode 100644 index 00000000..11fe8c4a --- /dev/null +++ b/man/splitFullUse.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/StateDisaggFunctions.R +\name{splitFullUse} +\alias{splitFullUse} +\title{Separate full use table into model components} +\usage{ +splitFullUse(model, domestic = FALSE) +} +\arguments{ +\item{model}{An stateior model object with model specs and specific IO tables loaded} + +\item{domestic}{A boolean that indicates whether the table to format is the domesticUse table or not} +} +\value{ +A model object with FullUse split into UseTransactions, FinalDemand, and UseValueAdded objects +} +\description{ +Separate full use table into model components +} From 91b30ffb19a6883cecc10863dbc84d56217a6479 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 28 Jun 2022 10:09:43 -0400 Subject: [PATCH 048/121] ensure model runs without disaggregation --- R/BuildModel.R | 19 ++++++++++--- R/InteregionalCommodityFlowFunctions.R | 37 +++++++++++++++----------- 2 files changed, 36 insertions(+), 20 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 1e32b9e1..0dfafe40 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -336,7 +336,7 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, # 2 - Generate 2-region ICFs logging::loginfo("Generating two-region interregional commodity flow (ICF) ratios...") ICF <- generateDomestic2RegionICFs(state, year, ioschema, iolevel, - ICF_sensitivity_analysis, adjust_by) + ICF_sensitivity_analysis, adjust_by, disagg) ICF <- ICF[match(rownames(SoI_CommodityOutput), ICF$BEA_2012_Summary_Code),] # Only allocate "error" to rows (commodities) that does not have ICF of 1 or 0 @@ -615,9 +615,20 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { } #end of for each state loop - } #end of if disaggregationSpecs is not empty statement - - } #End of Disaggregation for state model objects + } else { + stop("Error accessing disaggregation specs") + } + + } else { + # Initiate model object + model <- list() + model$Commodities <- commodities + model$Industries <- industries + model$US_DomesticUse <- US_DomesticUse + model$US_Make <- US_Make + model$US_Use <- US_Use + } + # reassign nonimport cols after disaggregation nonimport_cols <- c(industries, FD_cols[-which(FD_cols %in% import_col)]) diff --git a/R/InteregionalCommodityFlowFunctions.R b/R/InteregionalCommodityFlowFunctions.R index 125a9e6b..05893f15 100644 --- a/R/InteregionalCommodityFlowFunctions.R +++ b/R/InteregionalCommodityFlowFunctions.R @@ -95,10 +95,11 @@ calculateLocalandTradedRatios <- function(state, year, SoI = TRUE, ioschema, iol #' sensitivity analysis on ICF, default is FALSE. #' @param adjust_by A numeric value between 0 and 1 indicating the manual adjustment #' to ICF if a sensitivity analysis is conducted, default is 0 due to no SA. +#' @param disagg optional, disaggregation specs #' #' @return A data frame contains domestic 2 region ICFs. generateDomestic2RegionICFs <- function(state, year, ioschema, iolevel, ICF_sensitivity_analysis = FALSE, - adjust_by = 0) { + adjust_by = 0, disagg = NULL) { # Specify BEA code bea <- paste("BEA", ioschema, iolevel, "Code", sep = "_") # Generate SoI-RoUS commodity flow ratios from FAF @@ -143,26 +144,30 @@ generateDomestic2RegionICFs <- function(state, year, ioschema, iolevel, "CommodityCodeName_2012", sep = "_")) # Update commodities from disaggregation - disagg <- data.frame(BEA_2012_Summary_Commodity_Code = c("221100", "221200", "221300"), - BEA_2012_Summary_Commodity_Name = c("Elec", "NG", "Water")) - CommodityCodeName <- CommodityCodeName[CommodityCodeName$BEA_2012_Summary_Commodity_Code!="22",] - CommodityCodeName <- rbind(CommodityCodeName, disagg) - + if (!is.null(disagg)){ + disagg_df <- data.frame(BEA_2012_Summary_Commodity_Code = c("221100", "221200", "221300"), + BEA_2012_Summary_Commodity_Name = c("Elec", "NG", "Water")) + CommodityCodeName <- CommodityCodeName[CommodityCodeName$BEA_2012_Summary_Commodity_Code!="22",] + CommodityCodeName <- rbind(CommodityCodeName, disagg_df) + } + ICF <- merge(ICF_2r_wide, CommodityCodeName, by.x = bea, by.y = paste("BEA", ioschema, iolevel, "Commodity_Code", sep = "_"), all.y = TRUE) if (iolevel == "Summary") { # Adjust utilities - ICF[ICF[, bea] == "221100", cols] <- calculateElectricityFlowRatios(state, year)[, cols] - ICF[ICF[, bea] == "221100", "source"] <- "EIA" - ICF[ICF[, bea] %in% c("221200", "221300"), cols] <- data.frame("SoI2SoI" = 1, - "SoI2RoUS" = 0, - "RoUS2SoI" = 0, - "RoUS2RoUS" = 1) - ICF[ICF[, bea]%in% c("221200", "221300"), "source"] <- "Assuming no interregional trade" - - # ICF[ICF[, bea] == "22", cols] <- calculateUtilitiesFlowRatios(state, year)[, cols] - # ICF[ICF[, bea] == "22", "source"] <- "EIA" + if (is.null(disagg)){ + ICF[ICF[, bea] == "22", cols] <- calculateUtilitiesFlowRatios(state, year)[, cols] + ICF[ICF[, bea] == "22", "source"] <- "EIA" + } else { + ICF[ICF[, bea] == "221100", cols] <- calculateElectricityFlowRatios(state, year)[, cols] + ICF[ICF[, bea] == "221100", "source"] <- "EIA" + ICF[ICF[, bea] %in% c("221200", "221300"), cols] <- data.frame("SoI2SoI" = 1, + "SoI2RoUS" = 0, + "RoUS2SoI" = 0, + "RoUS2RoUS" = 1) + ICF[ICF[, bea]%in% c("221200", "221300"), "source"] <- "Assuming no interregional trade" + } # Adjust waste management and remediation services ICF[ICF[, bea] == "562", cols] <- calculateWasteManagementServiceFlowRatios(state, year)[, cols] From 507b0b5b86c798126f39c3ba38d1f5fc358ad9c4 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 28 Jun 2022 10:10:02 -0400 Subject: [PATCH 049/121] update documentation --- R/UtilityFunctions.R | 1 + man/generateDomestic2RegionICFs.Rd | 7 +++++-- man/getBEASectorCodeLocation.Rd | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/R/UtilityFunctions.R b/R/UtilityFunctions.R index aa936c8b..c1c13af6 100644 --- a/R/UtilityFunctions.R +++ b/R/UtilityFunctions.R @@ -104,6 +104,7 @@ loadBEAStateDatatoBEASummaryMapping <- function(dataname) { #' @param location A text value specifying desired location, #' can be state name like "Georgia" or "RoUS" representing Rest of US. #' @param iolevel Level of detail, can be "Sector", "Summary, "Detail". +#' @param disagg optional, disaggregation specs #' @return A text value in the format of code/location. getBEASectorCodeLocation <- function(sector_type, location, iolevel, disagg=NULL) { # Get code diff --git a/man/generateDomestic2RegionICFs.Rd b/man/generateDomestic2RegionICFs.Rd index 31d2fc10..df927c90 100644 --- a/man/generateDomestic2RegionICFs.Rd +++ b/man/generateDomestic2RegionICFs.Rd @@ -10,7 +10,8 @@ generateDomestic2RegionICFs( ioschema, iolevel, ICF_sensitivity_analysis = FALSE, - adjust_by = 0 + adjust_by = 0, + disagg = NULL ) } \arguments{ @@ -27,7 +28,9 @@ theoretically can be "Detail", or "Sector" in future versions.} sensitivity analysis on ICF, default is FALSE.} \item{adjust_by}{A numeric value between 0 and 1 indicating the manual adjustment -to ICF if a sensitivity analysis is conducted, default is 0 due to no SA. +to ICF if a sensitivity analysis is conducted, default is 0 due to no SA.} + +\item{disagg}{optional, disaggregation specs #' @return A data frame contains domestic 2 region ICFs.} } \description{ diff --git a/man/getBEASectorCodeLocation.Rd b/man/getBEASectorCodeLocation.Rd index 8c743a1a..51f1c6b6 100644 --- a/man/getBEASectorCodeLocation.Rd +++ b/man/getBEASectorCodeLocation.Rd @@ -14,6 +14,8 @@ can be "Commodity", "Industry", "FinalDemand", or "ValueAdded".} can be state name like "Georgia" or "RoUS" representing Rest of US.} \item{iolevel}{Level of detail, can be "Sector", "Summary, "Detail".} + +\item{disagg}{optional, disaggregation specs} } \value{ A text value in the format of code/location. From adfbc7d835a101798804604d7f4541ea5be00029 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 28 Jun 2022 10:16:17 -0400 Subject: [PATCH 050/121] add temporary action for two region disagg --- data-raw/TwoRegionModelDisagg.R | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 data-raw/TwoRegionModelDisagg.R diff --git a/data-raw/TwoRegionModelDisagg.R b/data-raw/TwoRegionModelDisagg.R new file mode 100644 index 00000000..2df0eed9 --- /dev/null +++ b/data-raw/TwoRegionModelDisagg.R @@ -0,0 +1,24 @@ +# Generate and save two-region IO tables +for (year in 2017:2017) { + # Build model + TwoRegionModel <- assembleTwoRegionIO(year, iolevel = "Summary", disaggState = TRUE) + # Subset data set + for (name in names(TwoRegionModel)) { + df <- TwoRegionModel[[name]] + # Write data to .rds + data_name <- paste("TwoRegion_Summary", name, "UtilDisagg", year, + utils::packageDescription("stateior", fields = "Version"), + sep = "_") + saveRDS(object = df, + file = paste0(file.path("data", data_name), ".rds")) + # Write metadata to JSON + useeior:::writeMetadatatoJSON(package = "stateior", + name = data_name, + year = year, + source = "stateior", + url = NULL, + date_last_modified = as.character(Sys.Date()), + date_accessed = NULL) + } +} + From 93cfaae971c4a98af1feecdfaae22230b4070b06 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 28 Jun 2022 10:17:53 -0400 Subject: [PATCH 051/121] add temporary action for disaggregation --- .../save-two-region-model-disagg-data.yaml | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/save-two-region-model-disagg-data.yaml diff --git a/.github/workflows/save-two-region-model-disagg-data.yaml b/.github/workflows/save-two-region-model-disagg-data.yaml new file mode 100644 index 00000000..e61abea3 --- /dev/null +++ b/.github/workflows/save-two-region-model-disagg-data.yaml @@ -0,0 +1,72 @@ +# This workflow is designed to be manually triggered only. +name: Save two-region disaggregated data as .rds + +on: + workflow_dispatch: # allow manual trigger + +jobs: + generate-save-data: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os}} (${{ matrix.config.r}}) + + strategy: + fail-fast: false + matrix: + config: + - {os: ubuntu-latest, r: 'release'} + + # env: + # R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + + 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: devtools + + # Release disk space on runners + - name: Release disk space on runners + run: | + sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + + # Load package and generate two-region data + - name: Load stateior, generate and save two-region tables + run: | + devtools::load_all() + source("data-raw/TwoRegionModelDisagg.R") + shell: Rscript {0} + + # Upload .rds files + - name: Upload .rds files and prepare zip for manual download + uses: actions/upload-artifact@v2.3.0 + with: + # Artifact name + name: data and metadata + # A file, directory or wildcard patter that describes what to upload + path: "data/TwoRegion*.rds" + if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` + # retention-days: 5 # cannot exceed the retention limit set by the repository, organization, or enterprise. + + # Upload .json files + - name: Upload .json files and prepare zip for manual download + uses: actions/upload-artifact@v2.3.0 + with: + # Artifact name + name: data and metadata + # A file, directory or wildcard patter that describes what to upload + path: "inst/extdata/metadata/TwoRegion*.json" + if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` + # retention-days: 5 # cannot exceed the retention limit set by the repository, organization, or enterprise. From fc7f16c154ff5e571bccce9aa15926ecc7667958 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 28 Jun 2022 10:22:35 -0400 Subject: [PATCH 052/121] temporary testing --- .github/workflows/save-two-region-model-data.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/save-two-region-model-data.yaml b/.github/workflows/save-two-region-model-data.yaml index 934bd088..54625ea8 100644 --- a/.github/workflows/save-two-region-model-data.yaml +++ b/.github/workflows/save-two-region-model-data.yaml @@ -46,7 +46,7 @@ jobs: - name: Load stateior, generate and save two-region tables run: | devtools::load_all() - source("data-raw/TwoRegionModel.R") + source("data-raw/TwoRegionModelDisagg.R") shell: Rscript {0} # Upload .rds files From baa0ee144f2019e4d8f80d8abdcf8690f52448d0 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 8 Jul 2022 21:13:36 -0400 Subject: [PATCH 053/121] delete nonimport_cols remaining after merge commit --- R/BuildModel.R | 4 ---- 1 file changed, 4 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index abc2d586..e52e390a 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -679,11 +679,7 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { model$US_Make <- US_Make model$US_Use <- US_Use } - - # reassign nonimport cols after disaggregation - nonimport_cols <- c(industries, FD_cols[-which(FD_cols %in% import_col)]) - # Assemble two-region IO tables TwoRegionIO <- list() for (state in sort(c(state.name, "District of Columbia"))) { From 8337a6e8c8b1d93a13b00406f90e08d5c64f13f8 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 8 Jul 2022 21:20:22 -0400 Subject: [PATCH 054/121] update actions to match changes in original two-region action --- .../save-two-region-model-disagg-data.yaml | 19 +++++++-- data-raw/TwoRegionModelDisagg.R | 40 +++++++++---------- 2 files changed, 35 insertions(+), 24 deletions(-) diff --git a/.github/workflows/save-two-region-model-disagg-data.yaml b/.github/workflows/save-two-region-model-disagg-data.yaml index e61abea3..d4a30970 100644 --- a/.github/workflows/save-two-region-model-disagg-data.yaml +++ b/.github/workflows/save-two-region-model-disagg-data.yaml @@ -1,5 +1,5 @@ # This workflow is designed to be manually triggered only. -name: Save two-region disaggregated data as .rds +name: Save two-region disaggregated data as .rds in parallel runs on: workflow_dispatch: # allow manual trigger @@ -8,13 +8,25 @@ jobs: generate-save-data: runs-on: ${{ matrix.config.os }} - name: ${{ matrix.config.os}} (${{ matrix.config.r}}) + name: ${{ matrix.script-run }}, ${{ matrix.data-year }} (${{ matrix.config.os}}, ${{ matrix.config.r}}) strategy: fail-fast: false matrix: config: - {os: ubuntu-latest, r: 'release'} + script-run: + - data-raw/TwoRegionModelDisagg.R + data-year: + # - 2012 + # - 2013 + # - 2014 + # - 2015 + # - 2016 + - 2017 + # - 2018 + # - 2019 + # - 2020 # env: # R_REMOTES_NO_ERRORS_FROM_WARNINGS: true @@ -46,7 +58,8 @@ jobs: - name: Load stateior, generate and save two-region tables run: | devtools::load_all() - source("data-raw/TwoRegionModelDisagg.R") + year <- ${{ matrix.data-year }} + source("${{ matrix.script-run }}") shell: Rscript {0} # Upload .rds files diff --git a/data-raw/TwoRegionModelDisagg.R b/data-raw/TwoRegionModelDisagg.R index 2df0eed9..e1da4b6e 100644 --- a/data-raw/TwoRegionModelDisagg.R +++ b/data-raw/TwoRegionModelDisagg.R @@ -1,24 +1,22 @@ # Generate and save two-region IO tables -for (year in 2017:2017) { - # Build model - TwoRegionModel <- assembleTwoRegionIO(year, iolevel = "Summary", disaggState = TRUE) - # Subset data set - for (name in names(TwoRegionModel)) { - df <- TwoRegionModel[[name]] - # Write data to .rds - data_name <- paste("TwoRegion_Summary", name, "UtilDisagg", year, - utils::packageDescription("stateior", fields = "Version"), - sep = "_") - saveRDS(object = df, - file = paste0(file.path("data", data_name), ".rds")) - # Write metadata to JSON - useeior:::writeMetadatatoJSON(package = "stateior", - name = data_name, - year = year, - source = "stateior", - url = NULL, - date_last_modified = as.character(Sys.Date()), - date_accessed = NULL) - } +# Build model +TwoRegionModel <- assembleTwoRegionIO(year, iolevel = "Summary", disaggState = TRUE) +# Subset data set +for (name in names(TwoRegionModel)) { + df <- TwoRegionModel[[name]] + # Write data to .rds + data_name <- paste("TwoRegion_Summary", name, "UtilDisagg", year, + utils::packageDescription("stateior", fields = "Version"), + sep = "_") + saveRDS(object = df, + file = paste0(file.path("data", data_name), ".rds")) + # Write metadata to JSON + useeior:::writeMetadatatoJSON(package = "stateior", + name = data_name, + year = year, + source = "stateior", + url = NULL, + date_last_modified = as.character(Sys.Date()), + date_accessed = NULL) } From 59a0e3e430abab4de7de99b5b85100b9a05d1211 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 26 Oct 2022 14:24:52 -0400 Subject: [PATCH 055/121] update to 0.3.0 --- DESCRIPTION | 2 +- R/BuildModel.R | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index da21d750..15120446 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: stateior Type: Package Title: US State Input-Output (stateio) R modeling software -Version: 0.2.1 +Version: 0.3.0 Date: 2022-10-20 Authors@R: c( person("Mo", "Li", email="mo.li@gdit.com", role="aut"), diff --git a/R/BuildModel.R b/R/BuildModel.R index 0c399f2e..b70612d8 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -1,6 +1,6 @@ -# Define model version +# Define model version for accessing data from DataCommons # model_ver <- utils::packageDescription(pkg = "stateior", fields = "Version") -model_ver <- NULL +model_ver <- NULL # to access the latest available data #' Build a state supply model for all 52 states/regions (including DC and Overseas) #' for a given year From 0629c6edd0a8f9b3405b82fc59a56c3c3b8be464 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Wed, 15 Mar 2023 15:30:09 -0400 Subject: [PATCH 056/121] set IODataSource to blank to bypass sequential disaggregation within useeior --- R/StateDisaggFunctions.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 36e1620e..72ed3116 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -9,7 +9,8 @@ getStateModelDisaggSpecs <- function(){ disaggConfigpath <- system.file(paste0("extdata/disaggspecs/"), paste0(configfile,".yml"), package = "stateior") model$specs$DisaggregationSpecs <- configfile - + model$specs$IODataSource <- "" + model <- useeior:::getDisaggregationSpecs(model, disaggConfigpath) return(model) From a665c7d8d4b1cf98878ac113203e2dbf80244d51 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 21 Mar 2023 21:14:10 -0400 Subject: [PATCH 057/121] reference model specs for disaggregation, add fxn to read configuration files --- .../save-two-region-model-disagg-data.yaml | 3 +++ R/BuildModel.R | 8 +++---- R/StateDisaggFunctions.R | 10 +++----- R/UtilityFunctions.R | 23 +++++++++++++++++++ data-raw/TwoRegionModelDisagg.R | 12 ++++++++-- inst/extdata/modelspecs/StateIOv1.0.0-75.yml | 2 +- 6 files changed, 44 insertions(+), 14 deletions(-) diff --git a/.github/workflows/save-two-region-model-disagg-data.yaml b/.github/workflows/save-two-region-model-disagg-data.yaml index d4a30970..56a7b535 100644 --- a/.github/workflows/save-two-region-model-disagg-data.yaml +++ b/.github/workflows/save-two-region-model-disagg-data.yaml @@ -17,6 +17,8 @@ jobs: - {os: ubuntu-latest, r: 'release'} script-run: - data-raw/TwoRegionModelDisagg.R + model_spec: + - "StateIOv1.0.0-75" data-year: # - 2012 # - 2013 @@ -59,6 +61,7 @@ jobs: run: | devtools::load_all() year <- ${{ matrix.data-year }} + model_spec <- ${{ matrix.model-spec }} source("${{ matrix.script-run }}") shell: Rscript {0} diff --git a/R/BuildModel.R b/R/BuildModel.R index b70612d8..42d5784f 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -592,11 +592,11 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, #' @param year A numeric value between 2007 and 2017 specifying the year of interest. #' @param iolevel BEA sector level of detail, currently can only be "Summary", #' theoretically can be "Detail", or "Sector" in future versions. -#' @param disaggState TEMPORARY boolean to trigger disaggregation. +#' @param disagg_specs name of disaggregation. #' @return A list of two-region make, use, domestic use, and Use tables #' as well as commodity and industry outputs by state. #' @export -assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { +assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { startLogging() # Define industries, commodities, value added rows, final demand columns, and # international trade adjustment column @@ -627,10 +627,10 @@ assembleTwoRegionIO <- function(year, iolevel, disaggState=FALSE) { year), ver = model_ver) disagg <- NULL # Initialization - if(disaggState == TRUE){ + if(!is.na(disagg_specs)){ # Initialize model - model <- getStateModelDisaggSpecs() + model <- getStateModelDisaggSpecs(disagg_specs) if(length(model$DisaggregationSpecs)!=0){ disagg <- model$DisaggregationSpecs[[1]] diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 72ed3116..910916a1 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -1,16 +1,12 @@ #' Read and assign disaggregation specifications +#' @param configfile str, name of disaggregation specification #' @return A stateior model object with the disaggregation specs loaded. -getStateModelDisaggSpecs <- function(){ - - # Initialize model for every state +getStateModelDisaggSpecs <- function(configfile){ model <- list() - configfile <- "UtilityDisaggregation" - disaggConfigpath <- system.file(paste0("extdata/disaggspecs/"), paste0(configfile,".yml"), package = "stateior") - model$specs$DisaggregationSpecs <- configfile model$specs$IODataSource <- "" - + disaggConfigpath <- system.file(paste0("extdata/disaggspecs/"), paste0(configfile,".yml"), package = "stateior") model <- useeior:::getDisaggregationSpecs(model, disaggConfigpath) return(model) diff --git a/R/UtilityFunctions.R b/R/UtilityFunctions.R index 746b395e..ac18f550 100644 --- a/R/UtilityFunctions.R +++ b/R/UtilityFunctions.R @@ -386,6 +386,29 @@ capitalize <- function(string) { return(string) } + +#' Gets a stored or user specified model configuration file +#' @param configname str, name of the configuration file +#' @param configtype str, configuration type, can be "model" +#' @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 model specifications. +getConfiguration <- function(configname, configtype, configpaths = NULL) { + configfile <- paste0(configname, ".yml") + if (is.null(configpaths)) { + configpath <- system.file(paste0("extdata/", configtype, "specs/"), configfile, package = "stateior") + } 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) +} + + ############################################################## ### All functions below are archived and need modification ### ############################################################## diff --git a/data-raw/TwoRegionModelDisagg.R b/data-raw/TwoRegionModelDisagg.R index e1da4b6e..93908247 100644 --- a/data-raw/TwoRegionModelDisagg.R +++ b/data-raw/TwoRegionModelDisagg.R @@ -1,11 +1,19 @@ # Generate and save two-region IO tables +## Temp code inputs: +model_spec <- "StateIOv1.0.0-75" +year <- "2017" + +# Load model spec +specs <- getConfiguration(model_spec, "model") + # Build model -TwoRegionModel <- assembleTwoRegionIO(year, iolevel = "Summary", disaggState = TRUE) +TwoRegionModel <- assembleTwoRegionIO(year, iolevel = specs$BaseIOLevel, + disagg_specs = specs$DisaggregationSpecs) # Subset data set for (name in names(TwoRegionModel)) { df <- TwoRegionModel[[name]] # Write data to .rds - data_name <- paste("TwoRegion_Summary", name, "UtilDisagg", year, + data_name <- paste("TwoRegion_Summary", name, spec$DisaggregationSpecs, year, utils::packageDescription("stateior", fields = "Version"), sep = "_") saveRDS(object = df, diff --git a/inst/extdata/modelspecs/StateIOv1.0.0-75.yml b/inst/extdata/modelspecs/StateIOv1.0.0-75.yml index 8634ba2f..3c850cdd 100644 --- a/inst/extdata/modelspecs/StateIOv1.0.0-75.yml +++ b/inst/extdata/modelspecs/StateIOv1.0.0-75.yml @@ -15,7 +15,7 @@ IODataSource: "BEA" BasePriceType: "PRO" BasewithRedefinitions: FALSE ScrapIncluded: FALSE -DisaggregationSpecs: TBD +DisaggregationSpecs: "UtilityDisaggregation" DataProduct: - "Make" From 92c3caf2651155710ba83c7a0056bcb2b709001e Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 21 Mar 2023 21:37:25 -0400 Subject: [PATCH 058/121] use useeior config fxn, see https://github.com/USEPA/useeior/commit/f78a84edd67da3335e5a754a7a25bfdda2d9de27 --- R/StateDisaggFunctions.R | 2 +- R/UtilityFunctions.R | 23 ----------------------- data-raw/TwoRegionModelDisagg.R | 2 +- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 910916a1..34b54d57 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -7,7 +7,7 @@ getStateModelDisaggSpecs <- function(configfile){ model$specs$DisaggregationSpecs <- configfile model$specs$IODataSource <- "" disaggConfigpath <- system.file(paste0("extdata/disaggspecs/"), paste0(configfile,".yml"), package = "stateior") - model <- useeior:::getDisaggregationSpecs(model, disaggConfigpath) + model <- useeior:::getDisaggregationSpecs(model, disaggConfigpath, pkg = "stateior") return(model) } diff --git a/R/UtilityFunctions.R b/R/UtilityFunctions.R index ac18f550..746b395e 100644 --- a/R/UtilityFunctions.R +++ b/R/UtilityFunctions.R @@ -386,29 +386,6 @@ capitalize <- function(string) { return(string) } - -#' Gets a stored or user specified model configuration file -#' @param configname str, name of the configuration file -#' @param configtype str, configuration type, can be "model" -#' @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 model specifications. -getConfiguration <- function(configname, configtype, configpaths = NULL) { - configfile <- paste0(configname, ".yml") - if (is.null(configpaths)) { - configpath <- system.file(paste0("extdata/", configtype, "specs/"), configfile, package = "stateior") - } 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) -} - - ############################################################## ### All functions below are archived and need modification ### ############################################################## diff --git a/data-raw/TwoRegionModelDisagg.R b/data-raw/TwoRegionModelDisagg.R index 93908247..2b829bfb 100644 --- a/data-raw/TwoRegionModelDisagg.R +++ b/data-raw/TwoRegionModelDisagg.R @@ -4,7 +4,7 @@ model_spec <- "StateIOv1.0.0-75" year <- "2017" # Load model spec -specs <- getConfiguration(model_spec, "model") +specs <- useeior:::getConfiguration(model_spec, "model", pkg="stateior") # Build model TwoRegionModel <- assembleTwoRegionIO(year, iolevel = specs$BaseIOLevel, From d9e76ae2e445b41d6fa34863ef196c02f8d06125 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 23 Mar 2023 09:39:34 -0400 Subject: [PATCH 059/121] consolidate actions and scripts to not differentiate disaggregated models; allow user input to GH action for model spec --- .../workflows/save-two-region-model-data.yaml | 9 +- .../save-two-region-model-disagg-data.yaml | 88 ------------------- data-raw/TwoRegionModel.R | 16 +++- data-raw/TwoRegionModelDisagg.R | 30 ------- inst/extdata/modelspecs/StateIOv1.0.0-s.yml | 2 +- 5 files changed, 23 insertions(+), 122 deletions(-) delete mode 100644 .github/workflows/save-two-region-model-disagg-data.yaml delete mode 100644 data-raw/TwoRegionModelDisagg.R diff --git a/.github/workflows/save-two-region-model-data.yaml b/.github/workflows/save-two-region-model-data.yaml index 4b8cb4b4..f94fa4ae 100644 --- a/.github/workflows/save-two-region-model-data.yaml +++ b/.github/workflows/save-two-region-model-data.yaml @@ -3,6 +3,12 @@ name: Save two-region data as .rds in parallel runs on: workflow_dispatch: # allow manual trigger + inputs: + model_spec: + description: "Model spec file" + required: true + default: "StateIOv1.0.0-s" + jobs: generate-save-data: @@ -32,7 +38,7 @@ jobs: # R_REMOTES_NO_ERRORS_FROM_WARNINGS: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: r-lib/actions/setup-pandoc@v2 @@ -59,6 +65,7 @@ jobs: run: | devtools::load_all() year <- ${{ matrix.data-year }} + model_spec <- ${{ github.event.inputs.model-spec }} source("${{ matrix.script-run }}") shell: Rscript {0} diff --git a/.github/workflows/save-two-region-model-disagg-data.yaml b/.github/workflows/save-two-region-model-disagg-data.yaml deleted file mode 100644 index 56a7b535..00000000 --- a/.github/workflows/save-two-region-model-disagg-data.yaml +++ /dev/null @@ -1,88 +0,0 @@ -# This workflow is designed to be manually triggered only. -name: Save two-region disaggregated data as .rds in parallel runs - -on: - workflow_dispatch: # allow manual trigger - -jobs: - generate-save-data: - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.script-run }}, ${{ matrix.data-year }} (${{ matrix.config.os}}, ${{ matrix.config.r}}) - - strategy: - fail-fast: false - matrix: - config: - - {os: ubuntu-latest, r: 'release'} - script-run: - - data-raw/TwoRegionModelDisagg.R - model_spec: - - "StateIOv1.0.0-75" - data-year: - # - 2012 - # - 2013 - # - 2014 - # - 2015 - # - 2016 - - 2017 - # - 2018 - # - 2019 - # - 2020 - - # env: - # R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - - 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: devtools - - # Release disk space on runners - - name: Release disk space on runners - run: | - sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - # Load package and generate two-region data - - name: Load stateior, generate and save two-region tables - run: | - devtools::load_all() - year <- ${{ matrix.data-year }} - model_spec <- ${{ matrix.model-spec }} - source("${{ matrix.script-run }}") - shell: Rscript {0} - - # Upload .rds files - - name: Upload .rds files and prepare zip for manual download - uses: actions/upload-artifact@v2.3.0 - with: - # Artifact name - name: data and metadata - # A file, directory or wildcard patter that describes what to upload - path: "data/TwoRegion*.rds" - if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - # retention-days: 5 # cannot exceed the retention limit set by the repository, organization, or enterprise. - - # Upload .json files - - name: Upload .json files and prepare zip for manual download - uses: actions/upload-artifact@v2.3.0 - with: - # Artifact name - name: data and metadata - # A file, directory or wildcard patter that describes what to upload - path: "inst/extdata/metadata/TwoRegion*.json" - if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - # retention-days: 5 # cannot exceed the retention limit set by the repository, organization, or enterprise. diff --git a/data-raw/TwoRegionModel.R b/data-raw/TwoRegionModel.R index 17137be6..86532325 100644 --- a/data-raw/TwoRegionModel.R +++ b/data-raw/TwoRegionModel.R @@ -1,11 +1,23 @@ # Generate and save two-region IO tables +## Temp code inputs: +# model_spec <- "StateIOv1.0.0-75" +# model_spec <- "StateIOv1.0.0-s" +# year <- 2017 + +# Load model spec +specs <- useeior:::getConfiguration(model_spec, "model", pkg="stateior") + # Build model -TwoRegionModel <- assembleTwoRegionIO(year, iolevel = "Summary") +TwoRegionModel <- assembleTwoRegionIO(year, iolevel = specs$BaseIOLevel, + disagg_specs = specs$DisaggregationSpecs) + +stub <- ifelse(is.null(specs$DisaggregationSpecs), "", specs$DisaggregationSpecs) + # Subset data set for (name in names(TwoRegionModel)) { df <- TwoRegionModel[[name]] # Write data to .rds - data_name <- paste("TwoRegion_Summary", name, year, + data_name <- paste("TwoRegion_Summary", name, stub, year, utils::packageDescription("stateior", fields = "Version"), sep = "_") saveRDS(object = df, diff --git a/data-raw/TwoRegionModelDisagg.R b/data-raw/TwoRegionModelDisagg.R deleted file mode 100644 index 2b829bfb..00000000 --- a/data-raw/TwoRegionModelDisagg.R +++ /dev/null @@ -1,30 +0,0 @@ -# Generate and save two-region IO tables -## Temp code inputs: -model_spec <- "StateIOv1.0.0-75" -year <- "2017" - -# Load model spec -specs <- useeior:::getConfiguration(model_spec, "model", pkg="stateior") - -# Build model -TwoRegionModel <- assembleTwoRegionIO(year, iolevel = specs$BaseIOLevel, - disagg_specs = specs$DisaggregationSpecs) -# Subset data set -for (name in names(TwoRegionModel)) { - df <- TwoRegionModel[[name]] - # Write data to .rds - data_name <- paste("TwoRegion_Summary", name, spec$DisaggregationSpecs, year, - utils::packageDescription("stateior", fields = "Version"), - sep = "_") - saveRDS(object = df, - file = paste0(file.path("data", data_name), ".rds")) - # Write metadata to JSON - useeior:::writeMetadatatoJSON(package = "stateior", - name = data_name, - year = year, - source = "stateior", - url = NULL, - date_last_modified = as.character(Sys.Date()), - date_accessed = NULL) -} - diff --git a/inst/extdata/modelspecs/StateIOv1.0.0-s.yml b/inst/extdata/modelspecs/StateIOv1.0.0-s.yml index 1bb89fb9..e68b6f95 100644 --- a/inst/extdata/modelspecs/StateIOv1.0.0-s.yml +++ b/inst/extdata/modelspecs/StateIOv1.0.0-s.yml @@ -15,7 +15,7 @@ IODataSource: "BEA" BasePriceType: "PRO" BasewithRedefinitions: FALSE ScrapIncluded: FALSE -DisaggregationSpecs: null +DisaggregationSpecs: NULL DataProduct: - "Make" From e55af30de8db3aaf3c469ad4410418dfd4730952 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 23 Mar 2023 09:49:02 -0400 Subject: [PATCH 060/121] point to linkstateior branch --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 15120446..db4788ec 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -38,7 +38,7 @@ Imports: Depends: R (>= 3.6) Remotes: - github::USEPA/useeior@v1.1.0 + github::USEPA/useeior@linkstateior License: file LICENSE Encoding: UTF-8 LazyData: true From 44086637c7b8a3f048795c5ef9e9da7513ef9bd7 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 23 Mar 2023 10:02:24 -0400 Subject: [PATCH 061/121] modify handling of env variable --- .../workflows/save-two-region-model-data.yaml | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/save-two-region-model-data.yaml b/.github/workflows/save-two-region-model-data.yaml index f94fa4ae..a343e7d9 100644 --- a/.github/workflows/save-two-region-model-data.yaml +++ b/.github/workflows/save-two-region-model-data.yaml @@ -24,15 +24,15 @@ jobs: script-run: - data-raw/TwoRegionModel.R data-year: - - 2012 - - 2013 - - 2014 - - 2015 - - 2016 + # - 2012 + # - 2013 + # - 2014 + # - 2015 + # - 2016 - 2017 - - 2018 - - 2019 - - 2020 + # - 2018 + # - 2019 + # - 2020 # env: # R_REMOTES_NO_ERRORS_FROM_WARNINGS: true @@ -62,10 +62,13 @@ jobs: # Load package and generate two-region data - name: Load stateior, generate and save two-region tables + env: + MODEL-SPEC: ${{ github.event.inputs.model-spec }} run: | + echo "Generating model: $MODEL-SPEC" devtools::load_all() year <- ${{ matrix.data-year }} - model_spec <- ${{ github.event.inputs.model-spec }} + model_spec <- $MODEL-SPEC source("${{ matrix.script-run }}") shell: Rscript {0} From a1a8b9d1d62767aa690358bf888f4b223c426a0f Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 23 Mar 2023 10:19:13 -0400 Subject: [PATCH 062/121] fix typo --- .github/workflows/save-two-region-model-data.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/save-two-region-model-data.yaml b/.github/workflows/save-two-region-model-data.yaml index a343e7d9..4ac66c2e 100644 --- a/.github/workflows/save-two-region-model-data.yaml +++ b/.github/workflows/save-two-region-model-data.yaml @@ -63,7 +63,7 @@ jobs: # Load package and generate two-region data - name: Load stateior, generate and save two-region tables env: - MODEL-SPEC: ${{ github.event.inputs.model-spec }} + MODEL-SPEC: ${{ github.event.inputs.model_spec }} run: | echo "Generating model: $MODEL-SPEC" devtools::load_all() From 137ec40f309eef237ac8a17cebbf22395ed49136 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 23 Mar 2023 10:56:40 -0400 Subject: [PATCH 063/121] drop echo statement --- .github/workflows/save-two-region-model-data.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/save-two-region-model-data.yaml b/.github/workflows/save-two-region-model-data.yaml index 4ac66c2e..ccc9fe24 100644 --- a/.github/workflows/save-two-region-model-data.yaml +++ b/.github/workflows/save-two-region-model-data.yaml @@ -65,7 +65,6 @@ jobs: env: MODEL-SPEC: ${{ github.event.inputs.model_spec }} run: | - echo "Generating model: $MODEL-SPEC" devtools::load_all() year <- ${{ matrix.data-year }} model_spec <- $MODEL-SPEC From 130e7a92264317fc71f154efa20925a1c568d6f5 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 23 Mar 2023 11:03:47 -0400 Subject: [PATCH 064/121] drop env variable --- .github/workflows/save-two-region-model-data.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/save-two-region-model-data.yaml b/.github/workflows/save-two-region-model-data.yaml index ccc9fe24..7b87700a 100644 --- a/.github/workflows/save-two-region-model-data.yaml +++ b/.github/workflows/save-two-region-model-data.yaml @@ -62,12 +62,10 @@ jobs: # Load package and generate two-region data - name: Load stateior, generate and save two-region tables - env: - MODEL-SPEC: ${{ github.event.inputs.model_spec }} run: | devtools::load_all() year <- ${{ matrix.data-year }} - model_spec <- $MODEL-SPEC + model_spec <- ${{ github.event.inputs.model_spec }} source("${{ matrix.script-run }}") shell: Rscript {0} From 8b3a24dd08af2e2bc3ca0719dbfef33b6c5bc429 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 23 Mar 2023 11:28:06 -0400 Subject: [PATCH 065/121] add `type: string` to avoid being passed as object --- .github/workflows/save-two-region-model-data.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/save-two-region-model-data.yaml b/.github/workflows/save-two-region-model-data.yaml index 7b87700a..6480e250 100644 --- a/.github/workflows/save-two-region-model-data.yaml +++ b/.github/workflows/save-two-region-model-data.yaml @@ -8,6 +8,7 @@ on: description: "Model spec file" required: true default: "StateIOv1.0.0-s" + type: string jobs: From b55f38ee591bc3ddea5bf65f09911d4fae27ebc5 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 23 Mar 2023 12:11:49 -0400 Subject: [PATCH 066/121] bypass useeior getConfiguration --- .github/workflows/save-two-region-model-data.yaml | 2 +- data-raw/TwoRegionModel.R | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/save-two-region-model-data.yaml b/.github/workflows/save-two-region-model-data.yaml index 6480e250..1bd587af 100644 --- a/.github/workflows/save-two-region-model-data.yaml +++ b/.github/workflows/save-two-region-model-data.yaml @@ -5,7 +5,7 @@ on: workflow_dispatch: # allow manual trigger inputs: model_spec: - description: "Model spec file" + description: "Model spec file (in quotes)" required: true default: "StateIOv1.0.0-s" type: string diff --git a/data-raw/TwoRegionModel.R b/data-raw/TwoRegionModel.R index 86532325..3b06abf5 100644 --- a/data-raw/TwoRegionModel.R +++ b/data-raw/TwoRegionModel.R @@ -5,7 +5,10 @@ # year <- 2017 # Load model spec -specs <- useeior:::getConfiguration(model_spec, "model", pkg="stateior") +configfile <- paste0(model_spec, ".yml") +configpath <- system.file("extdata/modelspecs/", configfile, package = "stateior") +specs <- configr::read.config(configpath) +# specs <- useeior:::getConfiguration(model_spec, "model", pkg="stateior") # Build model TwoRegionModel <- assembleTwoRegionIO(year, iolevel = specs$BaseIOLevel, From 85087d7842e1bfd8386cd0cf9600228c69027c02 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 23 Mar 2023 12:25:16 -0400 Subject: [PATCH 067/121] fix typo --- R/BuildModel.R | 2 +- data-raw/TwoRegionModel.R | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 42d5784f..807902a6 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -627,7 +627,7 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { year), ver = model_ver) disagg <- NULL # Initialization - if(!is.na(disagg_specs)){ + if(!is.null(disagg_specs)){ # Initialize model model <- getStateModelDisaggSpecs(disagg_specs) diff --git a/data-raw/TwoRegionModel.R b/data-raw/TwoRegionModel.R index 3b06abf5..85ab0572 100644 --- a/data-raw/TwoRegionModel.R +++ b/data-raw/TwoRegionModel.R @@ -5,8 +5,7 @@ # year <- 2017 # Load model spec -configfile <- paste0(model_spec, ".yml") -configpath <- system.file("extdata/modelspecs/", configfile, package = "stateior") +configpath <- system.file("extdata/modelspecs/", paste0(model_spec, ".yml")) specs <- configr::read.config(configpath) # specs <- useeior:::getConfiguration(model_spec, "model", pkg="stateior") From 3fca94e03200ec6d23440e8c711f6ebd1a23d183 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 23 Mar 2023 12:37:27 -0400 Subject: [PATCH 068/121] package is required parameter --- data-raw/TwoRegionModel.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data-raw/TwoRegionModel.R b/data-raw/TwoRegionModel.R index 85ab0572..9398e6e8 100644 --- a/data-raw/TwoRegionModel.R +++ b/data-raw/TwoRegionModel.R @@ -5,7 +5,8 @@ # year <- 2017 # Load model spec -configpath <- system.file("extdata/modelspecs/", paste0(model_spec, ".yml")) +logging::loginfo(paste("Generating two region model for", model_spec)) +configpath <- system.file("extdata/modelspecs/", paste0(model_spec, ".yml"), package = "stateior") specs <- configr::read.config(configpath) # specs <- useeior:::getConfiguration(model_spec, "model", pkg="stateior") From 932a55dc9f29b4d59476239160262ba8051cc02c Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 24 Mar 2023 17:32:02 -0400 Subject: [PATCH 069/121] Added function template to read in state-specific disaggregation paramters --- R/StateDisaggFunctions.R | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 34b54d57..d152c26b 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -1,17 +1,39 @@ #' Read and assign disaggregation specifications -#' @param configfile str, name of disaggregation specification +#' Function assumes all states will be disaggregated with the same config file/allocations unless a statefile parameter is included as input. +#' In this case, the function assumes the statefile paramter will modify the allocation values present in configfile for each state, rather than loading in 50 different sets of allocation values. +#' @param configfile str, name of disaggregation specification file +#' @param statefile str, name of state-specific disaggregation spec file that will modify the standard configfile for each state. Should be 1 config file that has the required modifications of configfile for each state #' @return A stateior model object with the disaggregation specs loaded. -getStateModelDisaggSpecs <- function(configfile){ +getStateModelDisaggSpecs <- function(configfile, statefile = NULL){ model <- list() model$specs$DisaggregationSpecs <- configfile model$specs$IODataSource <- "" disaggConfigpath <- system.file(paste0("extdata/disaggspecs/"), paste0(configfile,".yml"), package = "stateior") model <- useeior:::getDisaggregationSpecs(model, disaggConfigpath, pkg = "stateior") + + if(!is.null(statefile)){ + model$specs$StateDisaggSpecs <- getStateSpecificDisaggSpecs(disaggConfigpath, statefile) + } + return(model) } +#' Read in state-specific disaggregation values +#' This function assumes values contained in statefile will modify disaggregation values present in the main disaggregation config file. +#' @param statefile str, name of state-specific disaggregation spec file that will modify the standard configfile for each state. Should be 1 config file that has the required modifications of configfile for each state +#' @param disaggConfigpath str, path for statefile +#' @return A stateior model object with the state-specific disaggregation specs included in model$specs$STateDisaggSpecs object +getStateSpecificDisaggSpecs <- function(disaggConfigpath, statefile){ + + temp <-1 + filename <- file.path(dirname(disaggConfigpath), statefile) + stateFileDF <- utils::read.table(filename, sep = ",", header = TRUE, stringsAsFactors = FALSE, check.names = FALSE) + return(stateFileDF) + +} + #' Disaggregate state make and use tables #' @param model An stateior model object with model specs and specific IO tables loaded #' @param state A string value that indicates the state model being disaggregated From 00d76b830c86c703c5e52d3a1c3f8c6738e9a1d5 Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 24 Mar 2023 17:32:40 -0400 Subject: [PATCH 070/121] Added commented lines to test state-specific disaggregation paramters in assembleTwoRegionIO function --- R/BuildModel.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/BuildModel.R b/R/BuildModel.R index 807902a6..7a2b32cb 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -631,6 +631,8 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { # Initialize model model <- getStateModelDisaggSpecs(disagg_specs) + #stateDisaggFile <- "Employment_ratios.csv" + #model <- getStateModelDisaggSpecs(disagg_specs, stateDisaggFile) if(length(model$DisaggregationSpecs)!=0){ disagg <- model$DisaggregationSpecs[[1]] From 861a36497c07bbc1ce48aac49f72362a9cabd2d2 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 24 Mar 2023 21:17:01 -0400 Subject: [PATCH 071/121] update packages for actions --- .github/workflows/save-two-region-model-data.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/save-two-region-model-data.yaml b/.github/workflows/save-two-region-model-data.yaml index 1bd587af..23455fa2 100644 --- a/.github/workflows/save-two-region-model-data.yaml +++ b/.github/workflows/save-two-region-model-data.yaml @@ -72,7 +72,7 @@ jobs: # Upload .rds files - name: Upload .rds files and prepare zip for manual download - uses: actions/upload-artifact@v2.3.0 + uses: actions/upload-artifact@v3.1.1 with: # Artifact name name: data and metadata @@ -83,7 +83,7 @@ jobs: # Upload .json files - name: Upload .json files and prepare zip for manual download - uses: actions/upload-artifact@v2.3.0 + uses: actions/upload-artifact@v3.1.1 with: # Artifact name name: data and metadata From cddf7b724e7dedb9a002d62e0c4b2c2454f1badc Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 24 Mar 2023 21:17:48 -0400 Subject: [PATCH 072/121] add value added data product --- inst/extdata/modelspecs/StateIOv1.0.0-75.yml | 3 ++- inst/extdata/modelspecs/StateIOv1.0.0-s.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/inst/extdata/modelspecs/StateIOv1.0.0-75.yml b/inst/extdata/modelspecs/StateIOv1.0.0-75.yml index 3c850cdd..7f52dc3c 100644 --- a/inst/extdata/modelspecs/StateIOv1.0.0-75.yml +++ b/inst/extdata/modelspecs/StateIOv1.0.0-75.yml @@ -1,6 +1,6 @@ Model: "StateIOv1.0.0-75" # 75 represents Summary level disaggregated model (73 + 2 = 75 commodities & 71 + 2 = 73 industries) BaseIOSchema: 2012 -BaseIOLevel: &BaseIOLevel "Summary" +BaseIOLevel: "Summary" IOYear: - 2012 - 2013 @@ -25,3 +25,4 @@ DataProduct: - "InternationalTradeAdjustment" - "CommodityOutput" - "IndustryOutput" + - "ValueAdded" diff --git a/inst/extdata/modelspecs/StateIOv1.0.0-s.yml b/inst/extdata/modelspecs/StateIOv1.0.0-s.yml index e68b6f95..69463931 100644 --- a/inst/extdata/modelspecs/StateIOv1.0.0-s.yml +++ b/inst/extdata/modelspecs/StateIOv1.0.0-s.yml @@ -1,6 +1,6 @@ Model: "StateIOv1.0.0-s" # s represents Summary level (73 commodities & 71 industries) BaseIOSchema: 2012 -BaseIOLevel: &BaseIOLevel "Summary" +BaseIOLevel: "Summary" IOYear: - 2012 - 2013 @@ -25,3 +25,4 @@ DataProduct: - "InternationalTradeAdjustment" - "CommodityOutput" - "IndustryOutput" + - "ValueAdded" From c8e793cc77f45a1898e986adac1faeaf1f55bdd7 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 28 Mar 2023 22:06:57 -0400 Subject: [PATCH 073/121] enable all years for two-region model build --- .../workflows/save-two-region-model-data.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/save-two-region-model-data.yaml b/.github/workflows/save-two-region-model-data.yaml index 23455fa2..ccf301d6 100644 --- a/.github/workflows/save-two-region-model-data.yaml +++ b/.github/workflows/save-two-region-model-data.yaml @@ -25,15 +25,15 @@ jobs: script-run: - data-raw/TwoRegionModel.R data-year: - # - 2012 - # - 2013 - # - 2014 - # - 2015 - # - 2016 + - 2012 + - 2013 + - 2014 + - 2015 + - 2016 - 2017 - # - 2018 - # - 2019 - # - 2020 + - 2018 + - 2019 + - 2020 # env: # R_REMOTES_NO_ERRORS_FROM_WARNINGS: true From 9fce51f2ad316ee2ebe25c15e3817c609aeffd46 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 28 Mar 2023 22:29:26 -0400 Subject: [PATCH 074/121] add package to specs, fix typo --- inst/extdata/disaggspecs/UtilityDisaggregation.yml | 3 ++- inst/extdata/disaggspecs/UtilityDisaggregationSummary_Use.csv | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inst/extdata/disaggspecs/UtilityDisaggregation.yml b/inst/extdata/disaggspecs/UtilityDisaggregation.yml index 1e92939f..32913a6a 100644 --- a/inst/extdata/disaggspecs/UtilityDisaggregation.yml +++ b/inst/extdata/disaggspecs/UtilityDisaggregation.yml @@ -6,4 +6,5 @@ Disaggregation: SectorFile: UtilityDisaggregation_Sectors.csv MakeFile: UtilityDisaggregationSummary_Make.csv UseFile: UtilityDisaggregationSummary_Use.csv - EnvFile: UtilityDisaggregationSummary_Env.csv + EnvFile: UtilityDisaggregationSummary_Env.csv + package: "stateior" diff --git a/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Use.csv b/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Use.csv index a43b5019..b611c795 100644 --- a/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Use.csv +++ b/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Use.csv @@ -1,4 +1,4 @@ -"IndustryCode","CommodityCode","PercentUse","Note" +"IndustryCode","CommodityCode","PercentUsed","Note" "221100/US","221100/US",0.558191280736159,"IntersectionDisagg" "221100/US","221200/US",0.0356388595564942,"IntersectionDisagg" "221100/US","221300/US",0.00365816865288882,"IntersectionDisagg" From f42c216e17f2184dfa96d7d96d67e05c706077e5 Mon Sep 17 00:00:00 2001 From: jvendries Date: Thu, 30 Mar 2023 18:27:39 -0400 Subject: [PATCH 075/121] add work folder to ignore list --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4f5229e1..0d7b54de 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .RData .Ruserdata inst/doc/**/*.html +work From 45383f445dad85fd5db1b4ceb734d1d1b632c05d Mon Sep 17 00:00:00 2001 From: jvendries Date: Sat, 1 Apr 2023 16:14:46 -0400 Subject: [PATCH 076/121] temporary changes to buildModel.R to debug VA 2020 disagg error --- R/BuildModel.R | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 7a2b32cb..8b5b7145 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -693,7 +693,14 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { # Assemble two-region IO tables TwoRegionIO <- list() - for (state in sort(c(state.name, "District of Columbia"))) { + #TEMPORARY FOR DEBUGGING + for (state in c("Virginia")){ +# for (state in sort(c(state.name, "District of Columbia"))) { + + if(state == "Virginia"){ + temp <-1 + } + ## Two-region Make model$MakeTransactions <- State_Make_ls[[state]] model$FullUse <- State_Use_ls[[state]] From 338772e716eb988b7a22f521db6a6af055d093ba Mon Sep 17 00:00:00 2001 From: jvendries Date: Sat, 1 Apr 2023 20:08:24 -0400 Subject: [PATCH 077/121] added a new yml disaggregation file to point to the employment ratios csv rather than the Use, Make, and Env csv files --- inst/extdata/disaggspecs/UtilityDisaggByProxy.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 inst/extdata/disaggspecs/UtilityDisaggByProxy.yml diff --git a/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml b/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml new file mode 100644 index 00000000..1cf0c30c --- /dev/null +++ b/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml @@ -0,0 +1,11 @@ +Disaggregation: + 22/US: + OriginalSectorCode: "22/US" + OrignalSectorName: "Utilities" + DisaggregationType: "Userdefined" + SectorFile: UtilityDisaggregation_Sectors.csv + # MakeFile: UtilityDisaggregationSummary_Make.csv + # UseFile: UtilityDisaggregationSummary_Use.csv + # EnvFile: UtilityDisaggregationSummary_Env.csv + stateFile: Employment_ratios.csv + package: "stateior" From a590aa6a698ef86487b117018978f75fc62ca9bc Mon Sep 17 00:00:00 2001 From: jvendries Date: Sat, 1 Apr 2023 20:39:03 -0400 Subject: [PATCH 078/121] update getStateModelDisaggSpecs to save stateFile as dataframe that is a part of the disagg object for every model$DisaggregationSpecs --- R/StateDisaggFunctions.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index d152c26b..3e53cf5e 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -12,8 +12,12 @@ getStateModelDisaggSpecs <- function(configfile, statefile = NULL){ disaggConfigpath <- system.file(paste0("extdata/disaggspecs/"), paste0(configfile,".yml"), package = "stateior") model <- useeior:::getDisaggregationSpecs(model, disaggConfigpath, pkg = "stateior") - if(!is.null(statefile)){ - model$specs$StateDisaggSpecs <- getStateSpecificDisaggSpecs(disaggConfigpath, statefile) + for(disagg in model$DisaggregationSpecs) + { + if(!is.null(disagg$stateFile)){ + disagg$stateDF <- getStateSpecificDisaggSpecs(disaggConfigpath, disagg$stateFile) + model$DisaggregationSpecs[[disagg$OriginalSectorCode]] <- disagg + } } return(model) From 7b33dccea46068d60cf062a34b21b4e2be793599 Mon Sep 17 00:00:00 2001 From: jvendries Date: Sat, 1 Apr 2023 20:39:31 -0400 Subject: [PATCH 079/121] add comment for decision point on how to handle disaggregation by proxy --- R/BuildModel.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/BuildModel.R b/R/BuildModel.R index 8b5b7145..babd4ff0 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -646,6 +646,8 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { model$FullUse <- US_Use model$DomesticFullUse <- US_DomesticUse # Note that the domestic full use object does not include value added rows + #ERROR HERE FOR DISAGG BY PROXY: NEED TO DECIDE IF WE WANT TO REFACTOR THIS CODE TO WORK ONLY FOR DISAGG BY PROXY, IF WE WANT TO KEEP THIS VERSION (DISAGG BASED ON + # 2020 DETAIL MODEL), OR IF WE WANT TO KEEP BOTH # Disaggregate national model objects once (i.e. not for each state) model <- disaggregateNationalObjectsInStateModel(model, disagg) From 538ef44f3c746dbad4b7bb14906753191384dde9 Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 3 Apr 2023 21:52:57 -0400 Subject: [PATCH 080/121] Added dummy US employment ratios for testing in the Employment_ratios.csv file --- .../extdata/disaggspecs/Employment_ratios.csv | 915 +++++++++--------- .../disaggspecs/Employment_ratios_backup.csv | 460 +++++++++ 2 files changed, 922 insertions(+), 453 deletions(-) create mode 100644 inst/extdata/disaggspecs/Employment_ratios_backup.csv diff --git a/inst/extdata/disaggspecs/Employment_ratios.csv b/inst/extdata/disaggspecs/Employment_ratios.csv index f1b97880..02efd485 100644 --- a/inst/extdata/disaggspecs/Employment_ratios.csv +++ b/inst/extdata/disaggspecs/Employment_ratios.csv @@ -1,460 +1,469 @@ State,ActivityProducedBy,Share,Year -Alabama,221100,0.6958398066632142,2016 -Alabama,221200,0.09999136889349215,2016 -Alabama,221300,0.20416882444329362,2016 -Alaska,221100,0.714622641509434,2016 -Alaska,221200,0.13726415094339622,2016 -Alaska,221300,0.1481132075471698,2016 -Arizona,221100,0.992974695895401,2016 -Arizona,221200,0.0,2016 -Arizona,221300,0.007025304104598972,2016 -Arkansas,221100,0.5329691032403918,2016 -Arkansas,221200,0.10437076111529767,2016 -Arkansas,221300,0.3626601356443105,2016 -California,221100,0.36238932052002404,2016 -California,221200,0.0,2016 -California,221300,0.637610679479976,2016 -Colorado,221100,0.795752427184466,2016 -Colorado,221200,0.10631067961165049,2016 -Colorado,221300,0.09793689320388349,2016 -Connecticut,221100,0.5514211886304909,2016 -Connecticut,221200,0.10904392764857881,2016 -Connecticut,221300,0.3395348837209302,2016 -Delaware,221100,1.0,2016 -Delaware,221200,0.0,2016 -Delaware,221300,0.0,2016 +US,221100,0.34,2016 +US,221200,0.33,2016 +US,221300,0.33,2016 +Alabama,221100,0.695839807,2016 +Alabama,221200,0.099991369,2016 +Alabama,221300,0.204168824,2016 +Alaska,221100,0.714622642,2016 +Alaska,221200,0.137264151,2016 +Alaska,221300,0.148113208,2016 +Arizona,221100,0.992974696,2016 +Arizona,221200,0,2016 +Arizona,221300,0.007025304,2016 +Arkansas,221100,0.532969103,2016 +Arkansas,221200,0.104370761,2016 +Arkansas,221300,0.362660136,2016 +California,221100,0.362389321,2016 +California,221200,0,2016 +California,221300,0.637610679,2016 +Colorado,221100,0.795752427,2016 +Colorado,221200,0.10631068,2016 +Colorado,221300,0.097936893,2016 +Connecticut,221100,0.551421189,2016 +Connecticut,221200,0.109043928,2016 +Connecticut,221300,0.339534884,2016 +Delaware,221100,1,2016 +Delaware,221200,0,2016 +Delaware,221300,0,2016 District Of Columbia,221100,,2016 District Of Columbia,221200,,2016 District Of Columbia,221300,,2016 -Florida,221100,0.7706402987138709,2016 -Florida,221200,0.05514451666436178,2016 -Florida,221300,0.17421518462176738,2016 -Georgia,221100,0.8420134562671319,2016 -Georgia,221200,0.10037378519810615,2016 -Georgia,221300,0.057612758534762026,2016 -Hawaii,221100,1.0,2016 -Hawaii,221200,0.0,2016 -Hawaii,221300,0.0,2016 -Idaho,221100,0.7653611210923464,2016 -Idaho,221200,0.0,2016 -Idaho,221300,0.23463887890765361,2016 -Illinois,221100,0.6695485457965562,2016 -Illinois,221200,0.1605049920416727,2016 -Illinois,221300,0.1699464621617711,2016 -Indiana,221100,0.7111716621253406,2016 -Indiana,221200,0.11371037416096232,2016 -Indiana,221300,0.1751179637136971,2016 -Iowa,221100,0.78442521631644,2016 -Iowa,221200,0.07045735475896168,2016 -Iowa,221300,0.14511742892459828,2016 -Kansas,221100,0.6157773806484554,2016 -Kansas,221200,0.2221087567015573,2016 -Kansas,221300,0.16211386264998723,2016 -Kentucky,221100,0.5581913708008279,2016 -Kentucky,221200,0.0728387199490527,2016 -Kentucky,221300,0.3689699092501194,2016 -Louisiana,221100,0.46906069149725477,2016 -Louisiana,221200,0.10023742395014097,2016 -Louisiana,221300,0.4307018845526042,2016 -Maine,221100,0.4832146490335707,2016 -Maine,221200,0.05188199389623601,2016 -Maine,221300,0.4649033570701933,2016 -Maryland,221100,0.8927008750994431,2016 -Maryland,221200,0.056881463802704854,2016 -Maryland,221300,0.05041766109785203,2016 -Massachusetts,221100,0.5553125706960259,2016 -Massachusetts,221200,0.20843073674685167,2016 -Massachusetts,221300,0.2362566925571224,2016 -Michigan,221100,0.8395624002253733,2016 -Michigan,221200,0.11343788149121983,2016 -Michigan,221300,0.04699971828340689,2016 -Minnesota,221100,0.8326792722083483,2016 -Minnesota,221200,0.11202283267927221,2016 -Minnesota,221300,0.05529789511237959,2016 -Mississippi,221100,0.7192065692652234,2016 -Mississippi,221200,0.0681454623013757,2016 -Mississippi,221300,0.21264796843340086,2016 -Missouri,221100,0.5129345409187049,2016 -Missouri,221200,0.14458484733445415,2016 -Missouri,221300,0.3424806117468409,2016 -Montana,221100,0.7471230451460608,2016 -Montana,221200,0.1106521097668929,2016 -Montana,221300,0.14222484508704633,2016 -Nebraska,221100,0.7716777834787071,2016 -Nebraska,221200,0.10582349923037455,2016 -Nebraska,221300,0.12249871729091842,2016 -Nevada,221100,0.674134926562111,2016 -Nevada,221200,0.0,2016 -Nevada,221300,0.32586507343788895,2016 -New Hampshire,221100,0.7365319865319865,2016 -New Hampshire,221200,0.10311447811447812,2016 -New Hampshire,221300,0.16035353535353536,2016 -New Jersey,221100,0.5394820858460447,2016 -New Jersey,221200,0.3054274565448741,2016 -New Jersey,221300,0.15509045760908124,2016 -New Mexico,221100,0.5263325377883851,2016 -New Mexico,221200,0.1858392999204455,2016 -New Mexico,221300,0.2878281622911695,2016 -New York,221100,0.755165113279634,2016 -New York,221200,0.17307083931569853,2016 -New York,221300,0.07176404740466746,2016 -North Carolina,221100,0.7246435027113878,2016 -North Carolina,221200,0.1404565843208141,2016 -North Carolina,221300,0.13489991296779807,2016 -North Dakota,221100,0.9337368588722523,2016 -North Dakota,221200,0.0,2016 -North Dakota,221300,0.06626314112774769,2016 -Ohio,221100,0.4720680083275503,2016 -Ohio,221200,0.19059680777238028,2016 -Ohio,221300,0.3373351839000694,2016 -Oklahoma,221100,0.43917603466683414,2016 -Oklahoma,221200,0.28757143754317654,2016 -Oklahoma,221300,0.2732525277899893,2016 -Oregon,221100,0.5220414752266236,2016 -Oregon,221200,0.14801937166273438,2016 -Oregon,221300,0.329939153110642,2016 -Pennsylvania,221100,0.4958280508299673,2016 -Pennsylvania,221200,0.14113866202789163,2016 -Pennsylvania,221300,0.3630332871421411,2016 -Rhode Island,221100,1.0,2016 -Rhode Island,221200,0.0,2016 -Rhode Island,221300,0.0,2016 -South Carolina,221100,0.7359536246655625,2016 -South Carolina,221200,0.059752834756019876,2016 -South Carolina,221300,0.20429354057841764,2016 -South Dakota,221100,0.784051510648836,2016 -South Dakota,221200,0.09806835066864784,2016 -South Dakota,221300,0.1178801386825161,2016 -Tennessee,221100,0.7305083974329798,2016 -Tennessee,221200,0.08178963178735606,2016 -Tennessee,221300,0.1877019707796641,2016 -Texas,221100,0.5552512985497993,2016 -Texas,221200,0.09005734494148851,2016 -Texas,221300,0.35469135650871225,2016 -Utah,221100,0.45968441130570487,2016 -Utah,221200,0.1321310906883995,2016 -Utah,221300,0.4081844980058956,2016 -Vermont,221100,0.8427037271004422,2016 -Vermont,221200,0.0,2016 -Vermont,221300,0.1572962728995578,2016 -Virginia,221100,0.48124616842222595,2016 -Virginia,221200,0.08755503538984562,2016 -Virginia,221300,0.43119879618792845,2016 -Washington,221100,0.659468438538206,2016 -Washington,221200,0.03590183260100739,2016 -Washington,221300,0.30462972886078665,2016 -West Virginia,221100,0.734571483846005,2016 -West Virginia,221200,0.1408396208164055,2016 -West Virginia,221300,0.12458889533758948,2016 -Wisconsin,221100,0.7481797639969872,2016 -Wisconsin,221200,0.06477529500376601,2016 -Wisconsin,221300,0.1870449409992468,2016 -Wyoming,221100,0.8633516053249805,2016 -Wyoming,221200,0.09162098668754894,2016 -Wyoming,221300,0.04502740798747063,2016 -Alabama,221100,0.6855893267361725,2017 -Alabama,221200,0.10134299346174236,2017 -Alabama,221300,0.21306767980208519,2017 -Alaska,221100,0.7170524326877658,2017 -Alaska,221200,0.1350968351440718,2017 -Alaska,221300,0.1478507321681625,2017 -Arizona,221100,0.9929194256867502,2017 -Arizona,221200,0.0,2017 -Arizona,221300,0.007080574313249852,2017 -Arkansas,221100,0.5367757712565839,2017 -Arkansas,221200,0.09951091045899173,2017 -Arkansas,221300,0.3637133182844244,2017 -California,221100,0.36999005660088724,2017 -California,221200,0.0,2017 -California,221300,0.6300099433991128,2017 -Colorado,221100,0.7925485827453893,2017 -Colorado,221200,0.10521104097041713,2017 -Colorado,221300,0.1022403762841936,2017 -Connecticut,221100,0.547513141932875,2017 -Connecticut,221200,0.10540504111066182,2017 -Connecticut,221300,0.3470818169564631,2017 -Delaware,221100,1.0,2017 -Delaware,221200,0.0,2017 -Delaware,221300,0.0,2017 +Florida,221100,0.770640299,2016 +Florida,221200,0.055144517,2016 +Florida,221300,0.174215185,2016 +Georgia,221100,0.842013456,2016 +Georgia,221200,0.100373785,2016 +Georgia,221300,0.057612759,2016 +Hawaii,221100,1,2016 +Hawaii,221200,0,2016 +Hawaii,221300,0,2016 +Idaho,221100,0.765361121,2016 +Idaho,221200,0,2016 +Idaho,221300,0.234638879,2016 +Illinois,221100,0.669548546,2016 +Illinois,221200,0.160504992,2016 +Illinois,221300,0.169946462,2016 +Indiana,221100,0.711171662,2016 +Indiana,221200,0.113710374,2016 +Indiana,221300,0.175117964,2016 +Iowa,221100,0.784425216,2016 +Iowa,221200,0.070457355,2016 +Iowa,221300,0.145117429,2016 +Kansas,221100,0.615777381,2016 +Kansas,221200,0.222108757,2016 +Kansas,221300,0.162113863,2016 +Kentucky,221100,0.558191371,2016 +Kentucky,221200,0.07283872,2016 +Kentucky,221300,0.368969909,2016 +Louisiana,221100,0.469060691,2016 +Louisiana,221200,0.100237424,2016 +Louisiana,221300,0.430701885,2016 +Maine,221100,0.483214649,2016 +Maine,221200,0.051881994,2016 +Maine,221300,0.464903357,2016 +Maryland,221100,0.892700875,2016 +Maryland,221200,0.056881464,2016 +Maryland,221300,0.050417661,2016 +Massachusetts,221100,0.555312571,2016 +Massachusetts,221200,0.208430737,2016 +Massachusetts,221300,0.236256693,2016 +Michigan,221100,0.8395624,2016 +Michigan,221200,0.113437881,2016 +Michigan,221300,0.046999718,2016 +Minnesota,221100,0.832679272,2016 +Minnesota,221200,0.112022833,2016 +Minnesota,221300,0.055297895,2016 +Mississippi,221100,0.719206569,2016 +Mississippi,221200,0.068145462,2016 +Mississippi,221300,0.212647968,2016 +Missouri,221100,0.512934541,2016 +Missouri,221200,0.144584847,2016 +Missouri,221300,0.342480612,2016 +Montana,221100,0.747123045,2016 +Montana,221200,0.11065211,2016 +Montana,221300,0.142224845,2016 +Nebraska,221100,0.771677783,2016 +Nebraska,221200,0.105823499,2016 +Nebraska,221300,0.122498717,2016 +Nevada,221100,0.674134927,2016 +Nevada,221200,0,2016 +Nevada,221300,0.325865073,2016 +New Hampshire,221100,0.736531987,2016 +New Hampshire,221200,0.103114478,2016 +New Hampshire,221300,0.160353535,2016 +New Jersey,221100,0.539482086,2016 +New Jersey,221200,0.305427457,2016 +New Jersey,221300,0.155090458,2016 +New Mexico,221100,0.526332538,2016 +New Mexico,221200,0.1858393,2016 +New Mexico,221300,0.287828162,2016 +New York,221100,0.755165113,2016 +New York,221200,0.173070839,2016 +New York,221300,0.071764047,2016 +North Carolina,221100,0.724643503,2016 +North Carolina,221200,0.140456584,2016 +North Carolina,221300,0.134899913,2016 +North Dakota,221100,0.933736859,2016 +North Dakota,221200,0,2016 +North Dakota,221300,0.066263141,2016 +Ohio,221100,0.472068008,2016 +Ohio,221200,0.190596808,2016 +Ohio,221300,0.337335184,2016 +Oklahoma,221100,0.439176035,2016 +Oklahoma,221200,0.287571438,2016 +Oklahoma,221300,0.273252528,2016 +Oregon,221100,0.522041475,2016 +Oregon,221200,0.148019372,2016 +Oregon,221300,0.329939153,2016 +Pennsylvania,221100,0.495828051,2016 +Pennsylvania,221200,0.141138662,2016 +Pennsylvania,221300,0.363033287,2016 +Rhode Island,221100,1,2016 +Rhode Island,221200,0,2016 +Rhode Island,221300,0,2016 +South Carolina,221100,0.735953625,2016 +South Carolina,221200,0.059752835,2016 +South Carolina,221300,0.204293541,2016 +South Dakota,221100,0.784051511,2016 +South Dakota,221200,0.098068351,2016 +South Dakota,221300,0.117880139,2016 +Tennessee,221100,0.730508397,2016 +Tennessee,221200,0.081789632,2016 +Tennessee,221300,0.187701971,2016 +Texas,221100,0.555251299,2016 +Texas,221200,0.090057345,2016 +Texas,221300,0.354691357,2016 +Utah,221100,0.459684411,2016 +Utah,221200,0.132131091,2016 +Utah,221300,0.408184498,2016 +Vermont,221100,0.842703727,2016 +Vermont,221200,0,2016 +Vermont,221300,0.157296273,2016 +Virginia,221100,0.481246168,2016 +Virginia,221200,0.087555035,2016 +Virginia,221300,0.431198796,2016 +Washington,221100,0.659468439,2016 +Washington,221200,0.035901833,2016 +Washington,221300,0.304629729,2016 +West Virginia,221100,0.734571484,2016 +West Virginia,221200,0.140839621,2016 +West Virginia,221300,0.124588895,2016 +Wisconsin,221100,0.748179764,2016 +Wisconsin,221200,0.064775295,2016 +Wisconsin,221300,0.187044941,2016 +Wyoming,221100,0.863351605,2016 +Wyoming,221200,0.091620987,2016 +Wyoming,221300,0.045027408,2016 +US,221100,0.34,2017 +US,221200,0.33,2017 +US,221300,0.33,2017 +Alabama,221100,0.685589327,2017 +Alabama,221200,0.101342993,2017 +Alabama,221300,0.21306768,2017 +Alaska,221100,0.717052433,2017 +Alaska,221200,0.135096835,2017 +Alaska,221300,0.147850732,2017 +Arizona,221100,0.992919426,2017 +Arizona,221200,0,2017 +Arizona,221300,0.007080574,2017 +Arkansas,221100,0.536775771,2017 +Arkansas,221200,0.09951091,2017 +Arkansas,221300,0.363713318,2017 +California,221100,0.369990057,2017 +California,221200,0,2017 +California,221300,0.630009943,2017 +Colorado,221100,0.792548583,2017 +Colorado,221200,0.105211041,2017 +Colorado,221300,0.102240376,2017 +Connecticut,221100,0.547513142,2017 +Connecticut,221200,0.105405041,2017 +Connecticut,221300,0.347081817,2017 +Delaware,221100,1,2017 +Delaware,221200,0,2017 +Delaware,221300,0,2017 District Of Columbia,221100,,2017 District Of Columbia,221200,,2017 District Of Columbia,221300,,2017 -Florida,221100,0.7621745999038395,2017 -Florida,221200,0.05608214849921011,2017 -Florida,221300,0.18174325159695034,2017 -Georgia,221100,0.8309082554755706,2017 -Georgia,221200,0.10603972022259663,2017 -Georgia,221300,0.06305202430183285,2017 -Hawaii,221100,1.0,2017 -Hawaii,221200,0.0,2017 -Hawaii,221300,0.0,2017 -Idaho,221100,0.7651128914785142,2017 -Idaho,221200,0.0,2017 -Idaho,221300,0.2348871085214858,2017 -Illinois,221100,0.6565946897567636,2017 -Illinois,221200,0.16713972622426615,2017 -Illinois,221300,0.1762655840189703,2017 -Indiana,221100,0.7114345935976815,2017 -Indiana,221200,0.11632196021604532,2017 -Indiana,221300,0.1722434461862732,2017 -Iowa,221100,0.7845847341551488,2017 -Iowa,221200,0.07022786701531565,2017 -Iowa,221300,0.14518739882953555,2017 -Kansas,221100,0.6113695090439276,2017 -Kansas,221200,0.22080103359173125,2017 -Kansas,221300,0.16782945736434107,2017 -Kentucky,221100,0.552446446921192,2017 -Kentucky,221200,0.07390720101177772,2017 -Kentucky,221300,0.3736463520670303,2017 -Louisiana,221100,0.47029226785053646,2017 -Louisiana,221200,0.09655937846836848,2017 -Louisiana,221300,0.43314835368109506,2017 -Maine,221100,0.4952861952861953,2017 -Maine,221200,0.04276094276094276,2017 -Maine,221300,0.46195286195286195,2017 -Maryland,221100,0.8908489525909592,2017 -Maryland,221200,0.05883532123884935,2017 -Maryland,221300,0.05031572617019144,2017 -Massachusetts,221100,0.5584020842379505,2017 -Massachusetts,221200,0.2134896511796208,2017 -Massachusetts,221300,0.22810826458242872,2017 -Michigan,221100,0.8070104391648668,2017 -Michigan,221200,0.10920626349892008,2017 -Michigan,221300,0.0837832973362131,2017 -Minnesota,221100,0.8255193306405078,2017 -Minnesota,221200,0.1154068090017311,2017 -Minnesota,221300,0.05907386035776111,2017 -Mississippi,221100,0.7129931614939505,2017 -Mississippi,221200,0.06596528143082588,2017 -Mississippi,221300,0.22104155707522358,2017 -Missouri,221100,0.5108607334380586,2017 -Missouri,221200,0.14945019229727532,2017 -Missouri,221300,0.33968907426466605,2017 -Montana,221100,0.8063973063973064,2017 -Montana,221200,0.12558922558922558,2017 -Montana,221300,0.06801346801346801,2017 -Nebraska,221100,0.8951612903225806,2017 -Nebraska,221200,0.10483870967741936,2017 -Nebraska,221300,0.0,2017 -Nevada,221100,0.6723880597014925,2017 -Nevada,221200,0.0,2017 -Nevada,221300,0.3276119402985075,2017 -New Hampshire,221100,0.731433506044905,2017 -New Hampshire,221200,0.1157167530224525,2017 -New Hampshire,221300,0.15284974093264247,2017 -New Jersey,221100,0.5199914778779916,2017 -New Jersey,221200,0.32533200766990983,2017 -New Jersey,221300,0.15467651445209857,2017 -New Mexico,221100,0.5248955991005461,2017 -New Mexico,221200,0.1864760681015098,2017 -New Mexico,221300,0.2886283327979441,2017 -New York,221100,0.7557050836905247,2017 -New York,221200,0.17023059792629486,2017 -New York,221300,0.07406431838318048,2017 -North Carolina,221100,0.7267047363117232,2017 -North Carolina,221200,0.1394020826335237,2017 -North Carolina,221300,0.13389318105475312,2017 -North Dakota,221100,0.9312134977287476,2017 -North Dakota,221200,0.0,2017 -North Dakota,221300,0.06878650227125244,2017 -Ohio,221100,0.46731707317073173,2017 -Ohio,221200,0.1937630662020906,2017 -Ohio,221300,0.3389198606271777,2017 -Oklahoma,221100,0.4646304376570144,2017 -Oklahoma,221200,0.2499669443342589,2017 -Oklahoma,221300,0.2854026180087267,2017 -Oregon,221100,0.693427677234998,2017 -Oregon,221200,0.0,2017 -Oregon,221300,0.306572322765002,2017 -Pennsylvania,221100,0.48789112411969215,2017 -Pennsylvania,221200,0.1445933497756515,2017 -Pennsylvania,221300,0.3675155261046563,2017 -Rhode Island,221100,0.6435733819507748,2017 -Rhode Island,221200,0.0,2017 -Rhode Island,221300,0.35642661804922515,2017 -South Carolina,221100,0.7256625891946993,2017 -South Carolina,221200,0.059441896024464834,2017 -South Carolina,221300,0.21489551478083588,2017 -South Dakota,221100,0.7812343201204215,2017 -South Dakota,221200,0.09834420471650777,2017 -South Dakota,221300,0.12042147516307075,2017 -Tennessee,221100,0.7257370590100086,2017 -Tennessee,221200,0.08523164711743128,2017 -Tennessee,221300,0.18903129387256012,2017 -Texas,221100,0.5520989095152996,2017 -Texas,221200,0.09049685741031159,2017 -Texas,221300,0.3574042330743888,2017 -Utah,221100,0.45615528690618085,2017 -Utah,221200,0.13638685509960838,2017 -Utah,221300,0.4074578579942108,2017 -Vermont,221100,0.8371161548731643,2017 -Vermont,221200,0.0,2017 -Vermont,221300,0.1628838451268358,2017 -Virginia,221100,0.4747101327507982,2017 -Virginia,221200,0.09074105192404638,2017 -Virginia,221300,0.43454881532515544,2017 -Washington,221100,0.6614720438033063,2017 -Washington,221200,0.0368537432873539,2017 -Washington,221300,0.30167421290933977,2017 -West Virginia,221100,0.7480181200453001,2017 -West Virginia,221200,0.135522838807097,2017 -West Virginia,221300,0.11645904114760287,2017 -Wisconsin,221100,0.74617917757325,2017 -Wisconsin,221200,0.06400405302710462,2017 -Wisconsin,221300,0.18981676939964537,2017 -Wyoming,221100,0.8638007231820009,2017 -Wyoming,221200,0.09722780233025312,2017 -Wyoming,221300,0.038971474487746086,2017 -Alabama,221100,0.684650792245729,2018 -Alabama,221200,0.1001150747986191,2018 -Alabama,221300,0.21523413295565194,2018 -Alaska,221100,0.7220956719817767,2018 -Alaska,221200,0.13302961275626424,2018 -Alaska,221300,0.144874715261959,2018 -Arizona,221100,0.9928778686362437,2018 -Arizona,221200,0.0,2018 -Arizona,221300,0.007122131363756265,2018 -Arkansas,221100,0.5392538975501113,2018 -Arkansas,221200,0.09669636228656273,2018 -Arkansas,221300,0.3640497401633259,2018 -California,221100,0.3679787085025914,2018 -California,221200,0.0,2018 -California,221300,0.6320212914974086,2018 -Colorado,221100,0.7866749688667497,2018 -Colorado,221200,0.10859277708592777,2018 -Colorado,221300,0.10473225404732255,2018 -Connecticut,221100,0.5422583758444781,2018 -Connecticut,221200,0.10106162967048118,2018 -Connecticut,221300,0.3566799944850407,2018 -Delaware,221100,1.0,2018 -Delaware,221200,0.0,2018 -Delaware,221300,0.0,2018 -District Of Columbia,221100,1.0,2018 -District Of Columbia,221200,0.0,2018 -District Of Columbia,221300,0.0,2018 -Florida,221100,0.7543787909766237,2018 -Florida,221200,0.0585429019287126,2018 -Florida,221300,0.18707830709466367,2018 -Georgia,221100,0.822259484384825,2018 -Georgia,221200,0.10348983441626493,2018 -Georgia,221300,0.07425068119891008,2018 -Hawaii,221100,1.0,2018 -Hawaii,221200,0.0,2018 -Hawaii,221300,0.0,2018 -Idaho,221100,0.7649802655184786,2018 -Idaho,221200,0.0,2018 -Idaho,221300,0.23501973448152136,2018 -Illinois,221100,0.6557065509699165,2018 -Illinois,221200,0.16519057692997238,2018 -Illinois,221300,0.17910287210011117,2018 -Indiana,221100,0.7139877460565767,2018 -Indiana,221200,0.11752053187328901,2018 -Indiana,221300,0.16849172207013427,2018 -Iowa,221100,0.7842645953395139,2018 -Iowa,221200,0.07166123778501629,2018 -Iowa,221300,0.1440741668754698,2018 -Kansas,221100,0.5979872881355932,2018 -Kansas,221200,0.22709216101694915,2018 -Kansas,221300,0.17492055084745764,2018 -Kentucky,221100,0.5511009391523952,2018 -Kentucky,221200,0.07584247494278273,2018 -Kentucky,221300,0.37305658590482205,2018 -Louisiana,221100,0.4765664985011333,2018 -Louisiana,221200,0.09417269869123346,2018 -Louisiana,221300,0.42926080280763323,2018 -Maine,221100,0.48547008547008547,2018 -Maine,221200,0.043076923076923075,2018 -Maine,221300,0.47145299145299147,2018 -Maryland,221100,0.8828856021732568,2018 -Maryland,221200,0.06177683871616863,2018 -Maryland,221300,0.0553375591105745,2018 -Massachusetts,221100,0.5764583796605144,2018 -Massachusetts,221200,0.1868653176191535,2018 -Massachusetts,221300,0.23667630272033208,2018 -Michigan,221100,0.805064308681672,2018 -Michigan,221200,0.11017327617006073,2018 -Michigan,221300,0.08476241514826724,2018 -Minnesota,221100,0.8236276503049667,2018 -Minnesota,221200,0.11581469648562301,2018 -Minnesota,221300,0.060557653209410395,2018 -Mississippi,221100,0.7066994337001816,2018 -Mississippi,221200,0.06731488406881077,2018 -Mississippi,221300,0.2259856822310076,2018 -Missouri,221100,0.6396913200846821,2018 -Missouri,221200,0.01611691593252749,2018 -Missouri,221300,0.3441917639827904,2018 -Montana,221100,0.8091812264474135,2018 -Montana,221200,0.12572798903734156,2018 -Montana,221300,0.06509078451524494,2018 -Nebraska,221100,0.763048558815892,2018 -Nebraska,221200,0.1043884705271358,2018 -Nebraska,221300,0.13256297065697223,2018 -Nevada,221100,0.7101637639719262,2018 -Nevada,221200,0.0,2018 -Nevada,221300,0.28983623602807385,2018 -New Hampshire,221100,0.7230565371024735,2018 -New Hampshire,221200,0.11704946996466431,2018 -New Hampshire,221300,0.1598939929328622,2018 -New Jersey,221100,0.4937734730183831,2018 -New Jersey,221200,0.3590960005271134,2018 -New Jersey,221300,0.14713052645450353,2018 -New Mexico,221100,0.5184113201479338,2018 -New Mexico,221200,0.18684675992924907,2018 -New Mexico,221300,0.2947419199228172,2018 -New York,221100,0.8069856193292391,2018 -New York,221200,0.11608158313746304,2018 -New York,221300,0.07693279753329794,2018 -North Carolina,221100,0.7362545172947857,2018 -North Carolina,221200,0.13177594217862673,2018 -North Carolina,221300,0.13196954052658752,2018 -North Dakota,221100,0.7068273092369478,2018 -North Dakota,221200,0.1932730923694779,2018 -North Dakota,221300,0.09989959839357429,2018 -Ohio,221100,0.46649008468964553,2018 -Ohio,221200,0.1936709301920329,2018 -Ohio,221300,0.33983898511832156,2018 -Oklahoma,221100,0.46574797932953493,2018 -Oklahoma,221200,0.24897310189479263,2018 -Oklahoma,221300,0.28527891877567246,2018 -Oregon,221100,0.6922244759972954,2018 -Oregon,221200,0.0,2018 -Oregon,221300,0.3077755240027045,2018 -Pennsylvania,221100,0.4811219946571683,2018 -Pennsylvania,221200,0.14663104778866132,2018 -Pennsylvania,221300,0.37224695755417037,2018 -Rhode Island,221100,1.0,2018 -Rhode Island,221200,0.0,2018 -Rhode Island,221300,0.0,2018 -South Carolina,221100,0.7369428656895004,2018 -South Carolina,221200,0.055698474424169905,2018 -South Carolina,221300,0.20735865988632965,2018 -South Dakota,221100,0.7770475227502528,2018 -South Dakota,221200,0.10313447927199192,2018 -South Dakota,221300,0.1198179979777553,2018 -Tennessee,221100,0.724128552649472,2018 -Tennessee,221200,0.08549023163047913,2018 -Tennessee,221300,0.19038121572004896,2018 -Texas,221100,0.5450825098397949,2018 -Texas,221200,0.09513607202609502,2018 -Texas,221300,0.3597814181341101,2018 -Utah,221100,0.45962417470797357,2018 -Utah,221200,0.1271372947350601,2018 -Utah,221300,0.4132385305569663,2018 -Vermont,221100,0.8345612860013396,2018 -Vermont,221200,0.0,2018 -Vermont,221300,0.16543871399866042,2018 -Virginia,221100,0.46573434365946065,2018 -Virginia,221200,0.09399375975039001,2018 -Virginia,221300,0.4402718965901493,2018 -Washington,221100,0.6638834145835494,2018 -Washington,221200,0.037288663001763304,2018 -Washington,221300,0.29882792241468725,2018 -West Virginia,221100,0.7449802964908988,2018 -West Virginia,221200,0.13773691124038281,2018 -West Virginia,221300,0.11728279226871834,2018 -Wisconsin,221100,0.7335944299390774,2018 -Wisconsin,221200,0.06892950391644909,2018 -Wisconsin,221300,0.19747606614447347,2018 -Wyoming,221100,0.8308852719333069,2018 -Wyoming,221200,0.13298928146089717,2018 -Wyoming,221300,0.036125446605795954,2018 +Florida,221100,0.7621746,2017 +Florida,221200,0.056082148,2017 +Florida,221300,0.181743252,2017 +Georgia,221100,0.830908255,2017 +Georgia,221200,0.10603972,2017 +Georgia,221300,0.063052024,2017 +Hawaii,221100,1,2017 +Hawaii,221200,0,2017 +Hawaii,221300,0,2017 +Idaho,221100,0.765112891,2017 +Idaho,221200,0,2017 +Idaho,221300,0.234887109,2017 +Illinois,221100,0.65659469,2017 +Illinois,221200,0.167139726,2017 +Illinois,221300,0.176265584,2017 +Indiana,221100,0.711434594,2017 +Indiana,221200,0.11632196,2017 +Indiana,221300,0.172243446,2017 +Iowa,221100,0.784584734,2017 +Iowa,221200,0.070227867,2017 +Iowa,221300,0.145187399,2017 +Kansas,221100,0.611369509,2017 +Kansas,221200,0.220801034,2017 +Kansas,221300,0.167829457,2017 +Kentucky,221100,0.552446447,2017 +Kentucky,221200,0.073907201,2017 +Kentucky,221300,0.373646352,2017 +Louisiana,221100,0.470292268,2017 +Louisiana,221200,0.096559378,2017 +Louisiana,221300,0.433148354,2017 +Maine,221100,0.495286195,2017 +Maine,221200,0.042760943,2017 +Maine,221300,0.461952862,2017 +Maryland,221100,0.890848953,2017 +Maryland,221200,0.058835321,2017 +Maryland,221300,0.050315726,2017 +Massachusetts,221100,0.558402084,2017 +Massachusetts,221200,0.213489651,2017 +Massachusetts,221300,0.228108265,2017 +Michigan,221100,0.807010439,2017 +Michigan,221200,0.109206263,2017 +Michigan,221300,0.083783297,2017 +Minnesota,221100,0.825519331,2017 +Minnesota,221200,0.115406809,2017 +Minnesota,221300,0.05907386,2017 +Mississippi,221100,0.712993161,2017 +Mississippi,221200,0.065965281,2017 +Mississippi,221300,0.221041557,2017 +Missouri,221100,0.510860733,2017 +Missouri,221200,0.149450192,2017 +Missouri,221300,0.339689074,2017 +Montana,221100,0.806397306,2017 +Montana,221200,0.125589226,2017 +Montana,221300,0.068013468,2017 +Nebraska,221100,0.89516129,2017 +Nebraska,221200,0.10483871,2017 +Nebraska,221300,0,2017 +Nevada,221100,0.67238806,2017 +Nevada,221200,0,2017 +Nevada,221300,0.32761194,2017 +New Hampshire,221100,0.731433506,2017 +New Hampshire,221200,0.115716753,2017 +New Hampshire,221300,0.152849741,2017 +New Jersey,221100,0.519991478,2017 +New Jersey,221200,0.325332008,2017 +New Jersey,221300,0.154676514,2017 +New Mexico,221100,0.524895599,2017 +New Mexico,221200,0.186476068,2017 +New Mexico,221300,0.288628333,2017 +New York,221100,0.755705084,2017 +New York,221200,0.170230598,2017 +New York,221300,0.074064318,2017 +North Carolina,221100,0.726704736,2017 +North Carolina,221200,0.139402083,2017 +North Carolina,221300,0.133893181,2017 +North Dakota,221100,0.931213498,2017 +North Dakota,221200,0,2017 +North Dakota,221300,0.068786502,2017 +Ohio,221100,0.467317073,2017 +Ohio,221200,0.193763066,2017 +Ohio,221300,0.338919861,2017 +Oklahoma,221100,0.464630438,2017 +Oklahoma,221200,0.249966944,2017 +Oklahoma,221300,0.285402618,2017 +Oregon,221100,0.693427677,2017 +Oregon,221200,0,2017 +Oregon,221300,0.306572323,2017 +Pennsylvania,221100,0.487891124,2017 +Pennsylvania,221200,0.14459335,2017 +Pennsylvania,221300,0.367515526,2017 +Rhode Island,221100,0.643573382,2017 +Rhode Island,221200,0,2017 +Rhode Island,221300,0.356426618,2017 +South Carolina,221100,0.725662589,2017 +South Carolina,221200,0.059441896,2017 +South Carolina,221300,0.214895515,2017 +South Dakota,221100,0.78123432,2017 +South Dakota,221200,0.098344205,2017 +South Dakota,221300,0.120421475,2017 +Tennessee,221100,0.725737059,2017 +Tennessee,221200,0.085231647,2017 +Tennessee,221300,0.189031294,2017 +Texas,221100,0.55209891,2017 +Texas,221200,0.090496857,2017 +Texas,221300,0.357404233,2017 +Utah,221100,0.456155287,2017 +Utah,221200,0.136386855,2017 +Utah,221300,0.407457858,2017 +Vermont,221100,0.837116155,2017 +Vermont,221200,0,2017 +Vermont,221300,0.162883845,2017 +Virginia,221100,0.474710133,2017 +Virginia,221200,0.090741052,2017 +Virginia,221300,0.434548815,2017 +Washington,221100,0.661472044,2017 +Washington,221200,0.036853743,2017 +Washington,221300,0.301674213,2017 +West Virginia,221100,0.74801812,2017 +West Virginia,221200,0.135522839,2017 +West Virginia,221300,0.116459041,2017 +Wisconsin,221100,0.746179178,2017 +Wisconsin,221200,0.064004053,2017 +Wisconsin,221300,0.189816769,2017 +Wyoming,221100,0.863800723,2017 +Wyoming,221200,0.097227802,2017 +Wyoming,221300,0.038971474,2017 +US,221100,0.34,2018 +US,221200,0.33,2018 +US,221300,0.33,2018 +Alabama,221100,0.684650792,2018 +Alabama,221200,0.100115075,2018 +Alabama,221300,0.215234133,2018 +Alaska,221100,0.722095672,2018 +Alaska,221200,0.133029613,2018 +Alaska,221300,0.144874715,2018 +Arizona,221100,0.992877869,2018 +Arizona,221200,0,2018 +Arizona,221300,0.007122131,2018 +Arkansas,221100,0.539253898,2018 +Arkansas,221200,0.096696362,2018 +Arkansas,221300,0.36404974,2018 +California,221100,0.367978709,2018 +California,221200,0,2018 +California,221300,0.632021291,2018 +Colorado,221100,0.786674969,2018 +Colorado,221200,0.108592777,2018 +Colorado,221300,0.104732254,2018 +Connecticut,221100,0.542258376,2018 +Connecticut,221200,0.10106163,2018 +Connecticut,221300,0.356679994,2018 +Delaware,221100,1,2018 +Delaware,221200,0,2018 +Delaware,221300,0,2018 +District Of Columbia,221100,1,2018 +District Of Columbia,221200,0,2018 +District Of Columbia,221300,0,2018 +Florida,221100,0.754378791,2018 +Florida,221200,0.058542902,2018 +Florida,221300,0.187078307,2018 +Georgia,221100,0.822259484,2018 +Georgia,221200,0.103489834,2018 +Georgia,221300,0.074250681,2018 +Hawaii,221100,1,2018 +Hawaii,221200,0,2018 +Hawaii,221300,0,2018 +Idaho,221100,0.764980266,2018 +Idaho,221200,0,2018 +Idaho,221300,0.235019734,2018 +Illinois,221100,0.655706551,2018 +Illinois,221200,0.165190577,2018 +Illinois,221300,0.179102872,2018 +Indiana,221100,0.713987746,2018 +Indiana,221200,0.117520532,2018 +Indiana,221300,0.168491722,2018 +Iowa,221100,0.784264595,2018 +Iowa,221200,0.071661238,2018 +Iowa,221300,0.144074167,2018 +Kansas,221100,0.597987288,2018 +Kansas,221200,0.227092161,2018 +Kansas,221300,0.174920551,2018 +Kentucky,221100,0.551100939,2018 +Kentucky,221200,0.075842475,2018 +Kentucky,221300,0.373056586,2018 +Louisiana,221100,0.476566499,2018 +Louisiana,221200,0.094172699,2018 +Louisiana,221300,0.429260803,2018 +Maine,221100,0.485470085,2018 +Maine,221200,0.043076923,2018 +Maine,221300,0.471452991,2018 +Maryland,221100,0.882885602,2018 +Maryland,221200,0.061776839,2018 +Maryland,221300,0.055337559,2018 +Massachusetts,221100,0.57645838,2018 +Massachusetts,221200,0.186865318,2018 +Massachusetts,221300,0.236676303,2018 +Michigan,221100,0.805064309,2018 +Michigan,221200,0.110173276,2018 +Michigan,221300,0.084762415,2018 +Minnesota,221100,0.82362765,2018 +Minnesota,221200,0.115814696,2018 +Minnesota,221300,0.060557653,2018 +Mississippi,221100,0.706699434,2018 +Mississippi,221200,0.067314884,2018 +Mississippi,221300,0.225985682,2018 +Missouri,221100,0.63969132,2018 +Missouri,221200,0.016116916,2018 +Missouri,221300,0.344191764,2018 +Montana,221100,0.809181226,2018 +Montana,221200,0.125727989,2018 +Montana,221300,0.065090785,2018 +Nebraska,221100,0.763048559,2018 +Nebraska,221200,0.104388471,2018 +Nebraska,221300,0.132562971,2018 +Nevada,221100,0.710163764,2018 +Nevada,221200,0,2018 +Nevada,221300,0.289836236,2018 +New Hampshire,221100,0.723056537,2018 +New Hampshire,221200,0.11704947,2018 +New Hampshire,221300,0.159893993,2018 +New Jersey,221100,0.493773473,2018 +New Jersey,221200,0.359096001,2018 +New Jersey,221300,0.147130526,2018 +New Mexico,221100,0.51841132,2018 +New Mexico,221200,0.18684676,2018 +New Mexico,221300,0.29474192,2018 +New York,221100,0.806985619,2018 +New York,221200,0.116081583,2018 +New York,221300,0.076932798,2018 +North Carolina,221100,0.736254517,2018 +North Carolina,221200,0.131775942,2018 +North Carolina,221300,0.131969541,2018 +North Dakota,221100,0.706827309,2018 +North Dakota,221200,0.193273092,2018 +North Dakota,221300,0.099899598,2018 +Ohio,221100,0.466490085,2018 +Ohio,221200,0.19367093,2018 +Ohio,221300,0.339838985,2018 +Oklahoma,221100,0.465747979,2018 +Oklahoma,221200,0.248973102,2018 +Oklahoma,221300,0.285278919,2018 +Oregon,221100,0.692224476,2018 +Oregon,221200,0,2018 +Oregon,221300,0.307775524,2018 +Pennsylvania,221100,0.481121995,2018 +Pennsylvania,221200,0.146631048,2018 +Pennsylvania,221300,0.372246958,2018 +Rhode Island,221100,1,2018 +Rhode Island,221200,0,2018 +Rhode Island,221300,0,2018 +South Carolina,221100,0.736942866,2018 +South Carolina,221200,0.055698474,2018 +South Carolina,221300,0.20735866,2018 +South Dakota,221100,0.777047523,2018 +South Dakota,221200,0.103134479,2018 +South Dakota,221300,0.119817998,2018 +Tennessee,221100,0.724128553,2018 +Tennessee,221200,0.085490232,2018 +Tennessee,221300,0.190381216,2018 +Texas,221100,0.54508251,2018 +Texas,221200,0.095136072,2018 +Texas,221300,0.359781418,2018 +Utah,221100,0.459624175,2018 +Utah,221200,0.127137295,2018 +Utah,221300,0.413238531,2018 +Vermont,221100,0.834561286,2018 +Vermont,221200,0,2018 +Vermont,221300,0.165438714,2018 +Virginia,221100,0.465734344,2018 +Virginia,221200,0.09399376,2018 +Virginia,221300,0.440271897,2018 +Washington,221100,0.663883415,2018 +Washington,221200,0.037288663,2018 +Washington,221300,0.298827922,2018 +West Virginia,221100,0.744980296,2018 +West Virginia,221200,0.137736911,2018 +West Virginia,221300,0.117282792,2018 +Wisconsin,221100,0.73359443,2018 +Wisconsin,221200,0.068929504,2018 +Wisconsin,221300,0.197476066,2018 +Wyoming,221100,0.830885272,2018 +Wyoming,221200,0.132989281,2018 +Wyoming,221300,0.036125447,2018 diff --git a/inst/extdata/disaggspecs/Employment_ratios_backup.csv b/inst/extdata/disaggspecs/Employment_ratios_backup.csv new file mode 100644 index 00000000..76e88cd9 --- /dev/null +++ b/inst/extdata/disaggspecs/Employment_ratios_backup.csv @@ -0,0 +1,460 @@ +State,ActivityProducedBy,Share,Year +Alabama,221100,0.695839807,2016 +Alabama,221200,0.099991369,2016 +Alabama,221300,0.204168824,2016 +Alaska,221100,0.714622642,2016 +Alaska,221200,0.137264151,2016 +Alaska,221300,0.148113208,2016 +Arizona,221100,0.992974696,2016 +Arizona,221200,0,2016 +Arizona,221300,0.007025304,2016 +Arkansas,221100,0.532969103,2016 +Arkansas,221200,0.104370761,2016 +Arkansas,221300,0.362660136,2016 +California,221100,0.362389321,2016 +California,221200,0,2016 +California,221300,0.637610679,2016 +Colorado,221100,0.795752427,2016 +Colorado,221200,0.10631068,2016 +Colorado,221300,0.097936893,2016 +Connecticut,221100,0.551421189,2016 +Connecticut,221200,0.109043928,2016 +Connecticut,221300,0.339534884,2016 +Delaware,221100,1,2016 +Delaware,221200,0,2016 +Delaware,221300,0,2016 +District Of Columbia,221100,,2016 +District Of Columbia,221200,,2016 +District Of Columbia,221300,,2016 +Florida,221100,0.770640299,2016 +Florida,221200,0.055144517,2016 +Florida,221300,0.174215185,2016 +Georgia,221100,0.842013456,2016 +Georgia,221200,0.100373785,2016 +Georgia,221300,0.057612759,2016 +Hawaii,221100,1,2016 +Hawaii,221200,0,2016 +Hawaii,221300,0,2016 +Idaho,221100,0.765361121,2016 +Idaho,221200,0,2016 +Idaho,221300,0.234638879,2016 +Illinois,221100,0.669548546,2016 +Illinois,221200,0.160504992,2016 +Illinois,221300,0.169946462,2016 +Indiana,221100,0.711171662,2016 +Indiana,221200,0.113710374,2016 +Indiana,221300,0.175117964,2016 +Iowa,221100,0.784425216,2016 +Iowa,221200,0.070457355,2016 +Iowa,221300,0.145117429,2016 +Kansas,221100,0.615777381,2016 +Kansas,221200,0.222108757,2016 +Kansas,221300,0.162113863,2016 +Kentucky,221100,0.558191371,2016 +Kentucky,221200,0.07283872,2016 +Kentucky,221300,0.368969909,2016 +Louisiana,221100,0.469060691,2016 +Louisiana,221200,0.100237424,2016 +Louisiana,221300,0.430701885,2016 +Maine,221100,0.483214649,2016 +Maine,221200,0.051881994,2016 +Maine,221300,0.464903357,2016 +Maryland,221100,0.892700875,2016 +Maryland,221200,0.056881464,2016 +Maryland,221300,0.050417661,2016 +Massachusetts,221100,0.555312571,2016 +Massachusetts,221200,0.208430737,2016 +Massachusetts,221300,0.236256693,2016 +Michigan,221100,0.8395624,2016 +Michigan,221200,0.113437881,2016 +Michigan,221300,0.046999718,2016 +Minnesota,221100,0.832679272,2016 +Minnesota,221200,0.112022833,2016 +Minnesota,221300,0.055297895,2016 +Mississippi,221100,0.719206569,2016 +Mississippi,221200,0.068145462,2016 +Mississippi,221300,0.212647968,2016 +Missouri,221100,0.512934541,2016 +Missouri,221200,0.144584847,2016 +Missouri,221300,0.342480612,2016 +Montana,221100,0.747123045,2016 +Montana,221200,0.11065211,2016 +Montana,221300,0.142224845,2016 +Nebraska,221100,0.771677783,2016 +Nebraska,221200,0.105823499,2016 +Nebraska,221300,0.122498717,2016 +Nevada,221100,0.674134927,2016 +Nevada,221200,0,2016 +Nevada,221300,0.325865073,2016 +New Hampshire,221100,0.736531987,2016 +New Hampshire,221200,0.103114478,2016 +New Hampshire,221300,0.160353535,2016 +New Jersey,221100,0.539482086,2016 +New Jersey,221200,0.305427457,2016 +New Jersey,221300,0.155090458,2016 +New Mexico,221100,0.526332538,2016 +New Mexico,221200,0.1858393,2016 +New Mexico,221300,0.287828162,2016 +New York,221100,0.755165113,2016 +New York,221200,0.173070839,2016 +New York,221300,0.071764047,2016 +North Carolina,221100,0.724643503,2016 +North Carolina,221200,0.140456584,2016 +North Carolina,221300,0.134899913,2016 +North Dakota,221100,0.933736859,2016 +North Dakota,221200,0,2016 +North Dakota,221300,0.066263141,2016 +Ohio,221100,0.472068008,2016 +Ohio,221200,0.190596808,2016 +Ohio,221300,0.337335184,2016 +Oklahoma,221100,0.439176035,2016 +Oklahoma,221200,0.287571438,2016 +Oklahoma,221300,0.273252528,2016 +Oregon,221100,0.522041475,2016 +Oregon,221200,0.148019372,2016 +Oregon,221300,0.329939153,2016 +Pennsylvania,221100,0.495828051,2016 +Pennsylvania,221200,0.141138662,2016 +Pennsylvania,221300,0.363033287,2016 +Rhode Island,221100,1,2016 +Rhode Island,221200,0,2016 +Rhode Island,221300,0,2016 +South Carolina,221100,0.735953625,2016 +South Carolina,221200,0.059752835,2016 +South Carolina,221300,0.204293541,2016 +South Dakota,221100,0.784051511,2016 +South Dakota,221200,0.098068351,2016 +South Dakota,221300,0.117880139,2016 +Tennessee,221100,0.730508397,2016 +Tennessee,221200,0.081789632,2016 +Tennessee,221300,0.187701971,2016 +Texas,221100,0.555251299,2016 +Texas,221200,0.090057345,2016 +Texas,221300,0.354691357,2016 +Utah,221100,0.459684411,2016 +Utah,221200,0.132131091,2016 +Utah,221300,0.408184498,2016 +Vermont,221100,0.842703727,2016 +Vermont,221200,0,2016 +Vermont,221300,0.157296273,2016 +Virginia,221100,0.481246168,2016 +Virginia,221200,0.087555035,2016 +Virginia,221300,0.431198796,2016 +Washington,221100,0.659468439,2016 +Washington,221200,0.035901833,2016 +Washington,221300,0.304629729,2016 +West Virginia,221100,0.734571484,2016 +West Virginia,221200,0.140839621,2016 +West Virginia,221300,0.124588895,2016 +Wisconsin,221100,0.748179764,2016 +Wisconsin,221200,0.064775295,2016 +Wisconsin,221300,0.187044941,2016 +Wyoming,221100,0.863351605,2016 +Wyoming,221200,0.091620987,2016 +Wyoming,221300,0.045027408,2016 +Alabama,221100,0.685589327,2017 +Alabama,221200,0.101342993,2017 +Alabama,221300,0.21306768,2017 +Alaska,221100,0.717052433,2017 +Alaska,221200,0.135096835,2017 +Alaska,221300,0.147850732,2017 +Arizona,221100,0.992919426,2017 +Arizona,221200,0,2017 +Arizona,221300,0.007080574,2017 +Arkansas,221100,0.536775771,2017 +Arkansas,221200,0.09951091,2017 +Arkansas,221300,0.363713318,2017 +California,221100,0.369990057,2017 +California,221200,0,2017 +California,221300,0.630009943,2017 +Colorado,221100,0.792548583,2017 +Colorado,221200,0.105211041,2017 +Colorado,221300,0.102240376,2017 +Connecticut,221100,0.547513142,2017 +Connecticut,221200,0.105405041,2017 +Connecticut,221300,0.347081817,2017 +Delaware,221100,1,2017 +Delaware,221200,0,2017 +Delaware,221300,0,2017 +District Of Columbia,221100,,2017 +District Of Columbia,221200,,2017 +District Of Columbia,221300,,2017 +Florida,221100,0.7621746,2017 +Florida,221200,0.056082148,2017 +Florida,221300,0.181743252,2017 +Georgia,221100,0.830908255,2017 +Georgia,221200,0.10603972,2017 +Georgia,221300,0.063052024,2017 +Hawaii,221100,1,2017 +Hawaii,221200,0,2017 +Hawaii,221300,0,2017 +Idaho,221100,0.765112891,2017 +Idaho,221200,0,2017 +Idaho,221300,0.234887109,2017 +Illinois,221100,0.65659469,2017 +Illinois,221200,0.167139726,2017 +Illinois,221300,0.176265584,2017 +Indiana,221100,0.711434594,2017 +Indiana,221200,0.11632196,2017 +Indiana,221300,0.172243446,2017 +Iowa,221100,0.784584734,2017 +Iowa,221200,0.070227867,2017 +Iowa,221300,0.145187399,2017 +Kansas,221100,0.611369509,2017 +Kansas,221200,0.220801034,2017 +Kansas,221300,0.167829457,2017 +Kentucky,221100,0.552446447,2017 +Kentucky,221200,0.073907201,2017 +Kentucky,221300,0.373646352,2017 +Louisiana,221100,0.470292268,2017 +Louisiana,221200,0.096559378,2017 +Louisiana,221300,0.433148354,2017 +Maine,221100,0.495286195,2017 +Maine,221200,0.042760943,2017 +Maine,221300,0.461952862,2017 +Maryland,221100,0.890848953,2017 +Maryland,221200,0.058835321,2017 +Maryland,221300,0.050315726,2017 +Massachusetts,221100,0.558402084,2017 +Massachusetts,221200,0.213489651,2017 +Massachusetts,221300,0.228108265,2017 +Michigan,221100,0.807010439,2017 +Michigan,221200,0.109206263,2017 +Michigan,221300,0.083783297,2017 +Minnesota,221100,0.825519331,2017 +Minnesota,221200,0.115406809,2017 +Minnesota,221300,0.05907386,2017 +Mississippi,221100,0.712993161,2017 +Mississippi,221200,0.065965281,2017 +Mississippi,221300,0.221041557,2017 +Missouri,221100,0.510860733,2017 +Missouri,221200,0.149450192,2017 +Missouri,221300,0.339689074,2017 +Montana,221100,0.806397306,2017 +Montana,221200,0.125589226,2017 +Montana,221300,0.068013468,2017 +Nebraska,221100,0.89516129,2017 +Nebraska,221200,0.10483871,2017 +Nebraska,221300,0,2017 +Nevada,221100,0.67238806,2017 +Nevada,221200,0,2017 +Nevada,221300,0.32761194,2017 +New Hampshire,221100,0.731433506,2017 +New Hampshire,221200,0.115716753,2017 +New Hampshire,221300,0.152849741,2017 +New Jersey,221100,0.519991478,2017 +New Jersey,221200,0.325332008,2017 +New Jersey,221300,0.154676514,2017 +New Mexico,221100,0.524895599,2017 +New Mexico,221200,0.186476068,2017 +New Mexico,221300,0.288628333,2017 +New York,221100,0.755705084,2017 +New York,221200,0.170230598,2017 +New York,221300,0.074064318,2017 +North Carolina,221100,0.726704736,2017 +North Carolina,221200,0.139402083,2017 +North Carolina,221300,0.133893181,2017 +North Dakota,221100,0.931213498,2017 +North Dakota,221200,0,2017 +North Dakota,221300,0.068786502,2017 +Ohio,221100,0.467317073,2017 +Ohio,221200,0.193763066,2017 +Ohio,221300,0.338919861,2017 +Oklahoma,221100,0.464630438,2017 +Oklahoma,221200,0.249966944,2017 +Oklahoma,221300,0.285402618,2017 +Oregon,221100,0.693427677,2017 +Oregon,221200,0,2017 +Oregon,221300,0.306572323,2017 +Pennsylvania,221100,0.487891124,2017 +Pennsylvania,221200,0.14459335,2017 +Pennsylvania,221300,0.367515526,2017 +Rhode Island,221100,0.643573382,2017 +Rhode Island,221200,0,2017 +Rhode Island,221300,0.356426618,2017 +South Carolina,221100,0.725662589,2017 +South Carolina,221200,0.059441896,2017 +South Carolina,221300,0.214895515,2017 +South Dakota,221100,0.78123432,2017 +South Dakota,221200,0.098344205,2017 +South Dakota,221300,0.120421475,2017 +Tennessee,221100,0.725737059,2017 +Tennessee,221200,0.085231647,2017 +Tennessee,221300,0.189031294,2017 +Texas,221100,0.55209891,2017 +Texas,221200,0.090496857,2017 +Texas,221300,0.357404233,2017 +Utah,221100,0.456155287,2017 +Utah,221200,0.136386855,2017 +Utah,221300,0.407457858,2017 +Vermont,221100,0.837116155,2017 +Vermont,221200,0,2017 +Vermont,221300,0.162883845,2017 +Virginia,221100,0.474710133,2017 +Virginia,221200,0.090741052,2017 +Virginia,221300,0.434548815,2017 +Washington,221100,0.661472044,2017 +Washington,221200,0.036853743,2017 +Washington,221300,0.301674213,2017 +West Virginia,221100,0.74801812,2017 +West Virginia,221200,0.135522839,2017 +West Virginia,221300,0.116459041,2017 +Wisconsin,221100,0.746179178,2017 +Wisconsin,221200,0.064004053,2017 +Wisconsin,221300,0.189816769,2017 +Wyoming,221100,0.863800723,2017 +Wyoming,221200,0.097227802,2017 +Wyoming,221300,0.038971474,2017 +Alabama,221100,0.684650792,2018 +Alabama,221200,0.100115075,2018 +Alabama,221300,0.215234133,2018 +Alaska,221100,0.722095672,2018 +Alaska,221200,0.133029613,2018 +Alaska,221300,0.144874715,2018 +Arizona,221100,0.992877869,2018 +Arizona,221200,0,2018 +Arizona,221300,0.007122131,2018 +Arkansas,221100,0.539253898,2018 +Arkansas,221200,0.096696362,2018 +Arkansas,221300,0.36404974,2018 +California,221100,0.367978709,2018 +California,221200,0,2018 +California,221300,0.632021291,2018 +Colorado,221100,0.786674969,2018 +Colorado,221200,0.108592777,2018 +Colorado,221300,0.104732254,2018 +Connecticut,221100,0.542258376,2018 +Connecticut,221200,0.10106163,2018 +Connecticut,221300,0.356679994,2018 +Delaware,221100,1,2018 +Delaware,221200,0,2018 +Delaware,221300,0,2018 +District Of Columbia,221100,1,2018 +District Of Columbia,221200,0,2018 +District Of Columbia,221300,0,2018 +Florida,221100,0.754378791,2018 +Florida,221200,0.058542902,2018 +Florida,221300,0.187078307,2018 +Georgia,221100,0.822259484,2018 +Georgia,221200,0.103489834,2018 +Georgia,221300,0.074250681,2018 +Hawaii,221100,1,2018 +Hawaii,221200,0,2018 +Hawaii,221300,0,2018 +Idaho,221100,0.764980266,2018 +Idaho,221200,0,2018 +Idaho,221300,0.235019734,2018 +Illinois,221100,0.655706551,2018 +Illinois,221200,0.165190577,2018 +Illinois,221300,0.179102872,2018 +Indiana,221100,0.713987746,2018 +Indiana,221200,0.117520532,2018 +Indiana,221300,0.168491722,2018 +Iowa,221100,0.784264595,2018 +Iowa,221200,0.071661238,2018 +Iowa,221300,0.144074167,2018 +Kansas,221100,0.597987288,2018 +Kansas,221200,0.227092161,2018 +Kansas,221300,0.174920551,2018 +Kentucky,221100,0.551100939,2018 +Kentucky,221200,0.075842475,2018 +Kentucky,221300,0.373056586,2018 +Louisiana,221100,0.476566499,2018 +Louisiana,221200,0.094172699,2018 +Louisiana,221300,0.429260803,2018 +Maine,221100,0.485470085,2018 +Maine,221200,0.043076923,2018 +Maine,221300,0.471452991,2018 +Maryland,221100,0.882885602,2018 +Maryland,221200,0.061776839,2018 +Maryland,221300,0.055337559,2018 +Massachusetts,221100,0.57645838,2018 +Massachusetts,221200,0.186865318,2018 +Massachusetts,221300,0.236676303,2018 +Michigan,221100,0.805064309,2018 +Michigan,221200,0.110173276,2018 +Michigan,221300,0.084762415,2018 +Minnesota,221100,0.82362765,2018 +Minnesota,221200,0.115814696,2018 +Minnesota,221300,0.060557653,2018 +Mississippi,221100,0.706699434,2018 +Mississippi,221200,0.067314884,2018 +Mississippi,221300,0.225985682,2018 +Missouri,221100,0.63969132,2018 +Missouri,221200,0.016116916,2018 +Missouri,221300,0.344191764,2018 +Montana,221100,0.809181226,2018 +Montana,221200,0.125727989,2018 +Montana,221300,0.065090785,2018 +Nebraska,221100,0.763048559,2018 +Nebraska,221200,0.104388471,2018 +Nebraska,221300,0.132562971,2018 +Nevada,221100,0.710163764,2018 +Nevada,221200,0,2018 +Nevada,221300,0.289836236,2018 +New Hampshire,221100,0.723056537,2018 +New Hampshire,221200,0.11704947,2018 +New Hampshire,221300,0.159893993,2018 +New Jersey,221100,0.493773473,2018 +New Jersey,221200,0.359096001,2018 +New Jersey,221300,0.147130526,2018 +New Mexico,221100,0.51841132,2018 +New Mexico,221200,0.18684676,2018 +New Mexico,221300,0.29474192,2018 +New York,221100,0.806985619,2018 +New York,221200,0.116081583,2018 +New York,221300,0.076932798,2018 +North Carolina,221100,0.736254517,2018 +North Carolina,221200,0.131775942,2018 +North Carolina,221300,0.131969541,2018 +North Dakota,221100,0.706827309,2018 +North Dakota,221200,0.193273092,2018 +North Dakota,221300,0.099899598,2018 +Ohio,221100,0.466490085,2018 +Ohio,221200,0.19367093,2018 +Ohio,221300,0.339838985,2018 +Oklahoma,221100,0.465747979,2018 +Oklahoma,221200,0.248973102,2018 +Oklahoma,221300,0.285278919,2018 +Oregon,221100,0.692224476,2018 +Oregon,221200,0,2018 +Oregon,221300,0.307775524,2018 +Pennsylvania,221100,0.481121995,2018 +Pennsylvania,221200,0.146631048,2018 +Pennsylvania,221300,0.372246958,2018 +Rhode Island,221100,1,2018 +Rhode Island,221200,0,2018 +Rhode Island,221300,0,2018 +South Carolina,221100,0.736942866,2018 +South Carolina,221200,0.055698474,2018 +South Carolina,221300,0.20735866,2018 +South Dakota,221100,0.777047523,2018 +South Dakota,221200,0.103134479,2018 +South Dakota,221300,0.119817998,2018 +Tennessee,221100,0.724128553,2018 +Tennessee,221200,0.085490232,2018 +Tennessee,221300,0.190381216,2018 +Texas,221100,0.54508251,2018 +Texas,221200,0.095136072,2018 +Texas,221300,0.359781418,2018 +Utah,221100,0.459624175,2018 +Utah,221200,0.127137295,2018 +Utah,221300,0.413238531,2018 +Vermont,221100,0.834561286,2018 +Vermont,221200,0,2018 +Vermont,221300,0.165438714,2018 +Virginia,221100,0.465734344,2018 +Virginia,221200,0.09399376,2018 +Virginia,221300,0.440271897,2018 +Washington,221100,0.663883415,2018 +Washington,221200,0.037288663,2018 +Washington,221300,0.298827922,2018 +West Virginia,221100,0.744980296,2018 +West Virginia,221200,0.137736911,2018 +West Virginia,221300,0.117282792,2018 +Wisconsin,221100,0.73359443,2018 +Wisconsin,221200,0.068929504,2018 +Wisconsin,221300,0.197476066,2018 +Wyoming,221100,0.830885272,2018 +Wyoming,221200,0.132989281,2018 +Wyoming,221300,0.036125447,2018 From d49adae5d2bea7241fba729af9dee3941f37245e Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 3 Apr 2023 21:53:20 -0400 Subject: [PATCH 081/121] deleted deprecated commented lines --- R/BuildModel.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index babd4ff0..c79fb216 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -631,8 +631,7 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { # Initialize model model <- getStateModelDisaggSpecs(disagg_specs) - #stateDisaggFile <- "Employment_ratios.csv" - #model <- getStateModelDisaggSpecs(disagg_specs, stateDisaggFile) + if(length(model$DisaggregationSpecs)!=0){ disagg <- model$DisaggregationSpecs[[1]] From 29a16f1b10da9eabfce6fd536f21162d414a3892 Mon Sep 17 00:00:00 2001 From: jvendries Date: Tue, 4 Apr 2023 16:06:22 -0400 Subject: [PATCH 082/121] Updated ratios file to include national ratios for the three detail level sectors. See the following commit: https://github.com/USEPA/USEEIOStateMethod/commit/26fffbc95be5edec6be1c207ffdd582b461e166a --- .../extdata/disaggspecs/Employment_ratios.csv | 924 +++++++++--------- 1 file changed, 462 insertions(+), 462 deletions(-) diff --git a/inst/extdata/disaggspecs/Employment_ratios.csv b/inst/extdata/disaggspecs/Employment_ratios.csv index 02efd485..e022e875 100644 --- a/inst/extdata/disaggspecs/Employment_ratios.csv +++ b/inst/extdata/disaggspecs/Employment_ratios.csv @@ -1,469 +1,469 @@ State,ActivityProducedBy,Share,Year -US,221100,0.34,2016 -US,221200,0.33,2016 -US,221300,0.33,2016 -Alabama,221100,0.695839807,2016 -Alabama,221200,0.099991369,2016 -Alabama,221300,0.204168824,2016 -Alaska,221100,0.714622642,2016 -Alaska,221200,0.137264151,2016 -Alaska,221300,0.148113208,2016 -Arizona,221100,0.992974696,2016 -Arizona,221200,0,2016 -Arizona,221300,0.007025304,2016 -Arkansas,221100,0.532969103,2016 -Arkansas,221200,0.104370761,2016 -Arkansas,221300,0.362660136,2016 -California,221100,0.362389321,2016 -California,221200,0,2016 -California,221300,0.637610679,2016 -Colorado,221100,0.795752427,2016 -Colorado,221200,0.10631068,2016 -Colorado,221300,0.097936893,2016 -Connecticut,221100,0.551421189,2016 -Connecticut,221200,0.109043928,2016 -Connecticut,221300,0.339534884,2016 -Delaware,221100,1,2016 -Delaware,221200,0,2016 -Delaware,221300,0,2016 +US,221100,0.6354175796809285,2016 +US,221200,0.10814819143178722,2016 +US,221300,0.2564342288872843,2016 +US,221100,0.6343800234578942,2017 +US,221200,0.10686993127004159,2017 +US,221300,0.2587500452720642,2017 +US,221100,0.6370838539604272,2018 +US,221200,0.1030946587508028,2018 +US,221300,0.25982148728876997,2018 +Alabama,221100,0.6958398066632142,2016 +Alabama,221200,0.09999136889349215,2016 +Alabama,221300,0.20416882444329362,2016 +Alaska,221100,0.714622641509434,2016 +Alaska,221200,0.13726415094339622,2016 +Alaska,221300,0.1481132075471698,2016 +Arizona,221100,0.992974695895401,2016 +Arizona,221200,0.0,2016 +Arizona,221300,0.007025304104598972,2016 +Arkansas,221100,0.5329691032403918,2016 +Arkansas,221200,0.10437076111529767,2016 +Arkansas,221300,0.3626601356443105,2016 +California,221100,0.36238932052002404,2016 +California,221200,0.0,2016 +California,221300,0.637610679479976,2016 +Colorado,221100,0.795752427184466,2016 +Colorado,221200,0.10631067961165049,2016 +Colorado,221300,0.09793689320388349,2016 +Connecticut,221100,0.5514211886304909,2016 +Connecticut,221200,0.10904392764857881,2016 +Connecticut,221300,0.3395348837209302,2016 +Delaware,221100,1.0,2016 +Delaware,221200,0.0,2016 +Delaware,221300,0.0,2016 District Of Columbia,221100,,2016 District Of Columbia,221200,,2016 District Of Columbia,221300,,2016 -Florida,221100,0.770640299,2016 -Florida,221200,0.055144517,2016 -Florida,221300,0.174215185,2016 -Georgia,221100,0.842013456,2016 -Georgia,221200,0.100373785,2016 -Georgia,221300,0.057612759,2016 -Hawaii,221100,1,2016 -Hawaii,221200,0,2016 -Hawaii,221300,0,2016 -Idaho,221100,0.765361121,2016 -Idaho,221200,0,2016 -Idaho,221300,0.234638879,2016 -Illinois,221100,0.669548546,2016 -Illinois,221200,0.160504992,2016 -Illinois,221300,0.169946462,2016 -Indiana,221100,0.711171662,2016 -Indiana,221200,0.113710374,2016 -Indiana,221300,0.175117964,2016 -Iowa,221100,0.784425216,2016 -Iowa,221200,0.070457355,2016 -Iowa,221300,0.145117429,2016 -Kansas,221100,0.615777381,2016 -Kansas,221200,0.222108757,2016 -Kansas,221300,0.162113863,2016 -Kentucky,221100,0.558191371,2016 -Kentucky,221200,0.07283872,2016 -Kentucky,221300,0.368969909,2016 -Louisiana,221100,0.469060691,2016 -Louisiana,221200,0.100237424,2016 -Louisiana,221300,0.430701885,2016 -Maine,221100,0.483214649,2016 -Maine,221200,0.051881994,2016 -Maine,221300,0.464903357,2016 -Maryland,221100,0.892700875,2016 -Maryland,221200,0.056881464,2016 -Maryland,221300,0.050417661,2016 -Massachusetts,221100,0.555312571,2016 -Massachusetts,221200,0.208430737,2016 -Massachusetts,221300,0.236256693,2016 -Michigan,221100,0.8395624,2016 -Michigan,221200,0.113437881,2016 -Michigan,221300,0.046999718,2016 -Minnesota,221100,0.832679272,2016 -Minnesota,221200,0.112022833,2016 -Minnesota,221300,0.055297895,2016 -Mississippi,221100,0.719206569,2016 -Mississippi,221200,0.068145462,2016 -Mississippi,221300,0.212647968,2016 -Missouri,221100,0.512934541,2016 -Missouri,221200,0.144584847,2016 -Missouri,221300,0.342480612,2016 -Montana,221100,0.747123045,2016 -Montana,221200,0.11065211,2016 -Montana,221300,0.142224845,2016 -Nebraska,221100,0.771677783,2016 -Nebraska,221200,0.105823499,2016 -Nebraska,221300,0.122498717,2016 -Nevada,221100,0.674134927,2016 -Nevada,221200,0,2016 -Nevada,221300,0.325865073,2016 -New Hampshire,221100,0.736531987,2016 -New Hampshire,221200,0.103114478,2016 -New Hampshire,221300,0.160353535,2016 -New Jersey,221100,0.539482086,2016 -New Jersey,221200,0.305427457,2016 -New Jersey,221300,0.155090458,2016 -New Mexico,221100,0.526332538,2016 -New Mexico,221200,0.1858393,2016 -New Mexico,221300,0.287828162,2016 -New York,221100,0.755165113,2016 -New York,221200,0.173070839,2016 -New York,221300,0.071764047,2016 -North Carolina,221100,0.724643503,2016 -North Carolina,221200,0.140456584,2016 -North Carolina,221300,0.134899913,2016 -North Dakota,221100,0.933736859,2016 -North Dakota,221200,0,2016 -North Dakota,221300,0.066263141,2016 -Ohio,221100,0.472068008,2016 -Ohio,221200,0.190596808,2016 -Ohio,221300,0.337335184,2016 -Oklahoma,221100,0.439176035,2016 -Oklahoma,221200,0.287571438,2016 -Oklahoma,221300,0.273252528,2016 -Oregon,221100,0.522041475,2016 -Oregon,221200,0.148019372,2016 -Oregon,221300,0.329939153,2016 -Pennsylvania,221100,0.495828051,2016 -Pennsylvania,221200,0.141138662,2016 -Pennsylvania,221300,0.363033287,2016 -Rhode Island,221100,1,2016 -Rhode Island,221200,0,2016 -Rhode Island,221300,0,2016 -South Carolina,221100,0.735953625,2016 -South Carolina,221200,0.059752835,2016 -South Carolina,221300,0.204293541,2016 -South Dakota,221100,0.784051511,2016 -South Dakota,221200,0.098068351,2016 -South Dakota,221300,0.117880139,2016 -Tennessee,221100,0.730508397,2016 -Tennessee,221200,0.081789632,2016 -Tennessee,221300,0.187701971,2016 -Texas,221100,0.555251299,2016 -Texas,221200,0.090057345,2016 -Texas,221300,0.354691357,2016 -Utah,221100,0.459684411,2016 -Utah,221200,0.132131091,2016 -Utah,221300,0.408184498,2016 -Vermont,221100,0.842703727,2016 -Vermont,221200,0,2016 -Vermont,221300,0.157296273,2016 -Virginia,221100,0.481246168,2016 -Virginia,221200,0.087555035,2016 -Virginia,221300,0.431198796,2016 -Washington,221100,0.659468439,2016 -Washington,221200,0.035901833,2016 -Washington,221300,0.304629729,2016 -West Virginia,221100,0.734571484,2016 -West Virginia,221200,0.140839621,2016 -West Virginia,221300,0.124588895,2016 -Wisconsin,221100,0.748179764,2016 -Wisconsin,221200,0.064775295,2016 -Wisconsin,221300,0.187044941,2016 -Wyoming,221100,0.863351605,2016 -Wyoming,221200,0.091620987,2016 -Wyoming,221300,0.045027408,2016 -US,221100,0.34,2017 -US,221200,0.33,2017 -US,221300,0.33,2017 -Alabama,221100,0.685589327,2017 -Alabama,221200,0.101342993,2017 -Alabama,221300,0.21306768,2017 -Alaska,221100,0.717052433,2017 -Alaska,221200,0.135096835,2017 -Alaska,221300,0.147850732,2017 -Arizona,221100,0.992919426,2017 -Arizona,221200,0,2017 -Arizona,221300,0.007080574,2017 -Arkansas,221100,0.536775771,2017 -Arkansas,221200,0.09951091,2017 -Arkansas,221300,0.363713318,2017 -California,221100,0.369990057,2017 -California,221200,0,2017 -California,221300,0.630009943,2017 -Colorado,221100,0.792548583,2017 -Colorado,221200,0.105211041,2017 -Colorado,221300,0.102240376,2017 -Connecticut,221100,0.547513142,2017 -Connecticut,221200,0.105405041,2017 -Connecticut,221300,0.347081817,2017 -Delaware,221100,1,2017 -Delaware,221200,0,2017 -Delaware,221300,0,2017 +Florida,221100,0.7706402987138709,2016 +Florida,221200,0.05514451666436178,2016 +Florida,221300,0.17421518462176738,2016 +Georgia,221100,0.8420134562671319,2016 +Georgia,221200,0.10037378519810615,2016 +Georgia,221300,0.057612758534762026,2016 +Hawaii,221100,1.0,2016 +Hawaii,221200,0.0,2016 +Hawaii,221300,0.0,2016 +Idaho,221100,0.7653611210923464,2016 +Idaho,221200,0.0,2016 +Idaho,221300,0.23463887890765361,2016 +Illinois,221100,0.6695485457965562,2016 +Illinois,221200,0.1605049920416727,2016 +Illinois,221300,0.1699464621617711,2016 +Indiana,221100,0.7111716621253406,2016 +Indiana,221200,0.11371037416096232,2016 +Indiana,221300,0.1751179637136971,2016 +Iowa,221100,0.78442521631644,2016 +Iowa,221200,0.07045735475896168,2016 +Iowa,221300,0.14511742892459828,2016 +Kansas,221100,0.6157773806484554,2016 +Kansas,221200,0.2221087567015573,2016 +Kansas,221300,0.16211386264998723,2016 +Kentucky,221100,0.5581913708008279,2016 +Kentucky,221200,0.0728387199490527,2016 +Kentucky,221300,0.3689699092501194,2016 +Louisiana,221100,0.46906069149725477,2016 +Louisiana,221200,0.10023742395014097,2016 +Louisiana,221300,0.4307018845526042,2016 +Maine,221100,0.4832146490335707,2016 +Maine,221200,0.05188199389623601,2016 +Maine,221300,0.4649033570701933,2016 +Maryland,221100,0.8927008750994431,2016 +Maryland,221200,0.056881463802704854,2016 +Maryland,221300,0.05041766109785203,2016 +Massachusetts,221100,0.5553125706960259,2016 +Massachusetts,221200,0.20843073674685167,2016 +Massachusetts,221300,0.2362566925571224,2016 +Michigan,221100,0.8395624002253733,2016 +Michigan,221200,0.11343788149121983,2016 +Michigan,221300,0.04699971828340689,2016 +Minnesota,221100,0.8326792722083483,2016 +Minnesota,221200,0.11202283267927221,2016 +Minnesota,221300,0.05529789511237959,2016 +Mississippi,221100,0.7192065692652234,2016 +Mississippi,221200,0.0681454623013757,2016 +Mississippi,221300,0.21264796843340086,2016 +Missouri,221100,0.5129345409187049,2016 +Missouri,221200,0.14458484733445415,2016 +Missouri,221300,0.3424806117468409,2016 +Montana,221100,0.7471230451460608,2016 +Montana,221200,0.1106521097668929,2016 +Montana,221300,0.14222484508704633,2016 +Nebraska,221100,0.7716777834787071,2016 +Nebraska,221200,0.10582349923037455,2016 +Nebraska,221300,0.12249871729091842,2016 +Nevada,221100,0.674134926562111,2016 +Nevada,221200,0.0,2016 +Nevada,221300,0.32586507343788895,2016 +New Hampshire,221100,0.7365319865319865,2016 +New Hampshire,221200,0.10311447811447812,2016 +New Hampshire,221300,0.16035353535353536,2016 +New Jersey,221100,0.5394820858460447,2016 +New Jersey,221200,0.3054274565448741,2016 +New Jersey,221300,0.15509045760908124,2016 +New Mexico,221100,0.5263325377883851,2016 +New Mexico,221200,0.1858392999204455,2016 +New Mexico,221300,0.2878281622911695,2016 +New York,221100,0.755165113279634,2016 +New York,221200,0.17307083931569853,2016 +New York,221300,0.07176404740466746,2016 +North Carolina,221100,0.7246435027113878,2016 +North Carolina,221200,0.1404565843208141,2016 +North Carolina,221300,0.13489991296779807,2016 +North Dakota,221100,0.9337368588722523,2016 +North Dakota,221200,0.0,2016 +North Dakota,221300,0.06626314112774769,2016 +Ohio,221100,0.4720680083275503,2016 +Ohio,221200,0.19059680777238028,2016 +Ohio,221300,0.3373351839000694,2016 +Oklahoma,221100,0.43917603466683414,2016 +Oklahoma,221200,0.28757143754317654,2016 +Oklahoma,221300,0.2732525277899893,2016 +Oregon,221100,0.5220414752266236,2016 +Oregon,221200,0.14801937166273438,2016 +Oregon,221300,0.329939153110642,2016 +Pennsylvania,221100,0.4958280508299673,2016 +Pennsylvania,221200,0.14113866202789163,2016 +Pennsylvania,221300,0.3630332871421411,2016 +Rhode Island,221100,1.0,2016 +Rhode Island,221200,0.0,2016 +Rhode Island,221300,0.0,2016 +South Carolina,221100,0.7359536246655625,2016 +South Carolina,221200,0.059752834756019876,2016 +South Carolina,221300,0.20429354057841764,2016 +South Dakota,221100,0.784051510648836,2016 +South Dakota,221200,0.09806835066864784,2016 +South Dakota,221300,0.1178801386825161,2016 +Tennessee,221100,0.7305083974329798,2016 +Tennessee,221200,0.08178963178735606,2016 +Tennessee,221300,0.1877019707796641,2016 +Texas,221100,0.5552512985497993,2016 +Texas,221200,0.09005734494148851,2016 +Texas,221300,0.35469135650871225,2016 +Utah,221100,0.45968441130570487,2016 +Utah,221200,0.1321310906883995,2016 +Utah,221300,0.4081844980058956,2016 +Vermont,221100,0.8427037271004422,2016 +Vermont,221200,0.0,2016 +Vermont,221300,0.1572962728995578,2016 +Virginia,221100,0.48124616842222595,2016 +Virginia,221200,0.08755503538984562,2016 +Virginia,221300,0.43119879618792845,2016 +Washington,221100,0.659468438538206,2016 +Washington,221200,0.03590183260100739,2016 +Washington,221300,0.30462972886078665,2016 +West Virginia,221100,0.734571483846005,2016 +West Virginia,221200,0.1408396208164055,2016 +West Virginia,221300,0.12458889533758948,2016 +Wisconsin,221100,0.7481797639969872,2016 +Wisconsin,221200,0.06477529500376601,2016 +Wisconsin,221300,0.1870449409992468,2016 +Wyoming,221100,0.8633516053249805,2016 +Wyoming,221200,0.09162098668754894,2016 +Wyoming,221300,0.04502740798747063,2016 +Alabama,221100,0.6855893267361725,2017 +Alabama,221200,0.10134299346174236,2017 +Alabama,221300,0.21306767980208519,2017 +Alaska,221100,0.7170524326877658,2017 +Alaska,221200,0.1350968351440718,2017 +Alaska,221300,0.1478507321681625,2017 +Arizona,221100,0.9929194256867502,2017 +Arizona,221200,0.0,2017 +Arizona,221300,0.007080574313249852,2017 +Arkansas,221100,0.5367757712565839,2017 +Arkansas,221200,0.09951091045899173,2017 +Arkansas,221300,0.3637133182844244,2017 +California,221100,0.36999005660088724,2017 +California,221200,0.0,2017 +California,221300,0.6300099433991128,2017 +Colorado,221100,0.7925485827453893,2017 +Colorado,221200,0.10521104097041713,2017 +Colorado,221300,0.1022403762841936,2017 +Connecticut,221100,0.547513141932875,2017 +Connecticut,221200,0.10540504111066182,2017 +Connecticut,221300,0.3470818169564631,2017 +Delaware,221100,1.0,2017 +Delaware,221200,0.0,2017 +Delaware,221300,0.0,2017 District Of Columbia,221100,,2017 District Of Columbia,221200,,2017 District Of Columbia,221300,,2017 -Florida,221100,0.7621746,2017 -Florida,221200,0.056082148,2017 -Florida,221300,0.181743252,2017 -Georgia,221100,0.830908255,2017 -Georgia,221200,0.10603972,2017 -Georgia,221300,0.063052024,2017 -Hawaii,221100,1,2017 -Hawaii,221200,0,2017 -Hawaii,221300,0,2017 -Idaho,221100,0.765112891,2017 -Idaho,221200,0,2017 -Idaho,221300,0.234887109,2017 -Illinois,221100,0.65659469,2017 -Illinois,221200,0.167139726,2017 -Illinois,221300,0.176265584,2017 -Indiana,221100,0.711434594,2017 -Indiana,221200,0.11632196,2017 -Indiana,221300,0.172243446,2017 -Iowa,221100,0.784584734,2017 -Iowa,221200,0.070227867,2017 -Iowa,221300,0.145187399,2017 -Kansas,221100,0.611369509,2017 -Kansas,221200,0.220801034,2017 -Kansas,221300,0.167829457,2017 -Kentucky,221100,0.552446447,2017 -Kentucky,221200,0.073907201,2017 -Kentucky,221300,0.373646352,2017 -Louisiana,221100,0.470292268,2017 -Louisiana,221200,0.096559378,2017 -Louisiana,221300,0.433148354,2017 -Maine,221100,0.495286195,2017 -Maine,221200,0.042760943,2017 -Maine,221300,0.461952862,2017 -Maryland,221100,0.890848953,2017 -Maryland,221200,0.058835321,2017 -Maryland,221300,0.050315726,2017 -Massachusetts,221100,0.558402084,2017 -Massachusetts,221200,0.213489651,2017 -Massachusetts,221300,0.228108265,2017 -Michigan,221100,0.807010439,2017 -Michigan,221200,0.109206263,2017 -Michigan,221300,0.083783297,2017 -Minnesota,221100,0.825519331,2017 -Minnesota,221200,0.115406809,2017 -Minnesota,221300,0.05907386,2017 -Mississippi,221100,0.712993161,2017 -Mississippi,221200,0.065965281,2017 -Mississippi,221300,0.221041557,2017 -Missouri,221100,0.510860733,2017 -Missouri,221200,0.149450192,2017 -Missouri,221300,0.339689074,2017 -Montana,221100,0.806397306,2017 -Montana,221200,0.125589226,2017 -Montana,221300,0.068013468,2017 -Nebraska,221100,0.89516129,2017 -Nebraska,221200,0.10483871,2017 -Nebraska,221300,0,2017 -Nevada,221100,0.67238806,2017 -Nevada,221200,0,2017 -Nevada,221300,0.32761194,2017 -New Hampshire,221100,0.731433506,2017 -New Hampshire,221200,0.115716753,2017 -New Hampshire,221300,0.152849741,2017 -New Jersey,221100,0.519991478,2017 -New Jersey,221200,0.325332008,2017 -New Jersey,221300,0.154676514,2017 -New Mexico,221100,0.524895599,2017 -New Mexico,221200,0.186476068,2017 -New Mexico,221300,0.288628333,2017 -New York,221100,0.755705084,2017 -New York,221200,0.170230598,2017 -New York,221300,0.074064318,2017 -North Carolina,221100,0.726704736,2017 -North Carolina,221200,0.139402083,2017 -North Carolina,221300,0.133893181,2017 -North Dakota,221100,0.931213498,2017 -North Dakota,221200,0,2017 -North Dakota,221300,0.068786502,2017 -Ohio,221100,0.467317073,2017 -Ohio,221200,0.193763066,2017 -Ohio,221300,0.338919861,2017 -Oklahoma,221100,0.464630438,2017 -Oklahoma,221200,0.249966944,2017 -Oklahoma,221300,0.285402618,2017 -Oregon,221100,0.693427677,2017 -Oregon,221200,0,2017 -Oregon,221300,0.306572323,2017 -Pennsylvania,221100,0.487891124,2017 -Pennsylvania,221200,0.14459335,2017 -Pennsylvania,221300,0.367515526,2017 -Rhode Island,221100,0.643573382,2017 -Rhode Island,221200,0,2017 -Rhode Island,221300,0.356426618,2017 -South Carolina,221100,0.725662589,2017 -South Carolina,221200,0.059441896,2017 -South Carolina,221300,0.214895515,2017 -South Dakota,221100,0.78123432,2017 -South Dakota,221200,0.098344205,2017 -South Dakota,221300,0.120421475,2017 -Tennessee,221100,0.725737059,2017 -Tennessee,221200,0.085231647,2017 -Tennessee,221300,0.189031294,2017 -Texas,221100,0.55209891,2017 -Texas,221200,0.090496857,2017 -Texas,221300,0.357404233,2017 -Utah,221100,0.456155287,2017 -Utah,221200,0.136386855,2017 -Utah,221300,0.407457858,2017 -Vermont,221100,0.837116155,2017 -Vermont,221200,0,2017 -Vermont,221300,0.162883845,2017 -Virginia,221100,0.474710133,2017 -Virginia,221200,0.090741052,2017 -Virginia,221300,0.434548815,2017 -Washington,221100,0.661472044,2017 -Washington,221200,0.036853743,2017 -Washington,221300,0.301674213,2017 -West Virginia,221100,0.74801812,2017 -West Virginia,221200,0.135522839,2017 -West Virginia,221300,0.116459041,2017 -Wisconsin,221100,0.746179178,2017 -Wisconsin,221200,0.064004053,2017 -Wisconsin,221300,0.189816769,2017 -Wyoming,221100,0.863800723,2017 -Wyoming,221200,0.097227802,2017 -Wyoming,221300,0.038971474,2017 -US,221100,0.34,2018 -US,221200,0.33,2018 -US,221300,0.33,2018 -Alabama,221100,0.684650792,2018 -Alabama,221200,0.100115075,2018 -Alabama,221300,0.215234133,2018 -Alaska,221100,0.722095672,2018 -Alaska,221200,0.133029613,2018 -Alaska,221300,0.144874715,2018 -Arizona,221100,0.992877869,2018 -Arizona,221200,0,2018 -Arizona,221300,0.007122131,2018 -Arkansas,221100,0.539253898,2018 -Arkansas,221200,0.096696362,2018 -Arkansas,221300,0.36404974,2018 -California,221100,0.367978709,2018 -California,221200,0,2018 -California,221300,0.632021291,2018 -Colorado,221100,0.786674969,2018 -Colorado,221200,0.108592777,2018 -Colorado,221300,0.104732254,2018 -Connecticut,221100,0.542258376,2018 -Connecticut,221200,0.10106163,2018 -Connecticut,221300,0.356679994,2018 -Delaware,221100,1,2018 -Delaware,221200,0,2018 -Delaware,221300,0,2018 -District Of Columbia,221100,1,2018 -District Of Columbia,221200,0,2018 -District Of Columbia,221300,0,2018 -Florida,221100,0.754378791,2018 -Florida,221200,0.058542902,2018 -Florida,221300,0.187078307,2018 -Georgia,221100,0.822259484,2018 -Georgia,221200,0.103489834,2018 -Georgia,221300,0.074250681,2018 -Hawaii,221100,1,2018 -Hawaii,221200,0,2018 -Hawaii,221300,0,2018 -Idaho,221100,0.764980266,2018 -Idaho,221200,0,2018 -Idaho,221300,0.235019734,2018 -Illinois,221100,0.655706551,2018 -Illinois,221200,0.165190577,2018 -Illinois,221300,0.179102872,2018 -Indiana,221100,0.713987746,2018 -Indiana,221200,0.117520532,2018 -Indiana,221300,0.168491722,2018 -Iowa,221100,0.784264595,2018 -Iowa,221200,0.071661238,2018 -Iowa,221300,0.144074167,2018 -Kansas,221100,0.597987288,2018 -Kansas,221200,0.227092161,2018 -Kansas,221300,0.174920551,2018 -Kentucky,221100,0.551100939,2018 -Kentucky,221200,0.075842475,2018 -Kentucky,221300,0.373056586,2018 -Louisiana,221100,0.476566499,2018 -Louisiana,221200,0.094172699,2018 -Louisiana,221300,0.429260803,2018 -Maine,221100,0.485470085,2018 -Maine,221200,0.043076923,2018 -Maine,221300,0.471452991,2018 -Maryland,221100,0.882885602,2018 -Maryland,221200,0.061776839,2018 -Maryland,221300,0.055337559,2018 -Massachusetts,221100,0.57645838,2018 -Massachusetts,221200,0.186865318,2018 -Massachusetts,221300,0.236676303,2018 -Michigan,221100,0.805064309,2018 -Michigan,221200,0.110173276,2018 -Michigan,221300,0.084762415,2018 -Minnesota,221100,0.82362765,2018 -Minnesota,221200,0.115814696,2018 -Minnesota,221300,0.060557653,2018 -Mississippi,221100,0.706699434,2018 -Mississippi,221200,0.067314884,2018 -Mississippi,221300,0.225985682,2018 -Missouri,221100,0.63969132,2018 -Missouri,221200,0.016116916,2018 -Missouri,221300,0.344191764,2018 -Montana,221100,0.809181226,2018 -Montana,221200,0.125727989,2018 -Montana,221300,0.065090785,2018 -Nebraska,221100,0.763048559,2018 -Nebraska,221200,0.104388471,2018 -Nebraska,221300,0.132562971,2018 -Nevada,221100,0.710163764,2018 -Nevada,221200,0,2018 -Nevada,221300,0.289836236,2018 -New Hampshire,221100,0.723056537,2018 -New Hampshire,221200,0.11704947,2018 -New Hampshire,221300,0.159893993,2018 -New Jersey,221100,0.493773473,2018 -New Jersey,221200,0.359096001,2018 -New Jersey,221300,0.147130526,2018 -New Mexico,221100,0.51841132,2018 -New Mexico,221200,0.18684676,2018 -New Mexico,221300,0.29474192,2018 -New York,221100,0.806985619,2018 -New York,221200,0.116081583,2018 -New York,221300,0.076932798,2018 -North Carolina,221100,0.736254517,2018 -North Carolina,221200,0.131775942,2018 -North Carolina,221300,0.131969541,2018 -North Dakota,221100,0.706827309,2018 -North Dakota,221200,0.193273092,2018 -North Dakota,221300,0.099899598,2018 -Ohio,221100,0.466490085,2018 -Ohio,221200,0.19367093,2018 -Ohio,221300,0.339838985,2018 -Oklahoma,221100,0.465747979,2018 -Oklahoma,221200,0.248973102,2018 -Oklahoma,221300,0.285278919,2018 -Oregon,221100,0.692224476,2018 -Oregon,221200,0,2018 -Oregon,221300,0.307775524,2018 -Pennsylvania,221100,0.481121995,2018 -Pennsylvania,221200,0.146631048,2018 -Pennsylvania,221300,0.372246958,2018 -Rhode Island,221100,1,2018 -Rhode Island,221200,0,2018 -Rhode Island,221300,0,2018 -South Carolina,221100,0.736942866,2018 -South Carolina,221200,0.055698474,2018 -South Carolina,221300,0.20735866,2018 -South Dakota,221100,0.777047523,2018 -South Dakota,221200,0.103134479,2018 -South Dakota,221300,0.119817998,2018 -Tennessee,221100,0.724128553,2018 -Tennessee,221200,0.085490232,2018 -Tennessee,221300,0.190381216,2018 -Texas,221100,0.54508251,2018 -Texas,221200,0.095136072,2018 -Texas,221300,0.359781418,2018 -Utah,221100,0.459624175,2018 -Utah,221200,0.127137295,2018 -Utah,221300,0.413238531,2018 -Vermont,221100,0.834561286,2018 -Vermont,221200,0,2018 -Vermont,221300,0.165438714,2018 -Virginia,221100,0.465734344,2018 -Virginia,221200,0.09399376,2018 -Virginia,221300,0.440271897,2018 -Washington,221100,0.663883415,2018 -Washington,221200,0.037288663,2018 -Washington,221300,0.298827922,2018 -West Virginia,221100,0.744980296,2018 -West Virginia,221200,0.137736911,2018 -West Virginia,221300,0.117282792,2018 -Wisconsin,221100,0.73359443,2018 -Wisconsin,221200,0.068929504,2018 -Wisconsin,221300,0.197476066,2018 -Wyoming,221100,0.830885272,2018 -Wyoming,221200,0.132989281,2018 -Wyoming,221300,0.036125447,2018 +Florida,221100,0.7621745999038395,2017 +Florida,221200,0.05608214849921011,2017 +Florida,221300,0.18174325159695034,2017 +Georgia,221100,0.8309082554755706,2017 +Georgia,221200,0.10603972022259663,2017 +Georgia,221300,0.06305202430183285,2017 +Hawaii,221100,1.0,2017 +Hawaii,221200,0.0,2017 +Hawaii,221300,0.0,2017 +Idaho,221100,0.7651128914785142,2017 +Idaho,221200,0.0,2017 +Idaho,221300,0.2348871085214858,2017 +Illinois,221100,0.6565946897567636,2017 +Illinois,221200,0.16713972622426615,2017 +Illinois,221300,0.1762655840189703,2017 +Indiana,221100,0.7114345935976815,2017 +Indiana,221200,0.11632196021604532,2017 +Indiana,221300,0.1722434461862732,2017 +Iowa,221100,0.7845847341551488,2017 +Iowa,221200,0.07022786701531565,2017 +Iowa,221300,0.14518739882953555,2017 +Kansas,221100,0.6113695090439276,2017 +Kansas,221200,0.22080103359173125,2017 +Kansas,221300,0.16782945736434107,2017 +Kentucky,221100,0.552446446921192,2017 +Kentucky,221200,0.07390720101177772,2017 +Kentucky,221300,0.3736463520670303,2017 +Louisiana,221100,0.47029226785053646,2017 +Louisiana,221200,0.09655937846836848,2017 +Louisiana,221300,0.43314835368109506,2017 +Maine,221100,0.4952861952861953,2017 +Maine,221200,0.04276094276094276,2017 +Maine,221300,0.46195286195286195,2017 +Maryland,221100,0.8908489525909592,2017 +Maryland,221200,0.05883532123884935,2017 +Maryland,221300,0.05031572617019144,2017 +Massachusetts,221100,0.5584020842379505,2017 +Massachusetts,221200,0.2134896511796208,2017 +Massachusetts,221300,0.22810826458242872,2017 +Michigan,221100,0.8070104391648668,2017 +Michigan,221200,0.10920626349892008,2017 +Michigan,221300,0.0837832973362131,2017 +Minnesota,221100,0.8255193306405078,2017 +Minnesota,221200,0.1154068090017311,2017 +Minnesota,221300,0.05907386035776111,2017 +Mississippi,221100,0.7129931614939505,2017 +Mississippi,221200,0.06596528143082588,2017 +Mississippi,221300,0.22104155707522358,2017 +Missouri,221100,0.5108607334380586,2017 +Missouri,221200,0.14945019229727532,2017 +Missouri,221300,0.33968907426466605,2017 +Montana,221100,0.8063973063973064,2017 +Montana,221200,0.12558922558922558,2017 +Montana,221300,0.06801346801346801,2017 +Nebraska,221100,0.8951612903225806,2017 +Nebraska,221200,0.10483870967741936,2017 +Nebraska,221300,0.0,2017 +Nevada,221100,0.6723880597014925,2017 +Nevada,221200,0.0,2017 +Nevada,221300,0.3276119402985075,2017 +New Hampshire,221100,0.731433506044905,2017 +New Hampshire,221200,0.1157167530224525,2017 +New Hampshire,221300,0.15284974093264247,2017 +New Jersey,221100,0.5199914778779916,2017 +New Jersey,221200,0.32533200766990983,2017 +New Jersey,221300,0.15467651445209857,2017 +New Mexico,221100,0.5248955991005461,2017 +New Mexico,221200,0.1864760681015098,2017 +New Mexico,221300,0.2886283327979441,2017 +New York,221100,0.7557050836905247,2017 +New York,221200,0.17023059792629486,2017 +New York,221300,0.07406431838318048,2017 +North Carolina,221100,0.7267047363117232,2017 +North Carolina,221200,0.1394020826335237,2017 +North Carolina,221300,0.13389318105475312,2017 +North Dakota,221100,0.9312134977287476,2017 +North Dakota,221200,0.0,2017 +North Dakota,221300,0.06878650227125244,2017 +Ohio,221100,0.46731707317073173,2017 +Ohio,221200,0.1937630662020906,2017 +Ohio,221300,0.3389198606271777,2017 +Oklahoma,221100,0.4646304376570144,2017 +Oklahoma,221200,0.2499669443342589,2017 +Oklahoma,221300,0.2854026180087267,2017 +Oregon,221100,0.693427677234998,2017 +Oregon,221200,0.0,2017 +Oregon,221300,0.306572322765002,2017 +Pennsylvania,221100,0.48789112411969215,2017 +Pennsylvania,221200,0.1445933497756515,2017 +Pennsylvania,221300,0.3675155261046563,2017 +Rhode Island,221100,0.6435733819507748,2017 +Rhode Island,221200,0.0,2017 +Rhode Island,221300,0.35642661804922515,2017 +South Carolina,221100,0.7256625891946993,2017 +South Carolina,221200,0.059441896024464834,2017 +South Carolina,221300,0.21489551478083588,2017 +South Dakota,221100,0.7812343201204215,2017 +South Dakota,221200,0.09834420471650777,2017 +South Dakota,221300,0.12042147516307075,2017 +Tennessee,221100,0.7257370590100086,2017 +Tennessee,221200,0.08523164711743128,2017 +Tennessee,221300,0.18903129387256012,2017 +Texas,221100,0.5520989095152996,2017 +Texas,221200,0.09049685741031159,2017 +Texas,221300,0.3574042330743888,2017 +Utah,221100,0.45615528690618085,2017 +Utah,221200,0.13638685509960838,2017 +Utah,221300,0.4074578579942108,2017 +Vermont,221100,0.8371161548731643,2017 +Vermont,221200,0.0,2017 +Vermont,221300,0.1628838451268358,2017 +Virginia,221100,0.4747101327507982,2017 +Virginia,221200,0.09074105192404638,2017 +Virginia,221300,0.43454881532515544,2017 +Washington,221100,0.6614720438033063,2017 +Washington,221200,0.0368537432873539,2017 +Washington,221300,0.30167421290933977,2017 +West Virginia,221100,0.7480181200453001,2017 +West Virginia,221200,0.135522838807097,2017 +West Virginia,221300,0.11645904114760287,2017 +Wisconsin,221100,0.74617917757325,2017 +Wisconsin,221200,0.06400405302710462,2017 +Wisconsin,221300,0.18981676939964537,2017 +Wyoming,221100,0.8638007231820009,2017 +Wyoming,221200,0.09722780233025312,2017 +Wyoming,221300,0.038971474487746086,2017 +Alabama,221100,0.684650792245729,2018 +Alabama,221200,0.1001150747986191,2018 +Alabama,221300,0.21523413295565194,2018 +Alaska,221100,0.7220956719817767,2018 +Alaska,221200,0.13302961275626424,2018 +Alaska,221300,0.144874715261959,2018 +Arizona,221100,0.9928778686362437,2018 +Arizona,221200,0.0,2018 +Arizona,221300,0.007122131363756265,2018 +Arkansas,221100,0.5392538975501113,2018 +Arkansas,221200,0.09669636228656273,2018 +Arkansas,221300,0.3640497401633259,2018 +California,221100,0.3679787085025914,2018 +California,221200,0.0,2018 +California,221300,0.6320212914974086,2018 +Colorado,221100,0.7866749688667497,2018 +Colorado,221200,0.10859277708592777,2018 +Colorado,221300,0.10473225404732255,2018 +Connecticut,221100,0.5422583758444781,2018 +Connecticut,221200,0.10106162967048118,2018 +Connecticut,221300,0.3566799944850407,2018 +Delaware,221100,1.0,2018 +Delaware,221200,0.0,2018 +Delaware,221300,0.0,2018 +District Of Columbia,221100,1.0,2018 +District Of Columbia,221200,0.0,2018 +District Of Columbia,221300,0.0,2018 +Florida,221100,0.7543787909766237,2018 +Florida,221200,0.0585429019287126,2018 +Florida,221300,0.18707830709466367,2018 +Georgia,221100,0.822259484384825,2018 +Georgia,221200,0.10348983441626493,2018 +Georgia,221300,0.07425068119891008,2018 +Hawaii,221100,1.0,2018 +Hawaii,221200,0.0,2018 +Hawaii,221300,0.0,2018 +Idaho,221100,0.7649802655184786,2018 +Idaho,221200,0.0,2018 +Idaho,221300,0.23501973448152136,2018 +Illinois,221100,0.6557065509699165,2018 +Illinois,221200,0.16519057692997238,2018 +Illinois,221300,0.17910287210011117,2018 +Indiana,221100,0.7139877460565767,2018 +Indiana,221200,0.11752053187328901,2018 +Indiana,221300,0.16849172207013427,2018 +Iowa,221100,0.7842645953395139,2018 +Iowa,221200,0.07166123778501629,2018 +Iowa,221300,0.1440741668754698,2018 +Kansas,221100,0.5979872881355932,2018 +Kansas,221200,0.22709216101694915,2018 +Kansas,221300,0.17492055084745764,2018 +Kentucky,221100,0.5511009391523952,2018 +Kentucky,221200,0.07584247494278273,2018 +Kentucky,221300,0.37305658590482205,2018 +Louisiana,221100,0.4765664985011333,2018 +Louisiana,221200,0.09417269869123346,2018 +Louisiana,221300,0.42926080280763323,2018 +Maine,221100,0.48547008547008547,2018 +Maine,221200,0.043076923076923075,2018 +Maine,221300,0.47145299145299147,2018 +Maryland,221100,0.8828856021732568,2018 +Maryland,221200,0.06177683871616863,2018 +Maryland,221300,0.0553375591105745,2018 +Massachusetts,221100,0.5764583796605144,2018 +Massachusetts,221200,0.1868653176191535,2018 +Massachusetts,221300,0.23667630272033208,2018 +Michigan,221100,0.805064308681672,2018 +Michigan,221200,0.11017327617006073,2018 +Michigan,221300,0.08476241514826724,2018 +Minnesota,221100,0.8236276503049667,2018 +Minnesota,221200,0.11581469648562301,2018 +Minnesota,221300,0.060557653209410395,2018 +Mississippi,221100,0.7066994337001816,2018 +Mississippi,221200,0.06731488406881077,2018 +Mississippi,221300,0.2259856822310076,2018 +Missouri,221100,0.6396913200846821,2018 +Missouri,221200,0.01611691593252749,2018 +Missouri,221300,0.3441917639827904,2018 +Montana,221100,0.8091812264474135,2018 +Montana,221200,0.12572798903734156,2018 +Montana,221300,0.06509078451524494,2018 +Nebraska,221100,0.763048558815892,2018 +Nebraska,221200,0.1043884705271358,2018 +Nebraska,221300,0.13256297065697223,2018 +Nevada,221100,0.7101637639719262,2018 +Nevada,221200,0.0,2018 +Nevada,221300,0.28983623602807385,2018 +New Hampshire,221100,0.7230565371024735,2018 +New Hampshire,221200,0.11704946996466431,2018 +New Hampshire,221300,0.1598939929328622,2018 +New Jersey,221100,0.4937734730183831,2018 +New Jersey,221200,0.3590960005271134,2018 +New Jersey,221300,0.14713052645450353,2018 +New Mexico,221100,0.5184113201479338,2018 +New Mexico,221200,0.18684675992924907,2018 +New Mexico,221300,0.2947419199228172,2018 +New York,221100,0.8069856193292391,2018 +New York,221200,0.11608158313746304,2018 +New York,221300,0.07693279753329794,2018 +North Carolina,221100,0.7362545172947857,2018 +North Carolina,221200,0.13177594217862673,2018 +North Carolina,221300,0.13196954052658752,2018 +North Dakota,221100,0.7068273092369478,2018 +North Dakota,221200,0.1932730923694779,2018 +North Dakota,221300,0.09989959839357429,2018 +Ohio,221100,0.46649008468964553,2018 +Ohio,221200,0.1936709301920329,2018 +Ohio,221300,0.33983898511832156,2018 +Oklahoma,221100,0.46574797932953493,2018 +Oklahoma,221200,0.24897310189479263,2018 +Oklahoma,221300,0.28527891877567246,2018 +Oregon,221100,0.6922244759972954,2018 +Oregon,221200,0.0,2018 +Oregon,221300,0.3077755240027045,2018 +Pennsylvania,221100,0.4811219946571683,2018 +Pennsylvania,221200,0.14663104778866132,2018 +Pennsylvania,221300,0.37224695755417037,2018 +Rhode Island,221100,1.0,2018 +Rhode Island,221200,0.0,2018 +Rhode Island,221300,0.0,2018 +South Carolina,221100,0.7369428656895004,2018 +South Carolina,221200,0.055698474424169905,2018 +South Carolina,221300,0.20735865988632965,2018 +South Dakota,221100,0.7770475227502528,2018 +South Dakota,221200,0.10313447927199192,2018 +South Dakota,221300,0.1198179979777553,2018 +Tennessee,221100,0.724128552649472,2018 +Tennessee,221200,0.08549023163047913,2018 +Tennessee,221300,0.19038121572004896,2018 +Texas,221100,0.5450825098397949,2018 +Texas,221200,0.09513607202609502,2018 +Texas,221300,0.3597814181341101,2018 +Utah,221100,0.45962417470797357,2018 +Utah,221200,0.1271372947350601,2018 +Utah,221300,0.4132385305569663,2018 +Vermont,221100,0.8345612860013396,2018 +Vermont,221200,0.0,2018 +Vermont,221300,0.16543871399866042,2018 +Virginia,221100,0.46573434365946065,2018 +Virginia,221200,0.09399375975039001,2018 +Virginia,221300,0.4402718965901493,2018 +Washington,221100,0.6638834145835494,2018 +Washington,221200,0.037288663001763304,2018 +Washington,221300,0.29882792241468725,2018 +West Virginia,221100,0.7449802964908988,2018 +West Virginia,221200,0.13773691124038281,2018 +West Virginia,221300,0.11728279226871834,2018 +Wisconsin,221100,0.7335944299390774,2018 +Wisconsin,221200,0.06892950391644909,2018 +Wisconsin,221300,0.19747606614447347,2018 +Wyoming,221100,0.8308852719333069,2018 +Wyoming,221200,0.13298928146089717,2018 +Wyoming,221300,0.036125446605795954,2018 From 2d768f5e4b4194fc1a1120e49b4c6619e2ae834c Mon Sep 17 00:00:00 2001 From: jvendries Date: Tue, 4 Apr 2023 19:17:32 -0400 Subject: [PATCH 083/121] Added call to createDisaggFilesFromProxyData function to create Make, Use, and Env data for each state --- R/BuildModel.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/BuildModel.R b/R/BuildModel.R index c79fb216..52014d0c 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -648,6 +648,8 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { #ERROR HERE FOR DISAGG BY PROXY: NEED TO DECIDE IF WE WANT TO REFACTOR THIS CODE TO WORK ONLY FOR DISAGG BY PROXY, IF WE WANT TO KEEP THIS VERSION (DISAGG BASED ON # 2020 DETAIL MODEL), OR IF WE WANT TO KEEP BOTH # Disaggregate national model objects once (i.e. not for each state) + model <- createDisaggFilesFromProxyData(model, disagg, year, "US") + model <- disaggregateNationalObjectsInStateModel(model, disagg) # Assign the disaggregated model objects to the original stateior objects, rename some as national From ad8a6fc9dcd7058e2d11d4bcc3f507e3ea6cc6f3 Mon Sep 17 00:00:00 2001 From: jvendries Date: Tue, 4 Apr 2023 19:18:20 -0400 Subject: [PATCH 084/121] Added creareDisaggFilesFromProxyData function, which is intended to create Use, Make, and Env disaggregation DFs for each state based on proxy data --- R/StateDisaggFunctions.R | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 3e53cf5e..712db88b 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -290,3 +290,33 @@ disaggregateStateSectorLists <- function(code_vector, disagg) { return(newList) } + + +#### Functions below this line are used for creating disaggFiles from Proxy data, e.g., Make and USe files from Employment ratios. + +#' Create Make, Use, and Env ratio files for each state from Proxy data for the relevant sectors. +#' @param model An stateior model object with model specs and specific IO tables loaded +#' @param disagg Specifications for disaggregating the current Table +#' @param disaggYear Integer specifying the state model year +#' @param disaggState A string value that indicates the state model being disaggregated. For national models, string should be "US" +#' @return +createDisaggFilesFromProxyData <- function(model, disagg, disaggYear, disaggState){ + + temp <-1 + + #Get subset of ratios for current year + stateDFYear <- subset(disagg$stateDF, Year == disaggYear & State == disaggState) + # outputDF <- data.frame(IndustryCode = character(), CommodityCode = character(), PercentUse = double(), Note = character()) + # Default Make DF based on proxy employment values + industries <- c(rep(disagg$OriginalSectorCode,length(disagg$DisaggregatedSectorCodes))) + commodities <- disagg$DisaggregatedSectorCodes + PercentUse <- stateDFYear$Share # need to add code to ensure that the order of stateDF$Share is the same as the order of disagg$DisaggregatedSectorCodes + note <- c(rep("CommodityDisagg", length(disagg$DisaggregatedSectorCodes))) + UseDF <- data.frame(cbind(industries, commodities, PercentUse, note)) #need to rename the columns with the correct column names + + + + temp <-2 + return(model) + +} From 4fb5ef791ea82d40b07803e7e1934a09eba1b44a Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 5 Apr 2023 17:39:47 -0400 Subject: [PATCH 085/121] In function createDisaggFilesFromProxyData: Added code to create Use and Make DF based on proxy data from Employment_ratios.csv Currently debugging errors from resulting model object and disagg specs on following function call: model <- disaggregateNationalObjectsInStateModel(model, disagg) --- R/BuildModel.R | 8 ++++++-- R/StateDisaggFunctions.R | 40 +++++++++++++++++++++++++++++++++++----- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 52014d0c..73dc9d06 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -648,8 +648,12 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { #ERROR HERE FOR DISAGG BY PROXY: NEED TO DECIDE IF WE WANT TO REFACTOR THIS CODE TO WORK ONLY FOR DISAGG BY PROXY, IF WE WANT TO KEEP THIS VERSION (DISAGG BASED ON # 2020 DETAIL MODEL), OR IF WE WANT TO KEEP BOTH # Disaggregate national model objects once (i.e. not for each state) - model <- createDisaggFilesFromProxyData(model, disagg, year, "US") - + if(!is.null(disagg$stateDF)){ + + model <- createDisaggFilesFromProxyData(model, disagg, year, "US") + disagg <- model$DisaggregationSpecs[[disagg$OriginalSectorCode]] #update disagg + } + model <- disaggregateNationalObjectsInStateModel(model, disagg) # Assign the disaggregated model objects to the original stateior objects, rename some as national diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 712db88b..89992d2c 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -109,8 +109,8 @@ disaggregateNationalObjectsInStateModel <- function(model, disagg){ model <- splitFullUse(model, domestic = FALSE) # Disaggregate model objects - model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) - model$MakeTransactions[is.na(model$MakeTransactions)] <- 0 + # model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) + # model$MakeTransactions[is.na(model$MakeTransactions)] <- 0 model$DomesticUseTransactions <- useeior:::disaggregateUseTable(model, disagg, domestic = TRUE) model$DomesticUseTransactions[is.na(model$DomesticUseTransactions)] <- 0 @@ -123,6 +123,9 @@ disaggregateNationalObjectsInStateModel <- function(model, disagg){ model$UseValueAdded <- useeior:::disaggregateVA(model, disagg) model$UseValueAdded[is.na(model$UseValueAdded)] <- 0 + model$MakeTransactions <- useeior:::disaggregateMakeTable(model, disagg) + model$MakeTransactions[is.na(model$MakeTransactions)] <- 0 + model$Industries <- disaggregateStateSectorLists(model$Industries, disagg) model$Commodities <- disaggregateStateSectorLists(model$Commodities, disagg) @@ -302,18 +305,45 @@ disaggregateStateSectorLists <- function(code_vector, disagg) { #' @return createDisaggFilesFromProxyData <- function(model, disagg, disaggYear, disaggState){ + # Note: this function assumes: + # 1) The disaggregation will use the same proxy values for all disaggregated sectors across all rows and columns. + # That is, if we are disaggregating Summary 22 into the 3 Detail utility sectors, and the proxy allocations are (for example) 0.5/0.25/0.25, then + # in the Use table, the three Detail utility commodities (rows) will have that same split for across all columns (industries/final demand) + # 2) The disagg parameter will contain a disagg$stateDF variable that includes the data for the relevant disaggState and disaggYear parameters. + temp <-1 #Get subset of ratios for current year stateDFYear <- subset(disagg$stateDF, Year == disaggYear & State == disaggState) - # outputDF <- data.frame(IndustryCode = character(), CommodityCode = character(), PercentUse = double(), Note = character()) + # Default Make DF based on proxy employment values + # Specifying commodity disaggregation (column splits) for Make DF industries <- c(rep(disagg$OriginalSectorCode,length(disagg$DisaggregatedSectorCodes))) commodities <- disagg$DisaggregatedSectorCodes - PercentUse <- stateDFYear$Share # need to add code to ensure that the order of stateDF$Share is the same as the order of disagg$DisaggregatedSectorCodes + PercentMake <- stateDFYear$Share # need to add code to ensure that the order of stateDF$Share is the same as the order of disagg$DisaggregatedSectorCodes note <- c(rep("CommodityDisagg", length(disagg$DisaggregatedSectorCodes))) - UseDF <- data.frame(cbind(industries, commodities, PercentUse, note)) #need to rename the columns with the correct column names + makeDF <- data.frame(cbind(industries, commodities, PercentMake, note)) #need to rename the columns with the correct column names + colnames(makeDF) <- c("IndustryCode","CommodityCode", "PercentMake", "Note") + + + # Default Use DF based on employment ratios + # Specifying industry disaggregation (column splits) for Use DF + industries <- disagg$DisaggregatedSectorCodes + commodities <- c(rep(disagg$OriginalSectorCode,length(disagg$DisaggregatedSectorCodes))) + PercentUse <- stateDFYear$Share + note <- c(rep("IndustryDisagg", length(disagg$DisaggregatedSectorCodes))) + + useDF <- data.frame(cbind(industries, commodities, PercentUse, note)) #need to rename the columns with the correct column names + colnames(useDF) <- c("IndustryCode","CommodityCode", "PercentUse", "Note") + + useDF <- rbind(useDF, makeDF) #need to bid makeDF because disaggregation procedure requires the UseDF to have the default commodity and industry output. + + # Add new DFs to disagg and to model + disagg$MakeFileDF <- makeDF + disagg$UseFileDF <- useDF + + model$DisaggregationSpecs[[disagg$OriginalSectorCode]] <- disagg temp <-2 From 86bbd68159b973207a5d37db448ba9762a3eeddd Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 5 Apr 2023 18:30:52 -0400 Subject: [PATCH 086/121] Remove Employment ratios backup csv --- .../disaggspecs/Employment_ratios_backup.csv | 460 ------------------ 1 file changed, 460 deletions(-) delete mode 100644 inst/extdata/disaggspecs/Employment_ratios_backup.csv diff --git a/inst/extdata/disaggspecs/Employment_ratios_backup.csv b/inst/extdata/disaggspecs/Employment_ratios_backup.csv deleted file mode 100644 index 76e88cd9..00000000 --- a/inst/extdata/disaggspecs/Employment_ratios_backup.csv +++ /dev/null @@ -1,460 +0,0 @@ -State,ActivityProducedBy,Share,Year -Alabama,221100,0.695839807,2016 -Alabama,221200,0.099991369,2016 -Alabama,221300,0.204168824,2016 -Alaska,221100,0.714622642,2016 -Alaska,221200,0.137264151,2016 -Alaska,221300,0.148113208,2016 -Arizona,221100,0.992974696,2016 -Arizona,221200,0,2016 -Arizona,221300,0.007025304,2016 -Arkansas,221100,0.532969103,2016 -Arkansas,221200,0.104370761,2016 -Arkansas,221300,0.362660136,2016 -California,221100,0.362389321,2016 -California,221200,0,2016 -California,221300,0.637610679,2016 -Colorado,221100,0.795752427,2016 -Colorado,221200,0.10631068,2016 -Colorado,221300,0.097936893,2016 -Connecticut,221100,0.551421189,2016 -Connecticut,221200,0.109043928,2016 -Connecticut,221300,0.339534884,2016 -Delaware,221100,1,2016 -Delaware,221200,0,2016 -Delaware,221300,0,2016 -District Of Columbia,221100,,2016 -District Of Columbia,221200,,2016 -District Of Columbia,221300,,2016 -Florida,221100,0.770640299,2016 -Florida,221200,0.055144517,2016 -Florida,221300,0.174215185,2016 -Georgia,221100,0.842013456,2016 -Georgia,221200,0.100373785,2016 -Georgia,221300,0.057612759,2016 -Hawaii,221100,1,2016 -Hawaii,221200,0,2016 -Hawaii,221300,0,2016 -Idaho,221100,0.765361121,2016 -Idaho,221200,0,2016 -Idaho,221300,0.234638879,2016 -Illinois,221100,0.669548546,2016 -Illinois,221200,0.160504992,2016 -Illinois,221300,0.169946462,2016 -Indiana,221100,0.711171662,2016 -Indiana,221200,0.113710374,2016 -Indiana,221300,0.175117964,2016 -Iowa,221100,0.784425216,2016 -Iowa,221200,0.070457355,2016 -Iowa,221300,0.145117429,2016 -Kansas,221100,0.615777381,2016 -Kansas,221200,0.222108757,2016 -Kansas,221300,0.162113863,2016 -Kentucky,221100,0.558191371,2016 -Kentucky,221200,0.07283872,2016 -Kentucky,221300,0.368969909,2016 -Louisiana,221100,0.469060691,2016 -Louisiana,221200,0.100237424,2016 -Louisiana,221300,0.430701885,2016 -Maine,221100,0.483214649,2016 -Maine,221200,0.051881994,2016 -Maine,221300,0.464903357,2016 -Maryland,221100,0.892700875,2016 -Maryland,221200,0.056881464,2016 -Maryland,221300,0.050417661,2016 -Massachusetts,221100,0.555312571,2016 -Massachusetts,221200,0.208430737,2016 -Massachusetts,221300,0.236256693,2016 -Michigan,221100,0.8395624,2016 -Michigan,221200,0.113437881,2016 -Michigan,221300,0.046999718,2016 -Minnesota,221100,0.832679272,2016 -Minnesota,221200,0.112022833,2016 -Minnesota,221300,0.055297895,2016 -Mississippi,221100,0.719206569,2016 -Mississippi,221200,0.068145462,2016 -Mississippi,221300,0.212647968,2016 -Missouri,221100,0.512934541,2016 -Missouri,221200,0.144584847,2016 -Missouri,221300,0.342480612,2016 -Montana,221100,0.747123045,2016 -Montana,221200,0.11065211,2016 -Montana,221300,0.142224845,2016 -Nebraska,221100,0.771677783,2016 -Nebraska,221200,0.105823499,2016 -Nebraska,221300,0.122498717,2016 -Nevada,221100,0.674134927,2016 -Nevada,221200,0,2016 -Nevada,221300,0.325865073,2016 -New Hampshire,221100,0.736531987,2016 -New Hampshire,221200,0.103114478,2016 -New Hampshire,221300,0.160353535,2016 -New Jersey,221100,0.539482086,2016 -New Jersey,221200,0.305427457,2016 -New Jersey,221300,0.155090458,2016 -New Mexico,221100,0.526332538,2016 -New Mexico,221200,0.1858393,2016 -New Mexico,221300,0.287828162,2016 -New York,221100,0.755165113,2016 -New York,221200,0.173070839,2016 -New York,221300,0.071764047,2016 -North Carolina,221100,0.724643503,2016 -North Carolina,221200,0.140456584,2016 -North Carolina,221300,0.134899913,2016 -North Dakota,221100,0.933736859,2016 -North Dakota,221200,0,2016 -North Dakota,221300,0.066263141,2016 -Ohio,221100,0.472068008,2016 -Ohio,221200,0.190596808,2016 -Ohio,221300,0.337335184,2016 -Oklahoma,221100,0.439176035,2016 -Oklahoma,221200,0.287571438,2016 -Oklahoma,221300,0.273252528,2016 -Oregon,221100,0.522041475,2016 -Oregon,221200,0.148019372,2016 -Oregon,221300,0.329939153,2016 -Pennsylvania,221100,0.495828051,2016 -Pennsylvania,221200,0.141138662,2016 -Pennsylvania,221300,0.363033287,2016 -Rhode Island,221100,1,2016 -Rhode Island,221200,0,2016 -Rhode Island,221300,0,2016 -South Carolina,221100,0.735953625,2016 -South Carolina,221200,0.059752835,2016 -South Carolina,221300,0.204293541,2016 -South Dakota,221100,0.784051511,2016 -South Dakota,221200,0.098068351,2016 -South Dakota,221300,0.117880139,2016 -Tennessee,221100,0.730508397,2016 -Tennessee,221200,0.081789632,2016 -Tennessee,221300,0.187701971,2016 -Texas,221100,0.555251299,2016 -Texas,221200,0.090057345,2016 -Texas,221300,0.354691357,2016 -Utah,221100,0.459684411,2016 -Utah,221200,0.132131091,2016 -Utah,221300,0.408184498,2016 -Vermont,221100,0.842703727,2016 -Vermont,221200,0,2016 -Vermont,221300,0.157296273,2016 -Virginia,221100,0.481246168,2016 -Virginia,221200,0.087555035,2016 -Virginia,221300,0.431198796,2016 -Washington,221100,0.659468439,2016 -Washington,221200,0.035901833,2016 -Washington,221300,0.304629729,2016 -West Virginia,221100,0.734571484,2016 -West Virginia,221200,0.140839621,2016 -West Virginia,221300,0.124588895,2016 -Wisconsin,221100,0.748179764,2016 -Wisconsin,221200,0.064775295,2016 -Wisconsin,221300,0.187044941,2016 -Wyoming,221100,0.863351605,2016 -Wyoming,221200,0.091620987,2016 -Wyoming,221300,0.045027408,2016 -Alabama,221100,0.685589327,2017 -Alabama,221200,0.101342993,2017 -Alabama,221300,0.21306768,2017 -Alaska,221100,0.717052433,2017 -Alaska,221200,0.135096835,2017 -Alaska,221300,0.147850732,2017 -Arizona,221100,0.992919426,2017 -Arizona,221200,0,2017 -Arizona,221300,0.007080574,2017 -Arkansas,221100,0.536775771,2017 -Arkansas,221200,0.09951091,2017 -Arkansas,221300,0.363713318,2017 -California,221100,0.369990057,2017 -California,221200,0,2017 -California,221300,0.630009943,2017 -Colorado,221100,0.792548583,2017 -Colorado,221200,0.105211041,2017 -Colorado,221300,0.102240376,2017 -Connecticut,221100,0.547513142,2017 -Connecticut,221200,0.105405041,2017 -Connecticut,221300,0.347081817,2017 -Delaware,221100,1,2017 -Delaware,221200,0,2017 -Delaware,221300,0,2017 -District Of Columbia,221100,,2017 -District Of Columbia,221200,,2017 -District Of Columbia,221300,,2017 -Florida,221100,0.7621746,2017 -Florida,221200,0.056082148,2017 -Florida,221300,0.181743252,2017 -Georgia,221100,0.830908255,2017 -Georgia,221200,0.10603972,2017 -Georgia,221300,0.063052024,2017 -Hawaii,221100,1,2017 -Hawaii,221200,0,2017 -Hawaii,221300,0,2017 -Idaho,221100,0.765112891,2017 -Idaho,221200,0,2017 -Idaho,221300,0.234887109,2017 -Illinois,221100,0.65659469,2017 -Illinois,221200,0.167139726,2017 -Illinois,221300,0.176265584,2017 -Indiana,221100,0.711434594,2017 -Indiana,221200,0.11632196,2017 -Indiana,221300,0.172243446,2017 -Iowa,221100,0.784584734,2017 -Iowa,221200,0.070227867,2017 -Iowa,221300,0.145187399,2017 -Kansas,221100,0.611369509,2017 -Kansas,221200,0.220801034,2017 -Kansas,221300,0.167829457,2017 -Kentucky,221100,0.552446447,2017 -Kentucky,221200,0.073907201,2017 -Kentucky,221300,0.373646352,2017 -Louisiana,221100,0.470292268,2017 -Louisiana,221200,0.096559378,2017 -Louisiana,221300,0.433148354,2017 -Maine,221100,0.495286195,2017 -Maine,221200,0.042760943,2017 -Maine,221300,0.461952862,2017 -Maryland,221100,0.890848953,2017 -Maryland,221200,0.058835321,2017 -Maryland,221300,0.050315726,2017 -Massachusetts,221100,0.558402084,2017 -Massachusetts,221200,0.213489651,2017 -Massachusetts,221300,0.228108265,2017 -Michigan,221100,0.807010439,2017 -Michigan,221200,0.109206263,2017 -Michigan,221300,0.083783297,2017 -Minnesota,221100,0.825519331,2017 -Minnesota,221200,0.115406809,2017 -Minnesota,221300,0.05907386,2017 -Mississippi,221100,0.712993161,2017 -Mississippi,221200,0.065965281,2017 -Mississippi,221300,0.221041557,2017 -Missouri,221100,0.510860733,2017 -Missouri,221200,0.149450192,2017 -Missouri,221300,0.339689074,2017 -Montana,221100,0.806397306,2017 -Montana,221200,0.125589226,2017 -Montana,221300,0.068013468,2017 -Nebraska,221100,0.89516129,2017 -Nebraska,221200,0.10483871,2017 -Nebraska,221300,0,2017 -Nevada,221100,0.67238806,2017 -Nevada,221200,0,2017 -Nevada,221300,0.32761194,2017 -New Hampshire,221100,0.731433506,2017 -New Hampshire,221200,0.115716753,2017 -New Hampshire,221300,0.152849741,2017 -New Jersey,221100,0.519991478,2017 -New Jersey,221200,0.325332008,2017 -New Jersey,221300,0.154676514,2017 -New Mexico,221100,0.524895599,2017 -New Mexico,221200,0.186476068,2017 -New Mexico,221300,0.288628333,2017 -New York,221100,0.755705084,2017 -New York,221200,0.170230598,2017 -New York,221300,0.074064318,2017 -North Carolina,221100,0.726704736,2017 -North Carolina,221200,0.139402083,2017 -North Carolina,221300,0.133893181,2017 -North Dakota,221100,0.931213498,2017 -North Dakota,221200,0,2017 -North Dakota,221300,0.068786502,2017 -Ohio,221100,0.467317073,2017 -Ohio,221200,0.193763066,2017 -Ohio,221300,0.338919861,2017 -Oklahoma,221100,0.464630438,2017 -Oklahoma,221200,0.249966944,2017 -Oklahoma,221300,0.285402618,2017 -Oregon,221100,0.693427677,2017 -Oregon,221200,0,2017 -Oregon,221300,0.306572323,2017 -Pennsylvania,221100,0.487891124,2017 -Pennsylvania,221200,0.14459335,2017 -Pennsylvania,221300,0.367515526,2017 -Rhode Island,221100,0.643573382,2017 -Rhode Island,221200,0,2017 -Rhode Island,221300,0.356426618,2017 -South Carolina,221100,0.725662589,2017 -South Carolina,221200,0.059441896,2017 -South Carolina,221300,0.214895515,2017 -South Dakota,221100,0.78123432,2017 -South Dakota,221200,0.098344205,2017 -South Dakota,221300,0.120421475,2017 -Tennessee,221100,0.725737059,2017 -Tennessee,221200,0.085231647,2017 -Tennessee,221300,0.189031294,2017 -Texas,221100,0.55209891,2017 -Texas,221200,0.090496857,2017 -Texas,221300,0.357404233,2017 -Utah,221100,0.456155287,2017 -Utah,221200,0.136386855,2017 -Utah,221300,0.407457858,2017 -Vermont,221100,0.837116155,2017 -Vermont,221200,0,2017 -Vermont,221300,0.162883845,2017 -Virginia,221100,0.474710133,2017 -Virginia,221200,0.090741052,2017 -Virginia,221300,0.434548815,2017 -Washington,221100,0.661472044,2017 -Washington,221200,0.036853743,2017 -Washington,221300,0.301674213,2017 -West Virginia,221100,0.74801812,2017 -West Virginia,221200,0.135522839,2017 -West Virginia,221300,0.116459041,2017 -Wisconsin,221100,0.746179178,2017 -Wisconsin,221200,0.064004053,2017 -Wisconsin,221300,0.189816769,2017 -Wyoming,221100,0.863800723,2017 -Wyoming,221200,0.097227802,2017 -Wyoming,221300,0.038971474,2017 -Alabama,221100,0.684650792,2018 -Alabama,221200,0.100115075,2018 -Alabama,221300,0.215234133,2018 -Alaska,221100,0.722095672,2018 -Alaska,221200,0.133029613,2018 -Alaska,221300,0.144874715,2018 -Arizona,221100,0.992877869,2018 -Arizona,221200,0,2018 -Arizona,221300,0.007122131,2018 -Arkansas,221100,0.539253898,2018 -Arkansas,221200,0.096696362,2018 -Arkansas,221300,0.36404974,2018 -California,221100,0.367978709,2018 -California,221200,0,2018 -California,221300,0.632021291,2018 -Colorado,221100,0.786674969,2018 -Colorado,221200,0.108592777,2018 -Colorado,221300,0.104732254,2018 -Connecticut,221100,0.542258376,2018 -Connecticut,221200,0.10106163,2018 -Connecticut,221300,0.356679994,2018 -Delaware,221100,1,2018 -Delaware,221200,0,2018 -Delaware,221300,0,2018 -District Of Columbia,221100,1,2018 -District Of Columbia,221200,0,2018 -District Of Columbia,221300,0,2018 -Florida,221100,0.754378791,2018 -Florida,221200,0.058542902,2018 -Florida,221300,0.187078307,2018 -Georgia,221100,0.822259484,2018 -Georgia,221200,0.103489834,2018 -Georgia,221300,0.074250681,2018 -Hawaii,221100,1,2018 -Hawaii,221200,0,2018 -Hawaii,221300,0,2018 -Idaho,221100,0.764980266,2018 -Idaho,221200,0,2018 -Idaho,221300,0.235019734,2018 -Illinois,221100,0.655706551,2018 -Illinois,221200,0.165190577,2018 -Illinois,221300,0.179102872,2018 -Indiana,221100,0.713987746,2018 -Indiana,221200,0.117520532,2018 -Indiana,221300,0.168491722,2018 -Iowa,221100,0.784264595,2018 -Iowa,221200,0.071661238,2018 -Iowa,221300,0.144074167,2018 -Kansas,221100,0.597987288,2018 -Kansas,221200,0.227092161,2018 -Kansas,221300,0.174920551,2018 -Kentucky,221100,0.551100939,2018 -Kentucky,221200,0.075842475,2018 -Kentucky,221300,0.373056586,2018 -Louisiana,221100,0.476566499,2018 -Louisiana,221200,0.094172699,2018 -Louisiana,221300,0.429260803,2018 -Maine,221100,0.485470085,2018 -Maine,221200,0.043076923,2018 -Maine,221300,0.471452991,2018 -Maryland,221100,0.882885602,2018 -Maryland,221200,0.061776839,2018 -Maryland,221300,0.055337559,2018 -Massachusetts,221100,0.57645838,2018 -Massachusetts,221200,0.186865318,2018 -Massachusetts,221300,0.236676303,2018 -Michigan,221100,0.805064309,2018 -Michigan,221200,0.110173276,2018 -Michigan,221300,0.084762415,2018 -Minnesota,221100,0.82362765,2018 -Minnesota,221200,0.115814696,2018 -Minnesota,221300,0.060557653,2018 -Mississippi,221100,0.706699434,2018 -Mississippi,221200,0.067314884,2018 -Mississippi,221300,0.225985682,2018 -Missouri,221100,0.63969132,2018 -Missouri,221200,0.016116916,2018 -Missouri,221300,0.344191764,2018 -Montana,221100,0.809181226,2018 -Montana,221200,0.125727989,2018 -Montana,221300,0.065090785,2018 -Nebraska,221100,0.763048559,2018 -Nebraska,221200,0.104388471,2018 -Nebraska,221300,0.132562971,2018 -Nevada,221100,0.710163764,2018 -Nevada,221200,0,2018 -Nevada,221300,0.289836236,2018 -New Hampshire,221100,0.723056537,2018 -New Hampshire,221200,0.11704947,2018 -New Hampshire,221300,0.159893993,2018 -New Jersey,221100,0.493773473,2018 -New Jersey,221200,0.359096001,2018 -New Jersey,221300,0.147130526,2018 -New Mexico,221100,0.51841132,2018 -New Mexico,221200,0.18684676,2018 -New Mexico,221300,0.29474192,2018 -New York,221100,0.806985619,2018 -New York,221200,0.116081583,2018 -New York,221300,0.076932798,2018 -North Carolina,221100,0.736254517,2018 -North Carolina,221200,0.131775942,2018 -North Carolina,221300,0.131969541,2018 -North Dakota,221100,0.706827309,2018 -North Dakota,221200,0.193273092,2018 -North Dakota,221300,0.099899598,2018 -Ohio,221100,0.466490085,2018 -Ohio,221200,0.19367093,2018 -Ohio,221300,0.339838985,2018 -Oklahoma,221100,0.465747979,2018 -Oklahoma,221200,0.248973102,2018 -Oklahoma,221300,0.285278919,2018 -Oregon,221100,0.692224476,2018 -Oregon,221200,0,2018 -Oregon,221300,0.307775524,2018 -Pennsylvania,221100,0.481121995,2018 -Pennsylvania,221200,0.146631048,2018 -Pennsylvania,221300,0.372246958,2018 -Rhode Island,221100,1,2018 -Rhode Island,221200,0,2018 -Rhode Island,221300,0,2018 -South Carolina,221100,0.736942866,2018 -South Carolina,221200,0.055698474,2018 -South Carolina,221300,0.20735866,2018 -South Dakota,221100,0.777047523,2018 -South Dakota,221200,0.103134479,2018 -South Dakota,221300,0.119817998,2018 -Tennessee,221100,0.724128553,2018 -Tennessee,221200,0.085490232,2018 -Tennessee,221300,0.190381216,2018 -Texas,221100,0.54508251,2018 -Texas,221200,0.095136072,2018 -Texas,221300,0.359781418,2018 -Utah,221100,0.459624175,2018 -Utah,221200,0.127137295,2018 -Utah,221300,0.413238531,2018 -Vermont,221100,0.834561286,2018 -Vermont,221200,0,2018 -Vermont,221300,0.165438714,2018 -Virginia,221100,0.465734344,2018 -Virginia,221200,0.09399376,2018 -Virginia,221300,0.440271897,2018 -Washington,221100,0.663883415,2018 -Washington,221200,0.037288663,2018 -Washington,221300,0.298827922,2018 -West Virginia,221100,0.744980296,2018 -West Virginia,221200,0.137736911,2018 -West Virginia,221300,0.117282792,2018 -Wisconsin,221100,0.73359443,2018 -Wisconsin,221200,0.068929504,2018 -Wisconsin,221300,0.197476066,2018 -Wyoming,221100,0.830885272,2018 -Wyoming,221200,0.132989281,2018 -Wyoming,221300,0.036125447,2018 From 3c3bbde51618ac6a9c7ae6689532842d2b4147a3 Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 5 Apr 2023 18:31:36 -0400 Subject: [PATCH 087/121] added testing files for testing the format of state use and Make DF that need to be generated by createDisaggFilesFromProxyData function --- inst/extdata/disaggspecs/UtilityDisaggByProxy.yml | 6 +++--- inst/extdata/disaggspecs/UtilityStateDummy_Make.csv | 4 ++++ inst/extdata/disaggspecs/UtilityStateDummy_Use.csv | 7 +++++++ 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 inst/extdata/disaggspecs/UtilityStateDummy_Make.csv create mode 100644 inst/extdata/disaggspecs/UtilityStateDummy_Use.csv diff --git a/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml b/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml index 1cf0c30c..7c45b224 100644 --- a/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml +++ b/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml @@ -4,8 +4,8 @@ Disaggregation: OrignalSectorName: "Utilities" DisaggregationType: "Userdefined" SectorFile: UtilityDisaggregation_Sectors.csv - # MakeFile: UtilityDisaggregationSummary_Make.csv - # UseFile: UtilityDisaggregationSummary_Use.csv + MakeFile: UtilityStateDummy_Make.csv + UseFile: UtilityStateDummy_Use.csv # EnvFile: UtilityDisaggregationSummary_Env.csv - stateFile: Employment_ratios.csv +# stateFile: Employment_ratios.csv #Uncomment this when the above Make and USe files are working in stateior disagg package: "stateior" diff --git a/inst/extdata/disaggspecs/UtilityStateDummy_Make.csv b/inst/extdata/disaggspecs/UtilityStateDummy_Make.csv new file mode 100644 index 00000000..7813278f --- /dev/null +++ b/inst/extdata/disaggspecs/UtilityStateDummy_Make.csv @@ -0,0 +1,4 @@ +IndustryCode,CommodityCode,PercentMake,Note +22/US,221100/US,0.63541758,CommodityDisagg +22/US,221200/US,0.108148191,CommodityDisagg +22/US,221300/US,0.256434229,CommodityDisagg diff --git a/inst/extdata/disaggspecs/UtilityStateDummy_Use.csv b/inst/extdata/disaggspecs/UtilityStateDummy_Use.csv new file mode 100644 index 00000000..db94e891 --- /dev/null +++ b/inst/extdata/disaggspecs/UtilityStateDummy_Use.csv @@ -0,0 +1,7 @@ +IndustryCode,CommodityCode,PercentUsed,Note, +221100/US,22/US,0.63541758,IndustryDisagg, +221200/US,22/US,0.108148191,IndustryDisagg, +221300/US,22/US,0.256434229,IndustryDisagg, +22/US,221100/US,0.63541758,CommodityDisagg, +22/US,221200/US,0.108148191,CommodityDisagg, +22/US,221300/US,0.256434229,CommodityDisagg, From de882261b63a5f7ff5e6fba34891727ca651e437 Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 5 Apr 2023 18:39:05 -0400 Subject: [PATCH 088/121] added new testing yml file to test useDf and MakeDF strctures that need to be gnerated by createDisaggFilesFromProxyData --- inst/extdata/disaggspecs/UtilityDisaggByProxy.yml | 8 ++++---- inst/extdata/disaggspecs/UtilityStateDummy.yml | 11 +++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 inst/extdata/disaggspecs/UtilityStateDummy.yml diff --git a/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml b/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml index 7c45b224..af2de3df 100644 --- a/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml +++ b/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml @@ -4,8 +4,8 @@ Disaggregation: OrignalSectorName: "Utilities" DisaggregationType: "Userdefined" SectorFile: UtilityDisaggregation_Sectors.csv - MakeFile: UtilityStateDummy_Make.csv - UseFile: UtilityStateDummy_Use.csv - # EnvFile: UtilityDisaggregationSummary_Env.csv -# stateFile: Employment_ratios.csv #Uncomment this when the above Make and USe files are working in stateior disagg +# MakeFile: UtilityStateDummy_Make.csv +# UseFile: UtilityStateDummy_Use.csv +# EnvFile: UtilityDisaggregationSummary_Env.csv + stateFile: Employment_ratios.csv #Uncomment this when the above Make and USe files are working in stateior disagg package: "stateior" diff --git a/inst/extdata/disaggspecs/UtilityStateDummy.yml b/inst/extdata/disaggspecs/UtilityStateDummy.yml new file mode 100644 index 00000000..7c45b224 --- /dev/null +++ b/inst/extdata/disaggspecs/UtilityStateDummy.yml @@ -0,0 +1,11 @@ +Disaggregation: + 22/US: + OriginalSectorCode: "22/US" + OrignalSectorName: "Utilities" + DisaggregationType: "Userdefined" + SectorFile: UtilityDisaggregation_Sectors.csv + MakeFile: UtilityStateDummy_Make.csv + UseFile: UtilityStateDummy_Use.csv + # EnvFile: UtilityDisaggregationSummary_Env.csv +# stateFile: Employment_ratios.csv #Uncomment this when the above Make and USe files are working in stateior disagg + package: "stateior" From 4bf5ac01478a5e651c05eaa4a9caebc440a8436e Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 5 Apr 2023 19:29:16 -0400 Subject: [PATCH 089/121] fixed errors that did not allow disaggregation to proceed with data derived from proxy file, in this case EMployment rations. Errors were (in createDisaggFilesFromProxyData function): 1) the disaggregatedSectorCodes were not being unlisted before being assigned to Use DF and Make DF 2) data in make DF and use DF were not being saved as dataframes and thus the data type was not consistent when doing a cbind for these objects --- R/BuildModel.R | 8 +++----- R/StateDisaggFunctions.R | 14 ++++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 73dc9d06..becd857d 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -645,12 +645,10 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { model$FullUse <- US_Use model$DomesticFullUse <- US_DomesticUse # Note that the domestic full use object does not include value added rows - #ERROR HERE FOR DISAGG BY PROXY: NEED TO DECIDE IF WE WANT TO REFACTOR THIS CODE TO WORK ONLY FOR DISAGG BY PROXY, IF WE WANT TO KEEP THIS VERSION (DISAGG BASED ON - # 2020 DETAIL MODEL), OR IF WE WANT TO KEEP BOTH # Disaggregate national model objects once (i.e. not for each state) if(!is.null(disagg$stateDF)){ - model <- createDisaggFilesFromProxyData(model, disagg, year, "US") + model <- createDisaggFilesFromProxyData(model, disagg, year, "US") #Function to disagg by proxy disagg <- model$DisaggregationSpecs[[disagg$OriginalSectorCode]] #update disagg } @@ -701,8 +699,8 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { # Assemble two-region IO tables TwoRegionIO <- list() #TEMPORARY FOR DEBUGGING - for (state in c("Virginia")){ -# for (state in sort(c(state.name, "District of Columbia"))) { +# for (state in c("Virginia")){ + for (state in sort(c(state.name, "District of Columbia"))) { if(state == "Virginia"){ temp <-1 diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 89992d2c..68dc61fd 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -319,26 +319,28 @@ createDisaggFilesFromProxyData <- function(model, disagg, disaggYear, disaggStat # Default Make DF based on proxy employment values # Specifying commodity disaggregation (column splits) for Make DF industries <- c(rep(disagg$OriginalSectorCode,length(disagg$DisaggregatedSectorCodes))) - commodities <- disagg$DisaggregatedSectorCodes + commodities <- unlist(disagg$DisaggregatedSectorCodes) PercentMake <- stateDFYear$Share # need to add code to ensure that the order of stateDF$Share is the same as the order of disagg$DisaggregatedSectorCodes note <- c(rep("CommodityDisagg", length(disagg$DisaggregatedSectorCodes))) - makeDF <- data.frame(cbind(industries, commodities, PercentMake, note)) #need to rename the columns with the correct column names + makeDF <- data.frame(cbind(data.frame(industries), data.frame(commodities), data.frame(PercentMake), data.frame(note))) #need to rename the columns with the correct column names colnames(makeDF) <- c("IndustryCode","CommodityCode", "PercentMake", "Note") # Default Use DF based on employment ratios # Specifying industry disaggregation (column splits) for Use DF - industries <- disagg$DisaggregatedSectorCodes + industries <- unlist(disagg$DisaggregatedSectorCodes) commodities <- c(rep(disagg$OriginalSectorCode,length(disagg$DisaggregatedSectorCodes))) PercentUse <- stateDFYear$Share note <- c(rep("IndustryDisagg", length(disagg$DisaggregatedSectorCodes))) - useDF <- data.frame(cbind(industries, commodities, PercentUse, note)) #need to rename the columns with the correct column names + useDF <- data.frame(cbind(data.frame(industries), data.frame(commodities), data.frame(PercentUse), data.frame(note))) #need to rename the columns with the correct column names + useDF_2 <- makeDF # so that colnames match colnames(useDF) <- c("IndustryCode","CommodityCode", "PercentUse", "Note") + colnames(useDF_2) <- c("IndustryCode","CommodityCode", "PercentUse", "Note") - useDF <- rbind(useDF, makeDF) #need to bid makeDF because disaggregation procedure requires the UseDF to have the default commodity and industry output. - + useDF <- rbind(useDF, useDF_2) #need to bid makeDF because disaggregation procedure requires the UseDF to have the default commodity and industry output. + # Add new DFs to disagg and to model disagg$MakeFileDF <- makeDF disagg$UseFileDF <- useDF From 49029b08994aaf18cd95d6d1d4d6964cc9e2c41f Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 5 Apr 2023 19:31:22 -0400 Subject: [PATCH 090/121] added comment for next step in state disagg testing with proxy data. --- R/BuildModel.R | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/R/BuildModel.R b/R/BuildModel.R index becd857d..f918b658 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -706,6 +706,16 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { temp <-1 } + + #LEFT OFF HERE: NEED TO TEST THE FOLLOWING CODE TO MAKE SURE EACH STATE IS DISAGGREGATED PROPERLY: + # # Disaggregate STATE model objects + # if(!is.null(disagg$stateDF)){ + # + # model <- createDisaggFilesFromProxyData(model, disagg, year, state) #Function to disagg by proxy + # disagg <- model$DisaggregationSpecs[[disagg$OriginalSectorCode]] #update disagg + # } + + ## Two-region Make model$MakeTransactions <- State_Make_ls[[state]] model$FullUse <- State_Use_ls[[state]] From cebc1caf5b58878f96a05daa47396336e845fec2 Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 12 Apr 2023 13:31:58 -0400 Subject: [PATCH 091/121] handle cases where there is no proxy data for disaggregation for a specific state (i.e., D.C.) --- R/StateDisaggFunctions.R | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 68dc61fd..9ee78380 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -315,7 +315,24 @@ createDisaggFilesFromProxyData <- function(model, disagg, disaggYear, disaggStat #Get subset of ratios for current year stateDFYear <- subset(disagg$stateDF, Year == disaggYear & State == disaggState) + + # If the state/year combination is not found, assume a uniform split between sectors + if(dim(stateDFYear)[1] == 0){ + + activity <- unlist(disagg$DisaggregatedSectorCodes) + uniformAllocationVector <- 1/length(disagg$DisaggregatedSectorCodes) + share <- rep(uniformAllocationVector,length(disagg$DisaggregatedSectorCodes)) + + stateDFYear <- data.frame(State = rep(disaggState, length(disagg$DisaggregatedSectorCodes)), + Activity = activity, + Share = share, + Year = rep(disaggYear, length(disagg$DisaggregatedSectorCodes))) + + } + print(paste0("For ",disaggState,"-",disaggYear, " the allocation to disaggregate ", + disagg$OriginalSectorCode, " into ", disagg$DisaggregatedSectorCodes, " is ", stateDFYear$Share)) + # Default Make DF based on proxy employment values # Specifying commodity disaggregation (column splits) for Make DF industries <- c(rep(disagg$OriginalSectorCode,length(disagg$DisaggregatedSectorCodes))) From 80b5ae8cbeee8046ebeb632d87e53d1118437dc7 Mon Sep 17 00:00:00 2001 From: jvendries Date: Wed, 12 Apr 2023 13:33:10 -0400 Subject: [PATCH 092/121] add if statement to disaggregate model objects for each state using proxy data jf it is provided --- R/BuildModel.R | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index f918b658..9826764a 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -699,21 +699,17 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { # Assemble two-region IO tables TwoRegionIO <- list() #TEMPORARY FOR DEBUGGING -# for (state in c("Virginia")){ +# for (state in c("District of Columbia")){ for (state in sort(c(state.name, "District of Columbia"))) { - if(state == "Virginia"){ - temp <-1 - } - #LEFT OFF HERE: NEED TO TEST THE FOLLOWING CODE TO MAKE SURE EACH STATE IS DISAGGREGATED PROPERLY: - # # Disaggregate STATE model objects - # if(!is.null(disagg$stateDF)){ - # - # model <- createDisaggFilesFromProxyData(model, disagg, year, state) #Function to disagg by proxy - # disagg <- model$DisaggregationSpecs[[disagg$OriginalSectorCode]] #update disagg - # } + # Disaggregate STATE model objects + if(!is.null(disagg$stateDF)){ + + model <- createDisaggFilesFromProxyData(model, disagg, year, state) #Function to disagg by proxy + disagg <- model$DisaggregationSpecs[[disagg$OriginalSectorCode]] #update disagg + } ## Two-region Make From d3d219f0d36b826bb98a844b7564343cd53b6346 Mon Sep 17 00:00:00 2001 From: "Ben Young (ERG)" <44471635+bl-young@users.noreply.github.com> Date: Tue, 6 Feb 2024 15:55:26 -0500 Subject: [PATCH 093/121] require useeior v1.4.0 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3567c451..ab4840f4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -40,7 +40,7 @@ Imports: Depends: R (>= 3.6) Remotes: - github::USEPA/useeior@linkstateior + github::USEPA/useeior@v1.4.0 License: file LICENSE Encoding: UTF-8 LazyData: true From e1ed152e5630a6afb0e9d6a2659296870de6a2c6 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 6 Feb 2024 22:25:13 -0500 Subject: [PATCH 094/121] use make table for commodity output consistent with approach in buildStateSupplyModel() --- R/StateDisaggFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 9ee78380..00dd5d10 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -269,7 +269,7 @@ calculateStateIndustryCommodityOuput <- function(model){ rownames(model$IndustryOutput) <- rowLabels # Calculating and formatting CommodityOuput - model$CommodityOutput <- data.frame(rowSums(model$UseTransactions) + rowSums(model$FinalDemand)) + model$CommodityOutput <- data.frame(colSums(model$MakeTransactions)) colnames(model$CommodityOutput) <- "Output" rowLabels <- rownames(model$CommodityOutput) rowLabels <- gsub("\\/.*","",rowLabels) # remove everything after "/" From 0b9f535a8b2b197be62d4c61bb32ddeae530d505 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 6 Feb 2024 23:39:30 -0500 Subject: [PATCH 095/121] clean up spec file, env file not needed --- .../disaggspecs/UtilityDisaggregation.yml | 7 +- .../UtilityDisaggregationSummary_Env.csv | 1180 ----------------- 2 files changed, 3 insertions(+), 1184 deletions(-) delete mode 100644 inst/extdata/disaggspecs/UtilityDisaggregationSummary_Env.csv diff --git a/inst/extdata/disaggspecs/UtilityDisaggregation.yml b/inst/extdata/disaggspecs/UtilityDisaggregation.yml index 32913a6a..abf83371 100644 --- a/inst/extdata/disaggspecs/UtilityDisaggregation.yml +++ b/inst/extdata/disaggspecs/UtilityDisaggregation.yml @@ -1,10 +1,9 @@ Disaggregation: 22/US: OriginalSectorCode: "22/US" - OrignalSectorName: "Utilities" + OriginalSectorName: "Utilities" DisaggregationType: "Userdefined" SectorFile: UtilityDisaggregation_Sectors.csv - MakeFile: UtilityDisaggregationSummary_Make.csv - UseFile: UtilityDisaggregationSummary_Use.csv - EnvFile: UtilityDisaggregationSummary_Env.csv + MakeFile: UtilityDisaggregationSummary_Make.csv # Ratios from 2012 US Make table + UseFile: UtilityDisaggregationSummary_Use.csv # Ratios from 2012 US Use table package: "stateior" diff --git a/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Env.csv b/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Env.csv deleted file mode 100644 index f087cb14..00000000 --- a/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Env.csv +++ /dev/null @@ -1,1180 +0,0 @@ -"Flowable","Context","FlowUUID","Sector","FlowRatio" -"Water","emission/air/troposphere/ground-level","","221100",1 -"Water, fresh","emission/air/troposphere/ground-level","","221100",1 -"Water, fresh","resource/water/fresh water body","","221100",0.907847888636718 -"Water, fresh","resource/water/fresh water body","","221300",0.0921521113632819 -"Water, fresh","resource/water/subterranean/fresh water body","","221100",0.0700765446579275 -"Water, fresh","resource/water/subterranean/fresh water body","","221300",0.929923455342073 -"Water, saline","resource/water/saline water body","","221100",1 -"Water, saline","resource/water/subterranean/saline water body","","221100",1 -"1,1-Dichloroethane","emission/air","","221100",0.623240890992679 -"1,1-Dichloroethane","emission/air","","221200",0.0255357966388812 -"1,1-Dichloroethane","emission/air","","221300",0.35122331236844 -"1,1-Dichloroethylene","emission/air","","221100",0.107341784437035 -"1,1-Dichloroethylene","emission/air","","221300",0.892658215562965 -"1,1-Dimethylhydrazine","emission/air","","221100",1 -"1,1,1-Trichloroethane","emission/air","","221100",0.218288244999612 -"1,1,1-Trichloroethane","emission/air","","221300",0.781711755000388 -"1,1,2-Trichloroethane","emission/air","","221100",0.426043113374257 -"1,1,2-Trichloroethane","emission/air","","221200",0.117527522802421 -"1,1,2-Trichloroethane","emission/air","","221300",0.456429363823322 -"1,1,2,2-Tetrachloroethane","emission/air","","221100",0.235799339929909 -"1,1,2,2-Tetrachloroethane","emission/air","","221200",0.0758213868023184 -"1,1,2,2-Tetrachloroethane","emission/air","","221300",0.688379273267773 -"1,2-Dichloroethane","emission/air","","221100",0.703198130352856 -"1,2-Dichloroethane","emission/air","","221200",0.00691521868732921 -"1,2-Dichloroethane","emission/air","","221300",0.289886650959814 -"1,2-Dichloropropane","emission/air","","221100",0.383310095438901 -"1,2-Dichloropropane","emission/air","","221200",0.0221168187960939 -"1,2-Dichloropropane","emission/air","","221300",0.594573085765005 -"1,2,4-Trichlorobenzene","emission/air","","221100",0.539050462943468 -"1,2,4-Trichlorobenzene","emission/air","","221300",0.460949537056532 -"1,2,4-Trimethylbenzene","emission/air","","221100",0.996494371518716 -"1,2,4-Trimethylbenzene","emission/air","","221300",0.00350562848128384 -"1,3-Butadiene","emission/air","","221100",0.717595194352346 -"1,3-Butadiene","emission/air","","221200",0.149200649935943 -"1,3-Butadiene","emission/air","","221300",0.133204155711711 -"1,3-Dichloropropene","emission/air","","221100",0.431393800568674 -"1,3-Dichloropropene","emission/air","","221200",0.12046858464949 -"1,3-Dichloropropene","emission/air","","221300",0.448137614781837 -"1,4-Dioxane","emission/air","","221100",0.00097388499783038 -"1,4-Dioxane","emission/air","","221300",0.99902611500217 -"2-Chloroacetophenone","emission/air","","221100",0.999534322944684 -"2-Chloroacetophenone","emission/air","","221300",0.000465677055315895 -"2-Chlorobiphenyl","emission/air","","221100",0.324194778144233 -"2-Chlorobiphenyl","emission/air","","221300",0.675805221855767 -"2-Chloronaphthalene","emission/air","","221100",0.750453786056516 -"2-Chloronaphthalene","emission/air","","221300",0.249546213943484 -"2-Methylnaphthalene","emission/air","","221100",0.707203180405566 -"2-Methylnaphthalene","emission/air","","221200",0.0442380037003079 -"2-Methylnaphthalene","emission/air","","221300",0.248558815894127 -"2,2,4-Trimethylpentane","emission/air","","221100",0.311890811283507 -"2,2,4-Trimethylpentane","emission/air","","221200",0.49820539840994 -"2,2,4-Trimethylpentane","emission/air","","221300",0.189903790306552 -"2,4-Dinitrophenol","emission/air","","221100",0.857877624521288 -"2,4-Dinitrophenol","emission/air","","221300",0.142122375478712 -"2,4-Dinitrotoluene","emission/air","","221100",0.671030815846188 -"2,4-Dinitrotoluene","emission/air","","221300",0.328969184153812 -"2,4,5-Trichlorophenol","emission/air","","221100",1 -"2,4,6-Trichlorophenol","emission/air","","221100",0.309174204077361 -"2,4,6-Trichlorophenol","emission/air","","221300",0.690825795922639 -"3-Methylcholanthrene","emission/air","","221100",0.962866833764136 -"3-Methylcholanthrene","emission/air","","221200",0.000498791677332626 -"3-Methylcholanthrene","emission/air","","221300",0.0366343745585315 -"5-Methylchrysene","emission/air","","221100",0.998428431681342 -"5-Methylchrysene","emission/air","","221300",0.00157156831865828 -"7,12-Dimethylbenz[a]anthracene","emission/air","","221100",0.970497834230408 -"7,12-Dimethylbenz[a]anthracene","emission/air","","221200",0.000332768062379497 -"7,12-Dimethylbenz[a]anthracene","emission/air","","221300",0.0291693977072126 -"Acenaphthene","emission/air","","221100",0.0590937141624503 -"Acenaphthene","emission/air","","221200",0.000251656724996389 -"Acenaphthene","emission/air","","221300",0.940654629112553 -"Acenaphthylene","emission/air","","221100",0.633134755117857 -"Acenaphthylene","emission/air","","221200",0.0460486545133872 -"Acenaphthylene","emission/air","","221300",0.320816590368756 -"Acetaldehyde","emission/air","","221100",0.823916640762069 -"Acetaldehyde","emission/air","","221200",0.0815065526280234 -"Acetaldehyde","emission/air","","221300",0.0945768066099078 -"Acetonitrile","emission/air","","221100",0.000248184025125329 -"Acetonitrile","emission/air","","221200",0.970864698028121 -"Acetonitrile","emission/air","","221300",0.028887117946754 -"Acetophenone","emission/air","","221100",0.984807047160379 -"Acetophenone","emission/air","","221300",0.015192952839621 -"Acrolein","emission/air","","221100",0.722005844221816 -"Acrolein","emission/air","","221200",0.110441124637758 -"Acrolein","emission/air","","221300",0.167553031140426 -"Acrylonitrile","emission/air","","221100",0.574779470509358 -"Acrylonitrile","emission/air","","221300",0.425220529490642 -"Allyl chloride","emission/air","","221100",0.977137897435704 -"Allyl chloride","emission/air","","221300",0.0228621025642957 -"Ammonia","emission/air","","221100",0.809458095211295 -"Ammonia","emission/air","","221200",0.0640775988631357 -"Ammonia","emission/air","","221300",0.12646430592557 -"Aniline","emission/air","","221100",0.81684070943146 -"Aniline","emission/air","","221300",0.18315929056854 -"Anthracene","emission/air","","221100",0.834141471381339 -"Anthracene","emission/air","","221200",0.0024788767332967 -"Anthracene","emission/air","","221300",0.163379651885364 -"Antimony","emission/air","","221100",0.970053294093946 -"Antimony","emission/air","","221300",0.0299467059060538 -"Antimony compounds","emission/air","","221100",1 -"Arsenic","emission/air","","221100",0.958627320389616 -"Arsenic","emission/air","","221200",7.38304745051349e-05 -"Arsenic","emission/air","","221300",0.0412988491358793 -"Arsenic compounds","emission/air","","221100",1 -"Asbestos","emission/air","","221100",0.999447887289797 -"Asbestos","emission/air","","221300",0.000552112710202651 -"Barium","emission/air","","221100",1 -"Barium compounds","emission/air","","221100",1 -"Benz[a]anthracene","emission/air","","221100",0.996219416718387 -"Benz[a]anthracene","emission/air","","221200",0.00206243850725712 -"Benz[a]anthracene","emission/air","","221300",0.00171814477435615 -"Benzene","emission/air","","221100",0.780410485736284 -"Benzene","emission/air","","221200",0.0401357517851054 -"Benzene","emission/air","","221300",0.179453762478611 -"Benzidine","emission/air","","221100",1 -"Benzo(b)fluoranthene","emission/air","","221100",0.784272707099009 -"Benzo(b)fluoranthene","emission/air","","221200",0.0140937430190534 -"Benzo(b)fluoranthene","emission/air","","221300",0.201633549881938 -"Benzo[a]pyrene","emission/air","","221100",0.992797761962282 -"Benzo[a]pyrene","emission/air","","221200",0.00270405076257185 -"Benzo[a]pyrene","emission/air","","221300",0.00449818727514633 -"Benzo[e]pyrene","emission/air","","221100",0.538581254692943 -"Benzo[e]pyrene","emission/air","","221200",0.103472053626217 -"Benzo[e]pyrene","emission/air","","221300",0.357946691680839 -"Benzo[ghi]perylene","emission/air","","221100",0.99298144383352 -"Benzo[ghi]perylene","emission/air","","221200",0.00114842784453017 -"Benzo[ghi]perylene","emission/air","","221300",0.00587012832194955 -"Benzo[k]fluoranthene","emission/air","","221100",0.913257035866361 -"Benzo[k]fluoranthene","emission/air","","221200",0.00102318029336661 -"Benzo[k]fluoranthene","emission/air","","221300",0.0857197838402728 -"Benzofluoranthene","emission/air","","221100",0.995550489863991 -"Benzofluoranthene","emission/air","","221300",0.0044495101360094 -"Benzyl chloride","emission/air","","221100",0.999014908717941 -"Benzyl chloride","emission/air","","221300",0.00098509128205888 -"Beryllium","emission/air","","221100",0.963452448361344 -"Beryllium","emission/air","","221200",9.29542913123354e-06 -"Beryllium","emission/air","","221300",0.0365382562095248 -"Beryllium compounds","emission/air","","221100",1 -"Biphenyl","emission/air","","221100",0.884907320525374 -"Biphenyl","emission/air","","221200",0.0746942833643919 -"Biphenyl","emission/air","","221300",0.0403983961102344 -"Bromine","emission/air","","221100",1 -"Cadmium","emission/air","","221100",0.961352387123784 -"Cadmium","emission/air","","221200",0.00128188102587004 -"Cadmium","emission/air","","221300",0.0373657318503456 -"Cadmium compounds","emission/air","","221100",1 -"Calcium cyanamide","emission/air","","221100",1 -"Carbon disulfide","emission/air","","221100",0.371224607154202 -"Carbon disulfide","emission/air","","221300",0.628775392845798 -"Carbon monoxide","emission/air","","221100",0.96063808111591 -"Carbon monoxide","emission/air","","221200",0.0145948848144748 -"Carbon monoxide","emission/air","","221300",0.0247670340696154 -"Carbon tetrachloride","emission/air","","221100",0.121635370306292 -"Carbon tetrachloride","emission/air","","221200",0.0155786432563091 -"Carbon tetrachloride","emission/air","","221300",0.862785986437399 -"Carbonyl sulfide","emission/air","","221100",0.364343002058295 -"Carbonyl sulfide","emission/air","","221300",0.635656997941704 -"Catechol","emission/air","","221100",0.11190053285968 -"Catechol","emission/air","","221200",0.88809946714032 -"Chlorine","emission/air","","221100",0.93529099930446 -"Chlorine","emission/air","","221300",0.0647090006955405 -"Chlorine dioxide","emission/air","","221100",1 -"Chlorobenzene","emission/air","","221100",0.496485013771821 -"Chlorobenzene","emission/air","","221200",0.00830709812026015 -"Chlorobenzene","emission/air","","221300",0.495207888107919 -"Chloroethane","emission/air","","221100",0.984161005893058 -"Chloroethane","emission/air","","221200",5.91322698524858e-05 -"Chloroethane","emission/air","","221300",0.0157798618370897 -"Chloroform","emission/air","","221100",0.348226429896114 -"Chloroform","emission/air","","221200",0.000659123082505304 -"Chloroform","emission/air","","221300",0.651114447021381 -"Chloromethane","emission/air","","221100",0.993665577030142 -"Chloromethane","emission/air","","221300",0.00633442296985765 -"Chromic(VI) acid","emission/air","","221100",0.995064964876999 -"Chromic(VI) acid","emission/air","","221300",0.00493503512300092 -"Chromium","emission/air","","221100",1 -"Chromium compounds","emission/air","","221100",1 -"Chromium(III)","emission/air","","221100",0.992320760586347 -"Chromium(III)","emission/air","","221200",0.000258272205009384 -"Chromium(III)","emission/air","","221300",0.00742096720864325 -"Chromium(VI)","emission/air","","221100",0.967651954936091 -"Chromium(VI)","emission/air","","221200",8.28013405114754e-05 -"Chromium(VI)","emission/air","","221300",0.0322652437233979 -"Chrysene","emission/air","","221100",0.997848328198706 -"Chrysene","emission/air","","221200",0.000667810576594857 -"Chrysene","emission/air","","221300",0.00148386122469901 -"Cobalt","emission/air","","221100",0.961698539219469 -"Cobalt","emission/air","","221200",5.69857812073088e-05 -"Cobalt","emission/air","","221300",0.0382444749993235 -"Cobalt compounds","emission/air","","221100",1 -"Copper","emission/air","","221100",1 -"Copper compounds","emission/air","","221100",1 -"Cresol","emission/air","","221100",0.977225356817737 -"Cresol","emission/air","","221300",0.0227746431822634 -"Cumene","emission/air","","221100",0.786552805576773 -"Cumene","emission/air","","221300",0.213447194423227 -"Cyanide","emission/air","","221100",0.998595102214601 -"Cyanide","emission/air","","221200",4.00237325504133e-06 -"Cyanide","emission/air","","221300",0.00140089541214392 -"Cyanide compounds","emission/air","","221100",1 -"Cyclohexane","emission/air","","221100",0.848360655737705 -"Cyclohexane","emission/air","","221300",0.151639344262295 -"Decachlorobiphenyl","emission/air","","221100",0.104881252624991 -"Decachlorobiphenyl","emission/air","","221300",0.895118747375009 -"Di(2-ethylhexyl) phthalate","emission/air","","221100",0.765227849661429 -"Di(2-ethylhexyl) phthalate","emission/air","","221300",0.234772150338571 -"Dibenz[a,h]acridine","emission/air","","221100",0.960336838748954 -"Dibenz[a,h]acridine","emission/air","","221300",0.0396631612510458 -"Dibenz[a,h]anthracene","emission/air","","221100",0.974110387430834 -"Dibenz[a,h]anthracene","emission/air","","221200",0.000199846786810686 -"Dibenz[a,h]anthracene","emission/air","","221300",0.0256897657823549 -"Dibenz[a,j]acridine","emission/air","","221100",1 -"Dibenzofuran","emission/air","","221100",0.645712085794709 -"Dibenzofuran","emission/air","","221200",0.345249286587739 -"Dibenzofuran","emission/air","","221300",0.00903862761755183 -"Dibutyl phthalate","emission/air","","221100",0.672836897723486 -"Dibutyl phthalate","emission/air","","221300",0.327163102276514 -"Dimethyl phthalate","emission/air","","221100",1 -"Dimethyl sulfate","emission/air","","221100",0.990496908082786 -"Dimethyl sulfate","emission/air","","221300",0.00950309191721369 -"Dioxins","emission/air","","221100",1 -"Ethylbenzene","emission/air","","221100",0.764996895938197 -"Ethylbenzene","emission/air","","221200",0.0152227069580685 -"Ethylbenzene","emission/air","","221300",0.219780397103735 -"Ethylene dibromide","emission/air","","221100",0.778731148025949 -"Ethylene dibromide","emission/air","","221200",0.0905176267024211 -"Ethylene dibromide","emission/air","","221300",0.13075122527163 -"Ethylene glycol","emission/air","","221100",0.0798295254736875 -"Ethylene glycol","emission/air","","221200",0.520503857754757 -"Ethylene glycol","emission/air","","221300",0.399666616771555 -"Ethylene glycol monobutyl ether acetate","emission/air","","221100",1 -"Fluoranthene","emission/air","","221100",0.95786370269218 -"Fluoranthene","emission/air","","221200",0.000506083961503605 -"Fluoranthene","emission/air","","221300",0.041630213346316 -"Fluorene","emission/air","","221100",0.779606788348136 -"Fluorene","emission/air","","221200",0.0348458420372702 -"Fluorene","emission/air","","221300",0.185547369614594 -"Fluorine","emission/air","","221100",1 -"Formaldehyde","emission/air","","221100",0.876407359533006 -"Formaldehyde","emission/air","","221200",0.0775326435602644 -"Formaldehyde","emission/air","","221300",0.0460599969067299 -"Formic acid","emission/air","","221100",1 -"Glycol ethers","emission/air","","221100",8.41814032983214e-06 -"Glycol ethers","emission/air","","221200",0.00149764589588874 -"Glycol ethers","emission/air","","221300",0.998493935963781 -"Glycol ethers, subset","emission/air","","221100",1 -"Heptachlorobiphenyl","emission/air","","221100",0.104888086115952 -"Heptachlorobiphenyl","emission/air","","221300",0.895111913884048 -"Hexachlorobenzene","emission/air","","221100",0.714505695049855 -"Hexachlorobenzene","emission/air","","221300",0.285494304950145 -"Hexachlorobiphenyl","emission/air","","221100",0.324214102514466 -"Hexachlorobiphenyl","emission/air","","221300",0.675785897485534 -"Hexachlorobutadiene","emission/air","","221100",0.460720341492598 -"Hexachlorobutadiene","emission/air","","221300",0.539279658507402 -"Hexachlorocyclopentadiene","emission/air","","221100",0.959793692929608 -"Hexachlorocyclopentadiene","emission/air","","221300",0.0402063070703914 -"Hexachloroethane","emission/air","","221100",0.989930351598557 -"Hexachloroethane","emission/air","","221300",0.0100696484014433 -"Hexamethylene-1,6-diisocyanate","emission/air","","221100",0.19000602980005 -"Hexamethylene-1,6-diisocyanate","emission/air","","221300",0.80999397019995 -"Hexane","emission/air","","221100",0.82540879959887 -"Hexane","emission/air","","221200",0.0866006555606553 -"Hexane","emission/air","","221300",0.0879905448404745 -"Hydrazine","emission/air","","221100",1 -"Hydrochloric acid","emission/air","","221100",0.943951112658544 -"Hydrochloric acid","emission/air","","221200",0.0015069920288635 -"Hydrochloric acid","emission/air","","221300",0.0545418953125926 -"Hydrofluoric acid","emission/air","","221100",0.997636324557212 -"Hydrofluoric acid","emission/air","","221300",0.00236367544278818 -"Hydrogen cyanide","emission/air","","221100",0.999327686515196 -"Hydrogen cyanide","emission/air","","221300",0.000672313484803894 -"Hydrogen sulfide","emission/air","","221100",0.705392973008274 -"Hydrogen sulfide","emission/air","","221200",0.00378010915429437 -"Hydrogen sulfide","emission/air","","221300",0.290826917837432 -"Indeno[1,2,3-cd]pyrene","emission/air","","221100",0.898922355718961 -"Indeno[1,2,3-cd]pyrene","emission/air","","221200",0.000986131887554662 -"Indeno[1,2,3-cd]pyrene","emission/air","","221300",0.100091512393485 -"Isophorone","emission/air","","221100",0.999585566848344 -"Isophorone","emission/air","","221300",0.000414433151655605 -"Lead","emission/air","","221100",0.884516882175613 -"Lead","emission/air","","221200",0.000134833232265916 -"Lead","emission/air","","221300",0.115348284592121 -"Lead compounds","emission/air","","221100",0.995956706481933 -"Lead compounds","emission/air","","221300",0.0040432935180671 -"m-Cresol","emission/air","","221100",0.0206488189338535 -"m-Cresol","emission/air","","221200",0.979348616105485 -"m-Cresol","emission/air","","221300",2.56496066122865e-06 -"m-Xylene","emission/air","","221100",0.74817044917603 -"m-Xylene","emission/air","","221300",0.25182955082397 -"Manganese","emission/air","","221100",0.958202926944397 -"Manganese","emission/air","","221200",0.000546114291429449 -"Manganese","emission/air","","221300",0.0412509587641739 -"Manganese compounds","emission/air","","221100",1 -"Mercury","emission/air","","221100",0.919855388490771 -"Mercury","emission/air","","221200",0.00123826748288416 -"Mercury","emission/air","","221300",0.0789063440263448 -"Mercury compounds","emission/air","","221100",1 -"Methanol","emission/air","","221100",0.159380251234089 -"Methanol","emission/air","","221200",0.620257075510572 -"Methanol","emission/air","","221300",0.220362673255339 -"Methyl bromide","emission/air","","221100",0.976154981049565 -"Methyl bromide","emission/air","","221300",0.0238450189504347 -"Methyl hydrazine","emission/air","","221100",0.999656494477333 -"Methyl hydrazine","emission/air","","221300",0.000343505522666656 -"Methyl iodide","emission/air","","221100",0.70207499697692 -"Methyl iodide","emission/air","","221300",0.29792500302308 -"Methyl isobutyl ketone","emission/air","","221100",0.162874936278984 -"Methyl isobutyl ketone","emission/air","","221200",0.00340895256286349 -"Methyl isobutyl ketone","emission/air","","221300",0.833716111158153 -"Methyl methacrylate","emission/air","","221100",0.573471316697697 -"Methyl methacrylate","emission/air","","221300",0.426528683302303 -"Methyl tert-butyl ether","emission/air","","221100",0.525154336277499 -"Methyl tert-butyl ether","emission/air","","221300",0.474845663722501 -"Methylene chloride","emission/air","","221100",0.658835961681127 -"Methylene chloride","emission/air","","221200",0.00149005964898226 -"Methylene chloride","emission/air","","221300",0.33967397866989 -"Molybdenum trioxide","emission/air","","221100",1 -"N-Nitrosodimethylamine","emission/air","","221100",1 -"N-Nitrosomorpholine","emission/air","","221100",1 -"Naphthalene","emission/air","","221100",0.663289681448239 -"Naphthalene","emission/air","","221200",0.0393003395047109 -"Naphthalene","emission/air","","221300",0.29740997904705 -"Nickel","emission/air","","221100",0.957935398271312 -"Nickel","emission/air","","221200",0.0207514591212107 -"Nickel","emission/air","","221300",0.0213131426074776 -"Nickel compounds","emission/air","","221100",1 -"Nitrobenzene","emission/air","","221100",0.44855224161089 -"Nitrobenzene","emission/air","","221300",0.55144775838911 -"Nitrogen dioxide","emission/air","","221100",0.97626464991262 -"Nitrogen dioxide","emission/air","","221200",0.0108561941361575 -"Nitrogen dioxide","emission/air","","221300",0.0128791559512226 -"o-Cresol","emission/air","","221100",0.508424966624193 -"o-Cresol","emission/air","","221200",0.491456784696026 -"o-Cresol","emission/air","","221300",0.000118248679780534 -"o-Xylene","emission/air","","221100",0.717254448039029 -"o-Xylene","emission/air","","221300",0.282745551960971 -"p-Cresol","emission/air","","221100",0.408893694198862 -"p-Cresol","emission/air","","221200",0.590669017495041 -"p-Cresol","emission/air","","221300",0.00043728830609634 -"p-Dichlorobenzene","emission/air","","221100",0.25527787607066 -"p-Dichlorobenzene","emission/air","","221300",0.74472212392934 -"p-Nitrophenol","emission/air","","221100",0.11222894218564 -"p-Nitrophenol","emission/air","","221300",0.88777105781436 -"p-Xylene","emission/air","","221100",0.784430816276126 -"p-Xylene","emission/air","","221300",0.215569183723874 -"PAH/POM, unspecified","emission/air","","221100",0.975954577902492 -"PAH/POM, unspecified","emission/air","","221200",0.0188132579825469 -"PAH/POM, unspecified","emission/air","","221300",0.00523216411496078 -"Particulate matter, = 2.5µm","emission/air","","221100",0.978362321284935 -"Particulate matter, = 2.5µm","emission/air","","221200",0.00770148430558551 -"Particulate matter, = 2.5µm","emission/air","","221300",0.0139361944094798 -"Particulate matter, > 2.5µm and = 10µm","emission/air","","221100",0.990606680033475 -"Particulate matter, > 2.5µm and = 10µm","emission/air","","221200",0.00047286075736233 -"Particulate matter, > 2.5µm and = 10µm","emission/air","","221300",0.00892045920916243 -"Pentachlorobiphenyl","emission/air","","221100",0.324176008264763 -"Pentachlorobiphenyl","emission/air","","221300",0.675823991735237 -"Pentachlorophenol","emission/air","","221100",0.115761021226301 -"Pentachlorophenol","emission/air","","221300",0.884238978773699 -"Perylene","emission/air","","221100",0.722544165706923 -"Perylene","emission/air","","221200",0.00777369527794853 -"Perylene","emission/air","","221300",0.269682139015128 -"Phenanthrene","emission/air","","221100",0.884486273521378 -"Phenanthrene","emission/air","","221200",0.0136871471667281 -"Phenanthrene","emission/air","","221300",0.101826579311894 -"Phenol","emission/air","","221100",0.516296804597348 -"Phenol","emission/air","","221200",0.192864998495272 -"Phenol","emission/air","","221300",0.29083819690738 -"Phosphorus","emission/air","","221100",0.835567629634426 -"Phosphorus","emission/air","","221200",4.32789732011043e-05 -"Phosphorus","emission/air","","221300",0.164389091392373 -"Phthalic anhydride","emission/air","","221100",1 -"Polychlorinated biphenyls","emission/air","","221100",0.257958862389887 -"Polychlorinated biphenyls","emission/air","","221300",0.742041137610113 -"Polycyclic aromatic hydrocarbons","emission/air","","221100",0.146129980409218 -"Polycyclic aromatic hydrocarbons","emission/air","","221200",0.784175847103961 -"Polycyclic aromatic hydrocarbons","emission/air","","221300",0.0696941724868214 -"Propionaldehyde","emission/air","","221100",0.965631466362563 -"Propionaldehyde","emission/air","","221300",0.0343685336374372 -"Propylene","emission/air","","221100",1 -"Propylene oxide","emission/air","","221100",0.946192933425549 -"Propylene oxide","emission/air","","221200",0.0115517159279884 -"Propylene oxide","emission/air","","221300",0.0422553506464625 -"Pyrene","emission/air","","221100",0.871626496386317 -"Pyrene","emission/air","","221200",0.00288057571794611 -"Pyrene","emission/air","","221300",0.125492927895737 -"Quinoline","emission/air","","221100",0.00544430132832143 -"Quinoline","emission/air","","221200",0.994555698671679 -"Selenium","emission/air","","221100",0.997655447300439 -"Selenium","emission/air","","221200",1.16018275006751e-07 -"Selenium","emission/air","","221300",0.00234443668128606 -"Selenium compounds","emission/air","","221100",1 -"Styrene","emission/air","","221100",0.675900695772747 -"Styrene","emission/air","","221200",0.00115646759118074 -"Styrene","emission/air","","221300",0.322942836636072 -"Styrene oxide","emission/air","","221100",1 -"Sulfur dioxide","emission/air","","221100",0.993405239007915 -"Sulfur dioxide","emission/air","","221200",0.00402681499905937 -"Sulfur dioxide","emission/air","","221300",0.00256794599302598 -"Sulfuric acid","emission/air","","221100",1 -"Tetrachlorobiphenyl","emission/air","","221100",0.324231547730229 -"Tetrachlorobiphenyl","emission/air","","221300",0.675768452269771 -"Tetrachloroethylene","emission/air","","221100",0.147077970292167 -"Tetrachloroethylene","emission/air","","221200",1.49062653001911e-05 -"Tetrachloroethylene","emission/air","","221300",0.852907123442532 -"Thallium compounds","emission/air","","221100",1 -"Toluene","emission/air","","221100",0.85188174759143 -"Toluene","emission/air","","221200",0.0264020164315515 -"Toluene","emission/air","","221300",0.121716235977019 -"Tribromomethane","emission/air","","221100",0.990647417399612 -"Tribromomethane","emission/air","","221300",0.0093525826003876 -"Trichloroethylene","emission/air","","221100",0.224095565830913 -"Trichloroethylene","emission/air","","221300",0.775904434169087 -"Vanadium","emission/air","","221100",1 -"Vanadium compounds","emission/air","","221100",1 -"Vinyl acetate","emission/air","","221100",0.777048549839004 -"Vinyl acetate","emission/air","","221300",0.222951450160996 -"Vinyl chloride","emission/air","","221100",0.547823985636961 -"Vinyl chloride","emission/air","","221200",0.0134839300643513 -"Vinyl chloride","emission/air","","221300",0.438692084298688 -"Volatile organic compounds","emission/air","","221100",0.767291401384913 -"Volatile organic compounds","emission/air","","221200",0.0329516908175736 -"Volatile organic compounds","emission/air","","221300",0.199756907797513 -"Xylene","emission/air","","221100",0.47752880226004 -"Xylene","emission/air","","221200",0.0151892446003544 -"Xylene","emission/air","","221300",0.507281953139605 -"Zinc","emission/air","","221100",1 -"Zinc compounds","emission/air","","221100",1 -"Diethanolamine","emission/air","","221200",0.574707083772465 -"Diethanolamine","emission/air","","221300",0.425292916227535 -"2-Methoxyethanol","emission/air","","221300",1 -"2-Nitropropane","emission/air","","221300",1 -"4,6-Dinitro-o-cresol","emission/air","","221300",1 -"Acrylic acid","emission/air","","221300",1 -"Benzo[ghi]fluoranthene","emission/air","","221300",1 -"Benzo[j]fluoranthene","emission/air","","221300",1 -"Chloroprene","emission/air","","221300",1 -"Dichlorvos","emission/air","","221300",1 -"Epichlorohydrin","emission/air","","221300",1 -"Ethyl acrylate","emission/air","","221300",1 -"Ethylene glycol monopropyl ether","emission/air","","221300",1 -"Ethylene oxide","emission/air","","221300",1 -"Heptachlor","emission/air","","221300",1 -"Hydroquinone","emission/air","","221300",1 -"Maleic anhydride","emission/air","","221300",1 -"N,N-Dimethylaniline","emission/air","","221300",1 -"N,N-Dimethylformamide","emission/air","","221300",1 -"o-Toluidine","emission/air","","221300",1 -"Phosgene","emission/air","","221300",1 -"Quinone","emission/air","","221300",1 -"Toxaphene","emission/air","","221300",1 -"Triethylamine","emission/air","","221300",1 -"Ammonia","emission/ground","","221100",1 -"Anthracene","emission/ground","","221100",1 -"Antimony compounds","emission/ground","","221100",1 -"Arsenic compounds","emission/ground","","221100",1 -"Barium compounds","emission/ground","","221100",1 -"Benzo[ghi]perylene","emission/ground","","221100",1 -"Beryllium compounds","emission/ground","","221100",1 -"Chromium compounds","emission/ground","","221100",0.999982897798094 -"Chromium compounds","emission/ground","","221300",1.7102201905759e-05 -"Cobalt","emission/ground","","221100",1 -"Cobalt compounds","emission/ground","","221100",0.999896945463539 -"Cobalt compounds","emission/ground","","221300",0.000103054536460695 -"Copper compounds","emission/ground","","221100",0.998405239498309 -"Copper compounds","emission/ground","","221300",0.00159476050169137 -"Dioxins","emission/ground","","221100",1 -"Formic acid","emission/ground","","221100",1 -"Lead","emission/ground","","221100",0.510388208097512 -"Lead","emission/ground","","221300",0.489611791902488 -"Lead compounds","emission/ground","","221100",0.997548583551255 -"Lead compounds","emission/ground","","221300",0.00245141644874504 -"Manganese","emission/ground","","221100",1 -"Manganese compounds","emission/ground","","221100",1 -"Mercury","emission/ground","","221100",1 -"Mercury compounds","emission/ground","","221100",1 -"Naphthalene","emission/ground","","221100",1 -"Nickel compounds","emission/ground","","221100",0.999872955823917 -"Nickel compounds","emission/ground","","221300",0.000127044176083228 -"Phenanthrene","emission/ground","","221100",1 -"Selenium compounds","emission/ground","","221100",1 -"Thallium compounds","emission/ground","","221100",1 -"Vanadium","emission/ground","","221100",1 -"Vanadium compounds","emission/ground","","221100",1 -"Zinc compounds","emission/ground","","221100",0.998797428190524 -"Zinc compounds","emission/ground","","221300",0.0012025718094764 -"Copper","emission/ground","","221300",1 -"Hydrogen sulfide","emission/ground","","221300",1 -"1,2-Dichloroethane","emission/water","","221100",0.0356407264705551 -"1,2-Dichloroethane","emission/water","","221300",0.964359273529445 -"Aluminum","emission/water","","221100",0.748543992874645 -"Aluminum","emission/water","","221300",0.251456007125355 -"Ammonia","emission/water","","221100",1 -"Antimony","emission/water","","221100",0.284055519919786 -"Antimony","emission/water","","221300",0.715944480080214 -"Antimony compounds","emission/water","","221100",1 -"Arsenic","emission/water","","221100",0.416015249439957 -"Arsenic","emission/water","","221300",0.583984750560043 -"Arsenic compounds","emission/water","","221100",1 -"Barium","emission/water","","221100",0.110999371245549 -"Barium","emission/water","","221300",0.889000628754451 -"Barium compounds","emission/water","","221100",1 -"Benzene","emission/water","","221100",0.0183775210670722 -"Benzene","emission/water","","221200",0.00111922350885353 -"Benzene","emission/water","","221300",0.980503255424074 -"Benzo[ghi]perylene","emission/water","","221100",0.00167035604716825 -"Benzo[ghi]perylene","emission/water","","221300",0.998329643952832 -"Beryllium","emission/water","","221100",0.0971306320125592 -"Beryllium","emission/water","","221300",0.902869367987441 -"Beryllium compounds","emission/water","","221100",1 -"Biological Oxygen Demand","emission/water","","221100",0.000391807771238533 -"Biological Oxygen Demand","emission/water","","221300",0.999608192228762 -"Boron","emission/water","","221100",0.956514048918537 -"Boron","emission/water","","221300",0.0434859510814635 -"Bromide","emission/water","","221100",0.00876724520587406 -"Bromide","emission/water","","221300",0.991232754794126 -"Cadmium","emission/water","","221100",0.000826311015402505 -"Cadmium","emission/water","","221300",0.999173688984598 -"Chemical Oxygen Demand","emission/water","","221100",0.988541880567035 -"Chemical Oxygen Demand","emission/water","","221300",0.0114581194329653 -"Chloride","emission/water","","221100",0.0214004458573142 -"Chloride","emission/water","","221300",0.978599554142686 -"Chlorides and sulfates, total","emission/water","","221100",1 -"Chlorine","emission/water","","221100",0.0931204723881564 -"Chlorine","emission/water","","221200",4.68868677608197e-08 -"Chlorine","emission/water","","221300",0.906879480724976 -"Chloroform","emission/water","","221100",0.0389729846356503 -"Chloroform","emission/water","","221300",0.96102701536435 -"Chromium","emission/water","","221100",0.0572770315784793 -"Chromium","emission/water","","221300",0.942722968421521 -"Chromium compounds","emission/water","","221100",0.983100872615757 -"Chromium compounds","emission/water","","221300",0.0168991273842427 -"Chromium(III)","emission/water","","221100",0.0212449852350946 -"Chromium(III)","emission/water","","221300",0.978755014764905 -"Chromium(VI)","emission/water","","221100",0.0399448721827804 -"Chromium(VI)","emission/water","","221300",0.96005512781722 -"Cobalt compounds","emission/water","","221100",0.849462365591398 -"Cobalt compounds","emission/water","","221300",0.150537634408602 -"Copper","emission/water","","221100",0.18550069924345 -"Copper","emission/water","","221300",0.81449930075655 -"Copper compounds","emission/water","","221100",0.995465479482424 -"Copper compounds","emission/water","","221300",0.00453452051757599 -"Cyanide","emission/water","","221100",0.00260179891997081 -"Cyanide","emission/water","","221300",0.997398201080029 -"Di(2-ethylhexyl) phthalate","emission/water","","221100",0.00108768727904124 -"Di(2-ethylhexyl) phthalate","emission/water","","221300",0.998912312720959 -"Dioxins","emission/water","","221100",1 -"Ethylbenzene","emission/water","","221100",0.00104480878250932 -"Ethylbenzene","emission/water","","221200",0.00077258096656405 -"Ethylbenzene","emission/water","","221300",0.998182610250927 -"Fluoride","emission/water","","221100",0.109556579794518 -"Fluoride","emission/water","","221300",0.890443420205482 -"Formic acid","emission/water","","221100",1 -"Hydrazine","emission/water","","221100",1 -"Hydrocarbons","emission/water","","221100",0.999442183760607 -"Hydrocarbons","emission/water","","221300",0.000557816239393137 -"Hydrocarbons, petroleum","emission/water","","221100",0.968455785305763 -"Hydrocarbons, petroleum","emission/water","","221300",0.0315442146942367 -"Iron","emission/water","","221100",0.963185866469421 -"Iron","emission/water","","221300",0.0368141335305793 -"Lead","emission/water","","221100",0.0106572701684001 -"Lead","emission/water","","221300",0.9893427298316 -"Lead compounds","emission/water","","221100",0.960676674091761 -"Lead compounds","emission/water","","221300",0.0393233259082392 -"Manganese","emission/water","","221100",0.192944586425856 -"Manganese","emission/water","","221300",0.807055413574144 -"Manganese compounds","emission/water","","221100",1 -"Mercury","emission/water","","221100",0.00157205727740415 -"Mercury","emission/water","","221300",0.998427942722596 -"Mercury compounds","emission/water","","221100",1 -"Methanol","emission/water","","221100",1 -"Molybdenum","emission/water","","221100",0.0237201859411087 -"Molybdenum","emission/water","","221300",0.976279814058891 -"Molybdenum trioxide","emission/water","","221100",1 -"Nickel","emission/water","","221100",0.00734455472535467 -"Nickel","emission/water","","221300",0.992655445274645 -"Nickel compounds","emission/water","","221100",0.992549347496182 -"Nickel compounds","emission/water","","221300",0.00745065250381763 -"Nitrate compounds","emission/water","","221100",1 -"Nitrogen","emission/water","","221100",0.0271047491808082 -"Nitrogen","emission/water","","221300",0.972895250819192 -"Oxygen","emission/water","","221100",0.314407090239892 -"Oxygen","emission/water","","221300",0.685592909760108 -"Phosphorus","emission/water","","221100",0.000169080341574315 -"Phosphorus","emission/water","","221300",0.999830919658426 -"Selenium","emission/water","","221100",0.679915602729808 -"Selenium","emission/water","","221300",0.320084397270192 -"Selenium compounds","emission/water","","221100",1 -"Silver","emission/water","","221100",0.432663871415449 -"Silver","emission/water","","221300",0.567336128584551 -"Sulfate","emission/water","","221100",0.486243101495168 -"Sulfate","emission/water","","221300",0.513756898504832 -"Thallium","emission/water","","221100",0.129476802682787 -"Thallium","emission/water","","221300",0.870523197317213 -"Thallium compounds","emission/water","","221100",1 -"Titanium","emission/water","","221100",1 -"Total dissolved solids","emission/water","","221100",0.857414387088286 -"Total dissolved solids","emission/water","","221300",0.142585612911714 -"Total metals","emission/water","","221100",1 -"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","","221100",0.653873869000955 -"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","","221200",5.915330107257e-05 -"Total oil and grease, less total petroleum hydrocarbons (TPH)","emission/water","","221300",0.346066977697973 -"Total Organic Carbon","emission/water","","221100",0.115235840253257 -"Total Organic Carbon","emission/water","","221200",0.000629972795052456 -"Total Organic Carbon","emission/water","","221300",0.88413418695169 -"Total suspended solids","emission/water","","221100",0.276813897168242 -"Total suspended solids","emission/water","","221200",5.5040851823331e-05 -"Total suspended solids","emission/water","","221300",0.723131061979935 -"Vanadium","emission/water","","221100",1 -"Vanadium compounds","emission/water","","221100",1 -"Zinc","emission/water","","221100",0.0608217141295712 -"Zinc","emission/water","","221200",1.18286434635222e-08 -"Zinc","emission/water","","221300",0.939178274041785 -"Zinc compounds","emission/water","","221100",0.995345355441044 -"Zinc compounds","emission/water","","221300",0.00465464455895608 -"Toluene","emission/water","","221200",0.000554540207029098 -"Toluene","emission/water","","221300",0.999445459792971 -"Xylene","emission/water","","221200",0.00537775995302217 -"Xylene","emission/water","","221300",0.994622240046978 -".alpha.-Endosulfan","emission/water","","221300",1 -".alpha.-Hexachlorocyclohexane","emission/water","","221300",1 -".beta.-Endosulfan","emission/water","","221300",1 -".beta.-Hexachlorocyclohexane","emission/water","","221300",1 -".delta.-Hexachlorocyclohexane","emission/water","","221300",1 -"1,1-Dichloroethane","emission/water","","221300",1 -"1,1-Dichloroethylene","emission/water","","221300",1 -"1,1,1-Trichloroethane","emission/water","","221300",1 -"1,1,2-Trichloroethane","emission/water","","221300",1 -"1,1,2,2-Tetrachloroethane","emission/water","","221300",1 -"1,2-Dichloropropane","emission/water","","221300",1 -"1,2-Diphenylhydrazine","emission/water","","221300",1 -"1,2,4-Trichlorobenzene","emission/water","","221300",1 -"1,2,4-Trimethylbenzene","emission/water","","221300",1 -"1,3-Dichloropropene","emission/water","","221300",1 -"2-Chloroethyl vinyl ether","emission/water","","221300",1 -"2-Chloronaphthalene","emission/water","","221300",1 -"2,3,7,8-Tetrachlorodibenzo-p-dioxin","emission/water","","221300",1 -"2,4-Dichlorophenol","emission/water","","221300",1 -"2,4-Dimethylphenol","emission/water","","221300",1 -"2,4-Dinitrophenol","emission/water","","221300",1 -"2,4-Dinitrotoluene","emission/water","","221300",1 -"2,4,6-Trichlorophenol","emission/water","","221300",1 -"2,6-Dinitrotoluene","emission/water","","221300",1 -"3,3'-Dichlorobenzidine","emission/water","","221300",1 -"4,6-Dinitro-o-cresol","emission/water","","221300",1 -"Acenaphthene","emission/water","","221300",1 -"Acenaphthylene","emission/water","","221300",1 -"Acetaldehyde","emission/water","","221300",1 -"Acrolein","emission/water","","221300",1 -"Acrylonitrile","emission/water","","221300",1 -"Aldrin","emission/water","","221300",1 -"Anthracene","emission/water","","221300",1 -"Aroclor 1016","emission/water","","221300",1 -"Aroclor 1221","emission/water","","221300",1 -"Aroclor 1232","emission/water","","221300",1 -"Aroclor 1242","emission/water","","221300",1 -"Aroclor 1248","emission/water","","221300",1 -"Aroclor 1254","emission/water","","221300",1 -"Aroclor 1260","emission/water","","221300",1 -"Aromatic hydrocarbons","emission/water","","221300",1 -"Atrazine","emission/water","","221300",1 -"Benz[a]anthracene","emission/water","","221300",1 -"Benzidine","emission/water","","221300",1 -"Benzo(b)fluoranthene","emission/water","","221300",1 -"Benzo[a]pyrene","emission/water","","221300",1 -"Benzo[k]fluoranthene","emission/water","","221300",1 -"Bicarbonate","emission/water","","221300",1 -"Bis(2-chloroethoxy)methane","emission/water","","221300",1 -"Bis(2-chloroethyl) ether","emission/water","","221300",1 -"Bis(2-chloroisopropyl) ether","emission/water","","221300",1 -"Bromine","emission/water","","221300",1 -"Butyl benzyl phthalate","emission/water","","221300",1 -"Carbon tetrachloride","emission/water","","221300",1 -"Carbonate","emission/water","","221300",1 -"Chlordane, technical","emission/water","","221300",1 -"Chlorobenzene","emission/water","","221300",1 -"Chlorodibromomethane","emission/water","","221300",1 -"Chloroethane","emission/water","","221300",1 -"Chloromethane","emission/water","","221300",1 -"Chlorophyll a","emission/water","","221300",1 -"Chrysene","emission/water","","221300",1 -"Cyclohexane","emission/water","","221300",1 -"Di-n-octyl phthalate","emission/water","","221300",1 -"Dibenz[a,h]anthracene","emission/water","","221300",1 -"Dibutyl phthalate","emission/water","","221300",1 -"Dichlorobromomethane","emission/water","","221300",1 -"Dieldrin","emission/water","","221300",1 -"Diethanolamine","emission/water","","221300",1 -"Diethyl phthalate","emission/water","","221300",1 -"Dimethyl phthalate","emission/water","","221300",1 -"Endosulfan sulfate","emission/water","","221300",1 -"Endrin","emission/water","","221300",1 -"Endrin aldehyde","emission/water","","221300",1 -"Ethylene glycol","emission/water","","221300",1 -"Fluoranthene","emission/water","","221300",1 -"Fluorene","emission/water","","221300",1 -"Heptachlor","emission/water","","221300",1 -"Heptachlor epoxide","emission/water","","221300",1 -"Hexachlorobenzene","emission/water","","221300",1 -"Hexachlorobutadiene","emission/water","","221300",1 -"Hexachlorocyclopentadiene","emission/water","","221300",1 -"Hexachloroethane","emission/water","","221300",1 -"Hydrocarbons, halogenated","emission/water","","221300",1 -"Hydrogen sulfide","emission/water","","221300",1 -"Indeno[1,2,3-cd]pyrene","emission/water","","221300",1 -"Isophorone","emission/water","","221300",1 -"Lindane","emission/water","","221300",1 -"m-Dichlorobenzene","emission/water","","221300",1 -"Magnesium","emission/water","","221300",1 -"Methyl bromide","emission/water","","221300",1 -"Methyl tert-butyl ether","emission/water","","221300",1 -"Methylene chloride","emission/water","","221300",1 -"N-Nitrosodi-n-propylamine","emission/water","","221300",1 -"N-Nitrosodimethylamine","emission/water","","221300",1 -"N-Nitrosodiphenylamine","emission/water","","221300",1 -"Naphthalene","emission/water","","221300",1 -"Nitrobenzene","emission/water","","221300",1 -"Nonylphenol","emission/water","","221300",1 -"o-Chlorophenol","emission/water","","221300",1 -"o-Dichlorobenzene","emission/water","","221300",1 -"o-Nitrophenol","emission/water","","221300",1 -"p-Bromophenyl phenyl ether","emission/water","","221300",1 -"p-Chloro-m-cresol","emission/water","","221300",1 -"p-Chlorophenyl phenyl ether","emission/water","","221300",1 -"p-Dichlorobenzene","emission/water","","221300",1 -"p-Nitrophenol","emission/water","","221300",1 -"p,p'-DDD","emission/water","","221300",1 -"p,p'-DDE","emission/water","","221300",1 -"p,p'-DDT","emission/water","","221300",1 -"Pentachlorophenol","emission/water","","221300",1 -"Peracetic acid","emission/water","","221300",1 -"Phenanthrene","emission/water","","221300",1 -"Phenol","emission/water","","221300",1 -"Phenols","emission/water","","221300",1 -"Polychlorinated biphenyls","emission/water","","221300",1 -"Potassium","emission/water","","221300",1 -"Pyrene","emission/water","","221300",1 -"Sodium","emission/water","","221300",1 -"Strontium","emission/water","","221300",1 -"Styrene","emission/water","","221300",1 -"Tetrachloroethylene","emission/water","","221300",1 -"Toxaphene","emission/water","","221300",1 -"trans-1,2-Dichloroethylene","emission/water","","221300",1 -"Tribromomethane","emission/water","","221300",1 -"Trichloroethylene","emission/water","","221300",1 -"Uranium","emission/water","","221300",1 -"Vinyl chloride","emission/water","","221300",1 -"Hexafluoroethane","emission/air","","221100",NA -"Hexafluoroethane","emission/air","","221200",NA -"Hexafluoroethane","emission/air","","221300",NA -"Perfluoropropane","emission/air","","221100",NA -"Perfluoropropane","emission/air","","221200",NA -"Perfluoropropane","emission/air","","221300",NA -"Perfluorocyclobutane","emission/air","","221100",NA -"Perfluorocyclobutane","emission/air","","221200",NA -"Perfluorocyclobutane","emission/air","","221300",NA -"Carbon tetrafluoride","emission/air","","221100",NA -"Carbon tetrafluoride","emission/air","","221200",NA -"Carbon tetrafluoride","emission/air","","221300",NA -"Methane","emission/air","","221100",0.0329263408794968 -"Methane","emission/air","","221200",0.433008844967677 -"Methane","emission/air","","221300",0.534064814152826 -"Carbon dioxide","emission/air","","221100",0.999356984296759 -"Carbon dioxide","emission/air","","221200",0.000423787656543493 -"Carbon dioxide","emission/air","","221300",0.000219228046697633 -"HFC-125","emission/air","","221100",NA -"HFC-125","emission/air","","221200",NA -"HFC-125","emission/air","","221300",NA -"HFC-134a","emission/air","","221100",NA -"HFC-134a","emission/air","","221200",NA -"HFC-134a","emission/air","","221300",NA -"HFC-143a","emission/air","","221100",NA -"HFC-143a","emission/air","","221200",NA -"HFC-143a","emission/air","","221300",NA -"HFC-23","emission/air","","221100",NA -"HFC-23","emission/air","","221200",NA -"HFC-23","emission/air","","221300",NA -"HFC-236fa","emission/air","","221100",NA -"HFC-236fa","emission/air","","221200",NA -"HFC-236fa","emission/air","","221300",NA -"HFC-32","emission/air","","221100",NA -"HFC-32","emission/air","","221200",NA -"HFC-32","emission/air","","221300",NA -"Nitrous oxide","emission/air","","221100",0.711955430410141 -"Nitrous oxide","emission/air","","221200",2.59631897100034e-05 -"Nitrous oxide","emission/air","","221300",0.288018606400149 -"Nitrogen trifluoride","emission/air","","221100",NA -"Nitrogen trifluoride","emission/air","","221200",NA -"Nitrogen trifluoride","emission/air","","221300",NA -"Sulfur hexafluoride","emission/air","","221100",1 -"Sulfur hexafluoride","emission/air","","221200",0 -"Sulfur hexafluoride","emission/air","","221300",0 -"Land use","resource/ground/human-dominated/industrial","","221100",1 -"Uranium","resource/ground","","221100",1 -"Energy, geothermal","resource/ground","","221100",1 -"Biomass","resource/biotic","","221100",0.999239672579092 -"Biomass","resource/biotic","","221300",0.000760327420907702 -"Energy, hydro","resource/water","","221100",0.999890504140938 -"Energy, hydro","resource/water","","221300",0.000109495859062353 -"Energy, solar","resource/air","","221100",0.999526211082044 -"Energy, solar","resource/air","","221300",0.000473788917955755 -"Energy, wind","resource/air","","221100",0.999937732386147 -"Energy, wind","resource/air","","221300",6.2267613852585e-05 -"Aluminum Cans","Waste Flows/MSW","","221100",0.752368580191692 -"Aluminum Cans","Waste Flows/MSW","","221300",0.034731710229525 -"Aluminum Cans","Waste Flows/MSW","","221200",0.212899709578783 -"Ash","Waste Flows/MSW","","221200",0.212899709616764 -"Ash","Waste Flows/MSW","","221100",0.752368580151817 -"Ash","Waste Flows/MSW","","221300",0.0347317102314194 -"Asphalt Shingles","Waste Flows/CDD","","221200",0.212899709548641 -"Asphalt Shingles","Waste Flows/CDD","","221100",0.752368580216653 -"Asphalt Shingles","Waste Flows/CDD","","221300",0.034731710234706 -"Batteries","Waste Flows/MSW","","221200",0.21289970955127 -"Batteries","Waste Flows/MSW","","221100",0.752368580221996 -"Batteries","Waste Flows/MSW","","221300",0.0347317102267343 -"Brown Glass Bottles and Containers","Waste Flows/MSW","","221200",0.212899709600987 -"Brown Glass Bottles and Containers","Waste Flows/MSW","","221100",0.752368580161846 -"Brown Glass Bottles and Containers","Waste Flows/MSW","","221300",0.0347317102371668 -"Brown Goods","Waste Flows/MSW","","221200",0.21289970958599 -"Brown Goods","Waste Flows/MSW","","221100",0.752368580191653 -"Brown Goods","Waste Flows/MSW","","221300",0.0347317102223574 -"Bulky Items","Waste Flows/MSW","","221100",0.752368580253461 -"Bulky Items","Waste Flows/MSW","","221300",0.034731710225405 -"Bulky Items","Waste Flows/MSW","","221200",0.212899709521134 -"Carpet","Waste Flows/MSW","","221100",0.752368580195973 -"Carpet","Waste Flows/MSW","","221200",0.212899709577876 -"Carpet","Waste Flows/MSW","","221300",0.0347317102261517 -"Wood","Waste Flows/CDD","","221100",0.0360977517941775 -"Wood","Waste Flows/CDD","","221300",0.00166638624776546 -"Wood","Waste Flows/CDD","","221200",0.0102146754611644 -"Wood","Waste Flows/CDD","","221100",0.353968343893987 -"Wood","Waste Flows/CDD","","221200",0.100163350272452 -"Wood","Waste Flows/CDD","","221300",0.0163402968662859 -"Wood","Waste Flows/CDD","","221200",0.079808412777503 -"Wood","Waste Flows/CDD","","221100",0.282035810848575 -"Wood","Waste Flows/CDD","","221300",0.0130196639169939 -"Wood","Waste Flows/CDD","","221300",0.00370536320061601 -"Wood","Waste Flows/CDD","","221100",0.0802666736419143 -"Wood","Waste Flows/CDD","","221200",0.0227132710785651 -"Clear Glass Bottles and Containers","Waste Flows/MSW","","221200",0.212899709547647 -"Clear Glass Bottles and Containers","Waste Flows/MSW","","221300",0.03473171022134 -"Clear Glass Bottles and Containers","Waste Flows/MSW","","221100",0.752368580231013 -"Computer-related Electronics","Waste Flows/MSW","","221300",0.034731710230177 -"Computer-related Electronics","Waste Flows/MSW","","221200",0.212899709561897 -"Computer-related Electronics","Waste Flows/MSW","","221100",0.752368580207926 -"Concrete","Waste Flows/CDD","","221300",0.0347317102414778 -"Concrete","Waste Flows/CDD","","221200",0.212899709573186 -"Concrete","Waste Flows/CDD","","221100",0.752368580185336 -"Durable Plastic Items - Number 2 and 5 Bulky Rigids","Waste Flows/MSW","","221300",0.0347317102297259 -"Durable Plastic Items - Number 2 and 5 Bulky Rigids","Waste Flows/MSW","","221100",0.752368580190669 -"Durable Plastic Items - Number 2 and 5 Bulky Rigids","Waste Flows/MSW","","221200",0.212899709579605 -"Durable Plastic Items - Other","Waste Flows/MSW","","221200",0.212899709614063 -"Durable Plastic Items - Other","Waste Flows/MSW","","221300",0.0347317102326581 -"Durable Plastic Items - Other","Waste Flows/MSW","","221100",0.752368580153279 -"Film Products","Waste Flows/MSW","","221100",0.752368580155251 -"Film Products","Waste Flows/MSW","","221300",0.0347317102259393 -"Film Products","Waste Flows/MSW","","221200",0.212899709618809 -"Flat Glass","Waste Flows/MSW","","221300",0.0347317102246929 -"Flat Glass","Waste Flows/MSW","","221100",0.752368580176105 -"Flat Glass","Waste Flows/MSW","","221200",0.212899709599202 -"Food","Waste Flows/MSW","","221100",0.752368580230101 -"Food","Waste Flows/MSW","","221300",0.0347317102248209 -"Food","Waste Flows/MSW","","221200",0.212899709545079 -"Green Glass Bottles and Containers","Waste Flows/MSW","","221100",0.752368580135576 -"Green Glass Bottles and Containers","Waste Flows/MSW","","221300",0.0347317102378338 -"Green Glass Bottles and Containers","Waste Flows/MSW","","221200",0.21289970962659 -"Gypsum Drywall","Waste Flows/CDD","","221100",0.752368580230285 -"Gypsum Drywall","Waste Flows/CDD","","221200",0.212899709539935 -"Gypsum Drywall","Waste Flows/CDD","","221300",0.0347317102297802 -"HDPE Plastic Containers","Waste Flows/MSW","","221200",0.212899709635968 -"HDPE Plastic Containers","Waste Flows/MSW","","221300",0.0347317102450287 -"HDPE Plastic Containers","Waste Flows/MSW","","221100",0.752368580119004 -"Leaves and Grass","Waste Flows/MSW","","221300",0.0347317102300042 -"Leaves and Grass","Waste Flows/MSW","","221100",0.752368580192246 -"Leaves and Grass","Waste Flows/MSW","","221200",0.21289970957775 -"Magazines and Catalogs","Waste Flows/MSW","","221200",0.212899709610666 -"Magazines and Catalogs","Waste Flows/MSW","","221100",0.752368580159833 -"Magazines and Catalogs","Waste Flows/MSW","","221300",0.0347317102295015 -"Manures","Waste Flows/MSW","","221200",0.212899709534226 -"Manures","Waste Flows/MSW","","221100",0.752368580246013 -"Manures","Waste Flows/MSW","","221300",0.0347317102197609 -"Miscellaneous Plastic Containers","Waste Flows/MSW","","221300",0.0347317102257506 -"Miscellaneous Plastic Containers","Waste Flows/MSW","","221200",0.212899709551021 -"Miscellaneous Plastic Containers","Waste Flows/MSW","","221100",0.752368580223228 -"Mixed Residue","Waste Flows/MSW","","221100",0.752368580192374 -"Mixed Residue","Waste Flows/MSW","","221300",0.0347317102333691 -"Mixed Residue","Waste Flows/MSW","","221200",0.212899709574256 -"Newspaper","Waste Flows/MSW","","221100",0.752368580195454 -"Newspaper","Waste Flows/MSW","","221300",0.0347317102271221 -"Newspaper","Waste Flows/MSW","","221200",0.212899709577424 -"Non-Bag Commercial and Industrial Packaging Film","Waste Flows/MSW","","221100",0.752368580216081 -"Non-Bag Commercial and Industrial Packaging Film","Waste Flows/MSW","","221300",0.034731710223812 -"Non-Bag Commercial and Industrial Packaging Film","Waste Flows/MSW","","221200",0.212899709560107 -"Other Ferrous","Waste Flows/MSW","","221100",0.752368580173383 -"Other Ferrous","Waste Flows/MSW","","221300",0.0347317102276057 -"Other Ferrous","Waste Flows/MSW","","221200",0.212899709599011 -"Other Film - Other","Waste Flows/MSW","","221100",0.752368580151488 -"Other Film - Other","Waste Flows/MSW","","221300",0.0347317102330971 -"Other Film - Other","Waste Flows/MSW","","221200",0.212899709615415 -"Other Miscellaneous Paper - Compostable","Waste Flows/MSW","","221100",0.752368580210728 -"Other Miscellaneous Paper - Compostable","Waste Flows/MSW","","221300",0.0347317102352825 -"Other Miscellaneous Paper - Compostable","Waste Flows/MSW","","221200",0.212899709553989 -"Other Miscellaneous Paper - Other","Waste Flows/MSW","","221100",0.752368580190779 -"Other Miscellaneous Paper - Other","Waste Flows/MSW","","221200",0.212899709580379 -"Other Miscellaneous Paper - Other","Waste Flows/MSW","","221300",0.0347317102288422 -"Other Non-Ferrous","Waste Flows/MSW","","221300",0.0347317102301099 -"Other Non-Ferrous","Waste Flows/MSW","","221100",0.752368580216978 -"Other Non-Ferrous","Waste Flows/MSW","","221200",0.212899709552912 -"Other Office Paper","Waste Flows/MSW","","221100",0.752368580151028 -"Other Office Paper","Waste Flows/MSW","","221300",0.0347317102293382 -"Other Office Paper","Waste Flows/MSW","","221200",0.212899709619634 -"Other Small Consumer Electronics","Waste Flows/MSW","","221100",0.752368580229723 -"Other Small Consumer Electronics","Waste Flows/MSW","","221200",0.212899709545158 -"Other Small Consumer Electronics","Waste Flows/MSW","","221300",0.0347317102251191 -"Paper Bags","Waste Flows/MSW","","221100",0.752368580172896 -"Paper Bags","Waste Flows/MSW","","221200",0.21289970959618 -"Paper Bags","Waste Flows/MSW","","221300",0.0347317102309238 -"PETE Plastic Containers","Waste Flows/MSW","","221200",0.212899709545876 -"PETE Plastic Containers","Waste Flows/MSW","","221100",0.752368580228084 -"PETE Plastic Containers","Waste Flows/MSW","","221300",0.0347317102260394 -"Phone Books and Directories","Waste Flows/MSW","","221100",0.75236858020103 -"Phone Books and Directories","Waste Flows/MSW","","221200",0.212899709565836 -"Phone Books and Directories","Waste Flows/MSW","","221300",0.034731710233134 -"Plastic Grocery and Other Merchandise Bags","Waste Flows/MSW","","221100",0.752368580167092 -"Plastic Grocery and Other Merchandise Bags","Waste Flows/MSW","","221200",0.212899709606903 -"Plastic Grocery and Other Merchandise Bags","Waste Flows/MSW","","221300",0.0347317102260051 -"Plastic Trash Bags","Waste Flows/MSW","","221300",0.0347317102280166 -"Plastic Trash Bags","Waste Flows/MSW","","221200",0.212899709593981 -"Plastic Trash Bags","Waste Flows/MSW","","221100",0.752368580178003 -"Prunings and Trimmings","Waste Flows/MSW","","221300",0.0347317102352355 -"Prunings and Trimmings","Waste Flows/MSW","","221200",0.212899709607407 -"Prunings and Trimmings","Waste Flows/MSW","","221100",0.752368580157357 -"Glass","Waste Flows/MSW","","221100",0.752368580252491 -"Glass","Waste Flows/MSW","","221200",0.212899709514388 -"Glass","Waste Flows/MSW","","221300",0.0347317102331214 -"Remainder/Composite Household Hazardous","Waste Flows/MSW","","221200",0.212899709566948 -"Remainder/Composite Household Hazardous","Waste Flows/MSW","","221100",0.752368580202784 -"Remainder/Composite Household Hazardous","Waste Flows/MSW","","221300",0.0347317102302683 -"Other","Waste Flows/CDD","","221200",0.2128997095422 -"Other","Waste Flows/CDD","","221300",0.0347317102385463 -"Other","Waste Flows/CDD","","221100",0.752368580219253 -"Remainder/Composite Metal","Waste Flows/MSW","","221200",0.212899709561764 -"Remainder/Composite Metal","Waste Flows/MSW","","221100",0.752368580201816 -"Remainder/Composite Metal","Waste Flows/MSW","","221300",0.0347317102364207 -"Organics","Waste Flows/MSW","","221300",0.0347317102268485 -"Organics","Waste Flows/MSW","","221200",0.212899709532057 -"Organics","Waste Flows/MSW","","221100",0.752368580241094 -"Remainder/Composite Paper - Compostable","Waste Flows/MSW","","221300",0.0347317102247669 -"Remainder/Composite Paper - Compostable","Waste Flows/MSW","","221200",0.212899709575381 -"Remainder/Composite Paper - Compostable","Waste Flows/MSW","","221100",0.752368580199852 -"Remainder/Composite Paper - Other","Waste Flows/MSW","","221100",0.752368580181532 -"Remainder/Composite Paper - Other","Waste Flows/MSW","","221200",0.212899709589114 -"Remainder/Composite Paper - Other","Waste Flows/MSW","","221300",0.0347317102293542 -"Plastic","Waste Flows/MSW","","221200",0.21289970962566 -"Plastic","Waste Flows/MSW","","221300",0.0347317102358545 -"Plastic","Waste Flows/MSW","","221100",0.752368580138486 -"Fines","Waste Flows/MSW","","221100",0.752368580213215 -"Fines","Waste Flows/MSW","","221200",0.212899709554519 -"Fines","Waste Flows/MSW","","221300",0.0347317102322659 -"Textiles","Waste Flows/MSW","","221200",0.21289970954735 -"Textiles","Waste Flows/MSW","","221300",0.0347317102335842 -"Textiles","Waste Flows/MSW","","221100",0.752368580219065 -"Tin/Steel Cans","Waste Flows/MSW","","221200",0.212899709542798 -"Tin/Steel Cans","Waste Flows/MSW","","221100",0.752368580225801 -"Tin/Steel Cans","Waste Flows/MSW","","221300",0.0347317102314009 -"Tires","Waste Flows/MSW","","221200",0.212899709579604 -"Tires","Waste Flows/MSW","","221100",0.752368580197955 -"Tires","Waste Flows/MSW","","221300",0.0347317102224411 -"Cardboard","Waste Flows/MSW","","221200",0.212899709547421 -"Cardboard","Waste Flows/MSW","","221300",0.0347317102284273 -"Cardboard","Waste Flows/MSW","","221100",0.752368580224152 -"Used Oil","Waste Flows/MSW","","221200",0.212899709551767 -"Used Oil","Waste Flows/MSW","","221300",0.0347317102333282 -"Used Oil","Waste Flows/MSW","","221100",0.752368580214905 -"Used Oil Filters","Waste Flows/MSW","","221300",0.0347317102400359 -"Used Oil Filters","Waste Flows/MSW","","221200",0.212899709585852 -"Used Oil Filters","Waste Flows/MSW","","221100",0.752368580174112 -"Video Display Devices","Waste Flows/MSW","","221100",0.752368580241927 -"Video Display Devices","Waste Flows/MSW","","221200",0.21289970953275 -"Video Display Devices","Waste Flows/MSW","","221300",0.034731710225323 -"White Ledger Paper","Waste Flows/MSW","","221100",0.752368580256075 -"White Ledger Paper","Waste Flows/MSW","","221300",0.0347317102339967 -"White Ledger Paper","Waste Flows/MSW","","221200",0.212899709509928 -"1,2-BENZENEDICARBOXYLIC ACID, DIBUTYL ESTER (OR) DIBUTYL PHTHALATE","Waste Flows/Hazardous Waste","","221100",1 -"1,2-DICHLOROETHANE","Waste Flows/Hazardous Waste","","221300",1 -"1,2,3-PROPANETRIOL, TRINITRATE (R) (OR) NITROGLYCERINE (R)","Waste Flows/Hazardous Waste","","221100",1 -"1,4-DICHLOROBENZENE","Waste Flows/Hazardous Waste","","221200",1 -"2-BUTANONE (I,T) (OR) METHYL ETHYL KETONE (MEK) (I,T)","Waste Flows/Hazardous Waste","","221100",1 -"2-BUTANONE, PEROXIDE (R,T) (OR) METHYL ETHYL KETONE PEROXIDE (R,T)","Waste Flows/Hazardous Waste","","221100",1 -"2-PROPANONE (I) (OR) ACETONE (I)","Waste Flows/Hazardous Waste","","221100",1 -"2-PROPENAMIDE (OR) ACRYLAMIDE","Waste Flows/Hazardous Waste","","221100",1 -"2-PROPENOIC ACID (I) (OR) ACRYLIC ACID (I)","Waste Flows/Hazardous Waste","","221100",1 -"2,4-D (2,4-DICHLOROPHENOXYACETIC ACID)","Waste Flows/Hazardous Waste","","221100",1 -"2,4-D, SALTS & ESTERS (OR) ACETIC ACID, (2,4-DICHLOROPHENOXY)-, SALTS & ESTERS (OR) DICHLOROPHENOXYACETIC ACID 2,4-D","Waste Flows/Hazardous Waste","","221100",1 -"2,4-DINITROPHENOL (OR) PHENOL, 2,4-DINITRO-","Waste Flows/Hazardous Waste","","221100",1 -"ACETIC ACID, LEAD(2+) SALT (OR) LEAD ACETATE","Waste Flows/Hazardous Waste","","221300",1 -"ACIDIC AQUEOUS WST","Waste Flows/Hazardous Waste","","221300",0.0609072835712995 -"ACIDIC AQUEOUS WST","Waste Flows/Hazardous Waste","","221100",0.939092716428701 -"ALPHA,ALPHA-DIMETHYLBENZYLHYDROPEROXIDE (R) (OR) HYDROPEROXIDE, 1-METHYL-1-PHENYLETHYL- (R)","Waste Flows/Hazardous Waste","","221100",1 -"ANILINE (I,T) (OR) BENZENAMINE (I,T)","Waste Flows/Hazardous Waste","","221100",1 -"AQUEOUS W/O CYANIDES","Waste Flows/Hazardous Waste","","221300",0.0144328002486448 -"AQUEOUS W/O CYANIDES","Waste Flows/Hazardous Waste","","221100",0.985567199751355 -"AQUEOUS/CYANIDES","Waste Flows/Hazardous Waste","","221300",0.00170164492342598 -"AQUEOUS/CYANIDES","Waste Flows/Hazardous Waste","","221100",0.998298355076574 -"ARSENIC","Waste Flows/Hazardous Waste","","221300",0.00418967469407883 -"ARSENIC","Waste Flows/Hazardous Waste","","221200",0.197899463272437 -"ARSENIC","Waste Flows/Hazardous Waste","","221100",0.797910862033484 -"ASH","Waste Flows/Hazardous Waste","","221100",0.385142878614237 -"ASH","Waste Flows/Hazardous Waste","","221300",0.614857121385763 -"BARIUM","Waste Flows/Hazardous Waste","","221200",0.240677966101695 -"BARIUM","Waste Flows/Hazardous Waste","","221300",0.0277966101694915 -"BARIUM","Waste Flows/Hazardous Waste","","221100",0.731525423728814 -"BENZENE","Waste Flows/Hazardous Waste","","221100",0.340964259072098 -"BENZENE","Waste Flows/Hazardous Waste","","221200",0.658881330530499 -"BENZENE","Waste Flows/Hazardous Waste","","221300",0.000154410397403398 -"BENZENE (I,T)","Waste Flows/Hazardous Waste","","221200",1 -"BENZENE, 1,3-DIISOCYANATOMETHYL- (R,T) (OR) TOLUENE DIISOCYANATE (R,T)","Waste Flows/Hazardous Waste","","221100",1 -"BENZENE, DIMETHYL- (I,T) (OR) XYLENE (I)","Waste Flows/Hazardous Waste","","221100",1 -"BENZENE, METHYL- (OR) TOLUENE","Waste Flows/Hazardous Waste","","221100",1 -"BENZENEDIAMINE, AR-METHYL- (OR) TOLUENEDIAMINE","Waste Flows/Hazardous Waste","","221200",1 -"CADMIUM","Waste Flows/Hazardous Waste","","221200",0.125432208577037 -"CADMIUM","Waste Flows/Hazardous Waste","","221100",0.848961600215172 -"CADMIUM","Waste Flows/Hazardous Waste","","221300",0.0256061912077912 -"CARBON TETRACHLORIDE","Waste Flows/Hazardous Waste","","221100",1 -"CARBON TETRACHLORIDE (OR) METHANE, TETRACHLORO-","Waste Flows/Hazardous Waste","","221100",1 -"CHLOROFORM","Waste Flows/Hazardous Waste","","221300",1 -"CHLOROFORM (OR) METHANE, TRICHLORO-","Waste Flows/Hazardous Waste","","221300",0.153846153846154 -"CHLOROFORM (OR) METHANE, TRICHLORO-","Waste Flows/Hazardous Waste","","221100",0.846153846153846 -"CHROMIUM","Waste Flows/Hazardous Waste","","221200",0.0174997826009602 -"CHROMIUM","Waste Flows/Hazardous Waste","","221100",0.590126611379664 -"CHROMIUM","Waste Flows/Hazardous Waste","","221300",0.392373606019376 -"COMPRESSED GAS","Waste Flows/Hazardous Waste","","221200",0.477937565766398 -"COMPRESSED GAS","Waste Flows/Hazardous Waste","","221100",0.519326552086987 -"COMPRESSED GAS","Waste Flows/Hazardous Waste","","221300",0.00273588214661522 -"CONT. DEBRIS","Waste Flows/Hazardous Waste","","221200",0.594329424075642 -"CONT. DEBRIS","Waste Flows/Hazardous Waste","","221300",0.0365845154239022 -"CONT. DEBRIS","Waste Flows/Hazardous Waste","","221100",0.369086060500456 -"CONTAMINATED SOIL","Waste Flows/Hazardous Waste","","221200",0.000393776342162883 -"CONTAMINATED SOIL","Waste Flows/Hazardous Waste","","221300",0.87753663066436 -"CONTAMINATED SOIL","Waste Flows/Hazardous Waste","","221100",0.122069592993477 -"CORROSIVE WASTE","Waste Flows/Hazardous Waste","","221200",0.105118030565648 -"CORROSIVE WASTE","Waste Flows/Hazardous Waste","","221300",0.546573487322911 -"CORROSIVE WASTE","Waste Flows/Hazardous Waste","","221100",0.348308482111442 -"CRESOL","Waste Flows/Hazardous Waste","","221200",1 -"CYANIDE","Waste Flows/Hazardous Waste","","221100",1 -"CYANIDES (SOLUBLE CYANIDE SALTS), NOT OTHERWISE SPECIFIED","Waste Flows/Hazardous Waste","","221100",1 -"CYANOGEN BROMIDE (CN)BR","Waste Flows/Hazardous Waste","","221300",1 -"DICHLORODIFLUOROMETHANE (OR) METHANE, DICHLORODIFLUORO-","Waste Flows/Hazardous Waste","","221100",1 -"DILUTE AQUEOUS WST","Waste Flows/Hazardous Waste","","221200",0.00181994343772913 -"DILUTE AQUEOUS WST","Waste Flows/Hazardous Waste","","221100",0.998180056562271 -"DRIED PAINT","Waste Flows/Hazardous Waste","","221200",0.671851368101491 -"DRIED PAINT","Waste Flows/Hazardous Waste","","221100",0.328148631898509 -"ELECTRICAL DEVICES","Waste Flows/Hazardous Waste","","221100",1 -"ETHANE, 1,1,1-TRICHLORO- (OR) METHYL CHLOROFORM","Waste Flows/Hazardous Waste","","221100",1 -"ETHANE, 1,2-DICHLORO- (OR) ETHYLENE DICHLORIDE","Waste Flows/Hazardous Waste","","221100",1 -"EXPLOSIVES, ETC.","Waste Flows/Hazardous Waste","","221200",0.911214953271028 -"EXPLOSIVES, ETC.","Waste Flows/Hazardous Waste","","221100",0.0887850467289719 -"FORMIC ACID (C,T)","Waste Flows/Hazardous Waste","","221100",1 -"HALOGENATED SOLVENT","Waste Flows/Hazardous Waste","","221300",0.00929091719934592 -"HALOGENATED SOLVENT","Waste Flows/Hazardous Waste","","221100",0.904563698528319 -"HALOGENATED SOLVENT","Waste Flows/Hazardous Waste","","221200",0.0861453842723354 -"HYDRAZINE (R,T)","Waste Flows/Hazardous Waste","","221100",1 -"HYDROFLUORIC ACID (C,T) (OR) HYDROGEN FLUORIDE (C,T)","Waste Flows/Hazardous Waste","","221300",1 -"HYDROGEN SULFIDE (OR) HYDROGEN SULFIDE H2S","Waste Flows/Hazardous Waste","","221100",1 -"IGNITABLE WASTE","Waste Flows/Hazardous Waste","","221200",0.112008365739537 -"IGNITABLE WASTE","Waste Flows/Hazardous Waste","","221100",0.802825594462651 -"IGNITABLE WASTE","Waste Flows/Hazardous Waste","","221300",0.0851660397978119 -"LAB PACK","Waste Flows/Hazardous Waste","","221100",1 -"LAB PACKS/ACUTE","Waste Flows/Hazardous Waste","","221100",0.806912991656734 -"LAB PACKS/ACUTE","Waste Flows/Hazardous Waste","","221300",0.193087008343266 -"LAB PACKS/NO ACUTE","Waste Flows/Hazardous Waste","","221200",0.150758894432306 -"LAB PACKS/NO ACUTE","Waste Flows/Hazardous Waste","","221100",0.669505305100102 -"LAB PACKS/NO ACUTE","Waste Flows/Hazardous Waste","","221300",0.179735800467592 -"LEAD","Waste Flows/Hazardous Waste","","221200",0.0948920855335172 -"LEAD","Waste Flows/Hazardous Waste","","221100",0.890913158388566 -"LEAD","Waste Flows/Hazardous Waste","","221300",0.0141947560779172 -"MERCURY","Waste Flows/Hazardous Waste","","221100",0.984049433554063 -"MERCURY","Waste Flows/Hazardous Waste","","221200",0.000590360158264397 -"MERCURY","Waste Flows/Hazardous Waste","","221300",0.0153602062876724 -"METAL BEARING SLUDGE","Waste Flows/Hazardous Waste","","221100",1 -"METAL SALTS/CHEM.","Waste Flows/Hazardous Waste","","221100",1 -"METAL SCALE, ETC.","Waste Flows/Hazardous Waste","","221100",1 -"METHANE, DICHLORO- (OR) METHYLENE CHLORIDE","Waste Flows/Hazardous Waste","","221100",1 -"METHANE, TRICHLOROFLUORO- (OR) TRICHLOROMONOFLUOROMETHANE","Waste Flows/Hazardous Waste","","221100",1 -"METHANOL (I) (OR) METHYL ALCOHOL (I)","Waste Flows/Hazardous Waste","","221100",1 -"METHYL ETHYL KETONE","Waste Flows/Hazardous Waste","","221100",1 -"NAPHTHALENE","Waste Flows/Hazardous Waste","","221200",0.39160218191044 -"NAPHTHALENE","Waste Flows/Hazardous Waste","","221100",0.60839781808956 -"NONHALOGEN. SOLVENT","Waste Flows/Hazardous Waste","","221100",0.928323391722217 -"NONHALOGEN. SOLVENT","Waste Flows/Hazardous Waste","","221200",0.0514313648422982 -"NONHALOGEN. SOLVENT","Waste Flows/Hazardous Waste","","221300",0.0202452434354851 -"OIL-WATER EMULSION","Waste Flows/Hazardous Waste","","221100",0.0887138254187054 -"OIL-WATER EMULSION","Waste Flows/Hazardous Waste","","221300",0.0892992119038422 -"OIL-WATER EMULSION","Waste Flows/Hazardous Waste","","221200",0.821986962677452 -"OILY SLUDGE","Waste Flows/Hazardous Waste","","221300",0.712810770628562 -"OILY SLUDGE","Waste Flows/Hazardous Waste","","221200",0.287189229371438 -"OTH INORGANIC LIQUID","Waste Flows/Hazardous Waste","","221200",0.419418590234943 -"OTH INORGANIC LIQUID","Waste Flows/Hazardous Waste","","221100",0.353447219994932 -"OTH INORGANIC LIQUID","Waste Flows/Hazardous Waste","","221300",0.227134189770126 -"OTH INORGANIC SLUDGE","Waste Flows/Hazardous Waste","","221100",1 -"OTH INORGANIC SOLIDS","Waste Flows/Hazardous Waste","","221100",0.873850197109067 -"OTH INORGANIC SOLIDS","Waste Flows/Hazardous Waste","","221300",0.00171963465874986 -"OTH INORGANIC SOLIDS","Waste Flows/Hazardous Waste","","221200",0.124430168232183 -"OTH ORGANIC LIQUID","Waste Flows/Hazardous Waste","","221100",0.232168658353881 -"OTH ORGANIC LIQUID","Waste Flows/Hazardous Waste","","221200",0.114657269427326 -"OTH ORGANIC LIQUID","Waste Flows/Hazardous Waste","","221300",0.653174072218793 -"OTH ORGANIC SOLIDS","Waste Flows/Hazardous Waste","","221200",0.477197221383268 -"OTH ORGANIC SOLIDS","Waste Flows/Hazardous Waste","","221300",0.0151011778918756 -"OTH ORGANIC SOLIDS","Waste Flows/Hazardous Waste","","221100",0.507701600724856 -"OTHER AQUEOUS WST","Waste Flows/Hazardous Waste","","221200",0.496688609430238 -"OTHER AQUEOUS WST","Waste Flows/Hazardous Waste","","221300",0.00249597121781433 -"OTHER AQUEOUS WST","Waste Flows/Hazardous Waste","","221100",0.500815419351948 -"OTHER ORGANIC SLUDGE","Waste Flows/Hazardous Waste","","221100",0.0547913906835733 -"OTHER ORGANIC SLUDGE","Waste Flows/Hazardous Waste","","221200",0.945208609316427 -"OTHER SLUDGES","Waste Flows/Hazardous Waste","","221200",0.570753001091306 -"OTHER SLUDGES","Waste Flows/Hazardous Waste","","221100",0.429246998908694 -"PAINT THINNER","Waste Flows/Hazardous Waste","","221300",0.0160299645744285 -"PAINT THINNER","Waste Flows/Hazardous Waste","","221200",0.0251192439883047 -"PAINT THINNER","Waste Flows/Hazardous Waste","","221100",0.958850791437267 -"PAINT, INK SLUDGE","Waste Flows/Hazardous Waste","","221300",1 -"PAINT, INK, ETC.","Waste Flows/Hazardous Waste","","221100",0.818077790897941 -"PAINT, INK, ETC.","Waste Flows/Hazardous Waste","","221300",0.0297826082049426 -"PAINT, INK, ETC.","Waste Flows/Hazardous Waste","","221200",0.152139600897116 -"PESTICIDE SOLIDS","Waste Flows/Hazardous Waste","","221100",1 -"PHENOL","Waste Flows/Hazardous Waste","","221200",0.851063829787234 -"PHENOL","Waste Flows/Hazardous Waste","","221300",0.148936170212766 -"POTASSIUM CYANIDE (OR) POTASSIUM CYANIDE K(CN)","Waste Flows/Hazardous Waste","","221300",1 -"PYRIDINE","Waste Flows/Hazardous Waste","","221300",1 -"REACTIVE ORG. LIQUID","Waste Flows/Hazardous Waste","","221200",0.319936012797441 -"REACTIVE ORG. LIQUID","Waste Flows/Hazardous Waste","","221100",0.678664267146571 -"REACTIVE ORG. LIQUID","Waste Flows/Hazardous Waste","","221300",0.0013997200559888 -"REACTIVE WASTE","Waste Flows/Hazardous Waste","","221300",0.000778434965635227 -"REACTIVE WASTE","Waste Flows/Hazardous Waste","","221100",0.999221565034365 -"SELENIUM","Waste Flows/Hazardous Waste","","221300",0.540896785163106 -"SELENIUM","Waste Flows/Hazardous Waste","","221200",0.000316495563336822 -"SELENIUM","Waste Flows/Hazardous Waste","","221100",0.458786719273557 -"SILVER","Waste Flows/Hazardous Waste","","221300",0.072490253411306 -"SILVER","Waste Flows/Hazardous Waste","","221100",0.927509746588694 -"SODIUM AZIDE","Waste Flows/Hazardous Waste","","221300",1 -"SODIUM CYANIDE (OR) SODIUM CYANIDE NA(CN)","Waste Flows/Hazardous Waste","","221300",1 -"SOLVENT MIXTURE","Waste Flows/Hazardous Waste","","221200",0.973978442680729 -"SOLVENT MIXTURE","Waste Flows/Hazardous Waste","","221100",0.0260215573192707 -"SPENT ACID","Waste Flows/Hazardous Waste","","221300",0.985030867383809 -"SPENT ACID","Waste Flows/Hazardous Waste","","221100",0.0149691326161914 -"SPENT CYANIDE PLATING BATH SOLUTIONS FROM ELECTROPLATING OPERATIONS.","Waste Flows/Hazardous Waste","","221100",1 -"SPENT FILTERS","Waste Flows/Hazardous Waste","","221300",0.0353961812510624 -"SPENT FILTERS","Waste Flows/Hazardous Waste","","221200",0.853827129373111 -"SPENT FILTERS","Waste Flows/Hazardous Waste","","221100",0.110776689375827 -"STILL BOTTOMS","Waste Flows/Hazardous Waste","","221300",1 -"TETRACHLOROETHYLENE","Waste Flows/Hazardous Waste","","221300",0.00549833512752085 -"TETRACHLOROETHYLENE","Waste Flows/Hazardous Waste","","221200",0.00194361862698472 -"TETRACHLOROETHYLENE","Waste Flows/Hazardous Waste","","221100",0.992558046245494 -"THE FOLLOWING SPENT HALOGENATED SOLVENTS USED IN DEGREASING: TETRACHLOROETHYLENE, TRICHLORETHYLENE, METHYLENE CHLORIDE, 1,1,1-TRICHLOROETHANE, CARBON TETRACHLORIDE AND CHLORINATED FLUOROCARBONS; ALL SPENT SOLVENT MIXTURES/BLENDS USED IN DEGREASING CONTAIN","Waste Flows/Hazardous Waste","","221300",0.10623070026214 -"THE FOLLOWING SPENT HALOGENATED SOLVENTS USED IN DEGREASING: TETRACHLOROETHYLENE, TRICHLORETHYLENE, METHYLENE CHLORIDE, 1,1,1-TRICHLOROETHANE, CARBON TETRACHLORIDE AND CHLORINATED FLUOROCARBONS; ALL SPENT SOLVENT MIXTURES/BLENDS USED IN DEGREASING CONTAIN","Waste Flows/Hazardous Waste","","221100",0.89376929973786 -"THE FOLLOWING SPENT HALOGENATED SOLVENTS: TETRACHLOROETHYLENE, METHYLENE CHLORIDE, TRICHLOROETHYLENE, 1,1,1-TRICHLOROETHANE, CHLOROBENZENE, 1,1,2-TRICHLORO-1,2,2-TRIFLUOROETHANE, ORTHO-DICHLOROBENZENE, TRICHLOROFLUOROMETHANE, AND 1,1,2, TRICHLOROETHANE; A","Waste Flows/Hazardous Waste","","221300",0.00405100238179835 -"THE FOLLOWING SPENT HALOGENATED SOLVENTS: TETRACHLOROETHYLENE, METHYLENE CHLORIDE, TRICHLOROETHYLENE, 1,1,1-TRICHLOROETHANE, CHLOROBENZENE, 1,1,2-TRICHLORO-1,2,2-TRIFLUOROETHANE, ORTHO-DICHLOROBENZENE, TRICHLOROFLUOROMETHANE, AND 1,1,2, TRICHLOROETHANE; A","Waste Flows/Hazardous Waste","","221200",0.741885695402534 -"THE FOLLOWING SPENT HALOGENATED SOLVENTS: TETRACHLOROETHYLENE, METHYLENE CHLORIDE, TRICHLOROETHYLENE, 1,1,1-TRICHLOROETHANE, CHLOROBENZENE, 1,1,2-TRICHLORO-1,2,2-TRIFLUOROETHANE, ORTHO-DICHLOROBENZENE, TRICHLOROFLUOROMETHANE, AND 1,1,2, TRICHLOROETHANE; A","Waste Flows/Hazardous Waste","","221100",0.254063302215668 -"THE FOLLOWING SPENT NONHALOGENATED SOLVENTS: CRESOLS, CRESYLIC ACID, AND NITROBENZENE; AND THE STILL BOTTOMS FROM THE RECOVERY OF THESE SOLVENTS; ALL SPENT SOLVENT MIXTURES/BLENDS CONTAINING, BEFORE USE, A TOTAL OF TEN PERCENT OR MORE (BY VOLUME) OF ONE O","Waste Flows/Hazardous Waste","","221100",1 -"THE FOLLOWING SPENT NONHALOGENATED SOLVENTS: TOLUENE, METHYL ETHYL KETONE, CARBON DISULFIDE, ISOBUTANOL, PYRIDINE, BENZENE, 2-ETHOXYETHANOL, AND 2-NITROPROPANE; ALL SPENT SOLVENT MIXTURES/BLENDS CONTAINING, BEFORE USE, A TOTAL OF TEN PERCENT OR MORE (BY V","Waste Flows/Hazardous Waste","","221300",0.00504023667607368 -"THE FOLLOWING SPENT NONHALOGENATED SOLVENTS: TOLUENE, METHYL ETHYL KETONE, CARBON DISULFIDE, ISOBUTANOL, PYRIDINE, BENZENE, 2-ETHOXYETHANOL, AND 2-NITROPROPANE; ALL SPENT SOLVENT MIXTURES/BLENDS CONTAINING, BEFORE USE, A TOTAL OF TEN PERCENT OR MORE (BY V","Waste Flows/Hazardous Waste","","221100",0.994959763323926 -"THE FOLLOWING SPENT NONHALOGENATED SOLVENTS: XYLENE, ACETONE, ETHYL ACETATE, ETHYL BENZENE, ETHYL ETHER, METHYL ISOBUTYL KETONE, N-BUTYL ALCOHOL, CYCLOHEXANONE, AND METHANOL; ALL SPENT SOLVENT MIXTURES/BLENDS CONTAINING, BEFORE USE, ONLY THE ABOVE SPENT N","Waste Flows/Hazardous Waste","","221100",0.608334511954014 -"THE FOLLOWING SPENT NONHALOGENATED SOLVENTS: XYLENE, ACETONE, ETHYL ACETATE, ETHYL BENZENE, ETHYL ETHER, METHYL ISOBUTYL KETONE, N-BUTYL ALCOHOL, CYCLOHEXANONE, AND METHANOL; ALL SPENT SOLVENT MIXTURES/BLENDS CONTAINING, BEFORE USE, ONLY THE ABOVE SPENT N","Waste Flows/Hazardous Waste","","221200",0.335545442342479 -"THE FOLLOWING SPENT NONHALOGENATED SOLVENTS: XYLENE, ACETONE, ETHYL ACETATE, ETHYL BENZENE, ETHYL ETHER, METHYL ISOBUTYL KETONE, N-BUTYL ALCOHOL, CYCLOHEXANONE, AND METHANOL; ALL SPENT SOLVENT MIXTURES/BLENDS CONTAINING, BEFORE USE, ONLY THE ABOVE SPENT N","Waste Flows/Hazardous Waste","","221300",0.0561200457035062 -"TRICHLORETHYLENE","Waste Flows/Hazardous Waste","","221100",1 -"VANADIUM OXIDE V2O5 (OR) VANADIUM PENTOXIDE","Waste Flows/Hazardous Waste","","221100",1 -"VINYL CHLORIDE","Waste Flows/Hazardous Waste","","221100",1 -"WASTE OIL","Waste Flows/Hazardous Waste","","221200",0.429970151838564 -"WASTE OIL","Waste Flows/Hazardous Waste","","221300",0.0892240028427213 -"WASTE OIL","Waste Flows/Hazardous Waste","","221100",0.480805845318715 -"Jobs","","","221100",0.589698645245311 -"Jobs","","","221200",0.145652746560184 -"Jobs","","","221300",0.264648608194506 -"Compensation of employees","","","221100",0.780805619266055 -"Compensation of employees","","","221200",0.161983944954128 -"Compensation of employees","","","221300",0.0572104357798165 -"Gross operating surplus","","","221100",0.786933022467147 -"Gross operating surplus","","","221200",0.191248940228911 -"Gross operating surplus","","","221300",0.0218180373039423 -"Taxes on production and imports, less subsidies","","","221100",0.838787426166067 -"Taxes on production and imports, less subsidies","","","221200",0.141574444972503 -"Taxes on production and imports, less subsidies","","","221300",0.0196381288614298 From 0d4b9159384e6abb45fe5bdbbb553e23ec126b4e Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 29 Feb 2024 12:42:48 -0500 Subject: [PATCH 096/121] move disaggregation specs from stateior to useeior see https://github.com/USEPA/useeior/commit/4b8f1194baee07dd69b3af72d0a310f3d5ce656f --- DESCRIPTION | 2 +- .../disaggspecs/UtilityDisaggregation.yml | 2 +- .../UtilityDisaggregationSummary_Make.csv | 46 -- .../UtilityDisaggregationSummary_Use.csv | 397 ------------------ 4 files changed, 2 insertions(+), 445 deletions(-) delete mode 100644 inst/extdata/disaggspecs/UtilityDisaggregationSummary_Make.csv delete mode 100644 inst/extdata/disaggspecs/UtilityDisaggregationSummary_Use.csv diff --git a/DESCRIPTION b/DESCRIPTION index ab4840f4..1fd7dcd1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -40,7 +40,7 @@ Imports: Depends: R (>= 3.6) Remotes: - github::USEPA/useeior@v1.4.0 + github::USEPA/useeior@2r_disagg License: file LICENSE Encoding: UTF-8 LazyData: true diff --git a/inst/extdata/disaggspecs/UtilityDisaggregation.yml b/inst/extdata/disaggspecs/UtilityDisaggregation.yml index abf83371..40f26358 100644 --- a/inst/extdata/disaggspecs/UtilityDisaggregation.yml +++ b/inst/extdata/disaggspecs/UtilityDisaggregation.yml @@ -6,4 +6,4 @@ Disaggregation: SectorFile: UtilityDisaggregation_Sectors.csv MakeFile: UtilityDisaggregationSummary_Make.csv # Ratios from 2012 US Make table UseFile: UtilityDisaggregationSummary_Use.csv # Ratios from 2012 US Use table - package: "stateior" + package: "useeior" diff --git a/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Make.csv b/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Make.csv deleted file mode 100644 index 5cd96400..00000000 --- a/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Make.csv +++ /dev/null @@ -1,46 +0,0 @@ -"IndustryCode","CommodityCode","PercentMake","Note" -"221100/US","221100/US",0.781090503048714,"IntersectionDisagg" -"221200/US","221100/US",0.000439612613365103,"IntersectionDisagg" -"221300/US","221100/US",0.00055830801897368,"IntersectionDisagg" -"221100/US","221200/US",0.0170679597139001,"IntersectionDisagg" -"221200/US","221200/US",0.174154734847652,"IntersectionDisagg" -"221300/US","221200/US",0.000153864414677786,"IntersectionDisagg" -"221100/US","221300/US",0.00225521270656298,"IntersectionDisagg" -"221200/US","221300/US",0,"IntersectionDisagg" -"221300/US","221300/US",0.0242798046361546,"IntersectionDisagg" -"486/US","221100/US",0,"CommodityDisagg" -"486/US","221200/US",1,"CommodityDisagg" -"486/US","221300/US",0,"CommodityDisagg" -"GFE/US","221100/US",1,"CommodityDisagg" -"GFE/US","221200/US",0,"CommodityDisagg" -"GFE/US","221300/US",0,"CommodityDisagg" -"GSLG/US","221100/US",0,"CommodityDisagg" -"GSLG/US","221200/US",0,"CommodityDisagg" -"GSLG/US","221300/US",1,"CommodityDisagg" -"GSLE/US","221100/US",0.485727541327864,"CommodityDisagg" -"GSLE/US","221200/US",0.0557712499694772,"CommodityDisagg" -"GSLE/US","221300/US",0.458501208702659,"CommodityDisagg" -"GFGN/US","221100/US",0,"CommodityDisagg" -"GFGN/US","221200/US",0,"CommodityDisagg" -"GFGN/US","221300/US",1,"CommodityDisagg" -"221100/US","211/US",0,"IndustryDisagg" -"221200/US","211/US",1,"IndustryDisagg" -"221300/US","211/US",0,"IndustryDisagg" -"221100/US","23/US",0.86417221937468,"IndustryDisagg" -"221200/US","23/US",0.13070220399795,"IndustryDisagg" -"221300/US","23/US",0.00512557662737058,"IndustryDisagg" -"221100/US","4A0/US",0.722222222222222,"IndustryDisagg" -"221200/US","4A0/US",0.222222222222222,"IndustryDisagg" -"221300/US","4A0/US",0.0555555555555556,"IndustryDisagg" -"221100/US","486/US",0.281609195402299,"IndustryDisagg" -"221200/US","486/US",0.718390804597701,"IndustryDisagg" -"221300/US","486/US",0,"IndustryDisagg" -"221100/US","5412OP/US",0.811023622047244,"IndustryDisagg" -"221200/US","5412OP/US",0.165354330708661,"IndustryDisagg" -"221300/US","5412OP/US",0.0236220472440945,"IndustryDisagg" -"221100/US","5415/US",0.748815165876777,"IndustryDisagg" -"221200/US","5415/US",0.23696682464455,"IndustryDisagg" -"221300/US","5415/US",0.014218009478673,"IndustryDisagg" -"221100/US","GSLE/US",0,"IndustryDisagg" -"221200/US","GSLE/US",0,"IndustryDisagg" -"221300/US","GSLE/US",1,"IndustryDisagg" diff --git a/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Use.csv b/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Use.csv deleted file mode 100644 index b611c795..00000000 --- a/inst/extdata/disaggspecs/UtilityDisaggregationSummary_Use.csv +++ /dev/null @@ -1,397 +0,0 @@ -"IndustryCode","CommodityCode","PercentUsed","Note" -"221100/US","221100/US",0.558191280736159,"IntersectionDisagg" -"221100/US","221200/US",0.0356388595564942,"IntersectionDisagg" -"221100/US","221300/US",0.00365816865288882,"IntersectionDisagg" -"221200/US","221100/US",0.00577010107105144,"IntersectionDisagg" -"221200/US","221200/US",0.000339417710061849,"IntersectionDisagg" -"221200/US","221300/US",0.00109367928797707,"IntersectionDisagg" -"221300/US","221100/US",0.388897269573088,"IntersectionDisagg" -"221300/US","221200/US",0.00241363704932871,"IntersectionDisagg" -"221300/US","221300/US",0.00399758636295067,"IntersectionDisagg" -"221100/US","211/US",0.412882745318653,"IndustryDisagg" -"221200/US","211/US",0.586474322912481,"IndustryDisagg" -"221300/US","211/US",0.000642931768866029,"IndustryDisagg" -"221100/US","212/US",0.985088536812675,"IndustryDisagg" -"221200/US","212/US",9.31966449207829e-05,"IndustryDisagg" -"221300/US","212/US",0.0148182665424045,"IndustryDisagg" -"221100/US","23/US",0.941456126052703,"IndustryDisagg" -"221200/US","23/US",0.0468622656886716,"IndustryDisagg" -"221300/US","23/US",0.0116816082586254,"IndustryDisagg" -"221100/US","315AL/US",1,"IndustryDisagg" -"221200/US","315AL/US",0,"IndustryDisagg" -"221300/US","315AL/US",0,"IndustryDisagg" -"221100/US","322/US",1,"IndustryDisagg" -"221200/US","322/US",0,"IndustryDisagg" -"221300/US","322/US",0,"IndustryDisagg" -"221100/US","323/US",0,"IndustryDisagg" -"221200/US","323/US",1,"IndustryDisagg" -"221300/US","323/US",0,"IndustryDisagg" -"221100/US","324/US",0.989391588745859,"IndustryDisagg" -"221200/US","324/US",0.00109019246089983,"IndustryDisagg" -"221300/US","324/US",0.00951821879324081,"IndustryDisagg" -"221100/US","325/US",0.890488431876607,"IndustryDisagg" -"221200/US","325/US",0.00359897172236504,"IndustryDisagg" -"221300/US","325/US",0.105912596401028,"IndustryDisagg" -"221100/US","326/US",1,"IndustryDisagg" -"221200/US","326/US",0,"IndustryDisagg" -"221300/US","326/US",0,"IndustryDisagg" -"221100/US","327/US",0.849056603773585,"IndustryDisagg" -"221200/US","327/US",0,"IndustryDisagg" -"221300/US","327/US",0.150943396226415,"IndustryDisagg" -"221100/US","331/US",1,"IndustryDisagg" -"221200/US","331/US",0,"IndustryDisagg" -"221300/US","331/US",0,"IndustryDisagg" -"221100/US","332/US",0.290960451977401,"IndustryDisagg" -"221200/US","332/US",0.703389830508475,"IndustryDisagg" -"221300/US","332/US",0.00564971751412429,"IndustryDisagg" -"221100/US","333/US",0.994953742640875,"IndustryDisagg" -"221200/US","333/US",0.00504625735912532,"IndustryDisagg" -"221300/US","333/US",0,"IndustryDisagg" -"221100/US","334/US",0.789473684210526,"IndustryDisagg" -"221200/US","334/US",0.0701754385964912,"IndustryDisagg" -"221300/US","334/US",0.140350877192982,"IndustryDisagg" -"221100/US","335/US",0.866666666666667,"IndustryDisagg" -"221200/US","335/US",0,"IndustryDisagg" -"221300/US","335/US",0.133333333333333,"IndustryDisagg" -"221100/US","3361MV/US",1,"IndustryDisagg" -"221200/US","3361MV/US",0,"IndustryDisagg" -"221300/US","3361MV/US",0,"IndustryDisagg" -"221100/US","42/US",0.784766013939595,"IndustryDisagg" -"221200/US","42/US",0.177729837371391,"IndustryDisagg" -"221300/US","42/US",0.0375041486890143,"IndustryDisagg" -"221100/US","441/US",1,"IndustryDisagg" -"221200/US","441/US",0,"IndustryDisagg" -"221300/US","441/US",0,"IndustryDisagg" -"221100/US","4A0/US",0.997142857142857,"IndustryDisagg" -"221200/US","4A0/US",0.000952380952380952,"IndustryDisagg" -"221300/US","4A0/US",0.0019047619047619,"IndustryDisagg" -"221100/US","445/US",1,"IndustryDisagg" -"221200/US","445/US",0,"IndustryDisagg" -"221300/US","445/US",0,"IndustryDisagg" -"221100/US","452/US",1,"IndustryDisagg" -"221200/US","452/US",0,"IndustryDisagg" -"221300/US","452/US",0,"IndustryDisagg" -"221100/US","481/US",0.768856447688564,"IndustryDisagg" -"221200/US","481/US",0.218978102189781,"IndustryDisagg" -"221300/US","481/US",0.0121654501216545,"IndustryDisagg" -"221100/US","482/US",0.952900232018561,"IndustryDisagg" -"221200/US","482/US",0.0299303944315545,"IndustryDisagg" -"221300/US","482/US",0.017169373549884,"IndustryDisagg" -"221100/US","483/US",0.934472934472934,"IndustryDisagg" -"221200/US","483/US",0.0142450142450142,"IndustryDisagg" -"221300/US","483/US",0.0512820512820513,"IndustryDisagg" -"221100/US","484/US",0.896374622356495,"IndustryDisagg" -"221200/US","484/US",0.00241691842900302,"IndustryDisagg" -"221300/US","484/US",0.101208459214502,"IndustryDisagg" -"221100/US","485/US",0.267195767195767,"IndustryDisagg" -"221200/US","485/US",0.73015873015873,"IndustryDisagg" -"221300/US","485/US",0.00264550264550265,"IndustryDisagg" -"221100/US","486/US",0.42875137773579,"IndustryDisagg" -"221200/US","486/US",0.570303889151315,"IndustryDisagg" -"221300/US","486/US",0.000944733112895607,"IndustryDisagg" -"221100/US","487OS/US",0.885228095582911,"IndustryDisagg" -"221200/US","487OS/US",0.112599565532223,"IndustryDisagg" -"221300/US","487OS/US",0.00217233888486604,"IndustryDisagg" -"221100/US","GFE/US",0.625,"IndustryDisagg" -"221200/US","GFE/US",0.318548387096774,"IndustryDisagg" -"221300/US","GFE/US",0.0564516129032258,"IndustryDisagg" -"221100/US","493/US",0.787003610108303,"IndustryDisagg" -"221200/US","493/US",0.117328519855596,"IndustryDisagg" -"221300/US","493/US",0.0956678700361011,"IndustryDisagg" -"221100/US","511/US",0.393162393162393,"IndustryDisagg" -"221200/US","511/US",0.606837606837607,"IndustryDisagg" -"221300/US","511/US",0,"IndustryDisagg" -"221100/US","513/US",0.859226379201015,"IndustryDisagg" -"221200/US","513/US",0.0792644261255548,"IndustryDisagg" -"221300/US","513/US",0.0615091946734306,"IndustryDisagg" -"221100/US","514/US",0.95013357079252,"IndustryDisagg" -"221200/US","514/US",0.04986642920748,"IndustryDisagg" -"221300/US","514/US",0,"IndustryDisagg" -"221100/US","521CI/US",0.591959658215436,"IndustryDisagg" -"221200/US","521CI/US",0.388009525143578,"IndustryDisagg" -"221300/US","521CI/US",0.0200308166409861,"IndustryDisagg" -"221100/US","523/US",0.655502392344498,"IndustryDisagg" -"221200/US","523/US",0.330143540669856,"IndustryDisagg" -"221300/US","523/US",0.0143540669856459,"IndustryDisagg" -"221100/US","524/US",0.704225352112676,"IndustryDisagg" -"221200/US","524/US",0.123239436619718,"IndustryDisagg" -"221300/US","524/US",0.172535211267606,"IndustryDisagg" -"221100/US","ORE/US",0.647714175950826,"IndustryDisagg" -"221200/US","ORE/US",0.316941990011525,"IndustryDisagg" -"221300/US","ORE/US",0.0353438340376489,"IndustryDisagg" -"221100/US","532RL/US",0.79110251450677,"IndustryDisagg" -"221200/US","532RL/US",0.163442940038685,"IndustryDisagg" -"221300/US","532RL/US",0.0454545454545455,"IndustryDisagg" -"221100/US","5411/US",0.810946358482338,"IndustryDisagg" -"221200/US","5411/US",0.171173135630179,"IndustryDisagg" -"221300/US","5411/US",0.0178805058874836,"IndustryDisagg" -"221100/US","5412OP/US",0.690796277145812,"IndustryDisagg" -"221200/US","5412OP/US",0.234934662028768,"IndustryDisagg" -"221300/US","5412OP/US",0.0742690608254207,"IndustryDisagg" -"221100/US","5415/US",0.519497686715136,"IndustryDisagg" -"221200/US","5415/US",0.434897554527429,"IndustryDisagg" -"221300/US","5415/US",0.0456047587574356,"IndustryDisagg" -"221100/US","55/US",0.842105263157895,"IndustryDisagg" -"221200/US","55/US",0.157894736842105,"IndustryDisagg" -"221300/US","55/US",0,"IndustryDisagg" -"221100/US","561/US",0.856304463809354,"IndustryDisagg" -"221200/US","561/US",0.1364929752801,"IndustryDisagg" -"221300/US","561/US",0.00720256091054597,"IndustryDisagg" -"221100/US","562/US",0.668587896253602,"IndustryDisagg" -"221200/US","562/US",0.239193083573487,"IndustryDisagg" -"221300/US","562/US",0.0922190201729107,"IndustryDisagg" -"221100/US","61/US",0.590717299578059,"IndustryDisagg" -"221200/US","61/US",0.409282700421941,"IndustryDisagg" -"221300/US","61/US",0,"IndustryDisagg" -"221100/US","711AS/US",0.767605633802817,"IndustryDisagg" -"221200/US","711AS/US",0.105633802816901,"IndustryDisagg" -"221300/US","711AS/US",0.126760563380282,"IndustryDisagg" -"221100/US","713/US",0.763157894736842,"IndustryDisagg" -"221200/US","713/US",0.236842105263158,"IndustryDisagg" -"221300/US","713/US",0,"IndustryDisagg" -"221100/US","721/US",0.807737397420867,"IndustryDisagg" -"221200/US","721/US",0.184056271981243,"IndustryDisagg" -"221300/US","721/US",0.0082063305978898,"IndustryDisagg" -"221100/US","722/US",0.873963515754561,"IndustryDisagg" -"221200/US","722/US",0.121614151464898,"IndustryDisagg" -"221300/US","722/US",0.00442233278054174,"IndustryDisagg" -"221100/US","81/US",0.358255451713396,"IndustryDisagg" -"221200/US","81/US",0.389408099688474,"IndustryDisagg" -"221300/US","81/US",0.252336448598131,"IndustryDisagg" -"221100/US","GSLE/US",0.941885187810064,"IndustryDisagg" -"221200/US","GSLE/US",0.00744153082919915,"IndustryDisagg" -"221300/US","GSLE/US",0.0506732813607371,"IndustryDisagg" -"221100/US","Other/US",0.897243107769424,"IndustryDisagg" -"221200/US","Other/US",0.0910609857978279,"IndustryDisagg" -"221300/US","Other/US",0.0116959064327485,"IndustryDisagg" -"221100/US","Used/US",0.815425769059296,"IndustryDisagg" -"221200/US","Used/US",0,"IndustryDisagg" -"221300/US","Used/US",0.184574230940704,"IndustryDisagg" -"221100/US","V001/US",0.780805619266055,"IndustryDisagg" -"221200/US","V001/US",0.161983944954128,"IndustryDisagg" -"221300/US","V001/US",0.0572104357798165,"IndustryDisagg" -"221100/US","V002/US",0.838787426166067,"IndustryDisagg" -"221200/US","V002/US",0.141574444972503,"IndustryDisagg" -"221300/US","V002/US",0.0196381288614298,"IndustryDisagg" -"221100/US","V003/US",0.786933022467147,"IndustryDisagg" -"221200/US","V003/US",0.191248940228911,"IndustryDisagg" -"221300/US","V003/US",0.0218180373039423,"IndustryDisagg" -"111CA/US","221100/US",0.352619589977221,"CommodityDisagg" -"111CA/US","221200/US",0.287243735763098,"CommodityDisagg" -"111CA/US","221300/US",0.360136674259681,"CommodityDisagg" -"113FF/US","221100/US",0.577464788732394,"CommodityDisagg" -"113FF/US","221200/US",0.338028169014085,"CommodityDisagg" -"113FF/US","221300/US",0.0845070422535211,"CommodityDisagg" -"211/US","221100/US",0.545832545832546,"CommodityDisagg" -"211/US","221200/US",0.110754110754111,"CommodityDisagg" -"211/US","221300/US",0.343413343413343,"CommodityDisagg" -"212/US","221100/US",0.894676192671122,"CommodityDisagg" -"212/US","221200/US",0.0988707075362987,"CommodityDisagg" -"212/US","221300/US",0.00645309979257894,"CommodityDisagg" -"213/US","221100/US",0.51980198019802,"CommodityDisagg" -"213/US","221200/US",0.336633663366337,"CommodityDisagg" -"213/US","221300/US",0.143564356435644,"CommodityDisagg" -"23/US","221100/US",0.802140433307231,"CommodityDisagg" -"23/US","221200/US",0.0694335682589402,"CommodityDisagg" -"23/US","221300/US",0.128425998433829,"CommodityDisagg" -"311FT/US","221100/US",0.712621970412339,"CommodityDisagg" -"311FT/US","221200/US",0.22851746931067,"CommodityDisagg" -"311FT/US","221300/US",0.0588605602769909,"CommodityDisagg" -"313TT/US","221100/US",0.832472324723247,"CommodityDisagg" -"313TT/US","221200/US",0.136531365313653,"CommodityDisagg" -"313TT/US","221300/US",0.0309963099630996,"CommodityDisagg" -"315AL/US","221100/US",0.805970149253731,"CommodityDisagg" -"315AL/US","221200/US",0.119402985074627,"CommodityDisagg" -"315AL/US","221300/US",0.0746268656716418,"CommodityDisagg" -"321/US","221100/US",0.881005586592179,"CommodityDisagg" -"321/US","221200/US",0.0988826815642458,"CommodityDisagg" -"321/US","221300/US",0.0201117318435754,"CommodityDisagg" -"322/US","221100/US",0.738459063857166,"CommodityDisagg" -"322/US","221200/US",0.240630529194145,"CommodityDisagg" -"322/US","221300/US",0.0209104069486891,"CommodityDisagg" -"323/US","221100/US",0.923022598870056,"CommodityDisagg" -"323/US","221200/US",0.0529661016949153,"CommodityDisagg" -"323/US","221300/US",0.0240112994350282,"CommodityDisagg" -"324/US","221100/US",0.610388000495847,"CommodityDisagg" -"324/US","221200/US",0.357010040907401,"CommodityDisagg" -"324/US","221300/US",0.0326019585967522,"CommodityDisagg" -"325/US","221100/US",0.633123814041746,"CommodityDisagg" -"325/US","221200/US",0.310661764705882,"CommodityDisagg" -"325/US","221300/US",0.0562144212523719,"CommodityDisagg" -"326/US","221100/US",0.909072539907052,"CommodityDisagg" -"326/US","221200/US",0.0703172358052132,"CommodityDisagg" -"326/US","221300/US",0.0206102242877349,"CommodityDisagg" -"327/US","221100/US",0.712587790383576,"CommodityDisagg" -"327/US","221200/US",0.262020529443544,"CommodityDisagg" -"327/US","221300/US",0.0253916801728795,"CommodityDisagg" -"331/US","221100/US",0.85470719051149,"CommodityDisagg" -"331/US","221200/US",0.127131208302446,"CommodityDisagg" -"331/US","221300/US",0.0181616011860638,"CommodityDisagg" -"332/US","221100/US",0.787292188567524,"CommodityDisagg" -"332/US","221200/US",0.178091550899567,"CommodityDisagg" -"332/US","221300/US",0.0346162605329082,"CommodityDisagg" -"333/US","221100/US",0.811825434068512,"CommodityDisagg" -"333/US","221200/US",0.142186766776161,"CommodityDisagg" -"333/US","221300/US",0.0459877991553261,"CommodityDisagg" -"334/US","221100/US",0.886104783599089,"CommodityDisagg" -"334/US","221200/US",0.067577828397874,"CommodityDisagg" -"334/US","221300/US",0.0463173880030372,"CommodityDisagg" -"335/US","221100/US",0.806889352818372,"CommodityDisagg" -"335/US","221200/US",0.154488517745303,"CommodityDisagg" -"335/US","221300/US",0.0386221294363257,"CommodityDisagg" -"3361MV/US","221100/US",0.781538461538462,"CommodityDisagg" -"3361MV/US","221200/US",0.121923076923077,"CommodityDisagg" -"3361MV/US","221300/US",0.0965384615384615,"CommodityDisagg" -"3364OT/US","221100/US",0.872968980797637,"CommodityDisagg" -"3364OT/US","221200/US",0.0878877400295421,"CommodityDisagg" -"3364OT/US","221300/US",0.0391432791728213,"CommodityDisagg" -"337/US","221100/US",0.800327332242226,"CommodityDisagg" -"337/US","221200/US",0.153846153846154,"CommodityDisagg" -"337/US","221300/US",0.0458265139116203,"CommodityDisagg" -"339/US","221100/US",0.828774062816616,"CommodityDisagg" -"339/US","221200/US",0.115501519756839,"CommodityDisagg" -"339/US","221300/US",0.0557244174265451,"CommodityDisagg" -"42/US","221100/US",0.943946471405126,"CommodityDisagg" -"42/US","221200/US",0.0201363464209065,"CommodityDisagg" -"42/US","221300/US",0.0359171821739679,"CommodityDisagg" -"441/US","221100/US",0.904614191547111,"CommodityDisagg" -"441/US","221200/US",0.0473051570376115,"CommodityDisagg" -"441/US","221300/US",0.0480806514152772,"CommodityDisagg" -"4A0/US","221100/US",0.956473297184877,"CommodityDisagg" -"4A0/US","221200/US",0.0110673698284186,"CommodityDisagg" -"4A0/US","221300/US",0.0324593329867043,"CommodityDisagg" -"445/US","221100/US",0.973806405524467,"CommodityDisagg" -"445/US","221200/US",0.00619121323967139,"CommodityDisagg" -"445/US","221300/US",0.0200023812358614,"CommodityDisagg" -"452/US","221100/US",0.979179424372321,"CommodityDisagg" -"452/US","221200/US",0.00489895897121862,"CommodityDisagg" -"452/US","221300/US",0.0159216166564605,"CommodityDisagg" -"481/US","221100/US",0.57843137254902,"CommodityDisagg" -"481/US","221200/US",0.411764705882353,"CommodityDisagg" -"481/US","221300/US",0.00980392156862745,"CommodityDisagg" -"482/US","221100/US",0.306122448979592,"CommodityDisagg" -"482/US","221200/US",0.561224489795918,"CommodityDisagg" -"482/US","221300/US",0.13265306122449,"CommodityDisagg" -"483/US","221100/US",0.375,"CommodityDisagg" -"483/US","221200/US",0.590909090909091,"CommodityDisagg" -"483/US","221300/US",0.0340909090909091,"CommodityDisagg" -"484/US","221100/US",0.908296943231441,"CommodityDisagg" -"484/US","221200/US",0.0655021834061135,"CommodityDisagg" -"484/US","221300/US",0.0262008733624454,"CommodityDisagg" -"485/US","221100/US",0.694444444444444,"CommodityDisagg" -"485/US","221200/US",0.166666666666667,"CommodityDisagg" -"485/US","221300/US",0.138888888888889,"CommodityDisagg" -"486/US","221100/US",0.481265611990008,"CommodityDisagg" -"486/US","221200/US",0.513738551207327,"CommodityDisagg" -"486/US","221300/US",0.00499583680266445,"CommodityDisagg" -"487OS/US","221100/US",0.728855721393035,"CommodityDisagg" -"487OS/US","221200/US",0.232587064676617,"CommodityDisagg" -"487OS/US","221300/US",0.0385572139303483,"CommodityDisagg" -"GFE/US","221100/US",0.516831683168317,"CommodityDisagg" -"GFE/US","221200/US",0.310891089108911,"CommodityDisagg" -"GFE/US","221300/US",0.172277227722772,"CommodityDisagg" -"493/US","221100/US",0.990376638460262,"CommodityDisagg" -"493/US","221200/US",0.0037332005973121,"CommodityDisagg" -"493/US","221300/US",0.00589016094242575,"CommodityDisagg" -"511/US","221100/US",0.914444444444444,"CommodityDisagg" -"511/US","221200/US",0.0355555555555556,"CommodityDisagg" -"511/US","221300/US",0.05,"CommodityDisagg" -"512/US","221100/US",0.958868894601542,"CommodityDisagg" -"512/US","221200/US",0.0205655526992288,"CommodityDisagg" -"512/US","221300/US",0.0205655526992288,"CommodityDisagg" -"513/US","221100/US",0.771506038945033,"CommodityDisagg" -"513/US","221200/US",0.00566921370470791,"CommodityDisagg" -"513/US","221300/US",0.222824747350259,"CommodityDisagg" -"514/US","221100/US",0.974603174603175,"CommodityDisagg" -"514/US","221200/US",0.0019047619047619,"CommodityDisagg" -"514/US","221300/US",0.0234920634920635,"CommodityDisagg" -"521CI/US","221100/US",0.849512505298855,"CommodityDisagg" -"521CI/US","221200/US",0.112759643916914,"CommodityDisagg" -"521CI/US","221300/US",0.0377278507842306,"CommodityDisagg" -"523/US","221100/US",0.951639344262295,"CommodityDisagg" -"523/US","221200/US",0.0188524590163934,"CommodityDisagg" -"523/US","221300/US",0.0295081967213115,"CommodityDisagg" -"524/US","221100/US",0.833819241982507,"CommodityDisagg" -"524/US","221200/US",0.0845481049562682,"CommodityDisagg" -"524/US","221300/US",0.0816326530612245,"CommodityDisagg" -"525/US","221100/US",0.00492914356130622,"CommodityDisagg" -"525/US","221200/US",0.634011090573013,"CommodityDisagg" -"525/US","221300/US",0.361059765865681,"CommodityDisagg" -"HS/US","221100/US",1,"CommodityDisagg" -"HS/US","221200/US",0,"CommodityDisagg" -"HS/US","221300/US",0,"CommodityDisagg" -"ORE/US","221100/US",0.794424843679044,"CommodityDisagg" -"ORE/US","221200/US",0.201156251091627,"CommodityDisagg" -"ORE/US","221300/US",0.00441890522932896,"CommodityDisagg" -"532RL/US","221100/US",0.432680538555692,"CommodityDisagg" -"532RL/US","221200/US",0.531211750305998,"CommodityDisagg" -"532RL/US","221300/US",0.0361077111383109,"CommodityDisagg" -"5411/US","221100/US",0.934782608695652,"CommodityDisagg" -"5411/US","221200/US",0.00668896321070234,"CommodityDisagg" -"5411/US","221300/US",0.0585284280936455,"CommodityDisagg" -"5412OP/US","221100/US",0.940514075887393,"CommodityDisagg" -"5412OP/US","221200/US",0.0186046511627907,"CommodityDisagg" -"5412OP/US","221300/US",0.0408812729498164,"CommodityDisagg" -"5415/US","221100/US",0.935593220338983,"CommodityDisagg" -"5415/US","221200/US",0.0135593220338983,"CommodityDisagg" -"5415/US","221300/US",0.0508474576271186,"CommodityDisagg" -"55/US","221100/US",0.970925879710507,"CommodityDisagg" -"55/US","221200/US",0.0232093835787372,"CommodityDisagg" -"55/US","221300/US",0.00586473671075618,"CommodityDisagg" -"561/US","221100/US",0.74942316566682,"CommodityDisagg" -"561/US","221200/US",0.0544531610521458,"CommodityDisagg" -"561/US","221300/US",0.196123673281034,"CommodityDisagg" -"562/US","221100/US",0.751012145748988,"CommodityDisagg" -"562/US","221200/US",0.119433198380567,"CommodityDisagg" -"562/US","221300/US",0.129554655870445,"CommodityDisagg" -"61/US","221100/US",0.480550484482516,"CommodityDisagg" -"61/US","221200/US",0.243083836539812,"CommodityDisagg" -"61/US","221300/US",0.276365678977672,"CommodityDisagg" -"621/US","221100/US",0.916407706650093,"CommodityDisagg" -"621/US","221200/US",0.0295214418893723,"CommodityDisagg" -"621/US","221300/US",0.0540708514605345,"CommodityDisagg" -"622/US","221100/US",0.865446478092069,"CommodityDisagg" -"622/US","221200/US",0.070216306156406,"CommodityDisagg" -"622/US","221300/US",0.0643372157515252,"CommodityDisagg" -"623/US","221100/US",0.890833333333333,"CommodityDisagg" -"623/US","221200/US",0.0383333333333333,"CommodityDisagg" -"623/US","221300/US",0.0708333333333333,"CommodityDisagg" -"624/US","221100/US",0.886942675159236,"CommodityDisagg" -"624/US","221200/US",0.0501592356687898,"CommodityDisagg" -"624/US","221300/US",0.0628980891719745,"CommodityDisagg" -"711AS/US","221100/US",0.928251121076233,"CommodityDisagg" -"711AS/US","221200/US",0.0269058295964126,"CommodityDisagg" -"711AS/US","221300/US",0.0448430493273543,"CommodityDisagg" -"713/US","221100/US",0.890376569037657,"CommodityDisagg" -"713/US","221200/US",0.0338912133891213,"CommodityDisagg" -"713/US","221300/US",0.0757322175732218,"CommodityDisagg" -"721/US","221100/US",0.897150799166088,"CommodityDisagg" -"721/US","221200/US",0.0363099374565671,"CommodityDisagg" -"721/US","221300/US",0.0665392633773454,"CommodityDisagg" -"722/US","221100/US",0.92534289276808,"CommodityDisagg" -"722/US","221200/US",0.0270157938487116,"CommodityDisagg" -"722/US","221300/US",0.0476413133832086,"CommodityDisagg" -"81/US","221100/US",0.764238711141366,"CommodityDisagg" -"81/US","221200/US",0.113002042205582,"CommodityDisagg" -"81/US","221300/US",0.122759246653052,"CommodityDisagg" -"GSLG/US","221100/US",0.255670456493173,"CommodityDisagg" -"GSLG/US","221200/US",0.452893789636062,"CommodityDisagg" -"GSLG/US","221300/US",0.291435753870765,"CommodityDisagg" -"GSLE/US","221100/US",0.390254237288136,"CommodityDisagg" -"GSLE/US","221200/US",0.215254237288136,"CommodityDisagg" -"GSLE/US","221300/US",0.394491525423729,"CommodityDisagg" -"GFGD/US","221100/US",0.418676019289785,"CommodityDisagg" -"GFGD/US","221200/US",0.306882946076282,"CommodityDisagg" -"GFGD/US","221300/US",0.274441034633932,"CommodityDisagg" -"GFGN/US","221100/US",0.223946784922395,"CommodityDisagg" -"GFGN/US","221200/US",0.404656319290466,"CommodityDisagg" -"GFGN/US","221300/US",0.37139689578714,"CommodityDisagg" -"F010/US","221100/US",0.673479322749926,"CommodityDisagg" -"F010/US","221200/US",0.182819565002145,"CommodityDisagg" -"F010/US","221300/US",0.143701112247929,"CommodityDisagg" -"F040/US","221100/US",0.691597414589104,"CommodityDisagg" -"F040/US","221200/US",0.12927054478301,"CommodityDisagg" -"F040/US","221300/US",0.179132040627886,"CommodityDisagg" -"F050/US","221100/US",1,"CommodityDisagg" -"F050/US","221200/US",0,"CommodityDisagg" -"F050/US","221300/US",0,"CommodityDisagg" From 58f7483f5af443f994d418b66a8dd6c08799d052 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 29 Feb 2024 12:55:16 -0500 Subject: [PATCH 097/121] fix typos --- R/StateDisaggFunctions.R | 4 ++-- inst/extdata/disaggspecs/UtilityDisaggByProxy.yml | 2 +- inst/extdata/disaggspecs/UtilityStateDummy.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 00dd5d10..7c4ff87f 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -48,7 +48,7 @@ disaggregateStateModel <- function(model, state){ for (disagg in model$DisaggregationSpecs){ - logging::loginfo(paste0("Disaggregating ", disagg$OrignalSectorName," for ", state)) + logging::loginfo(paste0("Disaggregating ", disagg$OriginalSectorName," for ", state)) # Formatting model objects according to useeior disaggregation formats model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object @@ -225,7 +225,7 @@ formatFullUseFromUSEEIOtoState <- function(model, state, domestic = FALSE){ tempVA <- cbind(model$UseValueAdded, VAbyFDSection) # combine UseValueAdded and VAbyFDSection columns - # Assemble FullUse table and remane according to stateior formats + # Assemble FullUse table and rename according to stateior formats model$FullUse <- rbind(tempFullUse, tempVA) rownames(model$FullUse) <- gsub("\\/.*","",rownames(model$FullUse)) # remove everything after "/" colnames(model$FullUse) <- gsub("\\/.*","",colnames(model$FullUse)) # remove everything after "/" diff --git a/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml b/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml index af2de3df..e32b40ec 100644 --- a/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml +++ b/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml @@ -1,7 +1,7 @@ Disaggregation: 22/US: OriginalSectorCode: "22/US" - OrignalSectorName: "Utilities" + OriginalSectorName: "Utilities" DisaggregationType: "Userdefined" SectorFile: UtilityDisaggregation_Sectors.csv # MakeFile: UtilityStateDummy_Make.csv diff --git a/inst/extdata/disaggspecs/UtilityStateDummy.yml b/inst/extdata/disaggspecs/UtilityStateDummy.yml index 7c45b224..b8b9048f 100644 --- a/inst/extdata/disaggspecs/UtilityStateDummy.yml +++ b/inst/extdata/disaggspecs/UtilityStateDummy.yml @@ -1,7 +1,7 @@ Disaggregation: 22/US: OriginalSectorCode: "22/US" - OrignalSectorName: "Utilities" + OriginalSectorName: "Utilities" DisaggregationType: "Userdefined" SectorFile: UtilityDisaggregation_Sectors.csv MakeFile: UtilityStateDummy_Make.csv From 13ddd22799ecf01abefa68cdc1e796c301ee5372 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 29 Feb 2024 12:55:38 -0500 Subject: [PATCH 098/121] point back to linkstateiorImportF branch --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1fd7dcd1..0f776b3d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -40,7 +40,7 @@ Imports: Depends: R (>= 3.6) Remotes: - github::USEPA/useeior@2r_disagg + github::USEPA/useeior@linkstateiorImportF License: file LICENSE Encoding: UTF-8 LazyData: true From 1a473350a8fc99c77b6a45534d1d22f154668886 Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 4 Mar 2024 23:14:54 -0500 Subject: [PATCH 099/121] add function call to useeior's balanceDisagg function --- R/BuildModel.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/BuildModel.R b/R/BuildModel.R index 3e634cc1..7fbd1071 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -798,6 +798,10 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { names(RoUS_ITA) <- getBEASectorCodeLocation("Commodity", "RoUS", iolevel, disagg) TwoRegionIO[["InternationalTradeAdjustment"]][[state]] <- c(SoI_ITA, RoUS_ITA) + # if(!is.null(disagg_specs)){ + # model <- useeior:::balanceDisagg(model, disagg) + # } + print(state) } return(TwoRegionIO) From c46c8d5ec0401230794141e386f8a9d6481d00b8 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Fri, 8 Mar 2024 11:53:34 -0500 Subject: [PATCH 100/121] need to update disagg for each individual state? --- R/BuildModel.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/BuildModel.R b/R/BuildModel.R index 3e634cc1..0f549f91 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -653,6 +653,7 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { } model <- disaggregateNationalObjectsInStateModel(model, disagg) + ## ^^ this should always use national level disaggregation data # Assign the disaggregated model objects to the original stateior objects, rename some as national US_Make <- model$MakeTransactions @@ -671,6 +672,10 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { model$CommodityOutput <- State_CommodityOutput_ls[[state]] model$IndustryOutput <- State_IndustryOutput_ls[[state]] + # if(!is.null(disagg$stateDF)) { + # model <- createDisaggFilesFromProxyData(model, disagg, year, state) + # disagg <- model$DisaggregationSpecs[[disagg$OriginalSectorCode]] + # } model <- disaggregateStateModel(model, state) # Assign the disaggregated model objects to the stateior lists From bcbb29ceb1eb727e4a5656563056a9795d023dea Mon Sep 17 00:00:00 2001 From: jvendries Date: Thu, 21 Mar 2024 18:19:47 -0400 Subject: [PATCH 101/121] Add if statement to get correct disaggregation percentages for each state --- R/BuildModel.R | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index ec0ca497..fbf1a984 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -672,10 +672,11 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { model$CommodityOutput <- State_CommodityOutput_ls[[state]] model$IndustryOutput <- State_IndustryOutput_ls[[state]] - # if(!is.null(disagg$stateDF)) { - # model <- createDisaggFilesFromProxyData(model, disagg, year, state) - # disagg <- model$DisaggregationSpecs[[disagg$OriginalSectorCode]] - # } + if(!is.null(disagg$stateDF)) { + # Get the correct disaggregation percentages for each state + model <- createDisaggFilesFromProxyData(model, disagg, year, state) + disagg <- model$DisaggregationSpecs[[disagg$OriginalSectorCode]] + } model <- disaggregateStateModel(model, state) # Assign the disaggregated model objects to the stateior lists From 518f31df86673374f5723114c26e797bcb22ed20 Mon Sep 17 00:00:00 2001 From: jvendries Date: Thu, 21 Mar 2024 18:55:12 -0400 Subject: [PATCH 102/121] Remove unneeded code and comments --- R/BuildModel.R | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index fbf1a984..008f9beb 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -704,19 +704,7 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { # Assemble two-region IO tables TwoRegionIO <- list() - #TEMPORARY FOR DEBUGGING -# for (state in c("District of Columbia")){ for (state in sort(c(state.name, "District of Columbia"))) { - - - #LEFT OFF HERE: NEED TO TEST THE FOLLOWING CODE TO MAKE SURE EACH STATE IS DISAGGREGATED PROPERLY: - # Disaggregate STATE model objects - if(!is.null(disagg$stateDF)){ - - model <- createDisaggFilesFromProxyData(model, disagg, year, state) #Function to disagg by proxy - disagg <- model$DisaggregationSpecs[[disagg$OriginalSectorCode]] #update disagg - } - ## Two-region Make model$MakeTransactions <- State_Make_ls[[state]] From feb61857e7e8ada0df29753aa1bc5141e3d8d473 Mon Sep 17 00:00:00 2001 From: jvendries Date: Thu, 21 Mar 2024 19:24:26 -0400 Subject: [PATCH 103/121] Add placeholders for calling createDisaggFilesFromProxyData function from useeior instead of stateior --- R/BuildModel.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/BuildModel.R b/R/BuildModel.R index 008f9beb..67d335d9 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -649,6 +649,7 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { if(!is.null(disagg$stateDF)){ model <- createDisaggFilesFromProxyData(model, disagg, year, "US") #Function to disagg by proxy + #model <- useeior:::createDisaggFilesFromProxyData(model, disagg, year, "US") #Function to disagg by proxy disagg <- model$DisaggregationSpecs[[disagg$OriginalSectorCode]] #update disagg } @@ -675,6 +676,7 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { if(!is.null(disagg$stateDF)) { # Get the correct disaggregation percentages for each state model <- createDisaggFilesFromProxyData(model, disagg, year, state) + #model <- useeior:::createDisaggFilesFromProxyData(model, disagg, year, state) disagg <- model$DisaggregationSpecs[[disagg$OriginalSectorCode]] } model <- disaggregateStateModel(model, state) From 765a729ae820da00e25fd1dc96dfc001d4f07842 Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 22 Mar 2024 18:38:50 -0400 Subject: [PATCH 104/121] Remove NAs when checking tolerance for q_SoI and q_RoUS --- R/BuildModel.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 67d335d9..1313b87a 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -550,7 +550,9 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, } else { q_SoI_use <- rowSums(SoI2SoI_Use[, c(industries, FD_cols, "ExportResidual")]) + rowSums(SoI2RoUS_Use[, c(industries, FD_cols)]) } - if (max(abs((q_SoI - q_SoI_use)/q_SoI_use)) > 1E-2) { + q_SoI_check <- abs((q_SoI - q_SoI_use)/q_SoI_use) + q_SoI_check[is.na(q_SoI_check)] <- 0 # Convert all N/As to 0 + if (max(q_SoI_check) > 1E-2) { if (domestic) { stop(paste0(state, "'s commodity output summed from two-region Domestic Use table ", "doesn't equal to ", state, "'s commodity output.")) @@ -566,7 +568,9 @@ buildTwoRegionUseModel <- function(state, year, ioschema, iolevel, } else { q_RoUS_use <- rowSums(RoUS2RoUS_Use[, c(industries, FD_cols, "ExportResidual")]) + rowSums(RoUS2SoI_Use[, c(industries, FD_cols)]) } - if (max(abs((q_RoUS - q_RoUS_use)/q_RoUS_use)) > 1E-2) { + q_RoUS_check <- abs((q_RoUS - q_RoUS_use)/q_RoUS_use) + q_RoUS_check[is.na(q_RoUS_check)] <- 0 # Convert all N/As to 0 + if (max(q_RoUS_check) > 1E-2) { if (domestic) { stop(paste0("RoUS (of ", state, ")'s commodity output summed from two-region Domestic Use table ", "doesn't equal to RoUS's commodity output.")) From eb87da84752b0ace6055379fbc6cc25574f735ee Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 25 Mar 2024 16:30:49 -0400 Subject: [PATCH 105/121] Add model spec for UtilityDisaggByProxy --- .../modelspecs/StateIOv1.0.0-75_Proxy.yml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 inst/extdata/modelspecs/StateIOv1.0.0-75_Proxy.yml diff --git a/inst/extdata/modelspecs/StateIOv1.0.0-75_Proxy.yml b/inst/extdata/modelspecs/StateIOv1.0.0-75_Proxy.yml new file mode 100644 index 00000000..d3855aeb --- /dev/null +++ b/inst/extdata/modelspecs/StateIOv1.0.0-75_Proxy.yml @@ -0,0 +1,28 @@ +Model: "StateIOv1.0.0-75" # 75 represents Summary level disaggregated model (73 + 2 = 75 commodities & 71 + 2 = 73 industries) +BaseIOSchema: 2012 +BaseIOLevel: "Summary" +IOYear: + - 2012 + - 2013 + - 2014 + - 2015 + - 2016 + - 2017 +GeoScale: + - "State" + - "TwoRegion" # SoI and RoUS +IODataSource: "BEA" +BasePriceType: "PRO" +BasewithRedefinitions: FALSE +ScrapIncluded: FALSE +DisaggregationSpecs: "UtilityDisaggByProxy" + +DataProduct: + - "Make" + - "Use" + - "DomesticUse" + - "DomesticUsewithTrade" + - "InternationalTradeAdjustment" + - "CommodityOutput" + - "IndustryOutput" + - "ValueAdded" From 2e58125fa606186b4f140c826aedb4cce994234b Mon Sep 17 00:00:00 2001 From: jvendries Date: Mon, 25 Mar 2024 16:31:41 -0400 Subject: [PATCH 106/121] fix spec name --- inst/extdata/modelspecs/StateIOv1.0.0-75_Proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/extdata/modelspecs/StateIOv1.0.0-75_Proxy.yml b/inst/extdata/modelspecs/StateIOv1.0.0-75_Proxy.yml index d3855aeb..3b1dd311 100644 --- a/inst/extdata/modelspecs/StateIOv1.0.0-75_Proxy.yml +++ b/inst/extdata/modelspecs/StateIOv1.0.0-75_Proxy.yml @@ -1,4 +1,4 @@ -Model: "StateIOv1.0.0-75" # 75 represents Summary level disaggregated model (73 + 2 = 75 commodities & 71 + 2 = 73 industries) +Model: "StateIOv1.0.0-75_Proxy" # 75 represents Summary level disaggregated model (73 + 2 = 75 commodities & 71 + 2 = 73 industries) BaseIOSchema: 2012 BaseIOLevel: "Summary" IOYear: From af078a99e8de7b132c3f13a2110f8bb710c1b6ed Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 26 Mar 2024 10:07:26 -0400 Subject: [PATCH 107/121] add employment ratios for additional years --- .../extdata/disaggspecs/Employment_ratios.csv | 936 ++++++++++++++++++ 1 file changed, 936 insertions(+) diff --git a/inst/extdata/disaggspecs/Employment_ratios.csv b/inst/extdata/disaggspecs/Employment_ratios.csv index e022e875..e15a6d6b 100644 --- a/inst/extdata/disaggspecs/Employment_ratios.csv +++ b/inst/extdata/disaggspecs/Employment_ratios.csv @@ -1,4 +1,16 @@ State,ActivityProducedBy,Share,Year +US,221100,0.6404913710116216,2012 +US,221200,0.10727150968930062,2012 +US,221300,0.2522371192990778,2012 +US,221100,0.6420260751272352,2013 +US,221200,0.10719023464234716,2013 +US,221300,0.2507836902304176,2013 +US,221100,0.6389537035998339,2014 +US,221200,0.10853628439698014,2014 +US,221300,0.2525100120031859,2014 +US,221100,0.63667485063675,2015 +US,221200,0.10935406914875119,2015 +US,221300,0.2539710802144988,2015 US,221100,0.6354175796809285,2016 US,221200,0.10814819143178722,2016 US,221300,0.2564342288872843,2016 @@ -8,6 +20,624 @@ US,221300,0.2587500452720642,2017 US,221100,0.6370838539604272,2018 US,221200,0.1030946587508028,2018 US,221300,0.25982148728876997,2018 +US,221100,0.6323852959185828,2019 +US,221200,0.10409549347916358,2019 +US,221300,0.26351921060225364,2019 +US,221100,0.6345549827470847,2020 +US,221200,0.10106699586185734,2020 +US,221300,0.26437802139105804,2020 +Alabama,221100,0.699668282725185,2012 +Alabama,221200,0.10142893595304925,2012 +Alabama,221300,0.19890278132176575,2012 +Alaska,221100,1.0,2012 +Alaska,221200,0.0,2012 +Alaska,221300,0.0,2012 +Arizona,221100,0.9927331449333872,2012 +Arizona,221200,0.0,2012 +Arizona,221300,0.0072668550666128385,2012 +Arkansas,221100,0.5314065510597302,2012 +Arkansas,221200,0.12244701348747591,2012 +Arkansas,221300,0.34614643545279383,2012 +California,221100,0.40988151790170235,2012 +California,221200,0.0,2012 +California,221300,0.5901184820982976,2012 +Colorado,221100,0.7833768819211149,2012 +Colorado,221200,0.1272863008585293,2012 +Colorado,221300,0.08933681722035586,2012 +Connecticut,221100,0.5353260869565217,2012 +Connecticut,221200,0.1331521739130435,2012 +Connecticut,221300,0.33152173913043476,2012 +Delaware,221100,1.0,2012 +Delaware,221200,0.0,2012 +Delaware,221300,0.0,2012 +District Of Columbia,221100,,2012 +District Of Columbia,221200,,2012 +District Of Columbia,221300,,2012 +Florida,221100,0.782295311406578,2012 +Florida,221200,0.06018194541637509,2012 +Florida,221300,0.1575227431770469,2012 +Georgia,221100,0.8606474456246839,2012 +Georgia,221200,0.09403136064744562,2012 +Georgia,221300,0.04532119372787051,2012 +Hawaii,221100,1.0,2012 +Hawaii,221200,0.0,2012 +Hawaii,221300,0.0,2012 +Idaho,221100,0.5671897289586305,2012 +Idaho,221200,0.07845934379457917,2012 +Idaho,221300,0.3543509272467903,2012 +Illinois,221100,0.6654611211573237,2012 +Illinois,221200,0.14788426763110307,2012 +Illinois,221300,0.18665461121157323,2012 +Indiana,221100,0.7119979168022915,2012 +Indiana,221200,0.12180196601783738,2012 +Indiana,221300,0.1662001171798711,2012 +Iowa,221100,0.7912936848559167,2012 +Iowa,221200,0.07136725935009197,2012 +Iowa,221300,0.13733905579399142,2012 +Kansas,221100,0.6606669611307421,2012 +Kansas,221200,0.20262809187279152,2012 +Kansas,221300,0.13670494699646643,2012 +Kentucky,221100,0.5605687504964652,2012 +Kentucky,221200,0.07069663992374295,2012 +Kentucky,221300,0.36873460957979187,2012 +Louisiana,221100,0.46764684991831806,2012 +Louisiana,221200,0.12486682292776476,2012 +Louisiana,221300,0.4074863271539172,2012 +Maine,221100,0.5032456440040998,2012 +Maine,221200,0.02801503245644004,2012 +Maine,221300,0.4687393235394602,2012 +Maryland,221100,0.9028843352432747,2012 +Maryland,221200,0.049528989025929886,2012 +Maryland,221300,0.04758667573079538,2012 +Massachusetts,221100,0.5052857483506875,2012 +Massachusetts,221200,0.25570304427311025,2012 +Massachusetts,221300,0.2390112073762022,2012 +Michigan,221100,0.8485677974386548,2012 +Michigan,221200,0.1131097859028253,2012 +Michigan,221300,0.038322416658519896,2012 +Minnesota,221100,0.8330964899815262,2012 +Minnesota,221200,0.11809009521102742,2012 +Minnesota,221300,0.04881341480744635,2012 +Mississippi,221100,0.7169085312225154,2012 +Mississippi,221200,0.07310905892700088,2012 +Mississippi,221300,0.20998240985048372,2012 +Missouri,221100,0.523525971609336,2012 +Missouri,221200,0.14737625604763677,2012 +Missouri,221300,0.3290977723430273,2012 +Montana,221100,0.7898572730033404,2012 +Montana,221200,0.09839052535681748,2012 +Montana,221300,0.11175220163984209,2012 +Nebraska,221100,0.7332264712617358,2012 +Nebraska,221200,0.15846118616899474,2012 +Nebraska,221300,0.10831234256926953,2012 +Nevada,221100,0.6879575864680636,2012 +Nevada,221200,0.0,2012 +Nevada,221300,0.3120424135319364,2012 +New Hampshire,221100,0.7851796407185628,2012 +New Hampshire,221200,0.0748502994011976,2012 +New Hampshire,221300,0.13997005988023953,2012 +New Jersey,221100,0.5142242575631418,2012 +New Jersey,221200,0.27921176797113517,2012 +New Jersey,221300,0.206563974465723,2012 +New Mexico,221100,0.518206829584075,2012 +New Mexico,221200,0.1844958731186276,2012 +New Mexico,221300,0.2972972972972973,2012 +New York,221100,0.7616969504615303,2012 +New York,221200,0.16334735115977678,2012 +New York,221300,0.0749556983786929,2012 +North Carolina,221100,0.744369460931783,2012 +North Carolina,221200,0.1702577445320758,2012 +North Carolina,221300,0.08537279453614115,2012 +North Dakota,221100,0.7047745358090186,2012 +North Dakota,221200,0.22122015915119364,2012 +North Dakota,221300,0.07400530503978779,2012 +Ohio,221100,0.4993043416217759,2012 +Ohio,221200,0.14476829224786844,2012 +Ohio,221300,0.3559273661303557,2012 +Oklahoma,221100,0.43377606752730885,2012 +Oklahoma,221200,0.29636295928500495,2012 +Oklahoma,221300,0.2698609731876862,2012 +Oregon,221100,0.7234502243643012,2012 +Oregon,221200,0.0,2012 +Oregon,221300,0.2765497756356989,2012 +Pennsylvania,221100,0.49813090033580437,2012 +Pennsylvania,221200,0.1353671672052208,2012 +Pennsylvania,221300,0.36650193245897483,2012 +Rhode Island,221100,1.0,2012 +Rhode Island,221200,0.0,2012 +Rhode Island,221300,0.0,2012 +South Carolina,221100,0.7692038086336819,2012 +South Carolina,221200,0.05099596939073544,2012 +South Carolina,221300,0.17980022197558268,2012 +South Dakota,221100,0.7876016260162602,2012 +South Dakota,221200,0.10467479674796748,2012 +South Dakota,221300,0.10772357723577236,2012 +Tennessee,221100,0.7536257361343061,2012 +Tennessee,221200,0.07717324426474466,2012 +Tennessee,221300,0.16920101960094927,2012 +Texas,221100,0.5477777916765696,2012 +Texas,221200,0.09883291845439876,2012 +Texas,221300,0.3533892898690317,2012 +Utah,221100,0.47396889790398916,2012 +Utah,221200,0.1440162271805274,2012 +Utah,221300,0.3820148749154834,2012 +Vermont,221100,0.8854266538830298,2012 +Vermont,221200,0.0,2012 +Vermont,221300,0.11457334611697027,2012 +Virginia,221100,0.4924742093691865,2012 +Virginia,221200,0.07570889001634816,2012 +Virginia,221300,0.4318169006144653,2012 +Washington,221100,0.6375585842805581,2012 +Washington,221200,0.06335182890696547,2012 +Washington,221300,0.29908958681247644,2012 +West Virginia,221100,0.5397422126745435,2012 +West Virginia,221200,0.09922126745435016,2012 +West Virginia,221300,0.36103651987110635,2012 +Wisconsin,221100,0.781085010329788,2012 +Wisconsin,221200,0.05210804193128778,2012 +Wisconsin,221300,0.16680694773892418,2012 +Wyoming,221100,0.8585817888799355,2012 +Wyoming,221200,0.0894439967767929,2012 +Wyoming,221300,0.051974214343271555,2012 +Alabama,221100,0.7012220996350674,2013 +Alabama,221200,0.10201137231604855,2013 +Alabama,221300,0.19676652804888398,2013 +Alaska,221100,1.0,2013 +Alaska,221200,0.0,2013 +Alaska,221300,0.0,2013 +Arizona,221100,0.9926365309879321,2013 +Arizona,221200,0.0,2013 +Arizona,221300,0.0073634690120679075,2013 +Arkansas,221100,0.5391730644713717,2013 +Arkansas,221200,0.12311534548145407,2013 +Arkansas,221300,0.33771159004717416,2013 +California,221100,0.39064786996379325,2013 +California,221200,0.0,2013 +California,221300,0.6093521300362068,2013 +Colorado,221100,0.8013532490744287,2013 +Colorado,221200,0.10608962083492915,2013 +Colorado,221300,0.09255713009064216,2013 +Connecticut,221100,0.5405173470638716,2013 +Connecticut,221200,0.13460831187936742,2013 +Connecticut,221300,0.32487434105676105,2013 +Delaware,221100,1.0,2013 +Delaware,221200,0.0,2013 +Delaware,221300,0.0,2013 +District Of Columbia,221100,,2013 +District Of Columbia,221200,,2013 +District Of Columbia,221300,,2013 +Florida,221100,0.7761050949760341,2013 +Florida,221200,0.05684360021303036,2013 +Florida,221300,0.16705130481093555,2013 +Georgia,221100,0.8565226171243941,2013 +Georgia,221200,0.09627423263327949,2013 +Georgia,221300,0.04720315024232633,2013 +Hawaii,221100,1.0,2013 +Hawaii,221200,0.0,2013 +Hawaii,221300,0.0,2013 +Idaho,221100,0.7425891181988743,2013 +Idaho,221200,0.0,2013 +Idaho,221300,0.2574108818011257,2013 +Illinois,221100,0.6766881147844095,2013 +Illinois,221200,0.1550920789882405,2013 +Illinois,221300,0.16821980622735005,2013 +Indiana,221100,0.7069897726532474,2013 +Indiana,221200,0.11901504787961696,2013 +Indiana,221300,0.1739951794671357,2013 +Iowa,221100,0.7882454624027658,2013 +Iowa,221200,0.07346585998271392,2013 +Iowa,221300,0.13828867761452032,2013 +Kansas,221100,0.6593443730990199,2013 +Kansas,221200,0.19894108369944802,2013 +Kansas,221300,0.14171454320153204,2013 +Kentucky,221100,0.5593505039193729,2013 +Kentucky,221200,0.07070868661014237,2013 +Kentucky,221300,0.36994080947048474,2013 +Louisiana,221100,0.4723404255319149,2013 +Louisiana,221200,0.11872340425531915,2013 +Louisiana,221300,0.40893617021276596,2013 +Maine,221100,0.4902229845626072,2013 +Maine,221200,0.03979416809605489,2013 +Maine,221300,0.4699828473413379,2013 +Maryland,221100,0.9012927147008718,2013 +Maryland,221200,0.04970437919631226,2013 +Maryland,221300,0.049002906102815914,2013 +Massachusetts,221100,0.5336808340016038,2013 +Massachusetts,221200,0.21708099438652767,2013 +Massachusetts,221300,0.24923817161186848,2013 +Michigan,221100,0.8480851895271591,2013 +Michigan,221200,0.11347205939820243,2013 +Michigan,221300,0.03844275107463853,2013 +Minnesota,221100,0.8399500277623543,2013 +Minnesota,221200,0.1103553581343698,2013 +Minnesota,221300,0.049694614103275955,2013 +Mississippi,221100,0.7251056452486727,2013 +Mississippi,221200,0.07118864449019395,2013 +Mississippi,221300,0.20370571026113338,2013 +Missouri,221100,0.5182819734951302,2013 +Missouri,221200,0.15046037575176965,2013 +Missouri,221300,0.3312576507531002,2013 +Montana,221100,0.7834862385321101,2013 +Montana,221200,0.10305810397553516,2013 +Montana,221300,0.11345565749235474,2013 +Nebraska,221100,0.7583965330444203,2013 +Nebraska,221200,0.13001083423618634,2013 +Nebraska,221300,0.11159263271939328,2013 +Nevada,221100,0.672566371681416,2013 +Nevada,221200,0.0,2013 +Nevada,221300,0.3274336283185841,2013 +New Hampshire,221100,0.7671840354767184,2013 +New Hampshire,221200,0.09534368070953436,2013 +New Hampshire,221300,0.13747228381374724,2013 +New Jersey,221100,0.5147460595446585,2013 +New Jersey,221200,0.27782837127845883,2013 +New Jersey,221300,0.20742556917688265,2013 +New Mexico,221100,0.5248477075985893,2013 +New Mexico,221200,0.1829111894838089,2013 +New Mexico,221300,0.2922411029176018,2013 +New York,221100,0.7646516528381404,2013 +New York,221200,0.16075332543131832,2013 +New York,221300,0.07459502173054129,2013 +North Carolina,221100,0.7496595369702795,2013 +North Carolina,221200,0.16646639429624288,2013 +North Carolina,221300,0.08387406873347752,2013 +North Dakota,221100,0.7085166968677193,2013 +North Dakota,221200,0.21485891793942533,2013 +North Dakota,221300,0.07662438519285529,2013 +Ohio,221100,0.4921713227013478,2013 +Ohio,221200,0.14763686562284303,2013 +Ohio,221300,0.3601918116758092,2013 +Oklahoma,221100,0.43314711359404096,2013 +Oklahoma,221200,0.2956548727498448,2013 +Oklahoma,221300,0.27119801365611423,2013 +Oregon,221100,0.6907734717042322,2013 +Oregon,221200,0.0,2013 +Oregon,221300,0.3092265282957678,2013 +Pennsylvania,221100,0.4920473342664461,2013 +Pennsylvania,221200,0.1386944903931798,2013 +Pennsylvania,221300,0.3692581753403741,2013 +Rhode Island,221100,1.0,2013 +Rhode Island,221200,0.0,2013 +Rhode Island,221300,0.0,2013 +South Carolina,221100,0.7697678477919357,2013 +South Carolina,221200,0.05184150811659976,2013 +South Carolina,221300,0.1783906440914645,2013 +South Dakota,221100,0.7897435897435897,2013 +South Dakota,221200,0.09897435897435898,2013 +South Dakota,221300,0.11128205128205128,2013 +Tennessee,221100,0.7502307388036742,2013 +Tennessee,221200,0.07827539225596625,2013 +Tennessee,221300,0.1714938689403595,2013 +Texas,221100,0.542323620397166,2013 +Texas,221200,0.10521654525496457,2013 +Texas,221300,0.3524598343478695,2013 +Utah,221100,0.4969130652427832,2013 +Utah,221200,0.1316535958618388,2013 +Utah,221300,0.37143333889537794,2013 +Vermont,221100,0.884029484029484,2013 +Vermont,221200,0.0,2013 +Vermont,221300,0.11597051597051597,2013 +Virginia,221100,0.48487937478763166,2013 +Virginia,221200,0.07900101936799185,2013 +Virginia,221300,0.4361196058443765,2013 +Washington,221100,0.6384734952028729,2013 +Washington,221200,0.061907059012703006,2013 +Washington,221300,0.29961944578442407,2013 +West Virginia,221100,0.7503384258363953,2013 +West Virginia,221200,0.1434925546315993,2013 +West Virginia,221300,0.10616901953200542,2013 +Wisconsin,221100,0.7756450108797016,2013 +Wisconsin,221200,0.05400994715573516,2013 +Wisconsin,221300,0.17034504196456327,2013 +Wyoming,221100,0.857200160449258,2013 +Wyoming,221200,0.09306056959486562,2013 +Wyoming,221300,0.04973926995587646,2013 +Alabama,221100,0.6985209496611398,2014 +Alabama,221200,0.10165807084097012,2014 +Alabama,221300,0.19982097949789013,2014 +Alaska,221100,0.7283950617283951,2014 +Alaska,221200,0.12867996201329535,2014 +Alaska,221300,0.1429249762583096,2014 +Arizona,221100,0.9926893657347864,2014 +Arizona,221200,0.0,2014 +Arizona,221300,0.007310634265213565,2014 +Arkansas,221100,0.522809963616009,2014 +Arkansas,221200,0.12762384550797648,2014 +Arkansas,221300,0.34956619087601454,2014 +California,221100,0.3699202280330173,2014 +California,221200,0.0,2014 +California,221300,0.6300797719669827,2014 +Colorado,221100,0.8073473399680551,2014 +Colorado,221200,0.10038088217225703,2014 +Colorado,221300,0.09227177785968792,2014 +Connecticut,221100,0.5361080143688839,2014 +Connecticut,221200,0.13786696395392048,2014 +Connecticut,221300,0.3260250216771956,2014 +Delaware,221100,1.0,2014 +Delaware,221200,0.0,2014 +Delaware,221300,0.0,2014 +District Of Columbia,221100,,2014 +District Of Columbia,221200,,2014 +District Of Columbia,221300,,2014 +Florida,221100,0.7694157335630204,2014 +Florida,221200,0.05806775768016078,2014 +Florida,221300,0.17251650875681884,2014 +Georgia,221100,0.8520115671452488,2014 +Georgia,221200,0.09700167419207549,2014 +Georgia,221300,0.050986758662675664,2014 +Hawaii,221100,1.0,2014 +Hawaii,221200,0.0,2014 +Hawaii,221300,0.0,2014 +Idaho,221100,0.7580527086383602,2014 +Idaho,221200,0.0,2014 +Idaho,221300,0.24194729136163984,2014 +Illinois,221100,0.6750119305458684,2014 +Illinois,221200,0.15711611174332807,2014 +Illinois,221300,0.16787195771080357,2014 +Indiana,221100,0.7140645161290322,2014 +Indiana,221200,0.11748387096774193,2014 +Indiana,221300,0.1684516129032258,2014 +Iowa,221100,0.7911681263105957,2014 +Iowa,221200,0.07030960897989393,2014 +Iowa,221300,0.1385222647095103,2014 +Kansas,221100,0.6611061352440663,2014 +Kansas,221200,0.19570085087326466,2014 +Kansas,221300,0.14319301388266906,2014 +Kentucky,221100,0.5611384957862935,2014 +Kentucky,221200,0.07234854507870886,2014 +Kentucky,221300,0.3665129591349976,2014 +Louisiana,221100,0.46368755414380597,2014 +Louisiana,221200,0.11760034652035807,2014 +Louisiana,221300,0.418712099335836,2014 +Maine,221100,0.4639971900245873,2014 +Maine,221200,0.05760449596066034,2014 +Maine,221300,0.47839831401475236,2014 +Maryland,221100,0.8939744492505785,2014 +Maryland,221200,0.05250980786641183,2014 +Maryland,221300,0.05351574288300976,2014 +Massachusetts,221100,0.5605037554055079,2014 +Massachusetts,221200,0.19543281996813594,2014 +Massachusetts,221300,0.2440634246263561,2014 +Michigan,221100,0.8423069553554321,2014 +Michigan,221200,0.1141023184518107,2014 +Michigan,221300,0.04359072619275723,2014 +Minnesota,221100,0.8430672268907563,2014 +Minnesota,221200,0.10938375350140056,2014 +Minnesota,221300,0.047549019607843135,2014 +Mississippi,221100,0.7217816404128191,2014 +Mississippi,221200,0.0712656165127648,2014 +Mississippi,221300,0.20695274307441608,2014 +Missouri,221100,0.5185680650684932,2014 +Missouri,221200,0.14709974315068494,2014 +Missouri,221300,0.3343321917808219,2014 +Montana,221100,0.7480983031012288,2014 +Montana,221200,0.10708016383850205,2014 +Montana,221300,0.14482153306026915,2014 +Nebraska,221100,0.756085626911315,2014 +Nebraska,221200,0.12770642201834861,2014 +Nebraska,221300,0.1162079510703364,2014 +Nevada,221100,0.6702127659574468,2014 +Nevada,221200,0.0,2014 +Nevada,221300,0.32978723404255317,2014 +New Hampshire,221100,0.7530050407134549,2014 +New Hampshire,221200,0.09228383094222567,2014 +New Hampshire,221300,0.1547111283443195,2014 +New Jersey,221100,0.5197109988776656,2014 +New Jersey,221200,0.2820566778900112,2014 +New Jersey,221300,0.19823232323232323,2014 +New Mexico,221100,0.5222704614889854,2014 +New Mexico,221200,0.1847563917028461,2014 +New Mexico,221300,0.2929731468081685,2014 +New York,221100,0.7633574236084696,2014 +New York,221200,0.16563966020032966,2014 +New York,221300,0.07100291619120071,2014 +North Carolina,221100,0.772391606346421,2014 +North Carolina,221200,0.1518607881845434,2014 +North Carolina,221300,0.07574760546903561,2014 +North Dakota,221100,0.9303400462198745,2014 +North Dakota,221200,0.0,2014 +North Dakota,221300,0.06965995378012545,2014 +Ohio,221100,0.5006976993810154,2014 +Ohio,221200,0.14386919031092346,2014 +Ohio,221300,0.35543311030806113,2014 +Oklahoma,221100,0.4299390243902439,2014 +Oklahoma,221200,0.305,2014 +Oklahoma,221300,0.2650609756097561,2014 +Oregon,221100,0.5322806570737297,2014 +Oregon,221200,0.15064306634407232,2014 +Oregon,221300,0.3170762765821979,2014 +Pennsylvania,221100,0.4742340952197255,2014 +Pennsylvania,221200,0.14392258977079114,2014 +Pennsylvania,221300,0.3818433150094834,2014 +Rhode Island,221100,1.0,2014 +Rhode Island,221200,0.0,2014 +Rhode Island,221300,0.0,2014 +South Carolina,221100,0.7686213277816332,2014 +South Carolina,221200,0.05175803839925977,2014 +South Carolina,221300,0.1796206338191071,2014 +South Dakota,221100,0.7874936451448907,2014 +South Dakota,221200,0.10015251652262329,2014 +South Dakota,221300,0.11235383833248602,2014 +Tennessee,221100,0.7399838666308147,2014 +Tennessee,221200,0.08098055032714888,2014 +Tennessee,221300,0.1790355830420364,2014 +Texas,221100,0.5455876097780669,2014 +Texas,221200,0.10341031350864463,2014 +Texas,221300,0.3510020767132885,2014 +Utah,221100,0.49508742714404663,2014 +Utah,221200,0.12722731057452122,2014 +Utah,221300,0.3776852622814321,2014 +Vermont,221100,0.8783578307146478,2014 +Vermont,221200,0.0,2014 +Vermont,221300,0.12164216928535225,2014 +Virginia,221100,0.4815085021606151,2014 +Virginia,221200,0.08288905101296369,2014 +Virginia,221300,0.43560244682642124,2014 +Washington,221100,0.6356733220050977,2014 +Washington,221200,0.061809685641461345,2014 +Washington,221300,0.3025169923534409,2014 +West Virginia,221100,0.7442799461641992,2014 +West Virginia,221200,0.14439530859450106,2014 +West Virginia,221300,0.11132474524129975,2014 +Wisconsin,221100,0.7716566866267465,2014 +Wisconsin,221200,0.053812375249501,2014 +Wisconsin,221300,0.1745309381237525,2014 +Wyoming,221100,0.8520591763294683,2014 +Wyoming,221200,0.0975609756097561,2014 +Wyoming,221300,0.05037984806077569,2014 +Alabama,221100,0.6966287346034181,2015 +Alabama,221200,0.10216084899629203,2015 +Alabama,221300,0.2012104164002898,2015 +Alaska,221100,0.7088014981273408,2015 +Alaska,221200,0.14840823970037453,2015 +Alaska,221300,0.14279026217228463,2015 +Arizona,221100,0.9928438908030744,2015 +Arizona,221200,0.0,2015 +Arizona,221300,0.0071561091969255235,2015 +Arkansas,221100,0.5215497265733617,2015 +Arkansas,221200,0.12586894058763556,2015 +Arkansas,221300,0.35258133283900267,2015 +California,221100,0.36163447951012717,2015 +California,221200,0.0,2015 +California,221300,0.6383655204898728,2015 +Colorado,221100,0.8051457139373247,2015 +Colorado,221200,0.10132910620656017,2015 +Colorado,221300,0.09352517985611511,2015 +Connecticut,221100,0.550213260953858,2015 +Connecticut,221200,0.10895696006203955,2015 +Connecticut,221300,0.3408297789841024,2015 +Delaware,221100,1.0,2015 +Delaware,221200,0.0,2015 +Delaware,221300,0.0,2015 +District Of Columbia,221100,,2015 +District Of Columbia,221200,,2015 +District Of Columbia,221300,,2015 +Florida,221100,0.7707415112302105,2015 +Florida,221200,0.0546525157787102,2015 +Florida,221300,0.1746059729910793,2015 +Georgia,221100,0.8451048951048951,2015 +Georgia,221200,0.0986013986013986,2015 +Georgia,221300,0.056293706293706294,2015 +Hawaii,221100,1.0,2015 +Hawaii,221200,0.0,2015 +Hawaii,221300,0.0,2015 +Idaho,221100,0.7649173256649893,2015 +Idaho,221200,0.0,2015 +Idaho,221300,0.2350826743350108,2015 +Illinois,221100,0.6747615233379451,2015 +Illinois,221200,0.15703051044928276,2015 +Illinois,221300,0.16820796621277215,2015 +Indiana,221100,0.7168385782800079,2015 +Indiana,221200,0.11057092175284147,2015 +Indiana,221300,0.17259049996715065,2015 +Iowa,221100,0.787893580668782,2015 +Iowa,221200,0.07005125701732975,2015 +Iowa,221300,0.1420551623138882,2015 +Kansas,221100,0.6169324221716022,2015 +Kansas,221200,0.22209567198177677,2015 +Kansas,221300,0.1609719058466211,2015 +Kentucky,221100,0.5568099927936584,2015 +Kentucky,221200,0.07334454319801426,2015 +Kentucky,221300,0.36984546400832735,2015 +Louisiana,221100,0.4667838570277595,2015 +Louisiana,221200,0.10818135208379111,2015 +Louisiana,221300,0.4250347908884494,2015 +Maine,221100,0.4726027397260274,2015 +Maine,221200,0.05958904109589041,2015 +Maine,221300,0.4678082191780822,2015 +Maryland,221100,0.8898313745528871,2015 +Maryland,221200,0.055390904445579967,2015 +Maryland,221300,0.054777721001532956,2015 +Massachusetts,221100,0.5412145001154468,2015 +Massachusetts,221200,0.20888170553374893,2015 +Massachusetts,221300,0.2499037943508043,2015 +Michigan,221100,0.8378185621909471,2015 +Michigan,221200,0.11606124001521491,2015 +Michigan,221300,0.04612019779383796,2015 +Minnesota,221100,0.8376996357523115,2015 +Minnesota,221200,0.10941440179321939,2015 +Minnesota,221300,0.05288596245446904,2015 +Mississippi,221100,0.7225045960852168,2015 +Mississippi,221200,0.06942792256948199,2015 +Mississippi,221300,0.20806748134530118,2015 +Missouri,221100,0.5169655320519704,2015 +Missouri,221200,0.14452915279716524,2015 +Missouri,221300,0.3385053151508644,2015 +Montana,221100,0.748541423570595,2015 +Montana,221200,0.11085180863477247,2015 +Montana,221300,0.14060676779463244,2015 +Nebraska,221100,0.7714750813924368,2015 +Nebraska,221200,0.10656148259454044,2015 +Nebraska,221300,0.12196343601302279,2015 +Nevada,221100,0.6731160896130346,2015 +Nevada,221200,0.0,2015 +Nevada,221300,0.3268839103869654,2015 +New Hampshire,221100,0.756368118323747,2015 +New Hampshire,221200,0.08422350041084635,2015 +New Hampshire,221300,0.15940838126540674,2015 +New Jersey,221100,0.5525214554223704,2015 +New Jersey,221200,0.29299950351088727,2015 +New Jersey,221300,0.15447904106674232,2015 +New Mexico,221100,0.5217109526895658,2015 +New Mexico,221200,0.1834089436163318,2015 +New Mexico,221300,0.2948801036941024,2015 +New York,221100,0.7615001675362596,2015 +New York,221200,0.16930735723517304,2015 +New York,221300,0.06919247522856732,2015 +North Carolina,221100,0.7250232805640549,2015 +North Carolina,221200,0.13841958228016496,2015 +North Carolina,221300,0.13655713715578024,2015 +North Dakota,221100,0.9321705426356589,2015 +North Dakota,221200,0.0,2015 +North Dakota,221300,0.06782945736434108,2015 +Ohio,221100,0.47302314284722946,2015 +Ohio,221200,0.1844141424655633,2015 +Ohio,221300,0.3425627146872072,2015 +Oklahoma,221100,0.4292724298782335,2015 +Oklahoma,221200,0.30641546010783305,2015 +Oklahoma,221300,0.2643121100139335,2015 +Oregon,221100,0.5198519085918549,2015 +Oregon,221200,0.15115536831354526,2015 +Oregon,221300,0.32899272309459976,2015 +Pennsylvania,221100,0.508168732153896,2015 +Pennsylvania,221200,0.13682258396867916,2015 +Pennsylvania,221300,0.35500868387742485,2015 +Rhode Island,221100,1.0,2015 +Rhode Island,221200,0.0,2015 +Rhode Island,221300,0.0,2015 +South Carolina,221100,0.7409323116219668,2015 +South Carolina,221200,0.05740740740740741,2015 +South Carolina,221300,0.2016602809706258,2015 +South Dakota,221100,0.7850701402805611,2015 +South Dakota,221200,0.10020040080160321,2015 +South Dakota,221300,0.11472945891783567,2015 +Tennessee,221100,0.7326637753937457,2015 +Tennessee,221200,0.08226432321387811,2015 +Tennessee,221300,0.18507190139237617,2015 +Texas,221100,0.5549419110878921,2015 +Texas,221200,0.094521979252183,2015 +Texas,221300,0.3505361096599249,2015 +Utah,221100,0.46504037107026286,2015 +Utah,221200,0.13142071808967531,2015 +Utah,221300,0.4035389108400618,2015 +Vermont,221100,0.8647125140924464,2015 +Vermont,221200,0.0,2015 +Vermont,221300,0.13528748590755355,2015 +Virginia,221100,0.47935267857142855,2015 +Virginia,221200,0.08649553571428571,2015 +Virginia,221300,0.4341517857142857,2015 +Washington,221100,0.6418434145064152,2015 +Washington,221200,0.05980623199790521,2015 +Washington,221300,0.2983503534956795,2015 +West Virginia,221100,0.7225193107546048,2015 +West Virginia,221200,0.15408991879580114,2015 +West Virginia,221300,0.12339077044959398,2015 +Wisconsin,221100,0.7626437687096266,2015 +Wisconsin,221200,0.06443989286276981,2015 +Wisconsin,221300,0.1729163384276036,2015 +Wyoming,221100,0.8610129564193169,2015 +Wyoming,221200,0.09658421672555949,2015 +Wyoming,221300,0.04240282685512368,2015 Alabama,221100,0.6958398066632142,2016 Alabama,221200,0.09999136889349215,2016 Alabama,221300,0.20416882444329362,2016 @@ -467,3 +1097,309 @@ Wisconsin,221300,0.19747606614447347,2018 Wyoming,221100,0.8308852719333069,2018 Wyoming,221200,0.13298928146089717,2018 Wyoming,221300,0.036125446605795954,2018 +Alabama,221100,0.6727527455145298,2019 +Alabama,221200,0.10570795860261219,2019 +Alabama,221300,0.22153929588285803,2019 +Alaska,221100,0.7215419501133787,2019 +Alaska,221200,0.13424036281179139,2019 +Alaska,221300,0.14421768707482993,2019 +Arizona,221100,0.9928637504955728,2019 +Arizona,221200,0.0,2019 +Arizona,221300,0.007136249504427118,2019 +Arkansas,221100,0.5405255878284924,2019 +Arkansas,221200,0.09414476717381282,2019 +Arkansas,221300,0.36532964499769477,2019 +California,221100,0.36238112291592056,2019 +California,221200,0.0,2019 +California,221300,0.6376188770840794,2019 +Colorado,221100,0.7845249755142018,2019 +Colorado,221200,0.11018609206660138,2019 +Colorado,221300,0.10528893241919686,2019 +Connecticut,221100,0.5402378318584071,2019 +Connecticut,221200,0.10218473451327434,2019 +Connecticut,221300,0.35757743362831856,2019 +Delaware,221100,1.0,2019 +Delaware,221200,0.0,2019 +Delaware,221300,0.0,2019 +District Of Columbia,221100,,2019 +District Of Columbia,221200,,2019 +District Of Columbia,221300,,2019 +Florida,221100,0.7396305332868596,2019 +Florida,221200,0.06378529104217498,2019 +Florida,221300,0.1965841756709655,2019 +Georgia,221100,0.8176795580110497,2019 +Georgia,221200,0.102339030309289,2019 +Georgia,221300,0.07998141167966127,2019 +Hawaii,221100,1.0,2019 +Hawaii,221200,0.0,2019 +Hawaii,221300,0.0,2019 +Idaho,221100,0.7597096188747732,2019 +Idaho,221200,0.0,2019 +Idaho,221300,0.24029038112522685,2019 +Illinois,221100,0.6590065915066815,2019 +Illinois,221200,0.15866440946583582,2019 +Illinois,221300,0.18232899902748262,2019 +Indiana,221100,0.7192532702294091,2019 +Indiana,221200,0.11141786629856044,2019 +Indiana,221300,0.1693288634720305,2019 +Iowa,221100,0.7783043032786885,2019 +Iowa,221200,0.07325819672131148,2019 +Iowa,221300,0.1484375,2019 +Kansas,221100,0.5912261872819963,2019 +Kansas,221200,0.23168768446471694,2019 +Kansas,221300,0.17708612825328682,2019 +Kentucky,221100,0.5480632411067193,2019 +Kentucky,221200,0.07604743083003952,2019 +Kentucky,221300,0.3758893280632411,2019 +Louisiana,221100,0.4758911403638515,2019 +Louisiana,221200,0.0952521816299364,2019 +Louisiana,221300,0.4288566780062121,2019 +Maine,221100,0.48072330262708973,2019 +Maine,221200,0.04435346298191743,2019 +Maine,221300,0.4749232343909928,2019 +Maryland,221100,0.8690367669401398,2019 +Maryland,221200,0.07241973057834498,2019 +Maryland,221300,0.05854350248151524,2019 +Massachusetts,221100,0.5596739900779589,2019 +Massachusetts,221200,0.21346562721474133,2019 +Massachusetts,221300,0.22686038270729977,2019 +Michigan,221100,0.7992614085993142,2019 +Michigan,221200,0.11338257276004572,2019 +Michigan,221300,0.08735601864064012,2019 +Minnesota,221100,0.8351397183513972,2019 +Minnesota,221200,0.10248470102484701,2019 +Minnesota,221300,0.062375580623755804,2019 +Mississippi,221100,0.70881557598702,2019 +Mississippi,221200,0.069118442401298,2019 +Mississippi,221300,0.22206598161168198,2019 +Missouri,221100,0.6398000410874478,2019 +Missouri,221200,0.015613230158186674,2019 +Missouri,221300,0.3445867287543655,2019 +Montana,221100,0.8080082135523614,2019 +Montana,221200,0.12457221081451061,2019 +Montana,221300,0.06741957563312799,2019 +Nebraska,221100,0.890476955195118,2019 +Nebraska,221200,0.10952304480488197,2019 +Nebraska,221300,0.0,2019 +Nevada,221100,0.7064457675381828,2019 +Nevada,221200,0.0,2019 +Nevada,221300,0.2935542324618172,2019 +New Hampshire,221100,0.7089518668466037,2019 +New Hampshire,221200,0.12370670265407108,2019 +New Hampshire,221300,0.16734143049932523,2019 +New Jersey,221100,0.4893223819301848,2019 +New Jersey,221200,0.35523613963039014,2019 +New Jersey,221300,0.15544147843942505,2019 +New Mexico,221100,0.5165981662978185,2019 +New Mexico,221200,0.1879544736010117,2019 +New Mexico,221300,0.2954473601011698,2019 +New York,221100,0.8066682043002485,2019 +New York,221200,0.11468183798467492,2019 +New York,221300,0.07864995771507649,2019 +North Carolina,221100,0.7271416399029953,2019 +North Carolina,221200,0.13475781608442028,2019 +North Carolina,221300,0.1381005440125844,2019 +North Dakota,221100,0.7278059184217542,2019 +North Dakota,221200,0.1682218075179952,2019 +North Dakota,221300,0.1039722740602506,2019 +Ohio,221100,0.4583274523641496,2019 +Ohio,221200,0.19463655610444602,2019 +Ohio,221300,0.34703599153140435,2019 +Oklahoma,221100,0.4596954181436261,2019 +Oklahoma,221200,0.25797558093737694,2019 +Oklahoma,221300,0.282329000918997,2019 +Oregon,221100,0.6886855912821203,2019 +Oregon,221200,0.0,2019 +Oregon,221300,0.31131440871787974,2019 +Pennsylvania,221100,0.4746586646661665,2019 +Pennsylvania,221200,0.14325581395348838,2019 +Pennsylvania,221300,0.3820855213803451,2019 +Rhode Island,221100,1.0,2019 +Rhode Island,221200,0.0,2019 +Rhode Island,221300,0.0,2019 +South Carolina,221100,0.7229600345913892,2019 +South Carolina,221200,0.05843473963802582,2019 +South Carolina,221300,0.21860522577058497,2019 +South Dakota,221100,0.778974358974359,2019 +South Dakota,221200,0.10051282051282051,2019 +South Dakota,221300,0.12051282051282051,2019 +Tennessee,221100,0.7210566512421942,2019 +Tennessee,221200,0.08648187250101083,2019 +Tennessee,221300,0.192461476256795,2019 +Texas,221100,0.5378030707214417,2019 +Texas,221200,0.09845278321180864,2019 +Texas,221300,0.36374414606674965,2019 +Utah,221100,0.4645858343337335,2019 +Utah,221200,0.11593208712056251,2019 +Utah,221300,0.419482078545704,2019 +Vermont,221100,0.8329911019849419,2019 +Vermont,221200,0.0,2019 +Vermont,221300,0.16700889801505817,2019 +Virginia,221100,0.4580943364704572,2019 +Virginia,221200,0.09929275491451801,2019 +Virginia,221300,0.4426129086150248,2019 +Washington,221100,0.6651829112304938,2019 +Washington,221200,0.03658224609874648,2019 +Washington,221300,0.2982348426707598,2019 +West Virginia,221100,0.7412388709982951,2019 +West Virginia,221200,0.13885205531350633,2019 +West Virginia,221300,0.11990907368819852,2019 +Wisconsin,221100,0.7231002768104295,2019 +Wisconsin,221200,0.07250647379230288,2019 +Wisconsin,221300,0.2043932493972676,2019 +Wyoming,221100,0.8266557645134914,2019 +Wyoming,221200,0.1349141455437449,2019 +Wyoming,221300,0.038430089942763694,2019 +Alabama,221100,0.6697235086432207,2020 +Alabama,221200,0.10674492182126645,2020 +Alabama,221300,0.22353156953551287,2020 +Alaska,221100,0.7305180670439704,2020 +Alaska,221200,0.13191118850674793,2020 +Alaska,221300,0.13757074444928166,2020 +Arizona,221100,0.9926660328670379,2020 +Arizona,221200,0.0,2020 +Arizona,221300,0.007333967132962108,2020 +Arkansas,221100,0.543177021198495,2020 +Arkansas,221200,0.0931449022666789,2020 +Arkansas,221300,0.3636780765348261,2020 +California,221100,0.3751733838669975,2020 +California,221200,0.0,2020 +California,221300,0.6248266161330025,2020 +Colorado,221100,0.7732964122321213,2020 +Colorado,221200,0.12123765952323622,2020 +Colorado,221300,0.10546592824464243,2020 +Connecticut,221100,0.5345045678144764,2020 +Connecticut,221200,0.10737877723120169,2020 +Connecticut,221300,0.3581166549543219,2020 +Delaware,221100,1.0,2020 +Delaware,221200,0.0,2020 +Delaware,221300,0.0,2020 +District Of Columbia,221100,1.0,2020 +District Of Columbia,221200,0.0,2020 +District Of Columbia,221300,0.0,2020 +Florida,221100,0.7385718243524034,2020 +Florida,221200,0.06507133952070925,2020 +Florida,221300,0.19635683612688737,2020 +Georgia,221100,0.8168971126474176,2020 +Georgia,221200,0.10059983733224888,2020 +Georgia,221300,0.08250305002033347,2020 +Hawaii,221100,1.0,2020 +Hawaii,221200,0.0,2020 +Hawaii,221300,0.0,2020 +Idaho,221100,0.7602318000724375,2020 +Idaho,221200,0.0,2020 +Idaho,221300,0.2397681999275625,2020 +Illinois,221100,0.6560417592181252,2020 +Illinois,221200,0.15759662372278987,2020 +Illinois,221300,0.18636161705908486,2020 +Indiana,221100,0.7101288894675173,2020 +Indiana,221200,0.11098815258429892,2020 +Indiana,221300,0.17888295794818382,2020 +Iowa,221100,0.786284517733281,2020 +Iowa,221200,0.06412773197225494,2020 +Iowa,221300,0.14958775029446408,2020 +Kansas,221100,0.5899559236009082,2020 +Kansas,221200,0.22505676505943636,2020 +Kansas,221300,0.1849873113396554,2020 +Kentucky,221100,0.5432680783060327,2020 +Kentucky,221200,0.0759089093088294,2020 +Kentucky,221300,0.3808230123851378,2020 +Louisiana,221100,0.490007513148009,2020 +Louisiana,221200,0.10060105184072127,2020 +Louisiana,221300,0.40939143501126973,2020 +Maine,221100,0.4837257617728532,2020 +Maine,221200,0.0453601108033241,2020 +Maine,221300,0.4709141274238227,2020 +Maryland,221100,0.8893366398016119,2020 +Maryland,221200,0.07377557346559206,2020 +Maryland,221300,0.03688778673279603,2020 +Massachusetts,221100,0.5580114398700656,2020 +Massachusetts,221200,0.22088835534213686,2020 +Massachusetts,221300,0.22110020478779746,2020 +Michigan,221100,0.7983275076324057,2020 +Michigan,221200,0.11309234104685634,2020 +Michigan,221300,0.08858015132073802,2020 +Minnesota,221100,0.8380038962985165,2020 +Minnesota,221200,0.10122883260902144,2020 +Minnesota,221300,0.06076727109246216,2020 +Mississippi,221100,0.7118957088538838,2020 +Mississippi,221200,0.06854970124932103,2020 +Mississippi,221300,0.21955458989679522,2020 +Missouri,221100,0.6380474897291275,2020 +Missouri,221200,0.01601559779959613,2020 +Missouri,221300,0.3459369124712764,2020 +Montana,221100,0.8088642659279779,2020 +Montana,221200,0.12465373961218837,2020 +Montana,221300,0.0664819944598338,2020 +Nebraska,221100,0.8869129046967624,2020 +Nebraska,221200,0.10533515731874145,2020 +Nebraska,221300,0.007751937984496124,2020 +Nevada,221100,0.7114728275137832,2020 +Nevada,221200,0.0,2020 +Nevada,221300,0.28852717248621684,2020 +New Hampshire,221100,0.6973506960035922,2020 +New Hampshire,221200,0.1311180960933992,2020 +New Hampshire,221300,0.17153120790300852,2020 +New Jersey,221100,0.4814761320141547,2020 +New Jersey,221200,0.3524229074889868,2020 +New Jersey,221300,0.16610096049685852,2020 +New Mexico,221100,0.5069566608028147,2020 +New Mexico,221200,0.18982888213657445,2020 +New Mexico,221300,0.3032144570606109,2020 +New York,221100,0.8093599449415003,2020 +New York,221200,0.10968366852744003,2020 +New York,221300,0.08095638653105962,2020 +North Carolina,221100,0.7299098392787142,2020 +North Carolina,221200,0.12988370573631255,2020 +North Carolina,221300,0.14020645498497322,2020 +North Dakota,221100,0.7393338838425544,2020 +North Dakota,221200,0.16570327552986513,2020 +North Dakota,221300,0.09496284062758051,2020 +Ohio,221100,0.452992371333405,2020 +Ohio,221200,0.19759320941227032,2020 +Ohio,221300,0.3494144192543247,2020 +Oklahoma,221100,0.507865492856112,2020 +Oklahoma,221200,0.18451435993649878,2020 +Oklahoma,221300,0.3076201472073892,2020 +Oregon,221100,0.687525232135648,2020 +Oregon,221200,0.0,2020 +Oregon,221300,0.312474767864352,2020 +Pennsylvania,221100,0.46654223908453935,2020 +Pennsylvania,221200,0.14796683291007556,2020 +Pennsylvania,221300,0.38549092800538504,2020 +Rhode Island,221100,1.0,2020 +Rhode Island,221200,0.0,2020 +Rhode Island,221300,0.0,2020 +South Carolina,221100,0.7176286072772898,2020 +South Carolina,221200,0.05821831869510665,2020 +South Carolina,221300,0.2241530740276035,2020 +South Dakota,221100,0.7860851505711319,2020 +South Dakota,221200,0.09190031152647975,2020 +South Dakota,221300,0.12201453790238836,2020 +Tennessee,221100,0.721260199456029,2020 +Tennessee,221200,0.08359020852221215,2020 +Tennessee,221300,0.19514959202175883,2020 +Texas,221100,0.536089262411857,2020 +Texas,221200,0.09660118042835422,2020 +Texas,221300,0.3673095571597888,2020 +Utah,221100,0.5736630733460156,2020 +Utah,221200,0.0,2020 +Utah,221300,0.42633692665398437,2020 +Vermont,221100,0.8338008415147266,2020 +Vermont,221200,0.0,2020 +Vermont,221300,0.1661991584852735,2020 +Virginia,221100,0.45522054718034616,2020 +Virginia,221200,0.10429927414852037,2020 +Virginia,221300,0.4404801786711334,2020 +Washington,221100,0.6630072333658237,2020 +Washington,221200,0.03611552865131073,2020 +Washington,221300,0.30087723798286564,2020 +West Virginia,221100,0.720976384203215,2020 +West Virginia,221200,0.15320500099226037,2020 +West Virginia,221300,0.12581861480452472,2020 +Wisconsin,221100,0.719803630974435,2020 +Wisconsin,221200,0.0721563542052612,2020 +Wisconsin,221300,0.20804001482030382,2020 +Wyoming,221100,0.8170230263157895,2020 +Wyoming,221200,0.14268092105263158,2020 +Wyoming,221300,0.04029605263157895,2020 From 1a487a2a4387ae1cb64854e64b1ea13dc67dcfb3 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 8 Apr 2024 17:14:36 -0400 Subject: [PATCH 108/121] fix error in handling of useeior data objects resulting from renaming of schema in useeior #280 --- R/UtilityFunctions.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/R/UtilityFunctions.R b/R/UtilityFunctions.R index 3636ce55..f4036ddb 100644 --- a/R/UtilityFunctions.R +++ b/R/UtilityFunctions.R @@ -8,7 +8,12 @@ startLogging <- function() { #' @param dataset A string specifying name of the data to load #' @return The data loaded from useeior loadDatafromUSEEIOR <- function(dataset) { - utils::data(package = "useeior", list = dataset) + if(!"sch" %in% dataset) { + dataset_srch <- paste0(dataset, "_12sch") + # currently only uses 2012 schema + # required due to renaming in useeior #280 + } + utils::data(package = "useeior", list = dataset_srch) df <- get(dataset) return(df) } From 3e69c4fb573da519b44955a59d63a2719a8c9e13 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 8 Apr 2024 20:39:52 -0400 Subject: [PATCH 109/121] replace `DisaggregatedSectorCodes` with `NewSectorCodes` to align with useeior v1.5 --- R/StateDisaggFunctions.R | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 7c4ff87f..fc690d02 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -30,8 +30,6 @@ getStateModelDisaggSpecs <- function(configfile, statefile = NULL){ #' @param disaggConfigpath str, path for statefile #' @return A stateior model object with the state-specific disaggregation specs included in model$specs$STateDisaggSpecs object getStateSpecificDisaggSpecs <- function(disaggConfigpath, statefile){ - - temp <-1 filename <- file.path(dirname(disaggConfigpath), statefile) stateFileDF <- utils::read.table(filename, sep = ",", header = TRUE, stringsAsFactors = FALSE, check.names = FALSE) return(stateFileDF) @@ -285,7 +283,7 @@ calculateStateIndustryCommodityOuput <- function(model){ disaggregateStateSectorLists <- function(code_vector, disagg) { originalSectorCode <- gsub("\\/.*","",disagg$OriginalSectorCode) # remove everything after "/" - disaggCodes <- gsub("\\/.*","",disagg$DisaggregatedSectorCodes) # remove everything after "/" + disaggCodes <- gsub("\\/.*","",disagg$NewSectorCodes) # remove everything after "/" originalIndex <- grep(paste0("^",originalSectorCode,"$"), code_vector) # the ^ and $ are required to find an exact match newList <- append(code_vector[1:originalIndex -1], disaggCodes) @@ -319,26 +317,26 @@ createDisaggFilesFromProxyData <- function(model, disagg, disaggYear, disaggStat # If the state/year combination is not found, assume a uniform split between sectors if(dim(stateDFYear)[1] == 0){ - activity <- unlist(disagg$DisaggregatedSectorCodes) - uniformAllocationVector <- 1/length(disagg$DisaggregatedSectorCodes) - share <- rep(uniformAllocationVector,length(disagg$DisaggregatedSectorCodes)) + activity <- unlist(disagg$NewSectorCodes) + uniformAllocationVector <- 1/length(disagg$NewSectorCodes) + share <- rep(uniformAllocationVector,length(disagg$NewSectorCodes)) - stateDFYear <- data.frame(State = rep(disaggState, length(disagg$DisaggregatedSectorCodes)), + stateDFYear <- data.frame(State = rep(disaggState, length(disagg$NewSectorCodes)), Activity = activity, Share = share, - Year = rep(disaggYear, length(disagg$DisaggregatedSectorCodes))) + Year = rep(disaggYear, length(disagg$NewSectorCodes))) } print(paste0("For ",disaggState,"-",disaggYear, " the allocation to disaggregate ", - disagg$OriginalSectorCode, " into ", disagg$DisaggregatedSectorCodes, " is ", stateDFYear$Share)) + disagg$OriginalSectorCode, " into ", disagg$NewSectorCodes, " is ", stateDFYear$Share)) # Default Make DF based on proxy employment values # Specifying commodity disaggregation (column splits) for Make DF - industries <- c(rep(disagg$OriginalSectorCode,length(disagg$DisaggregatedSectorCodes))) - commodities <- unlist(disagg$DisaggregatedSectorCodes) - PercentMake <- stateDFYear$Share # need to add code to ensure that the order of stateDF$Share is the same as the order of disagg$DisaggregatedSectorCodes - note <- c(rep("CommodityDisagg", length(disagg$DisaggregatedSectorCodes))) + industries <- c(rep(disagg$OriginalSectorCode,length(disagg$NewSectorCodes))) + commodities <- unlist(disagg$NewSectorCodes) + PercentMake <- stateDFYear$Share # need to add code to ensure that the order of stateDF$Share is the same as the order of disagg$NewSectorCodes + note <- c(rep("CommodityDisagg", length(disagg$NewSectorCodes))) makeDF <- data.frame(cbind(data.frame(industries), data.frame(commodities), data.frame(PercentMake), data.frame(note))) #need to rename the columns with the correct column names colnames(makeDF) <- c("IndustryCode","CommodityCode", "PercentMake", "Note") @@ -346,10 +344,10 @@ createDisaggFilesFromProxyData <- function(model, disagg, disaggYear, disaggStat # Default Use DF based on employment ratios # Specifying industry disaggregation (column splits) for Use DF - industries <- unlist(disagg$DisaggregatedSectorCodes) - commodities <- c(rep(disagg$OriginalSectorCode,length(disagg$DisaggregatedSectorCodes))) + industries <- unlist(disagg$NewSectorCodes) + commodities <- c(rep(disagg$OriginalSectorCode,length(disagg$NewSectorCodes))) PercentUse <- stateDFYear$Share - note <- c(rep("IndustryDisagg", length(disagg$DisaggregatedSectorCodes))) + note <- c(rep("IndustryDisagg", length(disagg$NewSectorCodes))) useDF <- data.frame(cbind(data.frame(industries), data.frame(commodities), data.frame(PercentUse), data.frame(note))) #need to rename the columns with the correct column names useDF_2 <- makeDF # so that colnames match From 009318f173d54d6804b0d636ed98a9183a80481b Mon Sep 17 00:00:00 2001 From: Ben Young Date: Mon, 8 Apr 2024 20:58:02 -0400 Subject: [PATCH 110/121] don't add schema for select useeior objects --- R/InteregionalCommodityFlowFunctions.R | 3 ++- R/UtilityFunctions.R | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/R/InteregionalCommodityFlowFunctions.R b/R/InteregionalCommodityFlowFunctions.R index 30bda2e6..06227f63 100644 --- a/R/InteregionalCommodityFlowFunctions.R +++ b/R/InteregionalCommodityFlowFunctions.R @@ -143,7 +143,8 @@ generateDomestic2RegionICFs <- function(state, year, ioschema, iolevel, # Merge ICF_2r_wide with complete BEA Commodity list CommodityCodeName <- loadDatafromUSEEIOR(paste(iolevel, "CommodityCodeName_2012", - sep = "_")) + sep = "_"), + appendSchema = FALSE) # Update commodities from disaggregation if (!is.null(disagg)){ disagg_df <- data.frame(BEA_2012_Summary_Commodity_Code = c("221100", "221200", "221300"), diff --git a/R/UtilityFunctions.R b/R/UtilityFunctions.R index f4036ddb..ec66805a 100644 --- a/R/UtilityFunctions.R +++ b/R/UtilityFunctions.R @@ -6,12 +6,15 @@ startLogging <- function() { #' Load data from useeior using flexible dataset name #' @param dataset A string specifying name of the data to load +#' @param appendSchema bool, set to FALSE to ignore schema in name #' @return The data loaded from useeior -loadDatafromUSEEIOR <- function(dataset) { - if(!"sch" %in% dataset) { +loadDatafromUSEEIOR <- function(dataset, appendSchema = TRUE) { + if(appendSchema && !"sch" %in% dataset) { dataset_srch <- paste0(dataset, "_12sch") # currently only uses 2012 schema # required due to renaming in useeior #280 + } else { + dataset_srch <- dataset } utils::data(package = "useeior", list = dataset_srch) df <- get(dataset) From 2350710a418f2494a99be2fda79b1c1a6a7b413f Mon Sep 17 00:00:00 2001 From: jvendries Date: Thu, 25 Apr 2024 17:09:43 -0400 Subject: [PATCH 111/121] change call for createDisaggFilesFromProxyData function to useeior package --- R/BuildModel.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 1313b87a..9685a164 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -652,8 +652,8 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { # Disaggregate national model objects once (i.e. not for each state) if(!is.null(disagg$stateDF)){ - model <- createDisaggFilesFromProxyData(model, disagg, year, "US") #Function to disagg by proxy - #model <- useeior:::createDisaggFilesFromProxyData(model, disagg, year, "US") #Function to disagg by proxy + #model <- createDisaggFilesFromProxyData(model, disagg, year, "US") #Function to disagg by proxy + model <- useeior:::createDisaggFilesFromProxyData(model, disagg, year, "US") #Function to disagg by proxy disagg <- model$DisaggregationSpecs[[disagg$OriginalSectorCode]] #update disagg } From b786b922b396f8711074b939b054b2c866df631d Mon Sep 17 00:00:00 2001 From: jvendries Date: Thu, 25 Apr 2024 17:10:07 -0400 Subject: [PATCH 112/121] change package to useeior --- inst/extdata/disaggspecs/UtilityDisaggByProxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml b/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml index e32b40ec..ff6e3469 100644 --- a/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml +++ b/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml @@ -8,4 +8,4 @@ Disaggregation: # UseFile: UtilityStateDummy_Use.csv # EnvFile: UtilityDisaggregationSummary_Env.csv stateFile: Employment_ratios.csv #Uncomment this when the above Make and USe files are working in stateior disagg - package: "stateior" + package: "useeior" From bcf707a1104268192ce67ef06e1b320d184e8b20 Mon Sep 17 00:00:00 2001 From: jvendries Date: Fri, 26 Apr 2024 15:05:38 -0400 Subject: [PATCH 113/121] call create disagg files from proxy data function from useeior for state objects --- R/BuildModel.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/BuildModel.R b/R/BuildModel.R index 9685a164..24351c4e 100644 --- a/R/BuildModel.R +++ b/R/BuildModel.R @@ -679,8 +679,8 @@ assembleTwoRegionIO <- function(year, iolevel, disagg_specs=NULL) { if(!is.null(disagg$stateDF)) { # Get the correct disaggregation percentages for each state - model <- createDisaggFilesFromProxyData(model, disagg, year, state) - #model <- useeior:::createDisaggFilesFromProxyData(model, disagg, year, state) + #model <- createDisaggFilesFromProxyData(model, disagg, year, state) + model <- useeior:::createDisaggFilesFromProxyData(model, disagg, year, state) disagg <- model$DisaggregationSpecs[[disagg$OriginalSectorCode]] } model <- disaggregateStateModel(model, state) From 8b16e9bc5a64f58d29964f72d8e0bb78869e0798 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Sat, 26 Oct 2024 14:11:09 -0400 Subject: [PATCH 114/121] temporarily drop new disaggregation approach with employment data --- R/StateDisaggFunctions.R | 2 + .../extdata/disaggspecs/Employment_ratios.csv | 1405 ----------------- .../disaggspecs/UtilityDisaggByProxy.yml | 11 - .../disaggspecs/UtilityStateDummy_Make.csv | 4 - .../disaggspecs/UtilityStateDummy_Use.csv | 7 - .../modelspecs/StateIOv1.0.0-75_Proxy.yml | 28 - 6 files changed, 2 insertions(+), 1455 deletions(-) delete mode 100644 inst/extdata/disaggspecs/Employment_ratios.csv delete mode 100644 inst/extdata/disaggspecs/UtilityDisaggByProxy.yml delete mode 100644 inst/extdata/disaggspecs/UtilityStateDummy_Make.csv delete mode 100644 inst/extdata/disaggspecs/UtilityStateDummy_Use.csv delete mode 100644 inst/extdata/modelspecs/StateIOv1.0.0-75_Proxy.yml diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index fc690d02..57a85c52 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -309,6 +309,8 @@ createDisaggFilesFromProxyData <- function(model, disagg, disaggYear, disaggStat # in the Use table, the three Detail utility commodities (rows) will have that same split for across all columns (industries/final demand) # 2) The disagg parameter will contain a disagg$stateDF variable that includes the data for the relevant disaggState and disaggYear parameters. + stop("The function is not yet valid") + temp <-1 #Get subset of ratios for current year diff --git a/inst/extdata/disaggspecs/Employment_ratios.csv b/inst/extdata/disaggspecs/Employment_ratios.csv deleted file mode 100644 index e15a6d6b..00000000 --- a/inst/extdata/disaggspecs/Employment_ratios.csv +++ /dev/null @@ -1,1405 +0,0 @@ -State,ActivityProducedBy,Share,Year -US,221100,0.6404913710116216,2012 -US,221200,0.10727150968930062,2012 -US,221300,0.2522371192990778,2012 -US,221100,0.6420260751272352,2013 -US,221200,0.10719023464234716,2013 -US,221300,0.2507836902304176,2013 -US,221100,0.6389537035998339,2014 -US,221200,0.10853628439698014,2014 -US,221300,0.2525100120031859,2014 -US,221100,0.63667485063675,2015 -US,221200,0.10935406914875119,2015 -US,221300,0.2539710802144988,2015 -US,221100,0.6354175796809285,2016 -US,221200,0.10814819143178722,2016 -US,221300,0.2564342288872843,2016 -US,221100,0.6343800234578942,2017 -US,221200,0.10686993127004159,2017 -US,221300,0.2587500452720642,2017 -US,221100,0.6370838539604272,2018 -US,221200,0.1030946587508028,2018 -US,221300,0.25982148728876997,2018 -US,221100,0.6323852959185828,2019 -US,221200,0.10409549347916358,2019 -US,221300,0.26351921060225364,2019 -US,221100,0.6345549827470847,2020 -US,221200,0.10106699586185734,2020 -US,221300,0.26437802139105804,2020 -Alabama,221100,0.699668282725185,2012 -Alabama,221200,0.10142893595304925,2012 -Alabama,221300,0.19890278132176575,2012 -Alaska,221100,1.0,2012 -Alaska,221200,0.0,2012 -Alaska,221300,0.0,2012 -Arizona,221100,0.9927331449333872,2012 -Arizona,221200,0.0,2012 -Arizona,221300,0.0072668550666128385,2012 -Arkansas,221100,0.5314065510597302,2012 -Arkansas,221200,0.12244701348747591,2012 -Arkansas,221300,0.34614643545279383,2012 -California,221100,0.40988151790170235,2012 -California,221200,0.0,2012 -California,221300,0.5901184820982976,2012 -Colorado,221100,0.7833768819211149,2012 -Colorado,221200,0.1272863008585293,2012 -Colorado,221300,0.08933681722035586,2012 -Connecticut,221100,0.5353260869565217,2012 -Connecticut,221200,0.1331521739130435,2012 -Connecticut,221300,0.33152173913043476,2012 -Delaware,221100,1.0,2012 -Delaware,221200,0.0,2012 -Delaware,221300,0.0,2012 -District Of Columbia,221100,,2012 -District Of Columbia,221200,,2012 -District Of Columbia,221300,,2012 -Florida,221100,0.782295311406578,2012 -Florida,221200,0.06018194541637509,2012 -Florida,221300,0.1575227431770469,2012 -Georgia,221100,0.8606474456246839,2012 -Georgia,221200,0.09403136064744562,2012 -Georgia,221300,0.04532119372787051,2012 -Hawaii,221100,1.0,2012 -Hawaii,221200,0.0,2012 -Hawaii,221300,0.0,2012 -Idaho,221100,0.5671897289586305,2012 -Idaho,221200,0.07845934379457917,2012 -Idaho,221300,0.3543509272467903,2012 -Illinois,221100,0.6654611211573237,2012 -Illinois,221200,0.14788426763110307,2012 -Illinois,221300,0.18665461121157323,2012 -Indiana,221100,0.7119979168022915,2012 -Indiana,221200,0.12180196601783738,2012 -Indiana,221300,0.1662001171798711,2012 -Iowa,221100,0.7912936848559167,2012 -Iowa,221200,0.07136725935009197,2012 -Iowa,221300,0.13733905579399142,2012 -Kansas,221100,0.6606669611307421,2012 -Kansas,221200,0.20262809187279152,2012 -Kansas,221300,0.13670494699646643,2012 -Kentucky,221100,0.5605687504964652,2012 -Kentucky,221200,0.07069663992374295,2012 -Kentucky,221300,0.36873460957979187,2012 -Louisiana,221100,0.46764684991831806,2012 -Louisiana,221200,0.12486682292776476,2012 -Louisiana,221300,0.4074863271539172,2012 -Maine,221100,0.5032456440040998,2012 -Maine,221200,0.02801503245644004,2012 -Maine,221300,0.4687393235394602,2012 -Maryland,221100,0.9028843352432747,2012 -Maryland,221200,0.049528989025929886,2012 -Maryland,221300,0.04758667573079538,2012 -Massachusetts,221100,0.5052857483506875,2012 -Massachusetts,221200,0.25570304427311025,2012 -Massachusetts,221300,0.2390112073762022,2012 -Michigan,221100,0.8485677974386548,2012 -Michigan,221200,0.1131097859028253,2012 -Michigan,221300,0.038322416658519896,2012 -Minnesota,221100,0.8330964899815262,2012 -Minnesota,221200,0.11809009521102742,2012 -Minnesota,221300,0.04881341480744635,2012 -Mississippi,221100,0.7169085312225154,2012 -Mississippi,221200,0.07310905892700088,2012 -Mississippi,221300,0.20998240985048372,2012 -Missouri,221100,0.523525971609336,2012 -Missouri,221200,0.14737625604763677,2012 -Missouri,221300,0.3290977723430273,2012 -Montana,221100,0.7898572730033404,2012 -Montana,221200,0.09839052535681748,2012 -Montana,221300,0.11175220163984209,2012 -Nebraska,221100,0.7332264712617358,2012 -Nebraska,221200,0.15846118616899474,2012 -Nebraska,221300,0.10831234256926953,2012 -Nevada,221100,0.6879575864680636,2012 -Nevada,221200,0.0,2012 -Nevada,221300,0.3120424135319364,2012 -New Hampshire,221100,0.7851796407185628,2012 -New Hampshire,221200,0.0748502994011976,2012 -New Hampshire,221300,0.13997005988023953,2012 -New Jersey,221100,0.5142242575631418,2012 -New Jersey,221200,0.27921176797113517,2012 -New Jersey,221300,0.206563974465723,2012 -New Mexico,221100,0.518206829584075,2012 -New Mexico,221200,0.1844958731186276,2012 -New Mexico,221300,0.2972972972972973,2012 -New York,221100,0.7616969504615303,2012 -New York,221200,0.16334735115977678,2012 -New York,221300,0.0749556983786929,2012 -North Carolina,221100,0.744369460931783,2012 -North Carolina,221200,0.1702577445320758,2012 -North Carolina,221300,0.08537279453614115,2012 -North Dakota,221100,0.7047745358090186,2012 -North Dakota,221200,0.22122015915119364,2012 -North Dakota,221300,0.07400530503978779,2012 -Ohio,221100,0.4993043416217759,2012 -Ohio,221200,0.14476829224786844,2012 -Ohio,221300,0.3559273661303557,2012 -Oklahoma,221100,0.43377606752730885,2012 -Oklahoma,221200,0.29636295928500495,2012 -Oklahoma,221300,0.2698609731876862,2012 -Oregon,221100,0.7234502243643012,2012 -Oregon,221200,0.0,2012 -Oregon,221300,0.2765497756356989,2012 -Pennsylvania,221100,0.49813090033580437,2012 -Pennsylvania,221200,0.1353671672052208,2012 -Pennsylvania,221300,0.36650193245897483,2012 -Rhode Island,221100,1.0,2012 -Rhode Island,221200,0.0,2012 -Rhode Island,221300,0.0,2012 -South Carolina,221100,0.7692038086336819,2012 -South Carolina,221200,0.05099596939073544,2012 -South Carolina,221300,0.17980022197558268,2012 -South Dakota,221100,0.7876016260162602,2012 -South Dakota,221200,0.10467479674796748,2012 -South Dakota,221300,0.10772357723577236,2012 -Tennessee,221100,0.7536257361343061,2012 -Tennessee,221200,0.07717324426474466,2012 -Tennessee,221300,0.16920101960094927,2012 -Texas,221100,0.5477777916765696,2012 -Texas,221200,0.09883291845439876,2012 -Texas,221300,0.3533892898690317,2012 -Utah,221100,0.47396889790398916,2012 -Utah,221200,0.1440162271805274,2012 -Utah,221300,0.3820148749154834,2012 -Vermont,221100,0.8854266538830298,2012 -Vermont,221200,0.0,2012 -Vermont,221300,0.11457334611697027,2012 -Virginia,221100,0.4924742093691865,2012 -Virginia,221200,0.07570889001634816,2012 -Virginia,221300,0.4318169006144653,2012 -Washington,221100,0.6375585842805581,2012 -Washington,221200,0.06335182890696547,2012 -Washington,221300,0.29908958681247644,2012 -West Virginia,221100,0.5397422126745435,2012 -West Virginia,221200,0.09922126745435016,2012 -West Virginia,221300,0.36103651987110635,2012 -Wisconsin,221100,0.781085010329788,2012 -Wisconsin,221200,0.05210804193128778,2012 -Wisconsin,221300,0.16680694773892418,2012 -Wyoming,221100,0.8585817888799355,2012 -Wyoming,221200,0.0894439967767929,2012 -Wyoming,221300,0.051974214343271555,2012 -Alabama,221100,0.7012220996350674,2013 -Alabama,221200,0.10201137231604855,2013 -Alabama,221300,0.19676652804888398,2013 -Alaska,221100,1.0,2013 -Alaska,221200,0.0,2013 -Alaska,221300,0.0,2013 -Arizona,221100,0.9926365309879321,2013 -Arizona,221200,0.0,2013 -Arizona,221300,0.0073634690120679075,2013 -Arkansas,221100,0.5391730644713717,2013 -Arkansas,221200,0.12311534548145407,2013 -Arkansas,221300,0.33771159004717416,2013 -California,221100,0.39064786996379325,2013 -California,221200,0.0,2013 -California,221300,0.6093521300362068,2013 -Colorado,221100,0.8013532490744287,2013 -Colorado,221200,0.10608962083492915,2013 -Colorado,221300,0.09255713009064216,2013 -Connecticut,221100,0.5405173470638716,2013 -Connecticut,221200,0.13460831187936742,2013 -Connecticut,221300,0.32487434105676105,2013 -Delaware,221100,1.0,2013 -Delaware,221200,0.0,2013 -Delaware,221300,0.0,2013 -District Of Columbia,221100,,2013 -District Of Columbia,221200,,2013 -District Of Columbia,221300,,2013 -Florida,221100,0.7761050949760341,2013 -Florida,221200,0.05684360021303036,2013 -Florida,221300,0.16705130481093555,2013 -Georgia,221100,0.8565226171243941,2013 -Georgia,221200,0.09627423263327949,2013 -Georgia,221300,0.04720315024232633,2013 -Hawaii,221100,1.0,2013 -Hawaii,221200,0.0,2013 -Hawaii,221300,0.0,2013 -Idaho,221100,0.7425891181988743,2013 -Idaho,221200,0.0,2013 -Idaho,221300,0.2574108818011257,2013 -Illinois,221100,0.6766881147844095,2013 -Illinois,221200,0.1550920789882405,2013 -Illinois,221300,0.16821980622735005,2013 -Indiana,221100,0.7069897726532474,2013 -Indiana,221200,0.11901504787961696,2013 -Indiana,221300,0.1739951794671357,2013 -Iowa,221100,0.7882454624027658,2013 -Iowa,221200,0.07346585998271392,2013 -Iowa,221300,0.13828867761452032,2013 -Kansas,221100,0.6593443730990199,2013 -Kansas,221200,0.19894108369944802,2013 -Kansas,221300,0.14171454320153204,2013 -Kentucky,221100,0.5593505039193729,2013 -Kentucky,221200,0.07070868661014237,2013 -Kentucky,221300,0.36994080947048474,2013 -Louisiana,221100,0.4723404255319149,2013 -Louisiana,221200,0.11872340425531915,2013 -Louisiana,221300,0.40893617021276596,2013 -Maine,221100,0.4902229845626072,2013 -Maine,221200,0.03979416809605489,2013 -Maine,221300,0.4699828473413379,2013 -Maryland,221100,0.9012927147008718,2013 -Maryland,221200,0.04970437919631226,2013 -Maryland,221300,0.049002906102815914,2013 -Massachusetts,221100,0.5336808340016038,2013 -Massachusetts,221200,0.21708099438652767,2013 -Massachusetts,221300,0.24923817161186848,2013 -Michigan,221100,0.8480851895271591,2013 -Michigan,221200,0.11347205939820243,2013 -Michigan,221300,0.03844275107463853,2013 -Minnesota,221100,0.8399500277623543,2013 -Minnesota,221200,0.1103553581343698,2013 -Minnesota,221300,0.049694614103275955,2013 -Mississippi,221100,0.7251056452486727,2013 -Mississippi,221200,0.07118864449019395,2013 -Mississippi,221300,0.20370571026113338,2013 -Missouri,221100,0.5182819734951302,2013 -Missouri,221200,0.15046037575176965,2013 -Missouri,221300,0.3312576507531002,2013 -Montana,221100,0.7834862385321101,2013 -Montana,221200,0.10305810397553516,2013 -Montana,221300,0.11345565749235474,2013 -Nebraska,221100,0.7583965330444203,2013 -Nebraska,221200,0.13001083423618634,2013 -Nebraska,221300,0.11159263271939328,2013 -Nevada,221100,0.672566371681416,2013 -Nevada,221200,0.0,2013 -Nevada,221300,0.3274336283185841,2013 -New Hampshire,221100,0.7671840354767184,2013 -New Hampshire,221200,0.09534368070953436,2013 -New Hampshire,221300,0.13747228381374724,2013 -New Jersey,221100,0.5147460595446585,2013 -New Jersey,221200,0.27782837127845883,2013 -New Jersey,221300,0.20742556917688265,2013 -New Mexico,221100,0.5248477075985893,2013 -New Mexico,221200,0.1829111894838089,2013 -New Mexico,221300,0.2922411029176018,2013 -New York,221100,0.7646516528381404,2013 -New York,221200,0.16075332543131832,2013 -New York,221300,0.07459502173054129,2013 -North Carolina,221100,0.7496595369702795,2013 -North Carolina,221200,0.16646639429624288,2013 -North Carolina,221300,0.08387406873347752,2013 -North Dakota,221100,0.7085166968677193,2013 -North Dakota,221200,0.21485891793942533,2013 -North Dakota,221300,0.07662438519285529,2013 -Ohio,221100,0.4921713227013478,2013 -Ohio,221200,0.14763686562284303,2013 -Ohio,221300,0.3601918116758092,2013 -Oklahoma,221100,0.43314711359404096,2013 -Oklahoma,221200,0.2956548727498448,2013 -Oklahoma,221300,0.27119801365611423,2013 -Oregon,221100,0.6907734717042322,2013 -Oregon,221200,0.0,2013 -Oregon,221300,0.3092265282957678,2013 -Pennsylvania,221100,0.4920473342664461,2013 -Pennsylvania,221200,0.1386944903931798,2013 -Pennsylvania,221300,0.3692581753403741,2013 -Rhode Island,221100,1.0,2013 -Rhode Island,221200,0.0,2013 -Rhode Island,221300,0.0,2013 -South Carolina,221100,0.7697678477919357,2013 -South Carolina,221200,0.05184150811659976,2013 -South Carolina,221300,0.1783906440914645,2013 -South Dakota,221100,0.7897435897435897,2013 -South Dakota,221200,0.09897435897435898,2013 -South Dakota,221300,0.11128205128205128,2013 -Tennessee,221100,0.7502307388036742,2013 -Tennessee,221200,0.07827539225596625,2013 -Tennessee,221300,0.1714938689403595,2013 -Texas,221100,0.542323620397166,2013 -Texas,221200,0.10521654525496457,2013 -Texas,221300,0.3524598343478695,2013 -Utah,221100,0.4969130652427832,2013 -Utah,221200,0.1316535958618388,2013 -Utah,221300,0.37143333889537794,2013 -Vermont,221100,0.884029484029484,2013 -Vermont,221200,0.0,2013 -Vermont,221300,0.11597051597051597,2013 -Virginia,221100,0.48487937478763166,2013 -Virginia,221200,0.07900101936799185,2013 -Virginia,221300,0.4361196058443765,2013 -Washington,221100,0.6384734952028729,2013 -Washington,221200,0.061907059012703006,2013 -Washington,221300,0.29961944578442407,2013 -West Virginia,221100,0.7503384258363953,2013 -West Virginia,221200,0.1434925546315993,2013 -West Virginia,221300,0.10616901953200542,2013 -Wisconsin,221100,0.7756450108797016,2013 -Wisconsin,221200,0.05400994715573516,2013 -Wisconsin,221300,0.17034504196456327,2013 -Wyoming,221100,0.857200160449258,2013 -Wyoming,221200,0.09306056959486562,2013 -Wyoming,221300,0.04973926995587646,2013 -Alabama,221100,0.6985209496611398,2014 -Alabama,221200,0.10165807084097012,2014 -Alabama,221300,0.19982097949789013,2014 -Alaska,221100,0.7283950617283951,2014 -Alaska,221200,0.12867996201329535,2014 -Alaska,221300,0.1429249762583096,2014 -Arizona,221100,0.9926893657347864,2014 -Arizona,221200,0.0,2014 -Arizona,221300,0.007310634265213565,2014 -Arkansas,221100,0.522809963616009,2014 -Arkansas,221200,0.12762384550797648,2014 -Arkansas,221300,0.34956619087601454,2014 -California,221100,0.3699202280330173,2014 -California,221200,0.0,2014 -California,221300,0.6300797719669827,2014 -Colorado,221100,0.8073473399680551,2014 -Colorado,221200,0.10038088217225703,2014 -Colorado,221300,0.09227177785968792,2014 -Connecticut,221100,0.5361080143688839,2014 -Connecticut,221200,0.13786696395392048,2014 -Connecticut,221300,0.3260250216771956,2014 -Delaware,221100,1.0,2014 -Delaware,221200,0.0,2014 -Delaware,221300,0.0,2014 -District Of Columbia,221100,,2014 -District Of Columbia,221200,,2014 -District Of Columbia,221300,,2014 -Florida,221100,0.7694157335630204,2014 -Florida,221200,0.05806775768016078,2014 -Florida,221300,0.17251650875681884,2014 -Georgia,221100,0.8520115671452488,2014 -Georgia,221200,0.09700167419207549,2014 -Georgia,221300,0.050986758662675664,2014 -Hawaii,221100,1.0,2014 -Hawaii,221200,0.0,2014 -Hawaii,221300,0.0,2014 -Idaho,221100,0.7580527086383602,2014 -Idaho,221200,0.0,2014 -Idaho,221300,0.24194729136163984,2014 -Illinois,221100,0.6750119305458684,2014 -Illinois,221200,0.15711611174332807,2014 -Illinois,221300,0.16787195771080357,2014 -Indiana,221100,0.7140645161290322,2014 -Indiana,221200,0.11748387096774193,2014 -Indiana,221300,0.1684516129032258,2014 -Iowa,221100,0.7911681263105957,2014 -Iowa,221200,0.07030960897989393,2014 -Iowa,221300,0.1385222647095103,2014 -Kansas,221100,0.6611061352440663,2014 -Kansas,221200,0.19570085087326466,2014 -Kansas,221300,0.14319301388266906,2014 -Kentucky,221100,0.5611384957862935,2014 -Kentucky,221200,0.07234854507870886,2014 -Kentucky,221300,0.3665129591349976,2014 -Louisiana,221100,0.46368755414380597,2014 -Louisiana,221200,0.11760034652035807,2014 -Louisiana,221300,0.418712099335836,2014 -Maine,221100,0.4639971900245873,2014 -Maine,221200,0.05760449596066034,2014 -Maine,221300,0.47839831401475236,2014 -Maryland,221100,0.8939744492505785,2014 -Maryland,221200,0.05250980786641183,2014 -Maryland,221300,0.05351574288300976,2014 -Massachusetts,221100,0.5605037554055079,2014 -Massachusetts,221200,0.19543281996813594,2014 -Massachusetts,221300,0.2440634246263561,2014 -Michigan,221100,0.8423069553554321,2014 -Michigan,221200,0.1141023184518107,2014 -Michigan,221300,0.04359072619275723,2014 -Minnesota,221100,0.8430672268907563,2014 -Minnesota,221200,0.10938375350140056,2014 -Minnesota,221300,0.047549019607843135,2014 -Mississippi,221100,0.7217816404128191,2014 -Mississippi,221200,0.0712656165127648,2014 -Mississippi,221300,0.20695274307441608,2014 -Missouri,221100,0.5185680650684932,2014 -Missouri,221200,0.14709974315068494,2014 -Missouri,221300,0.3343321917808219,2014 -Montana,221100,0.7480983031012288,2014 -Montana,221200,0.10708016383850205,2014 -Montana,221300,0.14482153306026915,2014 -Nebraska,221100,0.756085626911315,2014 -Nebraska,221200,0.12770642201834861,2014 -Nebraska,221300,0.1162079510703364,2014 -Nevada,221100,0.6702127659574468,2014 -Nevada,221200,0.0,2014 -Nevada,221300,0.32978723404255317,2014 -New Hampshire,221100,0.7530050407134549,2014 -New Hampshire,221200,0.09228383094222567,2014 -New Hampshire,221300,0.1547111283443195,2014 -New Jersey,221100,0.5197109988776656,2014 -New Jersey,221200,0.2820566778900112,2014 -New Jersey,221300,0.19823232323232323,2014 -New Mexico,221100,0.5222704614889854,2014 -New Mexico,221200,0.1847563917028461,2014 -New Mexico,221300,0.2929731468081685,2014 -New York,221100,0.7633574236084696,2014 -New York,221200,0.16563966020032966,2014 -New York,221300,0.07100291619120071,2014 -North Carolina,221100,0.772391606346421,2014 -North Carolina,221200,0.1518607881845434,2014 -North Carolina,221300,0.07574760546903561,2014 -North Dakota,221100,0.9303400462198745,2014 -North Dakota,221200,0.0,2014 -North Dakota,221300,0.06965995378012545,2014 -Ohio,221100,0.5006976993810154,2014 -Ohio,221200,0.14386919031092346,2014 -Ohio,221300,0.35543311030806113,2014 -Oklahoma,221100,0.4299390243902439,2014 -Oklahoma,221200,0.305,2014 -Oklahoma,221300,0.2650609756097561,2014 -Oregon,221100,0.5322806570737297,2014 -Oregon,221200,0.15064306634407232,2014 -Oregon,221300,0.3170762765821979,2014 -Pennsylvania,221100,0.4742340952197255,2014 -Pennsylvania,221200,0.14392258977079114,2014 -Pennsylvania,221300,0.3818433150094834,2014 -Rhode Island,221100,1.0,2014 -Rhode Island,221200,0.0,2014 -Rhode Island,221300,0.0,2014 -South Carolina,221100,0.7686213277816332,2014 -South Carolina,221200,0.05175803839925977,2014 -South Carolina,221300,0.1796206338191071,2014 -South Dakota,221100,0.7874936451448907,2014 -South Dakota,221200,0.10015251652262329,2014 -South Dakota,221300,0.11235383833248602,2014 -Tennessee,221100,0.7399838666308147,2014 -Tennessee,221200,0.08098055032714888,2014 -Tennessee,221300,0.1790355830420364,2014 -Texas,221100,0.5455876097780669,2014 -Texas,221200,0.10341031350864463,2014 -Texas,221300,0.3510020767132885,2014 -Utah,221100,0.49508742714404663,2014 -Utah,221200,0.12722731057452122,2014 -Utah,221300,0.3776852622814321,2014 -Vermont,221100,0.8783578307146478,2014 -Vermont,221200,0.0,2014 -Vermont,221300,0.12164216928535225,2014 -Virginia,221100,0.4815085021606151,2014 -Virginia,221200,0.08288905101296369,2014 -Virginia,221300,0.43560244682642124,2014 -Washington,221100,0.6356733220050977,2014 -Washington,221200,0.061809685641461345,2014 -Washington,221300,0.3025169923534409,2014 -West Virginia,221100,0.7442799461641992,2014 -West Virginia,221200,0.14439530859450106,2014 -West Virginia,221300,0.11132474524129975,2014 -Wisconsin,221100,0.7716566866267465,2014 -Wisconsin,221200,0.053812375249501,2014 -Wisconsin,221300,0.1745309381237525,2014 -Wyoming,221100,0.8520591763294683,2014 -Wyoming,221200,0.0975609756097561,2014 -Wyoming,221300,0.05037984806077569,2014 -Alabama,221100,0.6966287346034181,2015 -Alabama,221200,0.10216084899629203,2015 -Alabama,221300,0.2012104164002898,2015 -Alaska,221100,0.7088014981273408,2015 -Alaska,221200,0.14840823970037453,2015 -Alaska,221300,0.14279026217228463,2015 -Arizona,221100,0.9928438908030744,2015 -Arizona,221200,0.0,2015 -Arizona,221300,0.0071561091969255235,2015 -Arkansas,221100,0.5215497265733617,2015 -Arkansas,221200,0.12586894058763556,2015 -Arkansas,221300,0.35258133283900267,2015 -California,221100,0.36163447951012717,2015 -California,221200,0.0,2015 -California,221300,0.6383655204898728,2015 -Colorado,221100,0.8051457139373247,2015 -Colorado,221200,0.10132910620656017,2015 -Colorado,221300,0.09352517985611511,2015 -Connecticut,221100,0.550213260953858,2015 -Connecticut,221200,0.10895696006203955,2015 -Connecticut,221300,0.3408297789841024,2015 -Delaware,221100,1.0,2015 -Delaware,221200,0.0,2015 -Delaware,221300,0.0,2015 -District Of Columbia,221100,,2015 -District Of Columbia,221200,,2015 -District Of Columbia,221300,,2015 -Florida,221100,0.7707415112302105,2015 -Florida,221200,0.0546525157787102,2015 -Florida,221300,0.1746059729910793,2015 -Georgia,221100,0.8451048951048951,2015 -Georgia,221200,0.0986013986013986,2015 -Georgia,221300,0.056293706293706294,2015 -Hawaii,221100,1.0,2015 -Hawaii,221200,0.0,2015 -Hawaii,221300,0.0,2015 -Idaho,221100,0.7649173256649893,2015 -Idaho,221200,0.0,2015 -Idaho,221300,0.2350826743350108,2015 -Illinois,221100,0.6747615233379451,2015 -Illinois,221200,0.15703051044928276,2015 -Illinois,221300,0.16820796621277215,2015 -Indiana,221100,0.7168385782800079,2015 -Indiana,221200,0.11057092175284147,2015 -Indiana,221300,0.17259049996715065,2015 -Iowa,221100,0.787893580668782,2015 -Iowa,221200,0.07005125701732975,2015 -Iowa,221300,0.1420551623138882,2015 -Kansas,221100,0.6169324221716022,2015 -Kansas,221200,0.22209567198177677,2015 -Kansas,221300,0.1609719058466211,2015 -Kentucky,221100,0.5568099927936584,2015 -Kentucky,221200,0.07334454319801426,2015 -Kentucky,221300,0.36984546400832735,2015 -Louisiana,221100,0.4667838570277595,2015 -Louisiana,221200,0.10818135208379111,2015 -Louisiana,221300,0.4250347908884494,2015 -Maine,221100,0.4726027397260274,2015 -Maine,221200,0.05958904109589041,2015 -Maine,221300,0.4678082191780822,2015 -Maryland,221100,0.8898313745528871,2015 -Maryland,221200,0.055390904445579967,2015 -Maryland,221300,0.054777721001532956,2015 -Massachusetts,221100,0.5412145001154468,2015 -Massachusetts,221200,0.20888170553374893,2015 -Massachusetts,221300,0.2499037943508043,2015 -Michigan,221100,0.8378185621909471,2015 -Michigan,221200,0.11606124001521491,2015 -Michigan,221300,0.04612019779383796,2015 -Minnesota,221100,0.8376996357523115,2015 -Minnesota,221200,0.10941440179321939,2015 -Minnesota,221300,0.05288596245446904,2015 -Mississippi,221100,0.7225045960852168,2015 -Mississippi,221200,0.06942792256948199,2015 -Mississippi,221300,0.20806748134530118,2015 -Missouri,221100,0.5169655320519704,2015 -Missouri,221200,0.14452915279716524,2015 -Missouri,221300,0.3385053151508644,2015 -Montana,221100,0.748541423570595,2015 -Montana,221200,0.11085180863477247,2015 -Montana,221300,0.14060676779463244,2015 -Nebraska,221100,0.7714750813924368,2015 -Nebraska,221200,0.10656148259454044,2015 -Nebraska,221300,0.12196343601302279,2015 -Nevada,221100,0.6731160896130346,2015 -Nevada,221200,0.0,2015 -Nevada,221300,0.3268839103869654,2015 -New Hampshire,221100,0.756368118323747,2015 -New Hampshire,221200,0.08422350041084635,2015 -New Hampshire,221300,0.15940838126540674,2015 -New Jersey,221100,0.5525214554223704,2015 -New Jersey,221200,0.29299950351088727,2015 -New Jersey,221300,0.15447904106674232,2015 -New Mexico,221100,0.5217109526895658,2015 -New Mexico,221200,0.1834089436163318,2015 -New Mexico,221300,0.2948801036941024,2015 -New York,221100,0.7615001675362596,2015 -New York,221200,0.16930735723517304,2015 -New York,221300,0.06919247522856732,2015 -North Carolina,221100,0.7250232805640549,2015 -North Carolina,221200,0.13841958228016496,2015 -North Carolina,221300,0.13655713715578024,2015 -North Dakota,221100,0.9321705426356589,2015 -North Dakota,221200,0.0,2015 -North Dakota,221300,0.06782945736434108,2015 -Ohio,221100,0.47302314284722946,2015 -Ohio,221200,0.1844141424655633,2015 -Ohio,221300,0.3425627146872072,2015 -Oklahoma,221100,0.4292724298782335,2015 -Oklahoma,221200,0.30641546010783305,2015 -Oklahoma,221300,0.2643121100139335,2015 -Oregon,221100,0.5198519085918549,2015 -Oregon,221200,0.15115536831354526,2015 -Oregon,221300,0.32899272309459976,2015 -Pennsylvania,221100,0.508168732153896,2015 -Pennsylvania,221200,0.13682258396867916,2015 -Pennsylvania,221300,0.35500868387742485,2015 -Rhode Island,221100,1.0,2015 -Rhode Island,221200,0.0,2015 -Rhode Island,221300,0.0,2015 -South Carolina,221100,0.7409323116219668,2015 -South Carolina,221200,0.05740740740740741,2015 -South Carolina,221300,0.2016602809706258,2015 -South Dakota,221100,0.7850701402805611,2015 -South Dakota,221200,0.10020040080160321,2015 -South Dakota,221300,0.11472945891783567,2015 -Tennessee,221100,0.7326637753937457,2015 -Tennessee,221200,0.08226432321387811,2015 -Tennessee,221300,0.18507190139237617,2015 -Texas,221100,0.5549419110878921,2015 -Texas,221200,0.094521979252183,2015 -Texas,221300,0.3505361096599249,2015 -Utah,221100,0.46504037107026286,2015 -Utah,221200,0.13142071808967531,2015 -Utah,221300,0.4035389108400618,2015 -Vermont,221100,0.8647125140924464,2015 -Vermont,221200,0.0,2015 -Vermont,221300,0.13528748590755355,2015 -Virginia,221100,0.47935267857142855,2015 -Virginia,221200,0.08649553571428571,2015 -Virginia,221300,0.4341517857142857,2015 -Washington,221100,0.6418434145064152,2015 -Washington,221200,0.05980623199790521,2015 -Washington,221300,0.2983503534956795,2015 -West Virginia,221100,0.7225193107546048,2015 -West Virginia,221200,0.15408991879580114,2015 -West Virginia,221300,0.12339077044959398,2015 -Wisconsin,221100,0.7626437687096266,2015 -Wisconsin,221200,0.06443989286276981,2015 -Wisconsin,221300,0.1729163384276036,2015 -Wyoming,221100,0.8610129564193169,2015 -Wyoming,221200,0.09658421672555949,2015 -Wyoming,221300,0.04240282685512368,2015 -Alabama,221100,0.6958398066632142,2016 -Alabama,221200,0.09999136889349215,2016 -Alabama,221300,0.20416882444329362,2016 -Alaska,221100,0.714622641509434,2016 -Alaska,221200,0.13726415094339622,2016 -Alaska,221300,0.1481132075471698,2016 -Arizona,221100,0.992974695895401,2016 -Arizona,221200,0.0,2016 -Arizona,221300,0.007025304104598972,2016 -Arkansas,221100,0.5329691032403918,2016 -Arkansas,221200,0.10437076111529767,2016 -Arkansas,221300,0.3626601356443105,2016 -California,221100,0.36238932052002404,2016 -California,221200,0.0,2016 -California,221300,0.637610679479976,2016 -Colorado,221100,0.795752427184466,2016 -Colorado,221200,0.10631067961165049,2016 -Colorado,221300,0.09793689320388349,2016 -Connecticut,221100,0.5514211886304909,2016 -Connecticut,221200,0.10904392764857881,2016 -Connecticut,221300,0.3395348837209302,2016 -Delaware,221100,1.0,2016 -Delaware,221200,0.0,2016 -Delaware,221300,0.0,2016 -District Of Columbia,221100,,2016 -District Of Columbia,221200,,2016 -District Of Columbia,221300,,2016 -Florida,221100,0.7706402987138709,2016 -Florida,221200,0.05514451666436178,2016 -Florida,221300,0.17421518462176738,2016 -Georgia,221100,0.8420134562671319,2016 -Georgia,221200,0.10037378519810615,2016 -Georgia,221300,0.057612758534762026,2016 -Hawaii,221100,1.0,2016 -Hawaii,221200,0.0,2016 -Hawaii,221300,0.0,2016 -Idaho,221100,0.7653611210923464,2016 -Idaho,221200,0.0,2016 -Idaho,221300,0.23463887890765361,2016 -Illinois,221100,0.6695485457965562,2016 -Illinois,221200,0.1605049920416727,2016 -Illinois,221300,0.1699464621617711,2016 -Indiana,221100,0.7111716621253406,2016 -Indiana,221200,0.11371037416096232,2016 -Indiana,221300,0.1751179637136971,2016 -Iowa,221100,0.78442521631644,2016 -Iowa,221200,0.07045735475896168,2016 -Iowa,221300,0.14511742892459828,2016 -Kansas,221100,0.6157773806484554,2016 -Kansas,221200,0.2221087567015573,2016 -Kansas,221300,0.16211386264998723,2016 -Kentucky,221100,0.5581913708008279,2016 -Kentucky,221200,0.0728387199490527,2016 -Kentucky,221300,0.3689699092501194,2016 -Louisiana,221100,0.46906069149725477,2016 -Louisiana,221200,0.10023742395014097,2016 -Louisiana,221300,0.4307018845526042,2016 -Maine,221100,0.4832146490335707,2016 -Maine,221200,0.05188199389623601,2016 -Maine,221300,0.4649033570701933,2016 -Maryland,221100,0.8927008750994431,2016 -Maryland,221200,0.056881463802704854,2016 -Maryland,221300,0.05041766109785203,2016 -Massachusetts,221100,0.5553125706960259,2016 -Massachusetts,221200,0.20843073674685167,2016 -Massachusetts,221300,0.2362566925571224,2016 -Michigan,221100,0.8395624002253733,2016 -Michigan,221200,0.11343788149121983,2016 -Michigan,221300,0.04699971828340689,2016 -Minnesota,221100,0.8326792722083483,2016 -Minnesota,221200,0.11202283267927221,2016 -Minnesota,221300,0.05529789511237959,2016 -Mississippi,221100,0.7192065692652234,2016 -Mississippi,221200,0.0681454623013757,2016 -Mississippi,221300,0.21264796843340086,2016 -Missouri,221100,0.5129345409187049,2016 -Missouri,221200,0.14458484733445415,2016 -Missouri,221300,0.3424806117468409,2016 -Montana,221100,0.7471230451460608,2016 -Montana,221200,0.1106521097668929,2016 -Montana,221300,0.14222484508704633,2016 -Nebraska,221100,0.7716777834787071,2016 -Nebraska,221200,0.10582349923037455,2016 -Nebraska,221300,0.12249871729091842,2016 -Nevada,221100,0.674134926562111,2016 -Nevada,221200,0.0,2016 -Nevada,221300,0.32586507343788895,2016 -New Hampshire,221100,0.7365319865319865,2016 -New Hampshire,221200,0.10311447811447812,2016 -New Hampshire,221300,0.16035353535353536,2016 -New Jersey,221100,0.5394820858460447,2016 -New Jersey,221200,0.3054274565448741,2016 -New Jersey,221300,0.15509045760908124,2016 -New Mexico,221100,0.5263325377883851,2016 -New Mexico,221200,0.1858392999204455,2016 -New Mexico,221300,0.2878281622911695,2016 -New York,221100,0.755165113279634,2016 -New York,221200,0.17307083931569853,2016 -New York,221300,0.07176404740466746,2016 -North Carolina,221100,0.7246435027113878,2016 -North Carolina,221200,0.1404565843208141,2016 -North Carolina,221300,0.13489991296779807,2016 -North Dakota,221100,0.9337368588722523,2016 -North Dakota,221200,0.0,2016 -North Dakota,221300,0.06626314112774769,2016 -Ohio,221100,0.4720680083275503,2016 -Ohio,221200,0.19059680777238028,2016 -Ohio,221300,0.3373351839000694,2016 -Oklahoma,221100,0.43917603466683414,2016 -Oklahoma,221200,0.28757143754317654,2016 -Oklahoma,221300,0.2732525277899893,2016 -Oregon,221100,0.5220414752266236,2016 -Oregon,221200,0.14801937166273438,2016 -Oregon,221300,0.329939153110642,2016 -Pennsylvania,221100,0.4958280508299673,2016 -Pennsylvania,221200,0.14113866202789163,2016 -Pennsylvania,221300,0.3630332871421411,2016 -Rhode Island,221100,1.0,2016 -Rhode Island,221200,0.0,2016 -Rhode Island,221300,0.0,2016 -South Carolina,221100,0.7359536246655625,2016 -South Carolina,221200,0.059752834756019876,2016 -South Carolina,221300,0.20429354057841764,2016 -South Dakota,221100,0.784051510648836,2016 -South Dakota,221200,0.09806835066864784,2016 -South Dakota,221300,0.1178801386825161,2016 -Tennessee,221100,0.7305083974329798,2016 -Tennessee,221200,0.08178963178735606,2016 -Tennessee,221300,0.1877019707796641,2016 -Texas,221100,0.5552512985497993,2016 -Texas,221200,0.09005734494148851,2016 -Texas,221300,0.35469135650871225,2016 -Utah,221100,0.45968441130570487,2016 -Utah,221200,0.1321310906883995,2016 -Utah,221300,0.4081844980058956,2016 -Vermont,221100,0.8427037271004422,2016 -Vermont,221200,0.0,2016 -Vermont,221300,0.1572962728995578,2016 -Virginia,221100,0.48124616842222595,2016 -Virginia,221200,0.08755503538984562,2016 -Virginia,221300,0.43119879618792845,2016 -Washington,221100,0.659468438538206,2016 -Washington,221200,0.03590183260100739,2016 -Washington,221300,0.30462972886078665,2016 -West Virginia,221100,0.734571483846005,2016 -West Virginia,221200,0.1408396208164055,2016 -West Virginia,221300,0.12458889533758948,2016 -Wisconsin,221100,0.7481797639969872,2016 -Wisconsin,221200,0.06477529500376601,2016 -Wisconsin,221300,0.1870449409992468,2016 -Wyoming,221100,0.8633516053249805,2016 -Wyoming,221200,0.09162098668754894,2016 -Wyoming,221300,0.04502740798747063,2016 -Alabama,221100,0.6855893267361725,2017 -Alabama,221200,0.10134299346174236,2017 -Alabama,221300,0.21306767980208519,2017 -Alaska,221100,0.7170524326877658,2017 -Alaska,221200,0.1350968351440718,2017 -Alaska,221300,0.1478507321681625,2017 -Arizona,221100,0.9929194256867502,2017 -Arizona,221200,0.0,2017 -Arizona,221300,0.007080574313249852,2017 -Arkansas,221100,0.5367757712565839,2017 -Arkansas,221200,0.09951091045899173,2017 -Arkansas,221300,0.3637133182844244,2017 -California,221100,0.36999005660088724,2017 -California,221200,0.0,2017 -California,221300,0.6300099433991128,2017 -Colorado,221100,0.7925485827453893,2017 -Colorado,221200,0.10521104097041713,2017 -Colorado,221300,0.1022403762841936,2017 -Connecticut,221100,0.547513141932875,2017 -Connecticut,221200,0.10540504111066182,2017 -Connecticut,221300,0.3470818169564631,2017 -Delaware,221100,1.0,2017 -Delaware,221200,0.0,2017 -Delaware,221300,0.0,2017 -District Of Columbia,221100,,2017 -District Of Columbia,221200,,2017 -District Of Columbia,221300,,2017 -Florida,221100,0.7621745999038395,2017 -Florida,221200,0.05608214849921011,2017 -Florida,221300,0.18174325159695034,2017 -Georgia,221100,0.8309082554755706,2017 -Georgia,221200,0.10603972022259663,2017 -Georgia,221300,0.06305202430183285,2017 -Hawaii,221100,1.0,2017 -Hawaii,221200,0.0,2017 -Hawaii,221300,0.0,2017 -Idaho,221100,0.7651128914785142,2017 -Idaho,221200,0.0,2017 -Idaho,221300,0.2348871085214858,2017 -Illinois,221100,0.6565946897567636,2017 -Illinois,221200,0.16713972622426615,2017 -Illinois,221300,0.1762655840189703,2017 -Indiana,221100,0.7114345935976815,2017 -Indiana,221200,0.11632196021604532,2017 -Indiana,221300,0.1722434461862732,2017 -Iowa,221100,0.7845847341551488,2017 -Iowa,221200,0.07022786701531565,2017 -Iowa,221300,0.14518739882953555,2017 -Kansas,221100,0.6113695090439276,2017 -Kansas,221200,0.22080103359173125,2017 -Kansas,221300,0.16782945736434107,2017 -Kentucky,221100,0.552446446921192,2017 -Kentucky,221200,0.07390720101177772,2017 -Kentucky,221300,0.3736463520670303,2017 -Louisiana,221100,0.47029226785053646,2017 -Louisiana,221200,0.09655937846836848,2017 -Louisiana,221300,0.43314835368109506,2017 -Maine,221100,0.4952861952861953,2017 -Maine,221200,0.04276094276094276,2017 -Maine,221300,0.46195286195286195,2017 -Maryland,221100,0.8908489525909592,2017 -Maryland,221200,0.05883532123884935,2017 -Maryland,221300,0.05031572617019144,2017 -Massachusetts,221100,0.5584020842379505,2017 -Massachusetts,221200,0.2134896511796208,2017 -Massachusetts,221300,0.22810826458242872,2017 -Michigan,221100,0.8070104391648668,2017 -Michigan,221200,0.10920626349892008,2017 -Michigan,221300,0.0837832973362131,2017 -Minnesota,221100,0.8255193306405078,2017 -Minnesota,221200,0.1154068090017311,2017 -Minnesota,221300,0.05907386035776111,2017 -Mississippi,221100,0.7129931614939505,2017 -Mississippi,221200,0.06596528143082588,2017 -Mississippi,221300,0.22104155707522358,2017 -Missouri,221100,0.5108607334380586,2017 -Missouri,221200,0.14945019229727532,2017 -Missouri,221300,0.33968907426466605,2017 -Montana,221100,0.8063973063973064,2017 -Montana,221200,0.12558922558922558,2017 -Montana,221300,0.06801346801346801,2017 -Nebraska,221100,0.8951612903225806,2017 -Nebraska,221200,0.10483870967741936,2017 -Nebraska,221300,0.0,2017 -Nevada,221100,0.6723880597014925,2017 -Nevada,221200,0.0,2017 -Nevada,221300,0.3276119402985075,2017 -New Hampshire,221100,0.731433506044905,2017 -New Hampshire,221200,0.1157167530224525,2017 -New Hampshire,221300,0.15284974093264247,2017 -New Jersey,221100,0.5199914778779916,2017 -New Jersey,221200,0.32533200766990983,2017 -New Jersey,221300,0.15467651445209857,2017 -New Mexico,221100,0.5248955991005461,2017 -New Mexico,221200,0.1864760681015098,2017 -New Mexico,221300,0.2886283327979441,2017 -New York,221100,0.7557050836905247,2017 -New York,221200,0.17023059792629486,2017 -New York,221300,0.07406431838318048,2017 -North Carolina,221100,0.7267047363117232,2017 -North Carolina,221200,0.1394020826335237,2017 -North Carolina,221300,0.13389318105475312,2017 -North Dakota,221100,0.9312134977287476,2017 -North Dakota,221200,0.0,2017 -North Dakota,221300,0.06878650227125244,2017 -Ohio,221100,0.46731707317073173,2017 -Ohio,221200,0.1937630662020906,2017 -Ohio,221300,0.3389198606271777,2017 -Oklahoma,221100,0.4646304376570144,2017 -Oklahoma,221200,0.2499669443342589,2017 -Oklahoma,221300,0.2854026180087267,2017 -Oregon,221100,0.693427677234998,2017 -Oregon,221200,0.0,2017 -Oregon,221300,0.306572322765002,2017 -Pennsylvania,221100,0.48789112411969215,2017 -Pennsylvania,221200,0.1445933497756515,2017 -Pennsylvania,221300,0.3675155261046563,2017 -Rhode Island,221100,0.6435733819507748,2017 -Rhode Island,221200,0.0,2017 -Rhode Island,221300,0.35642661804922515,2017 -South Carolina,221100,0.7256625891946993,2017 -South Carolina,221200,0.059441896024464834,2017 -South Carolina,221300,0.21489551478083588,2017 -South Dakota,221100,0.7812343201204215,2017 -South Dakota,221200,0.09834420471650777,2017 -South Dakota,221300,0.12042147516307075,2017 -Tennessee,221100,0.7257370590100086,2017 -Tennessee,221200,0.08523164711743128,2017 -Tennessee,221300,0.18903129387256012,2017 -Texas,221100,0.5520989095152996,2017 -Texas,221200,0.09049685741031159,2017 -Texas,221300,0.3574042330743888,2017 -Utah,221100,0.45615528690618085,2017 -Utah,221200,0.13638685509960838,2017 -Utah,221300,0.4074578579942108,2017 -Vermont,221100,0.8371161548731643,2017 -Vermont,221200,0.0,2017 -Vermont,221300,0.1628838451268358,2017 -Virginia,221100,0.4747101327507982,2017 -Virginia,221200,0.09074105192404638,2017 -Virginia,221300,0.43454881532515544,2017 -Washington,221100,0.6614720438033063,2017 -Washington,221200,0.0368537432873539,2017 -Washington,221300,0.30167421290933977,2017 -West Virginia,221100,0.7480181200453001,2017 -West Virginia,221200,0.135522838807097,2017 -West Virginia,221300,0.11645904114760287,2017 -Wisconsin,221100,0.74617917757325,2017 -Wisconsin,221200,0.06400405302710462,2017 -Wisconsin,221300,0.18981676939964537,2017 -Wyoming,221100,0.8638007231820009,2017 -Wyoming,221200,0.09722780233025312,2017 -Wyoming,221300,0.038971474487746086,2017 -Alabama,221100,0.684650792245729,2018 -Alabama,221200,0.1001150747986191,2018 -Alabama,221300,0.21523413295565194,2018 -Alaska,221100,0.7220956719817767,2018 -Alaska,221200,0.13302961275626424,2018 -Alaska,221300,0.144874715261959,2018 -Arizona,221100,0.9928778686362437,2018 -Arizona,221200,0.0,2018 -Arizona,221300,0.007122131363756265,2018 -Arkansas,221100,0.5392538975501113,2018 -Arkansas,221200,0.09669636228656273,2018 -Arkansas,221300,0.3640497401633259,2018 -California,221100,0.3679787085025914,2018 -California,221200,0.0,2018 -California,221300,0.6320212914974086,2018 -Colorado,221100,0.7866749688667497,2018 -Colorado,221200,0.10859277708592777,2018 -Colorado,221300,0.10473225404732255,2018 -Connecticut,221100,0.5422583758444781,2018 -Connecticut,221200,0.10106162967048118,2018 -Connecticut,221300,0.3566799944850407,2018 -Delaware,221100,1.0,2018 -Delaware,221200,0.0,2018 -Delaware,221300,0.0,2018 -District Of Columbia,221100,1.0,2018 -District Of Columbia,221200,0.0,2018 -District Of Columbia,221300,0.0,2018 -Florida,221100,0.7543787909766237,2018 -Florida,221200,0.0585429019287126,2018 -Florida,221300,0.18707830709466367,2018 -Georgia,221100,0.822259484384825,2018 -Georgia,221200,0.10348983441626493,2018 -Georgia,221300,0.07425068119891008,2018 -Hawaii,221100,1.0,2018 -Hawaii,221200,0.0,2018 -Hawaii,221300,0.0,2018 -Idaho,221100,0.7649802655184786,2018 -Idaho,221200,0.0,2018 -Idaho,221300,0.23501973448152136,2018 -Illinois,221100,0.6557065509699165,2018 -Illinois,221200,0.16519057692997238,2018 -Illinois,221300,0.17910287210011117,2018 -Indiana,221100,0.7139877460565767,2018 -Indiana,221200,0.11752053187328901,2018 -Indiana,221300,0.16849172207013427,2018 -Iowa,221100,0.7842645953395139,2018 -Iowa,221200,0.07166123778501629,2018 -Iowa,221300,0.1440741668754698,2018 -Kansas,221100,0.5979872881355932,2018 -Kansas,221200,0.22709216101694915,2018 -Kansas,221300,0.17492055084745764,2018 -Kentucky,221100,0.5511009391523952,2018 -Kentucky,221200,0.07584247494278273,2018 -Kentucky,221300,0.37305658590482205,2018 -Louisiana,221100,0.4765664985011333,2018 -Louisiana,221200,0.09417269869123346,2018 -Louisiana,221300,0.42926080280763323,2018 -Maine,221100,0.48547008547008547,2018 -Maine,221200,0.043076923076923075,2018 -Maine,221300,0.47145299145299147,2018 -Maryland,221100,0.8828856021732568,2018 -Maryland,221200,0.06177683871616863,2018 -Maryland,221300,0.0553375591105745,2018 -Massachusetts,221100,0.5764583796605144,2018 -Massachusetts,221200,0.1868653176191535,2018 -Massachusetts,221300,0.23667630272033208,2018 -Michigan,221100,0.805064308681672,2018 -Michigan,221200,0.11017327617006073,2018 -Michigan,221300,0.08476241514826724,2018 -Minnesota,221100,0.8236276503049667,2018 -Minnesota,221200,0.11581469648562301,2018 -Minnesota,221300,0.060557653209410395,2018 -Mississippi,221100,0.7066994337001816,2018 -Mississippi,221200,0.06731488406881077,2018 -Mississippi,221300,0.2259856822310076,2018 -Missouri,221100,0.6396913200846821,2018 -Missouri,221200,0.01611691593252749,2018 -Missouri,221300,0.3441917639827904,2018 -Montana,221100,0.8091812264474135,2018 -Montana,221200,0.12572798903734156,2018 -Montana,221300,0.06509078451524494,2018 -Nebraska,221100,0.763048558815892,2018 -Nebraska,221200,0.1043884705271358,2018 -Nebraska,221300,0.13256297065697223,2018 -Nevada,221100,0.7101637639719262,2018 -Nevada,221200,0.0,2018 -Nevada,221300,0.28983623602807385,2018 -New Hampshire,221100,0.7230565371024735,2018 -New Hampshire,221200,0.11704946996466431,2018 -New Hampshire,221300,0.1598939929328622,2018 -New Jersey,221100,0.4937734730183831,2018 -New Jersey,221200,0.3590960005271134,2018 -New Jersey,221300,0.14713052645450353,2018 -New Mexico,221100,0.5184113201479338,2018 -New Mexico,221200,0.18684675992924907,2018 -New Mexico,221300,0.2947419199228172,2018 -New York,221100,0.8069856193292391,2018 -New York,221200,0.11608158313746304,2018 -New York,221300,0.07693279753329794,2018 -North Carolina,221100,0.7362545172947857,2018 -North Carolina,221200,0.13177594217862673,2018 -North Carolina,221300,0.13196954052658752,2018 -North Dakota,221100,0.7068273092369478,2018 -North Dakota,221200,0.1932730923694779,2018 -North Dakota,221300,0.09989959839357429,2018 -Ohio,221100,0.46649008468964553,2018 -Ohio,221200,0.1936709301920329,2018 -Ohio,221300,0.33983898511832156,2018 -Oklahoma,221100,0.46574797932953493,2018 -Oklahoma,221200,0.24897310189479263,2018 -Oklahoma,221300,0.28527891877567246,2018 -Oregon,221100,0.6922244759972954,2018 -Oregon,221200,0.0,2018 -Oregon,221300,0.3077755240027045,2018 -Pennsylvania,221100,0.4811219946571683,2018 -Pennsylvania,221200,0.14663104778866132,2018 -Pennsylvania,221300,0.37224695755417037,2018 -Rhode Island,221100,1.0,2018 -Rhode Island,221200,0.0,2018 -Rhode Island,221300,0.0,2018 -South Carolina,221100,0.7369428656895004,2018 -South Carolina,221200,0.055698474424169905,2018 -South Carolina,221300,0.20735865988632965,2018 -South Dakota,221100,0.7770475227502528,2018 -South Dakota,221200,0.10313447927199192,2018 -South Dakota,221300,0.1198179979777553,2018 -Tennessee,221100,0.724128552649472,2018 -Tennessee,221200,0.08549023163047913,2018 -Tennessee,221300,0.19038121572004896,2018 -Texas,221100,0.5450825098397949,2018 -Texas,221200,0.09513607202609502,2018 -Texas,221300,0.3597814181341101,2018 -Utah,221100,0.45962417470797357,2018 -Utah,221200,0.1271372947350601,2018 -Utah,221300,0.4132385305569663,2018 -Vermont,221100,0.8345612860013396,2018 -Vermont,221200,0.0,2018 -Vermont,221300,0.16543871399866042,2018 -Virginia,221100,0.46573434365946065,2018 -Virginia,221200,0.09399375975039001,2018 -Virginia,221300,0.4402718965901493,2018 -Washington,221100,0.6638834145835494,2018 -Washington,221200,0.037288663001763304,2018 -Washington,221300,0.29882792241468725,2018 -West Virginia,221100,0.7449802964908988,2018 -West Virginia,221200,0.13773691124038281,2018 -West Virginia,221300,0.11728279226871834,2018 -Wisconsin,221100,0.7335944299390774,2018 -Wisconsin,221200,0.06892950391644909,2018 -Wisconsin,221300,0.19747606614447347,2018 -Wyoming,221100,0.8308852719333069,2018 -Wyoming,221200,0.13298928146089717,2018 -Wyoming,221300,0.036125446605795954,2018 -Alabama,221100,0.6727527455145298,2019 -Alabama,221200,0.10570795860261219,2019 -Alabama,221300,0.22153929588285803,2019 -Alaska,221100,0.7215419501133787,2019 -Alaska,221200,0.13424036281179139,2019 -Alaska,221300,0.14421768707482993,2019 -Arizona,221100,0.9928637504955728,2019 -Arizona,221200,0.0,2019 -Arizona,221300,0.007136249504427118,2019 -Arkansas,221100,0.5405255878284924,2019 -Arkansas,221200,0.09414476717381282,2019 -Arkansas,221300,0.36532964499769477,2019 -California,221100,0.36238112291592056,2019 -California,221200,0.0,2019 -California,221300,0.6376188770840794,2019 -Colorado,221100,0.7845249755142018,2019 -Colorado,221200,0.11018609206660138,2019 -Colorado,221300,0.10528893241919686,2019 -Connecticut,221100,0.5402378318584071,2019 -Connecticut,221200,0.10218473451327434,2019 -Connecticut,221300,0.35757743362831856,2019 -Delaware,221100,1.0,2019 -Delaware,221200,0.0,2019 -Delaware,221300,0.0,2019 -District Of Columbia,221100,,2019 -District Of Columbia,221200,,2019 -District Of Columbia,221300,,2019 -Florida,221100,0.7396305332868596,2019 -Florida,221200,0.06378529104217498,2019 -Florida,221300,0.1965841756709655,2019 -Georgia,221100,0.8176795580110497,2019 -Georgia,221200,0.102339030309289,2019 -Georgia,221300,0.07998141167966127,2019 -Hawaii,221100,1.0,2019 -Hawaii,221200,0.0,2019 -Hawaii,221300,0.0,2019 -Idaho,221100,0.7597096188747732,2019 -Idaho,221200,0.0,2019 -Idaho,221300,0.24029038112522685,2019 -Illinois,221100,0.6590065915066815,2019 -Illinois,221200,0.15866440946583582,2019 -Illinois,221300,0.18232899902748262,2019 -Indiana,221100,0.7192532702294091,2019 -Indiana,221200,0.11141786629856044,2019 -Indiana,221300,0.1693288634720305,2019 -Iowa,221100,0.7783043032786885,2019 -Iowa,221200,0.07325819672131148,2019 -Iowa,221300,0.1484375,2019 -Kansas,221100,0.5912261872819963,2019 -Kansas,221200,0.23168768446471694,2019 -Kansas,221300,0.17708612825328682,2019 -Kentucky,221100,0.5480632411067193,2019 -Kentucky,221200,0.07604743083003952,2019 -Kentucky,221300,0.3758893280632411,2019 -Louisiana,221100,0.4758911403638515,2019 -Louisiana,221200,0.0952521816299364,2019 -Louisiana,221300,0.4288566780062121,2019 -Maine,221100,0.48072330262708973,2019 -Maine,221200,0.04435346298191743,2019 -Maine,221300,0.4749232343909928,2019 -Maryland,221100,0.8690367669401398,2019 -Maryland,221200,0.07241973057834498,2019 -Maryland,221300,0.05854350248151524,2019 -Massachusetts,221100,0.5596739900779589,2019 -Massachusetts,221200,0.21346562721474133,2019 -Massachusetts,221300,0.22686038270729977,2019 -Michigan,221100,0.7992614085993142,2019 -Michigan,221200,0.11338257276004572,2019 -Michigan,221300,0.08735601864064012,2019 -Minnesota,221100,0.8351397183513972,2019 -Minnesota,221200,0.10248470102484701,2019 -Minnesota,221300,0.062375580623755804,2019 -Mississippi,221100,0.70881557598702,2019 -Mississippi,221200,0.069118442401298,2019 -Mississippi,221300,0.22206598161168198,2019 -Missouri,221100,0.6398000410874478,2019 -Missouri,221200,0.015613230158186674,2019 -Missouri,221300,0.3445867287543655,2019 -Montana,221100,0.8080082135523614,2019 -Montana,221200,0.12457221081451061,2019 -Montana,221300,0.06741957563312799,2019 -Nebraska,221100,0.890476955195118,2019 -Nebraska,221200,0.10952304480488197,2019 -Nebraska,221300,0.0,2019 -Nevada,221100,0.7064457675381828,2019 -Nevada,221200,0.0,2019 -Nevada,221300,0.2935542324618172,2019 -New Hampshire,221100,0.7089518668466037,2019 -New Hampshire,221200,0.12370670265407108,2019 -New Hampshire,221300,0.16734143049932523,2019 -New Jersey,221100,0.4893223819301848,2019 -New Jersey,221200,0.35523613963039014,2019 -New Jersey,221300,0.15544147843942505,2019 -New Mexico,221100,0.5165981662978185,2019 -New Mexico,221200,0.1879544736010117,2019 -New Mexico,221300,0.2954473601011698,2019 -New York,221100,0.8066682043002485,2019 -New York,221200,0.11468183798467492,2019 -New York,221300,0.07864995771507649,2019 -North Carolina,221100,0.7271416399029953,2019 -North Carolina,221200,0.13475781608442028,2019 -North Carolina,221300,0.1381005440125844,2019 -North Dakota,221100,0.7278059184217542,2019 -North Dakota,221200,0.1682218075179952,2019 -North Dakota,221300,0.1039722740602506,2019 -Ohio,221100,0.4583274523641496,2019 -Ohio,221200,0.19463655610444602,2019 -Ohio,221300,0.34703599153140435,2019 -Oklahoma,221100,0.4596954181436261,2019 -Oklahoma,221200,0.25797558093737694,2019 -Oklahoma,221300,0.282329000918997,2019 -Oregon,221100,0.6886855912821203,2019 -Oregon,221200,0.0,2019 -Oregon,221300,0.31131440871787974,2019 -Pennsylvania,221100,0.4746586646661665,2019 -Pennsylvania,221200,0.14325581395348838,2019 -Pennsylvania,221300,0.3820855213803451,2019 -Rhode Island,221100,1.0,2019 -Rhode Island,221200,0.0,2019 -Rhode Island,221300,0.0,2019 -South Carolina,221100,0.7229600345913892,2019 -South Carolina,221200,0.05843473963802582,2019 -South Carolina,221300,0.21860522577058497,2019 -South Dakota,221100,0.778974358974359,2019 -South Dakota,221200,0.10051282051282051,2019 -South Dakota,221300,0.12051282051282051,2019 -Tennessee,221100,0.7210566512421942,2019 -Tennessee,221200,0.08648187250101083,2019 -Tennessee,221300,0.192461476256795,2019 -Texas,221100,0.5378030707214417,2019 -Texas,221200,0.09845278321180864,2019 -Texas,221300,0.36374414606674965,2019 -Utah,221100,0.4645858343337335,2019 -Utah,221200,0.11593208712056251,2019 -Utah,221300,0.419482078545704,2019 -Vermont,221100,0.8329911019849419,2019 -Vermont,221200,0.0,2019 -Vermont,221300,0.16700889801505817,2019 -Virginia,221100,0.4580943364704572,2019 -Virginia,221200,0.09929275491451801,2019 -Virginia,221300,0.4426129086150248,2019 -Washington,221100,0.6651829112304938,2019 -Washington,221200,0.03658224609874648,2019 -Washington,221300,0.2982348426707598,2019 -West Virginia,221100,0.7412388709982951,2019 -West Virginia,221200,0.13885205531350633,2019 -West Virginia,221300,0.11990907368819852,2019 -Wisconsin,221100,0.7231002768104295,2019 -Wisconsin,221200,0.07250647379230288,2019 -Wisconsin,221300,0.2043932493972676,2019 -Wyoming,221100,0.8266557645134914,2019 -Wyoming,221200,0.1349141455437449,2019 -Wyoming,221300,0.038430089942763694,2019 -Alabama,221100,0.6697235086432207,2020 -Alabama,221200,0.10674492182126645,2020 -Alabama,221300,0.22353156953551287,2020 -Alaska,221100,0.7305180670439704,2020 -Alaska,221200,0.13191118850674793,2020 -Alaska,221300,0.13757074444928166,2020 -Arizona,221100,0.9926660328670379,2020 -Arizona,221200,0.0,2020 -Arizona,221300,0.007333967132962108,2020 -Arkansas,221100,0.543177021198495,2020 -Arkansas,221200,0.0931449022666789,2020 -Arkansas,221300,0.3636780765348261,2020 -California,221100,0.3751733838669975,2020 -California,221200,0.0,2020 -California,221300,0.6248266161330025,2020 -Colorado,221100,0.7732964122321213,2020 -Colorado,221200,0.12123765952323622,2020 -Colorado,221300,0.10546592824464243,2020 -Connecticut,221100,0.5345045678144764,2020 -Connecticut,221200,0.10737877723120169,2020 -Connecticut,221300,0.3581166549543219,2020 -Delaware,221100,1.0,2020 -Delaware,221200,0.0,2020 -Delaware,221300,0.0,2020 -District Of Columbia,221100,1.0,2020 -District Of Columbia,221200,0.0,2020 -District Of Columbia,221300,0.0,2020 -Florida,221100,0.7385718243524034,2020 -Florida,221200,0.06507133952070925,2020 -Florida,221300,0.19635683612688737,2020 -Georgia,221100,0.8168971126474176,2020 -Georgia,221200,0.10059983733224888,2020 -Georgia,221300,0.08250305002033347,2020 -Hawaii,221100,1.0,2020 -Hawaii,221200,0.0,2020 -Hawaii,221300,0.0,2020 -Idaho,221100,0.7602318000724375,2020 -Idaho,221200,0.0,2020 -Idaho,221300,0.2397681999275625,2020 -Illinois,221100,0.6560417592181252,2020 -Illinois,221200,0.15759662372278987,2020 -Illinois,221300,0.18636161705908486,2020 -Indiana,221100,0.7101288894675173,2020 -Indiana,221200,0.11098815258429892,2020 -Indiana,221300,0.17888295794818382,2020 -Iowa,221100,0.786284517733281,2020 -Iowa,221200,0.06412773197225494,2020 -Iowa,221300,0.14958775029446408,2020 -Kansas,221100,0.5899559236009082,2020 -Kansas,221200,0.22505676505943636,2020 -Kansas,221300,0.1849873113396554,2020 -Kentucky,221100,0.5432680783060327,2020 -Kentucky,221200,0.0759089093088294,2020 -Kentucky,221300,0.3808230123851378,2020 -Louisiana,221100,0.490007513148009,2020 -Louisiana,221200,0.10060105184072127,2020 -Louisiana,221300,0.40939143501126973,2020 -Maine,221100,0.4837257617728532,2020 -Maine,221200,0.0453601108033241,2020 -Maine,221300,0.4709141274238227,2020 -Maryland,221100,0.8893366398016119,2020 -Maryland,221200,0.07377557346559206,2020 -Maryland,221300,0.03688778673279603,2020 -Massachusetts,221100,0.5580114398700656,2020 -Massachusetts,221200,0.22088835534213686,2020 -Massachusetts,221300,0.22110020478779746,2020 -Michigan,221100,0.7983275076324057,2020 -Michigan,221200,0.11309234104685634,2020 -Michigan,221300,0.08858015132073802,2020 -Minnesota,221100,0.8380038962985165,2020 -Minnesota,221200,0.10122883260902144,2020 -Minnesota,221300,0.06076727109246216,2020 -Mississippi,221100,0.7118957088538838,2020 -Mississippi,221200,0.06854970124932103,2020 -Mississippi,221300,0.21955458989679522,2020 -Missouri,221100,0.6380474897291275,2020 -Missouri,221200,0.01601559779959613,2020 -Missouri,221300,0.3459369124712764,2020 -Montana,221100,0.8088642659279779,2020 -Montana,221200,0.12465373961218837,2020 -Montana,221300,0.0664819944598338,2020 -Nebraska,221100,0.8869129046967624,2020 -Nebraska,221200,0.10533515731874145,2020 -Nebraska,221300,0.007751937984496124,2020 -Nevada,221100,0.7114728275137832,2020 -Nevada,221200,0.0,2020 -Nevada,221300,0.28852717248621684,2020 -New Hampshire,221100,0.6973506960035922,2020 -New Hampshire,221200,0.1311180960933992,2020 -New Hampshire,221300,0.17153120790300852,2020 -New Jersey,221100,0.4814761320141547,2020 -New Jersey,221200,0.3524229074889868,2020 -New Jersey,221300,0.16610096049685852,2020 -New Mexico,221100,0.5069566608028147,2020 -New Mexico,221200,0.18982888213657445,2020 -New Mexico,221300,0.3032144570606109,2020 -New York,221100,0.8093599449415003,2020 -New York,221200,0.10968366852744003,2020 -New York,221300,0.08095638653105962,2020 -North Carolina,221100,0.7299098392787142,2020 -North Carolina,221200,0.12988370573631255,2020 -North Carolina,221300,0.14020645498497322,2020 -North Dakota,221100,0.7393338838425544,2020 -North Dakota,221200,0.16570327552986513,2020 -North Dakota,221300,0.09496284062758051,2020 -Ohio,221100,0.452992371333405,2020 -Ohio,221200,0.19759320941227032,2020 -Ohio,221300,0.3494144192543247,2020 -Oklahoma,221100,0.507865492856112,2020 -Oklahoma,221200,0.18451435993649878,2020 -Oklahoma,221300,0.3076201472073892,2020 -Oregon,221100,0.687525232135648,2020 -Oregon,221200,0.0,2020 -Oregon,221300,0.312474767864352,2020 -Pennsylvania,221100,0.46654223908453935,2020 -Pennsylvania,221200,0.14796683291007556,2020 -Pennsylvania,221300,0.38549092800538504,2020 -Rhode Island,221100,1.0,2020 -Rhode Island,221200,0.0,2020 -Rhode Island,221300,0.0,2020 -South Carolina,221100,0.7176286072772898,2020 -South Carolina,221200,0.05821831869510665,2020 -South Carolina,221300,0.2241530740276035,2020 -South Dakota,221100,0.7860851505711319,2020 -South Dakota,221200,0.09190031152647975,2020 -South Dakota,221300,0.12201453790238836,2020 -Tennessee,221100,0.721260199456029,2020 -Tennessee,221200,0.08359020852221215,2020 -Tennessee,221300,0.19514959202175883,2020 -Texas,221100,0.536089262411857,2020 -Texas,221200,0.09660118042835422,2020 -Texas,221300,0.3673095571597888,2020 -Utah,221100,0.5736630733460156,2020 -Utah,221200,0.0,2020 -Utah,221300,0.42633692665398437,2020 -Vermont,221100,0.8338008415147266,2020 -Vermont,221200,0.0,2020 -Vermont,221300,0.1661991584852735,2020 -Virginia,221100,0.45522054718034616,2020 -Virginia,221200,0.10429927414852037,2020 -Virginia,221300,0.4404801786711334,2020 -Washington,221100,0.6630072333658237,2020 -Washington,221200,0.03611552865131073,2020 -Washington,221300,0.30087723798286564,2020 -West Virginia,221100,0.720976384203215,2020 -West Virginia,221200,0.15320500099226037,2020 -West Virginia,221300,0.12581861480452472,2020 -Wisconsin,221100,0.719803630974435,2020 -Wisconsin,221200,0.0721563542052612,2020 -Wisconsin,221300,0.20804001482030382,2020 -Wyoming,221100,0.8170230263157895,2020 -Wyoming,221200,0.14268092105263158,2020 -Wyoming,221300,0.04029605263157895,2020 diff --git a/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml b/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml deleted file mode 100644 index ff6e3469..00000000 --- a/inst/extdata/disaggspecs/UtilityDisaggByProxy.yml +++ /dev/null @@ -1,11 +0,0 @@ -Disaggregation: - 22/US: - OriginalSectorCode: "22/US" - OriginalSectorName: "Utilities" - DisaggregationType: "Userdefined" - SectorFile: UtilityDisaggregation_Sectors.csv -# MakeFile: UtilityStateDummy_Make.csv -# UseFile: UtilityStateDummy_Use.csv -# EnvFile: UtilityDisaggregationSummary_Env.csv - stateFile: Employment_ratios.csv #Uncomment this when the above Make and USe files are working in stateior disagg - package: "useeior" diff --git a/inst/extdata/disaggspecs/UtilityStateDummy_Make.csv b/inst/extdata/disaggspecs/UtilityStateDummy_Make.csv deleted file mode 100644 index 7813278f..00000000 --- a/inst/extdata/disaggspecs/UtilityStateDummy_Make.csv +++ /dev/null @@ -1,4 +0,0 @@ -IndustryCode,CommodityCode,PercentMake,Note -22/US,221100/US,0.63541758,CommodityDisagg -22/US,221200/US,0.108148191,CommodityDisagg -22/US,221300/US,0.256434229,CommodityDisagg diff --git a/inst/extdata/disaggspecs/UtilityStateDummy_Use.csv b/inst/extdata/disaggspecs/UtilityStateDummy_Use.csv deleted file mode 100644 index db94e891..00000000 --- a/inst/extdata/disaggspecs/UtilityStateDummy_Use.csv +++ /dev/null @@ -1,7 +0,0 @@ -IndustryCode,CommodityCode,PercentUsed,Note, -221100/US,22/US,0.63541758,IndustryDisagg, -221200/US,22/US,0.108148191,IndustryDisagg, -221300/US,22/US,0.256434229,IndustryDisagg, -22/US,221100/US,0.63541758,CommodityDisagg, -22/US,221200/US,0.108148191,CommodityDisagg, -22/US,221300/US,0.256434229,CommodityDisagg, diff --git a/inst/extdata/modelspecs/StateIOv1.0.0-75_Proxy.yml b/inst/extdata/modelspecs/StateIOv1.0.0-75_Proxy.yml deleted file mode 100644 index 3b1dd311..00000000 --- a/inst/extdata/modelspecs/StateIOv1.0.0-75_Proxy.yml +++ /dev/null @@ -1,28 +0,0 @@ -Model: "StateIOv1.0.0-75_Proxy" # 75 represents Summary level disaggregated model (73 + 2 = 75 commodities & 71 + 2 = 73 industries) -BaseIOSchema: 2012 -BaseIOLevel: "Summary" -IOYear: - - 2012 - - 2013 - - 2014 - - 2015 - - 2016 - - 2017 -GeoScale: - - "State" - - "TwoRegion" # SoI and RoUS -IODataSource: "BEA" -BasePriceType: "PRO" -BasewithRedefinitions: FALSE -ScrapIncluded: FALSE -DisaggregationSpecs: "UtilityDisaggByProxy" - -DataProduct: - - "Make" - - "Use" - - "DomesticUse" - - "DomesticUsewithTrade" - - "InternationalTradeAdjustment" - - "CommodityOutput" - - "IndustryOutput" - - "ValueAdded" From 7a53ca2723574ace0aace5d4e54318f0256a20c0 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Sat, 26 Oct 2024 14:12:59 -0400 Subject: [PATCH 115/121] drop additional file --- inst/extdata/disaggspecs/UtilityStateDummy.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 inst/extdata/disaggspecs/UtilityStateDummy.yml diff --git a/inst/extdata/disaggspecs/UtilityStateDummy.yml b/inst/extdata/disaggspecs/UtilityStateDummy.yml deleted file mode 100644 index b8b9048f..00000000 --- a/inst/extdata/disaggspecs/UtilityStateDummy.yml +++ /dev/null @@ -1,11 +0,0 @@ -Disaggregation: - 22/US: - OriginalSectorCode: "22/US" - OriginalSectorName: "Utilities" - DisaggregationType: "Userdefined" - SectorFile: UtilityDisaggregation_Sectors.csv - MakeFile: UtilityStateDummy_Make.csv - UseFile: UtilityStateDummy_Use.csv - # EnvFile: UtilityDisaggregationSummary_Env.csv -# stateFile: Employment_ratios.csv #Uncomment this when the above Make and USe files are working in stateior disagg - package: "stateior" From c2b395f829f77673c4aed1d8bcfd7e8f1a27acd0 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Sat, 26 Oct 2024 14:51:29 -0400 Subject: [PATCH 116/121] drop unneeded file (now in useeior), update specs and pointer to useeior branch --- DESCRIPTION | 2 +- .../disaggspecs/UtilityDisaggregation_Sectors.csv | 15 --------------- inst/extdata/modelspecs/StateIOv1.0.0-75.yml | 3 +++ inst/extdata/modelspecs/StateIOv1.0.0-s.yml | 3 +++ 4 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 inst/extdata/disaggspecs/UtilityDisaggregation_Sectors.csv diff --git a/DESCRIPTION b/DESCRIPTION index 0f776b3d..a52c9f4a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -40,7 +40,7 @@ Imports: Depends: R (>= 3.6) Remotes: - github::USEPA/useeior@linkstateiorImportF + github::USEPA/useeior@two_region_disagg License: file LICENSE Encoding: UTF-8 LazyData: true diff --git a/inst/extdata/disaggspecs/UtilityDisaggregation_Sectors.csv b/inst/extdata/disaggspecs/UtilityDisaggregation_Sectors.csv deleted file mode 100644 index 38ce652a..00000000 --- a/inst/extdata/disaggspecs/UtilityDisaggregation_Sectors.csv +++ /dev/null @@ -1,15 +0,0 @@ -NAICS_2012_Code,USEEIO_Code,USEEIO_Name,Category,Subcategory,Description -221111,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." -221112,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." -221113,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." -221114,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." -221115,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." -221116,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." -221117,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." -221118,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." -221121,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." -221122,221100/US,"Electric power generation, transmission, and distribution",22: Utilities,"2211: Electric Power Generation, Transmission and Distribution","BEA Code & Name is '221100:Electric power generation, transmission, and distribution'. This industry group comprises establishments primarily engaged in generating, transmitting, and/or distributing electric power. Establishments in this industry group may perform one or more of the following activities: (1) operate generation facilities that produce electric energy; (2) operate transmission systems that convey the electricity from the generation facility to the distribution system; and (3) operate distribution systems that convey electric power received from the generation facility or the transmission system to the final consumer." -221210,221200/US,Natural gas distribution,22: Utilities,2212: Natural Gas Distribution,"BEA Code & Name is '221200:Natural gas distribution'. This industry comprises: (1) establishments primarily engaged in operating gas distribution systems (e.g., mains, meters); (2) establishments known as gas marketers that buy gas from the well and sell it to a distribution system; (3) establishments known as gas brokers or agents that arrange the sale of gas over gas distribution systems operated by others; and (4) establishments primarily engaged in transmitting and distributing gas to final consumers." -221310,221300/US,"Water, sewage and other systems",22: Utilities,"2213: Water, Sewage and Other Systems","BEA Code & Name is '221300:Water, sewage and other systems'. This industry comprises establishments primarily engaged in operating water treatment plants and/or operating water supply systems. The water supply system may include pumping stations, aqueducts, and/or distribution mains. The water may be used for drinking, irrigation, or other uses." -221320,221300/US,"Water, sewage and other systems",22: Utilities,"2213: Water, Sewage and Other Systems","BEA Code & Name is '221300:Water, sewage and other systems'. This industry comprises establishments primarily engaged in operating water treatment plants and/or operating water supply systems. The water supply system may include pumping stations, aqueducts, and/or distribution mains. The water may be used for drinking, irrigation, or other uses." -221330,221300/US,"Water, sewage and other systems",22: Utilities,"2213: Water, Sewage and Other Systems","BEA Code & Name is '221300:Water, sewage and other systems'. This industry comprises establishments primarily engaged in operating water treatment plants and/or operating water supply systems. The water supply system may include pumping stations, aqueducts, and/or distribution mains. The water may be used for drinking, irrigation, or other uses." diff --git a/inst/extdata/modelspecs/StateIOv1.0.0-75.yml b/inst/extdata/modelspecs/StateIOv1.0.0-75.yml index 7f52dc3c..a299fea8 100644 --- a/inst/extdata/modelspecs/StateIOv1.0.0-75.yml +++ b/inst/extdata/modelspecs/StateIOv1.0.0-75.yml @@ -8,6 +8,9 @@ IOYear: - 2015 - 2016 - 2017 + - 2018 + - 2019 + - 2020 GeoScale: - "State" - "TwoRegion" # SoI and RoUS diff --git a/inst/extdata/modelspecs/StateIOv1.0.0-s.yml b/inst/extdata/modelspecs/StateIOv1.0.0-s.yml index 69463931..0ed211eb 100644 --- a/inst/extdata/modelspecs/StateIOv1.0.0-s.yml +++ b/inst/extdata/modelspecs/StateIOv1.0.0-s.yml @@ -8,6 +8,9 @@ IOYear: - 2015 - 2016 - 2017 + - 2018 + - 2019 + - 2020 GeoScale: - "State" - "TwoRegion" # SoI and RoUS From 429dd8cc9795536ce57c56abf981e6be55b0e4a6 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Sat, 26 Oct 2024 15:13:03 -0400 Subject: [PATCH 117/121] fix naming of objects --- data-raw/TwoRegionModel.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data-raw/TwoRegionModel.R b/data-raw/TwoRegionModel.R index 9398e6e8..2610a583 100644 --- a/data-raw/TwoRegionModel.R +++ b/data-raw/TwoRegionModel.R @@ -14,13 +14,13 @@ specs <- configr::read.config(configpath) TwoRegionModel <- assembleTwoRegionIO(year, iolevel = specs$BaseIOLevel, disagg_specs = specs$DisaggregationSpecs) -stub <- ifelse(is.null(specs$DisaggregationSpecs), "", specs$DisaggregationSpecs) - # Subset data set for (name in names(TwoRegionModel)) { df <- TwoRegionModel[[name]] # Write data to .rds - data_name <- paste("TwoRegion_Summary", name, stub, year, + name <- ifelse(is.null(specs$DisaggregationSpecs), name, + paste0(name, "_", specs$DisaggregationSpecs)) + data_name <- paste("TwoRegion_Summary", name, year, utils::packageDescription("stateior", fields = "Version"), sep = "_") saveRDS(object = df, From cb97a41eea9fc97b3e7fd1e7da0daea86e1fab99 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 17 Dec 2024 10:54:24 -0500 Subject: [PATCH 118/121] use alias for state model files --- .github/workflows/save-two-region-model-data.yaml | 2 +- data-raw/TwoRegionModel.R | 14 ++++++-------- ...tateIOv1.0.0-75.yml => StateIOv1.2-milkbar.yml} | 2 +- ...StateIOv1.0.0-s.yml => StateIOv1.2-shoofly.yml} | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) rename inst/extdata/modelspecs/{StateIOv1.0.0-75.yml => StateIOv1.2-milkbar.yml} (79%) rename inst/extdata/modelspecs/{StateIOv1.0.0-s.yml => StateIOv1.2-shoofly.yml} (83%) diff --git a/.github/workflows/save-two-region-model-data.yaml b/.github/workflows/save-two-region-model-data.yaml index ccf301d6..43edc5f6 100644 --- a/.github/workflows/save-two-region-model-data.yaml +++ b/.github/workflows/save-two-region-model-data.yaml @@ -7,7 +7,7 @@ on: model_spec: description: "Model spec file (in quotes)" required: true - default: "StateIOv1.0.0-s" + default: "StateIOv1.2-shoofly" type: string diff --git a/data-raw/TwoRegionModel.R b/data-raw/TwoRegionModel.R index 2610a583..cd9bfde9 100644 --- a/data-raw/TwoRegionModel.R +++ b/data-raw/TwoRegionModel.R @@ -1,26 +1,24 @@ # Generate and save two-region IO tables -## Temp code inputs: -# model_spec <- "StateIOv1.0.0-75" -# model_spec <- "StateIOv1.0.0-s" -# year <- 2017 + +# model_spec <- "StateIOv1.2-milkbar" # Utilities disaggregation +# model_spec <- "StateIOv1.2-shoofly" # base model +# year <- 2019 # Load model spec logging::loginfo(paste("Generating two region model for", model_spec)) configpath <- system.file("extdata/modelspecs/", paste0(model_spec, ".yml"), package = "stateior") specs <- configr::read.config(configpath) -# specs <- useeior:::getConfiguration(model_spec, "model", pkg="stateior") # Build model TwoRegionModel <- assembleTwoRegionIO(year, iolevel = specs$BaseIOLevel, disagg_specs = specs$DisaggregationSpecs) +alias <- gsub("^.*-", "", model_spec) # Subset data set for (name in names(TwoRegionModel)) { df <- TwoRegionModel[[name]] # Write data to .rds - name <- ifelse(is.null(specs$DisaggregationSpecs), name, - paste0(name, "_", specs$DisaggregationSpecs)) - data_name <- paste("TwoRegion_Summary", name, year, + data_name <- paste("TwoRegion_Summary", name, alias, year, utils::packageDescription("stateior", fields = "Version"), sep = "_") saveRDS(object = df, diff --git a/inst/extdata/modelspecs/StateIOv1.0.0-75.yml b/inst/extdata/modelspecs/StateIOv1.2-milkbar.yml similarity index 79% rename from inst/extdata/modelspecs/StateIOv1.0.0-75.yml rename to inst/extdata/modelspecs/StateIOv1.2-milkbar.yml index a299fea8..a2684518 100644 --- a/inst/extdata/modelspecs/StateIOv1.0.0-75.yml +++ b/inst/extdata/modelspecs/StateIOv1.2-milkbar.yml @@ -1,4 +1,4 @@ -Model: "StateIOv1.0.0-75" # 75 represents Summary level disaggregated model (73 + 2 = 75 commodities & 71 + 2 = 73 industries) +Model: "StateIOv1.2-milkbar" # alias milkbar reflects summary level disaggregated model for utilities BaseIOSchema: 2012 BaseIOLevel: "Summary" IOYear: diff --git a/inst/extdata/modelspecs/StateIOv1.0.0-s.yml b/inst/extdata/modelspecs/StateIOv1.2-shoofly.yml similarity index 83% rename from inst/extdata/modelspecs/StateIOv1.0.0-s.yml rename to inst/extdata/modelspecs/StateIOv1.2-shoofly.yml index 0ed211eb..c6b715f9 100644 --- a/inst/extdata/modelspecs/StateIOv1.0.0-s.yml +++ b/inst/extdata/modelspecs/StateIOv1.2-shoofly.yml @@ -1,4 +1,4 @@ -Model: "StateIOv1.0.0-s" # s represents Summary level (73 commodities & 71 industries) +Model: "StateIOv1.2-shoofly" # Summary level (73 commodities & 71 industries), no adjustments BaseIOSchema: 2012 BaseIOLevel: "Summary" IOYear: From 1200537c5bcd7df7aa8635c383085e2d69cad324 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 17 Dec 2024 13:26:20 -0500 Subject: [PATCH 119/121] bump upload-artifact --- .github/workflows/save-two-region-model-data.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/save-two-region-model-data.yaml b/.github/workflows/save-two-region-model-data.yaml index 43edc5f6..07f1961d 100644 --- a/.github/workflows/save-two-region-model-data.yaml +++ b/.github/workflows/save-two-region-model-data.yaml @@ -72,7 +72,7 @@ jobs: # Upload .rds files - name: Upload .rds files and prepare zip for manual download - uses: actions/upload-artifact@v3.1.1 + uses: actions/upload-artifact@v4 with: # Artifact name name: data and metadata @@ -83,7 +83,7 @@ jobs: # Upload .json files - name: Upload .json files and prepare zip for manual download - uses: actions/upload-artifact@v3.1.1 + uses: actions/upload-artifact@v4 with: # Artifact name name: data and metadata From 3cac8ba44a56513e9c359d41121f260ea054d2e2 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 17 Dec 2024 13:36:01 -0500 Subject: [PATCH 120/121] clean up line length --- R/StateDisaggFunctions.R | 74 ++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 33 deletions(-) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index 57a85c52..e886a423 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -1,9 +1,13 @@ - #' Read and assign disaggregation specifications -#' Function assumes all states will be disaggregated with the same config file/allocations unless a statefile parameter is included as input. -#' In this case, the function assumes the statefile paramter will modify the allocation values present in configfile for each state, rather than loading in 50 different sets of allocation values. +#' Function assumes all states will be disaggregated with the same config file +#' and allocations unless a statefile parameter is included as input. +#' In this case, the function assumes the statefile paramter will modify the +#' allocation values present in configfile for each state, rather than loading +#' in 50 different sets of allocation values. #' @param configfile str, name of disaggregation specification file -#' @param statefile str, name of state-specific disaggregation spec file that will modify the standard configfile for each state. Should be 1 config file that has the required modifications of configfile for each state +#' @param statefile str, name of state-specific disaggregation spec file that will +#' modify the standard configfile for each state. Should be 1 config file that has +#' the required modifications of configfile for each state #' @return A stateior model object with the disaggregation specs loaded. getStateModelDisaggSpecs <- function(configfile, statefile = NULL){ model <- list() @@ -19,21 +23,22 @@ getStateModelDisaggSpecs <- function(configfile, statefile = NULL){ model$DisaggregationSpecs[[disagg$OriginalSectorCode]] <- disagg } } - return(model) - } #' Read in state-specific disaggregation values -#' This function assumes values contained in statefile will modify disaggregation values present in the main disaggregation config file. -#' @param statefile str, name of state-specific disaggregation spec file that will modify the standard configfile for each state. Should be 1 config file that has the required modifications of configfile for each state +#' This function assumes values contained in statefile will modify disaggregation +#' values present in the main disaggregation config file. +#' @param statefile str, name of state-specific disaggregation spec file that will +#' modify the standard configfile for each state. Should be 1 config file that has +#' the required modifications of configfile for each state #' @param disaggConfigpath str, path for statefile -#' @return A stateior model object with the state-specific disaggregation specs included in model$specs$STateDisaggSpecs object +#' @return A stateior model object with the state-specific disaggregation specs +#' included in model$specs$STateDisaggSpecs object getStateSpecificDisaggSpecs <- function(disaggConfigpath, statefile){ filename <- file.path(dirname(disaggConfigpath), statefile) stateFileDF <- utils::read.table(filename, sep = ",", header = TRUE, stringsAsFactors = FALSE, check.names = FALSE) return(stateFileDF) - } #' Disaggregate state make and use tables @@ -42,7 +47,8 @@ getStateSpecificDisaggSpecs <- function(disaggConfigpath, statefile){ #' @return A stateior model with the disaggregateed objects disaggregateStateModel <- function(model, state){ - # TODO: Include validation checks for row/column sums - note that there may be unexpected results due to existing negative values in state use tables. + # TODO: Include validation checks for row/column sums - note that there may be unexpected + # results due to existing negative values in state use tables. for (disagg in model$DisaggregationSpecs){ @@ -74,17 +80,12 @@ disaggregateStateModel <- function(model, state){ model <- calculateStateIndustryCommodityOuput(model) # Also formats the disaggregated industry and commodity outputs to stateior formats } - # Formatting disaggregated model objects back to stateior formats model$MakeTransactions <- formatMakeFromUSEEIOtoState(model, state) model$FullUse <- formatFullUseFromUSEEIOtoState(model, state) model$DomesticFullUse <- formatFullUseFromUSEEIOtoState(model, state, domestic = TRUE) - } - return(model) - - } @@ -101,8 +102,10 @@ disaggregateNationalObjectsInStateModel <- function(model, disagg){ model$MakeTransactions <- formatMakeFromStateToUSEEIO(model, state) #Formatting MakeTransactions object # Format individual domestic use objects (DomesticUseTransactions, DomesticFinalDemand) - model$DomesticFullUse <- formatFullUseFromStateToUSEEIO(model$DomesticFullUse) # Note that the domestic full use object does not include value added rows - model <- splitFullUse(model, domestic = TRUE) # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects + # Note that the domestic full use object does not include value added rows + model$DomesticFullUse <- formatFullUseFromStateToUSEEIO(model$DomesticFullUse) + # Splitting FullUse into UseTransactions, UseValueAdded, and FinalDemand objects + model <- splitFullUse(model, domestic = TRUE) model$FullUse <- formatFullUseFromStateToUSEEIO(model$FullUse) model <- splitFullUse(model, domestic = FALSE) @@ -241,17 +244,20 @@ splitFullUse <- function(model, domestic = FALSE){ numCommodities <- model$origCommodities # Find number of commodities numIndustries <- model$origIndustries # Find number of industries if(domestic == TRUE){ - model$DomesticUseTransactions <- model$DomesticFullUse[1:numCommodities, 1:numIndustries] # Get subset of FullUse with numCommodities rows and numIndustries columns - model$DomesticFinalDemand <- model$DomesticFullUse[1:numCommodities,-(1:numIndustries)] # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries + # Get subset of FullUse with numCommodities rows and numIndustries columns + model$DomesticUseTransactions <- model$DomesticFullUse[1:numCommodities, 1:numIndustries] + # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries + model$DomesticFinalDemand <- model$DomesticFullUse[1:numCommodities,-(1:numIndustries)] - }else{ - model$UseTransactions <- model$FullUse[1:numCommodities, 1:numIndustries] # Get subset of FullUse with numCommodities rows and numIndustries columns - model$UseValueAdded <- model$FullUse[-(1:numCommodities),1:numIndustries] # Get subset of FullUse, starting from rows after numCommodities, with numIndustries columns - model$FinalDemand <- model$FullUse[1:numCommodities,-(1:numIndustries)] # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries + } else { + # Get subset of FullUse with numCommodities rows and numIndustries columns + model$UseTransactions <- model$FullUse[1:numCommodities, 1:numIndustries] + # Get subset of FullUse, starting from rows after numCommodities, with numIndustries columns + model$UseValueAdded <- model$FullUse[-(1:numCommodities),1:numIndustries] + # Get subset of FullUse, with numCommodities rows and starting from columns after numIndustries + model$FinalDemand <- model$FullUse[1:numCommodities,-(1:numIndustries)] } - return(model) - } #' Calculate output from model objects @@ -327,7 +333,6 @@ createDisaggFilesFromProxyData <- function(model, disagg, disaggYear, disaggStat Activity = activity, Share = share, Year = rep(disaggYear, length(disagg$NewSectorCodes))) - } print(paste0("For ",disaggState,"-",disaggYear, " the allocation to disaggregate ", @@ -337,10 +342,12 @@ createDisaggFilesFromProxyData <- function(model, disagg, disaggYear, disaggStat # Specifying commodity disaggregation (column splits) for Make DF industries <- c(rep(disagg$OriginalSectorCode,length(disagg$NewSectorCodes))) commodities <- unlist(disagg$NewSectorCodes) - PercentMake <- stateDFYear$Share # need to add code to ensure that the order of stateDF$Share is the same as the order of disagg$NewSectorCodes + PercentMake <- stateDFYear$Share + # need to add code to ensure that the order of stateDF$Share is the same as the order of disagg$NewSectorCodes note <- c(rep("CommodityDisagg", length(disagg$NewSectorCodes))) - makeDF <- data.frame(cbind(data.frame(industries), data.frame(commodities), data.frame(PercentMake), data.frame(note))) #need to rename the columns with the correct column names + # need to rename the columns with the correct column names + makeDF <- data.frame(cbind(data.frame(industries), data.frame(commodities), data.frame(PercentMake), data.frame(note))) colnames(makeDF) <- c("IndustryCode","CommodityCode", "PercentMake", "Note") @@ -351,20 +358,21 @@ createDisaggFilesFromProxyData <- function(model, disagg, disaggYear, disaggStat PercentUse <- stateDFYear$Share note <- c(rep("IndustryDisagg", length(disagg$NewSectorCodes))) - useDF <- data.frame(cbind(data.frame(industries), data.frame(commodities), data.frame(PercentUse), data.frame(note))) #need to rename the columns with the correct column names + # need to rename the columns with the correct column names + useDF <- data.frame(cbind(data.frame(industries), data.frame(commodities), data.frame(PercentUse), data.frame(note))) useDF_2 <- makeDF # so that colnames match colnames(useDF) <- c("IndustryCode","CommodityCode", "PercentUse", "Note") colnames(useDF_2) <- c("IndustryCode","CommodityCode", "PercentUse", "Note") - useDF <- rbind(useDF, useDF_2) #need to bid makeDF because disaggregation procedure requires the UseDF to have the default commodity and industry output. + # need to bind makeDF because disaggregation procedure requires the UseDF to have the default commodity and industry output. + useDF <- rbind(useDF, useDF_2) # Add new DFs to disagg and to model disagg$MakeFileDF <- makeDF disagg$UseFileDF <- useDF model$DisaggregationSpecs[[disagg$OriginalSectorCode]] <- disagg - - + temp <-2 return(model) From c51bcf686636adf826540a24d5ee947b8fb8a805 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Tue, 17 Dec 2024 13:39:34 -0500 Subject: [PATCH 121/121] update documentation --- DESCRIPTION | 2 +- R/StateDisaggFunctions.R | 2 +- man/assembleTwoRegionIO.Rd | 4 ++-- man/createDisaggFilesFromProxyData.Rd | 23 +++++++++++++++++++++++ man/getStateModelDisaggSpecs.Rd | 21 +++++++++++++++++++-- man/getStateSpecificDisaggSpecs.Rd | 26 ++++++++++++++++++++++++++ man/loadDatafromUSEEIOR.Rd | 4 +++- 7 files changed, 75 insertions(+), 7 deletions(-) create mode 100644 man/createDisaggFilesFromProxyData.Rd create mode 100644 man/getStateSpecificDisaggSpecs.Rd diff --git a/DESCRIPTION b/DESCRIPTION index a52c9f4a..1d2d51a1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -44,6 +44,6 @@ Remotes: License: file LICENSE Encoding: UTF-8 LazyData: true -RoxygenNote: 7.2.0 +RoxygenNote: 7.3.1 Suggests: testthat (>= 2.1.0) diff --git a/R/StateDisaggFunctions.R b/R/StateDisaggFunctions.R index e886a423..5b804732 100644 --- a/R/StateDisaggFunctions.R +++ b/R/StateDisaggFunctions.R @@ -306,7 +306,7 @@ disaggregateStateSectorLists <- function(code_vector, disagg) { #' @param disagg Specifications for disaggregating the current Table #' @param disaggYear Integer specifying the state model year #' @param disaggState A string value that indicates the state model being disaggregated. For national models, string should be "US" -#' @return +#' @return A stateior model with disaggregation specs included createDisaggFilesFromProxyData <- function(model, disagg, disaggYear, disaggState){ # Note: this function assumes: diff --git a/man/assembleTwoRegionIO.Rd b/man/assembleTwoRegionIO.Rd index abd3e2c2..37667deb 100644 --- a/man/assembleTwoRegionIO.Rd +++ b/man/assembleTwoRegionIO.Rd @@ -4,7 +4,7 @@ \alias{assembleTwoRegionIO} \title{Assemble two-region make, use, domestic use, and Use tables as well as commodity and industry outputs.} \usage{ -assembleTwoRegionIO(year, iolevel, disaggState = FALSE) +assembleTwoRegionIO(year, iolevel, disagg_specs = NULL) } \arguments{ \item{year}{A numeric value between 2007 and 2017 specifying the year of interest.} @@ -12,7 +12,7 @@ assembleTwoRegionIO(year, iolevel, disaggState = FALSE) \item{iolevel}{BEA sector level of detail, currently can only be "Summary", theoretically can be "Detail", or "Sector" in future versions.} -\item{disaggState}{TEMPORARY boolean to trigger disaggregation.} +\item{disagg_specs}{name of disaggregation.} } \value{ A list of two-region make, use, domestic use, and Use tables diff --git a/man/createDisaggFilesFromProxyData.Rd b/man/createDisaggFilesFromProxyData.Rd new file mode 100644 index 00000000..4a795ae4 --- /dev/null +++ b/man/createDisaggFilesFromProxyData.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/StateDisaggFunctions.R +\name{createDisaggFilesFromProxyData} +\alias{createDisaggFilesFromProxyData} +\title{Create Make, Use, and Env ratio files for each state from Proxy data for the relevant sectors.} +\usage{ +createDisaggFilesFromProxyData(model, disagg, disaggYear, disaggState) +} +\arguments{ +\item{model}{An stateior model object with model specs and specific IO tables loaded} + +\item{disagg}{Specifications for disaggregating the current Table} + +\item{disaggYear}{Integer specifying the state model year} + +\item{disaggState}{A string value that indicates the state model being disaggregated. For national models, string should be "US"} +} +\value{ +A stateior model with disaggregation specs included +} +\description{ +Create Make, Use, and Env ratio files for each state from Proxy data for the relevant sectors. +} diff --git a/man/getStateModelDisaggSpecs.Rd b/man/getStateModelDisaggSpecs.Rd index bd1181a1..23e2309e 100644 --- a/man/getStateModelDisaggSpecs.Rd +++ b/man/getStateModelDisaggSpecs.Rd @@ -2,13 +2,30 @@ % Please edit documentation in R/StateDisaggFunctions.R \name{getStateModelDisaggSpecs} \alias{getStateModelDisaggSpecs} -\title{Read and assign disaggregation specifications} +\title{Read and assign disaggregation specifications +Function assumes all states will be disaggregated with the same config file +and allocations unless a statefile parameter is included as input. +In this case, the function assumes the statefile paramter will modify the +allocation values present in configfile for each state, rather than loading +in 50 different sets of allocation values.} \usage{ -getStateModelDisaggSpecs() +getStateModelDisaggSpecs(configfile, statefile = NULL) +} +\arguments{ +\item{configfile}{str, name of disaggregation specification file} + +\item{statefile}{str, name of state-specific disaggregation spec file that will +modify the standard configfile for each state. Should be 1 config file that has +the required modifications of configfile for each state} } \value{ A stateior model object with the disaggregation specs loaded. } \description{ Read and assign disaggregation specifications +Function assumes all states will be disaggregated with the same config file +and allocations unless a statefile parameter is included as input. +In this case, the function assumes the statefile paramter will modify the +allocation values present in configfile for each state, rather than loading +in 50 different sets of allocation values. } diff --git a/man/getStateSpecificDisaggSpecs.Rd b/man/getStateSpecificDisaggSpecs.Rd new file mode 100644 index 00000000..532f993d --- /dev/null +++ b/man/getStateSpecificDisaggSpecs.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/StateDisaggFunctions.R +\name{getStateSpecificDisaggSpecs} +\alias{getStateSpecificDisaggSpecs} +\title{Read in state-specific disaggregation values +This function assumes values contained in statefile will modify disaggregation +values present in the main disaggregation config file.} +\usage{ +getStateSpecificDisaggSpecs(disaggConfigpath, statefile) +} +\arguments{ +\item{disaggConfigpath}{str, path for statefile} + +\item{statefile}{str, name of state-specific disaggregation spec file that will +modify the standard configfile for each state. Should be 1 config file that has +the required modifications of configfile for each state} +} +\value{ +A stateior model object with the state-specific disaggregation specs +included in model$specs$STateDisaggSpecs object +} +\description{ +Read in state-specific disaggregation values +This function assumes values contained in statefile will modify disaggregation +values present in the main disaggregation config file. +} diff --git a/man/loadDatafromUSEEIOR.Rd b/man/loadDatafromUSEEIOR.Rd index 0666081e..11b0296b 100644 --- a/man/loadDatafromUSEEIOR.Rd +++ b/man/loadDatafromUSEEIOR.Rd @@ -4,10 +4,12 @@ \alias{loadDatafromUSEEIOR} \title{Load data from useeior using flexible dataset name} \usage{ -loadDatafromUSEEIOR(dataset) +loadDatafromUSEEIOR(dataset, appendSchema = TRUE) } \arguments{ \item{dataset}{A string specifying name of the data to load} + +\item{appendSchema}{bool, set to FALSE to ignore schema in name} } \value{ The data loaded from useeior