Resource Stock Calculation 1 (1*) Last Updated: November 29, 2019; First Released: July 16, 2014 Author: Kevin Boyle, President, DevTreks Version: 2.2.0 A. Introduction This reference introduces tools for calculating resource stock Input and Output data. Appendix A. Resource Stock Management and Analysis, explains the background logic behind the resource stock calculation techniques demonstrated in this reference. Section Page Resource Stock Budgeting 2 Stock Indicators 3 Other Indicator Systems 23 Data 24 Input Stock Calculator 25 Output Stock Calculator 27 Resource Stock Analyzers 29 Multimedia and Stories 30 Summary and Conclusion 32 Appendix A. Resource Stock Management and Analysis 41 Appendix B. Resource Stock Examples 46 Appendix C. Uncertain Base Element Costs and Benefits 83 B. Resource Stock Social Budgeting The following image (World Bank, 2010) illustrates the global carbon cycle. In this image, carbon stocks are stored in the atmosphere, vegetation and soils, and the ocean. The quantity of these stocks vary based on the natural and human processes shown by the arrows. The following carbon stock budget provides a basic accounting framework for keeping track of changes in the atmospheric carbon stock over time. The science associated with many of these stock flows is still being discovered -US NASA recently launched a satellite to measure the estimated 25% carbon stock flow that is unaccounted for by current science (NYT, 2014). Atmospheric Carbon Stock Budget Unit: Gt Starting Stock Stock Credits Stock Debits Ending Stock 2010 Stock 1000 Respiration 119.6 0 880.4 Primary Production 0 120.2 1000.6 Land sinks and land use … 1.5 2.7 999.4 Ocean to Atmosphere flus 90.6 92.2 997.8 Fossil fuel combustion … 7.7 0 1005 2011 Stock 1005 This budget employs a basic Stock Ending Balance = Stock Starting Balance + Stock Credits – Stock Debits resource accounting framework. C. Stock Indicators (2*) The carbon cycle image demonstrates that carbon stocks are changed by natural and manmade resource processes that include plant respiration, gross primary plant production, and fossil fuel combustion. These processes can be measured using indicators, such as carbon dioxide (CO2) emissions from power plants, carbon sequestered in tropical rainforests, and CO2 used in grain crop production. The IPCC, FAO, World Bank, and US Global Change Research Program, references contain hundreds of examples of indicators that can be used to track resource stocks associated with climate change. The following image (USGCCRP, 2014) illustrates how indicators are used to measure climate change. The same reference recommends that new indicator systems be developed that can be used to prevent climate change from wrecking the societies living on this planet. The calculators introduced in this reference track these types of indicators using Stock Indicators. The following image shows that these indicators have generic quantitative properties and generic mathematical operations that can be applied to the quantities: This particular set of generic indicator properties was chosen because they support the Conservation Technology Assessments (CTA) introduced in the associated Resource Stock Analysis reference, including calculations derived from simple linear equations, life cycle analysis, multi-criteria scoring systems, probabilistic statistics, risk rankings, risk indexes, constrained optimization, damage assessment, and machine learning. Examples of many of the mathematical techniques used with these properties, such as Probabilistic Risk Analysis, can be found in the Technology Assessment and Social Performance Analysis tutorials. The Monitoring and Evaluation (M&E) tutorials demonstrate using a similar set of Indicator properties for carrying out M&E calculation and analysis. These properties are defined by the following default rules. Each tutorial includes URLs to datasets demonstrating the rules followed by custom algorithms. * Name and Indicator Deletions: Name of the indicator. Indicators can be deleted by setting this property and the Label property to blank or none. Indicators don’t actually get deleted but all of their properties are set to blank and they are not calculated and they are not displayed or stored in results. * Description: Description can include a general description, the means of verification needed for the indicator, and an explanation of the numeric techniques. * Label: Unique string Id for each Indicator. During analyses, the Label is used to aggregate indicators found in different base elements. If possible, a Work Breakdown Structure should be used to standardize the labels. Sibling indicators in the same calculator should not have the same Label –they should be unique. Use the next property to identify related indicators. * Related Labels: A comma-separated-value string of indicators that are related to the current indicator. Use the Label of each indicator to identify the related indicators. For example, Example 1 in Appendix B shows that a 2 step LCA calculation can relate an indicator’s gross emission calculations in step 1 to several environmental performances indicators in step 2. In Example 2, the following string is added to the nitrate emissions indicator: “CO2A, NO2A, SO2A, SO2B”. The final letter suffix is a simple convention that supports a variety of relationships and reporting (see the Lippiatt 2007 images in this reference). * Date: The exact date that the indicator was measured or, in the case of indicators stored in TEXT data files, the date that the calculations were run. * Distribution Type (3*): Options include none, normal, triangular, uniform (discrete), bernoulli, beta, lognormal, poisson, weibull, binomial, pareto, and gamma. Distributions that require 3 numbers, such as triangular, should use QT, QTD1, and QTD2 to define the distribution, with QT equal to the mode or mean. Distributions that require 2 numbers, such as normal and lognormal, should use QTD1 and QTD2 for the distribution. Distributions that require 1 number, such as poisson and bernoulli, should use QTD1 for the distribution. Individual algorithm describe their support for truncated distributions, if any. Calculations derived from sampled distributions return QTM = mean, QTL = lower x% confidence interval, QTU = upper x% confidence interval. The CTA reference will include examples for many of these distributions. * Q1 to Q5 Amounts: Amount of Quantity 1, 2, 3, 4, and/or 5. All amounts are double data types. Algorithms that use Data URL datasets to score statistical models do not actually use these amounts for any calculation. They should still be consistent with the last scoring dataset row because the Resource Stock Totals analysis displays their amounts. * Q6 to Q10 Amounts: Algorithms that use Data URL datasets can include up to 10 columns of input data. Although the calculator does not have Q6 to Q10 properties, these terms can still appear in Math Expressions for algorithms that use more than five columns of Data URL TEXT datasets. Because these properties are not stored in calculators, Q1 to Q5 should be the most significant variables in the calculation. For the same reason, these terms cannot appear in Score.MathExpressions. Example 5 in Appendix B demonstrates how to set these properties correctly. * Q1 to Q5 Unit: Unit of measurement for Quantity 1, 2, 3, 4, 5. * Math Expression (4*): A mathematical expression containing one or more of the Q1 to Q5 variables and/or sibling indicator Q1 to QTM variables. Any of the 14 sibling indicators’ Q1, Q2, Q3, Q4, Q5, QT, QTD1, QTD2, QTM, QTL, or QTU properties can be included in the expression. Any of the variables can be stored in an accompanying TEXT file. Example 5 in Appendix B demonstrates that algorithms that analyze more than 5 input columns in their TEXT datasets, must specify variables 6 to 10 using the terms Q6, Q7, Q7, Q8, Q9, and Q10. These tell the algorithm which columns of data from the dataset to include in the analysis. Some algorithms also use them to set the existing QT and/or QTM properties for each row of data in the dataset. Each variable in the expression, whether self or sibling, must use a string that identifies both the indicator (I1, I2, … In) and the Qx property (Q1 … QTM), with a period delimiter between them. Examples include: I1.Q1, I1.Q2, I2.QTM, I3.Q4 If the Math Expression is being used with data found in the Data URL TEXT files, the terms in the Math Expression must identify their corresponding data column by ending with a “.ColName” suffix: I1.Q1.EnergyUse1, I1.Q2.Horsepower, I2.QTM.Miles, I3.Q4.Time The expression will be parsed, solved and the result added to QT. Math Errors in the expression return a 0 value for QTAmount and a brief error message will be added to the Math Result property. As further explained in Footnote 4, the Math Expression should use the following type of syntax: Q1 to Q10 for Indicator 1 only: ((I1.Q1 + I1. Q2) * I1.Q3) + I1. Q4)) - (2 * I1.Q5) Sibling indicators with Indicator 1: ((I1.Q1 + I1. Q2) * I2.Q3) / (2 * I3.QTM) Data URL datasets: I1.Q1.EnergyUse1 + I1.Q2.Horsepower EXCEL-style Math Functions: (log(I1.Q1) * log(I2.QTM)) / (sin(I3.Q3)^2) * Math Operator: Options include none, equalto, lessthan, lessthanorequalto, greaterthan, or greaterthanorequalto. This will be used with algorithms that employ constrained variables, such as Bayesian statistics and constrained optimization. Each algorithm defines how the constraint should be set and used. Generally, the left hand side (LHS) of an equation will be QT and the RHS will be the Math Expression. * QT Amount: The result of the parsed Math Expression. Do not include QT in the Math Expression. Some algorithms, such as those that use Math Expressions to identify columns of data to include from TEXT data sets, use this as a data entry field. * QT Unit: Unit of measurement for QT. * Data URL: When Q1 to Q10 data are included in a TEXT file (see the Data URL property below), each indicator becomes the metadata describing the TEXT data. Some algorithms automatically fill in the Q1 to QT Amounts as calculated Means derived from the data (9*). Most algorithms can run multiple indicator calculations concurrently. * QTD1 Amount: The first variable, or shape parameter, is used to define the distribution of QT. For example, triangular distributions use this property to set a low estimate. If desired, the calculator can be run twice to first generate the QT Amount and Math Results descriptive statistics. Those numbers can then be used to set the QTD Amounts. In addition, Version 2.1.4 began to use the “D1 and D2” properties for reporting. * QTD1 Unit: Unit of measurement for QTD1. Examples include mean, low estimate, lower bound, and mu. * QTD2 Amount: The second variable, or scale parameter, is used to define the distribution of QT. For example, normal distributions use this property to set standard deviation. QT must be within the bounds of the QTD1 and QTD2 Amounts, or arbitrary adjustments are made to the QTD1 and QTD2 Amounts (+-25% of QT) to keep them within acceptable bounds. Distribution errors are added to the Math Result property for each indicator. * QTD2 Unit: Unit of measurement for QTD2. Examples include standard deviation, high estimate, upper bound, and gamma. * Math Type and Sub Math Type (3*): Numeric algorithm to use to set the QTM, QTL, and QTU properties. Math Type identifies the software library to run with the algorithm and Sub Math Type identifies specific algorithms to run using the library. The name of the custom algorithm is added to the Sub Math Type property (i.e. subalgorithm1). Sub algorithms that are currently available are listed in the CTA and Social Performance references. If the Sub Math Type is left blank or set equal to “none”, no algorithm is run. Examples of the following algorithms can be found in Appendix B and in the associated CTA tutorial: none: Run Math Expressions, but don’t run any specific algorithm. The Math Expression uses the Jace Nuget package, included in the source code, to parse the math expression. algorithm1 (MathNet and System.Math): Appendix B and Example 1 in the associated CTA tutorial use this option to introduce probabilistic statistics that employ MathNet and System.Math algorithms. MathNet is an open source mathematical library that is included as a Nuget package with the source code. algorithm2 (R Project): Example 2 in the associated CTA tutorial uses this option to introduce probabilistic statistics that employ R project algorithms. algorithm3 (Python): Example 3 in the associated CTA tutorial uses this option to introduce probabilistic statistics that employ Python algorithms. algorithm4 (AML): Example 4 in the associated CTA tutorial uses this option to introduce probabilistic statistics that employ Azure Machine Learning algorithms. algorithm5 (Display): Example 5 in the associated CTA tutorial uses this option to introduce probabilistic statistics that are generated using any statistical library and then manually added to Indicator and Score properties. The algorithm is used to display statistical results. Metadata analysis of those results can be carried out using Stock Analyzers. Algorithm6 (Julia): Version 2.0.2 stubbed out the source code to support this open source statistical library, but the library is not fully supported yet. Additional algorithms will be tested and released in future upgrades. Do not use the remaining options yet. * BaseIO: Updates specific base Input or Output properties with an indicator’s QTM value. All quantitative base element Input or Output properties, such as Input.Price or Output.Amount, are subject to uncertain measurement. Example 4 in Appendix B and Appendix B explain how to use this property to update base element properties with the uncertain numbers. This technique supports consistency among related calculators. For example, these properties will help keep related NPV calculators consistent with Resource Stock calculator results (i.e. mean costs and benefits). Options include: quantity = Input or Output amount times = Input or Output times ocprice = Input operating cost price aohprice = Input allocated overhead price capprice = Input capital price benprice = Output price compquantity = Output composition amount The following properties are automatically filled in by all Math Type algorithms. Analysts should use these properties to communicate results in terms of likelihoods and probabilities. * QTM Amount: Mean, predicted, estimated, or most likely, estimate of QT. When no algorithms are used to calculate QTM, this property is equal to QT. * QTM Unit: Unit of measurement for QTM. * QTL Amount: Lower bound on QT. * QTL Unit: Unit of measurement for QTL. * QTU Amount: Upper bound on QT. * QTU Unit: Unit of measurement for QTU. * Math Result: Either a URL to a comma-separated-value TEXT file or the actual strings of csv data generated from the Math Type and Math Sub Type properties. Large datasets may be too large to store or display directly in the Math Result. For large datasets, a URL to a Resource base element should be added to the initial Math Result. When a URL is found in this property, identified by checking whether the Math Result starts with “http”, the csv results will be stored in the TEXT file, rather than directly in the Math Results. The following image, from Appendix B of the CTAP reference, show how to use a URL to store data for this property. Indicator performance can be increased significantly using this URL technique. Errors running indicator calculations are appended to this property. The following image displays the combined Indicators, or Scores. The combined Indicators, or Scores, have the following properties: * Target Type: Used with Progress analyzers to identify benchmark and actual indicators. * Alternative Type: Used with Change by Alternative analyzers to identify alternatives to compare. * Score Math Expression (1*): Sets the Score property. Works identically to each Indicator.MathExpression property. Although an Indicator’s QTM property makes a logical variable in the expression, using that property exclusively is not a requirement. If needed, the Score, ScoreD1, ScoreD2, DistributionType, and MathType properties can be fine-tuned and run a second time to generate final ScoreM, ScoreL, and ScoreU properties. Do not include Score in the Math Expression (i.e. don’t use syntax like Score = I1.QTM + I2.QTM; instead enter I1.QTM + I2.QTM). * Score Amount: The result of the parsed Math Expression. * Score Unit: Unit of measurement for Score. This is a data entry field. * ScoreD1 Amount: This is a data entry field. This property works the same as each indicator’s QTD1 property. If this property is set to zero, the underlying indicator data will be used to fill in ScoreM, ScoreL, and ScoreU. For example, if the indicators are calculated using 10,000 iterations, a Score will be computed for each of the iterations and the 10,000 observations will be used to fill in the final results. * ScoreD1 Unit: Unit of measurement for ScoreD1. Examples include mean, low estimate, lower bound, and mu. * ScoreD2 Amount: This is a data entry field. This property works the same as each indicator’s QTD2 property. If the ScoreD1 and ScoreD2 properties are set to zero, the underlying indicator data will be used to fill in ScoreM, ScoreL, and ScoreU. * ScoreD2 Unit: Unit of measurement for ScoreD2. Examples include standard deviation, high estimate, upper bound, and gamma. * Score Distribution, Score Math Type, and Score Math Sub Type (9*): These properties work the same as each indicator’s Distribution Type, Math Type, and Math Sub Type properties, except that Score properties are used in the calculations. The properties are used to generate the ScoreM, ScoreL, and ScoreU properties. For example, the IPCC 2006 reference points out that the mean of aggregated emissions indicators must also account for the mean’s uncertainty, rather than a simple summation of each indicator’s uncertainty. * ScoreM Amount: Most likely estimate of Score. * ScoreM Unit: Unit of measurement for ScoreM. This is a data entry field (i.e. mean). * ScoreL Amount: The lower bound on the ScoreM Amount. * ScoreL Unit: Unit of measurement for ScoreL. This is a data entry field (i.e. lower 95% ci). * ScoreU Amount The upper bound on the ScoreM Amount. * ScoreU Unit: Unit of measurement for ScoreU. This is a data entry field (i.e. upper 95% ci). * Score Math Result: Reports the results of calculations, including density functions. Works identically to the Indicator.MathResults –the Math Results can be either stored directly in this property or stored in a TEXT URL that has been added to this property. All Score errors are appended to this property. * Iterations (3*): Number of iterations to use when drawing random number samples used with sampling algorithms. Examples 2 and 3 in Appendix B, uses this property to introduce basic risk analysis. The default value is 1000 iterations. NASA (page 12-5, 2011) recommends incrementally increasing the number of iterations and checking the statistical results, until the results are within acceptable bounds. A future release may automatically carry out this convergence check. * Confidence Level: Sets the level of the confidence interval that will be used by all Indicators and Scores. Use an integer greater than 9 and less than 100. The IPCC references recommend using levels as high as 95 (percent) while the GAO (2009) reference recommends reporting levels as low as 40 (percent). When in doubt, use 90. * Random Seed: Sets the seed that will be used to generate random samples of numbers. The seed will be used by all Indicators and Scores. Set this equal to 0 when this property should not be used, otherwise set this value to an integer greater than 0. In the latter case, the same set of random variables will be generated every time a new calculation is run (provided the same integer is used). Otherwise, a new set of random variables will be generated and calculations will vary slightly each time a calculation is run. * BaseIO: This property works the same as each indicator’s BaseIO, except the ScoreM property is used to update the underlying Input or Output property. * Media URL: The URL stores pictures, images, maps, videos, and other multimedia, to help to communicate the results of an analysis. Use a semicolon-delimited string of Media URLs for each communication aid. The files must be stored in base Resource elements. Videos are not permitted with this property. The IPCC references demonstrate that indicator datasets can be quite large –containing millions of observations. Obviously, no one is expected to manually enter large datasets in online applications. The following general calculator property allows appropriate TEXT data files, holding these types of datasets, to be linked to calculators. Version 2.1.4 elevated the use of the following Indicator.URL and Score.JointDataURL properties, and deprecated the Score.DataURL property, for many algorithms. The SPA3 reference explains that machine learning (ML) algorithms are becoming increasingly powerful and those algorithms use R and Python-compatible data conventions (i.e. 1st TEXT file stores scripts, 2nd TEXT file stores the dataset). * Indicator.URL: Indicator.URL datasets are run for one specific, indexed, Indicator at a time, in a specific order. Oftentimes, the Indicator.MathResults from some Indicators are used by subsequent Indicators. When the property is used to store URLs, the URLs must come from TEXT data files stored in a base Resource element. Do not include commas in the numbers (10000 not 10,000). Use single quotes, rather than double quotes, for string data. Don’t mistakenly include blank ending rows. Each algorithm defines the specific data format required by the algorithm. Errors with this property are appended to the Calculator Description property. * Score.JointDataURL (Stocks) or Score.URL (M&E): This property stores a TEXT data file holding rows of comma-separated-value strings holding the same data as an Indicator.URL or to hold supplemental data used in joint calculations. For example, probabilistic risk calculations can store a correlation matrix in this TEXT file. Algorithms that use scripting languages store a URL to the script file in this property. * Joint Data URL with multiple shared data: Different indicators can use completely different shared datasets by using a semicolon-delimited string of Joint Data URLs in this property. Each delimited string should hold a separate TEXT dataset. The joint dataset must identify which indicators are represented by the data. The same indicator can be used in more than one dataset, but subsequent datasets can overwrite previous dataset results. Algorithms that use Score.JointDataURLs and Score.DataURLs at the same time should use the same index position for both URLs. The CTA reference includes examples that use multiple joint datasets. The URL must come from a TEXT data file stored in a base Resource element. Do not include commas in the numbers (10000 not 10,000). Don’t mistakenly include blank ending rows. The TEXT File for algorithm 1 must use the following row format. Some algorithms require the use of statistical library-compatible datasets (i.e. R project, Python, AML), rather than this convention. https://devtreks1.blob.core.windows.net/resources/network_carbon/resourcepack_1534/resource_7951/Ex6.csv Indicator Label Custom Col1 Custom Col2 Colname1 Colname2 Colname3 … Colname11 CO2 10/10/2014 1 https://devtreks1.blob..drought.png 7.000 … 1.500 The following items explain the default rules used by the columns. The references used to introduce custom algorithms include actual datasets that show the rules enforced for the algorithm. Columns to Analyze: The following rules are enforced when deciding which columns of data to analyze. All columns of data must follow these rules (i.e. not only ColName1 to ColName11). Symptoms that these rules are being violated include QT = 0, missing dependent variables, and unhelpful error messages. 1. One column name must not start with another column name. For example, if energy is a column name and another column name is energy1, either the column named energy or energy1 will not be analyzed. Column names must not include the period separator used in math expressions (Ix.Qx). The author has violated this rule several times and mistakenly thought a bug was involved each time. 2. A column will not be analyzed unless the Math Expression contains a term that ends with the column name (Version 2.1.6+ began relaxing this rule for custom algorithms). For example, the Math Expression I1.Q1.energy1 + I2.Q1.energy2 will analyze columns name energy1 and energy2. This supports reusing the same dataset for different Inputs, Outputs, and Indicators. 3. Algorithms that use the Qx Amounts to make estimations or predictions for a specific set of variables, will match the correct column name to a corresponding term in the Math Expression. That term will be used to identify the Qx Amounts that must be passed to the algorithm. Algorithms that use TEXT datasets typically include scoring rows of data and therefore don’t use the Qx variables –they should still be filled in with the last row of scoring data because the Resource Stock Totals Analyzer will analyze them. 4. Each dataset can contain data for more than one Indicator by using more than one Indicator Label. Algorithms will be run for each Indicator in the dataset provided that Rules 1 to 3 are followed. Indicator Label to ColName2 (first 5 columns): Minimal columns required by all algorithms. All columns relate to Indicator Qx variables. The right Indicator is identified by the Indicator Label in the dataset. The right variable is identified by the Ix.Qx.ColName syntax required in Math Expressions. Many algorithms use the ColName1 column to store a dependent, or output, variable. ColName2 to ColName11 are used to store up to 10 columns of independent, or input, variables. All algorithms require at least one column of input data, hence the 5 column minimal dataset requirement. Individual algorithms define the data format for each column. The default data format used by many algorithms are strings for the first 3 columns and doubles for the remaining 11 columns. Custom Col1 and Custom Col2: Custom data defined by each algorithm. Some algorithms use these columns to define a date, a latitude-longitude, an image URL, a document URL, or a textual name for a categorical variable. A prototype algorithm uses these columns to make further divisions of data, such as learning steps in Bayesian inference calculations. These columns can be left blank, but they must be included in all TEXT files. Each algorithm will convert the string data format to a format used by the algorithm. ColName2 to ColName11 (9 columns): Optional columns that store up to 9 Qx variables (10 input variables in total). Version 2.1.8 introduced new algorithms that exceed the 10 variable limit (but Occam’s Rule is still a good reason to limit the variables). Custom algorithms are introduced in tutorials that include URLs to the actual datasets employed by the algorithm. Most algorithms replace missing data with zeros. Errors with either the URL or the dataset are appended to the Calculator Description property. Scoring and Training datasets: Many algorithms require a training dataset to build a statistical model and a scoring dataset to produce estimations, predictions, and recommendations from the model. Each algorithm specifies how they handle these two datasets. * Score.DataURL (10*): The URL stores a TEXT data file holding rows of comma-separated-value indicator data corresponding to the indicators used in joint calculations. * URL Relationships: Parent Indicator calculations can be run in a manner that automatically updates their children (i.e. by setting Use in Descendants = true and Overwrite Descendants = true). Appendix B, Example 3 on localhost demonstrates that not every calculator property in the children is updated. In this instance, the author decided that Indicators calculated with Data URL datasets tend to quite important and the Data URL property should not be automatically updated. In hindsight, that logic is open for debate. The recommended convention for dealing with this type of debate is for network administrators to communicate their network’s preferences to their information technologists (i.e. our role is demonstrate what you should be doing rather than what you are actually doing). Errors with one indicator or dataset do not affect subsequent indicators or datasets. Most Individual indicator errors will appear in the Calculator Description property, along with the name of the indicator causing the error. Dataset errors will appear in either the Score Math Result property or the Calculator Description property. Input and Output calculations should be checked for errors prior to running analyses. Error messages should be removed from Math Expressions, Math Results, and Descriptions before calculations are run or they may still appear in new calculations. The Resource Stock Analysis 1 reference explains that the associated Statistical, Change, and Progress analyzers only use the QTM and ScoreM properties in their analyses (QTM, ScoreM, ScoreL, ScoreU). This means that some indicators may need to be measured using more than one step so that their results can be included in analyses. For example, Example 1 shows how a 2 step LCA produces an allocated co-input or co-output emissions amount in Step 1 and an environmental impact or performance amount in Step 2. The same Input or Output is used to carry out the 2 sets of indicator calculations. The results of both steps can be analyzed together using the Related Indicators Label property –emissions can be listed for each environmental impact (see the reports generated by Lippiatt’s 2007 software shown in Example 1). Each calculator supports up to 15 indicators (if needed, the source code shows that 20 indicators can be supported). The same indicator, such as I121 CO2 emissions, can be added to more than one Input or Output element. For example, a two year project may use two separate Input Series to keep track of the same indicators. An emissions inventory for cars may need more than 15 indicators. A large damage assessment may need to break locations down into separate Outputs. Indicators should be entered in a consistent order and up to 15 label-dependent Input indicators and Output indicators will be calculated. The order is particularly important when multiple budgets are being compared. The first 15 unique (by label) indicators will be calculated and any additional indicators will be ignored. Analyzers allow up to 10 of the indicators to be selected for further analysis. D. Other Indicator Systems The UN CAPNET (2015) reference explains the benefits and limitations associated with using indicator systems to help reduce the impacts of natural resource disasters, such as drought. They use the following image to demonstrate alternative sets of properties that are appropriate for alternative uses of indicators. The U.S. CMS web site has additional examples of advanced properties applicable to health care performance indicators. The indicators in this reference don’t preclude the use of these alternative indicator properties, but they are not essential for the principal purpose used by any Indicator in DevTreks – to quantify how to save money when improving stakeholders’ quality of life. Simple conventions, such as the use of a separate Indicator Reference Manual, or web site (i.e. U.S. CMS web site), that categorizes and defines the alternative indicators, allow both systems to be used together. E. Data The data used in these sample calculations come from a simple life cycle analysis of organic vs. conventional orange production in Brazil (Knudsen, 2014) that is explained in Example 1 in Appendix B (6*, 7*). Examples of other types of stock budgeting are presented in the Technology Assessment 1 and 2 tutorials. The calculators explained in this reference can be found at the following URLs. Remember that localhost URLs require that datasets first be previewed by their owner (so that they get stored in the file system). https://www.devtreks.org/greentreks/preview/carbon/linkedviewgroup/Stock Calculators/63/none/ https://localhost:5001/greentreks/preview/watershed/linkedviewgroup/Stock Calculators/58/none Examples of input and output calculations can be found at the following URLs. https://www.devtreks.org/greentreks/preview/carbon/input/2014 Fertilizer, Orange, Conventional/2147397531/none/ https://localhost:5001/greentreks/preview/carbon/input/2014 Fertilizer, Orange, Conventional/2147376818/none https://www.devtreks.org/greentreks/preview/carbon/input/2014 Fertilizer, Orange, Organic/2147397532/none/ https://www.devtreks.org/greentreks/preview/carbon/output/2014 Orange, Conventional LCA/2141223454/none/ https://www.devtreks.org/greentreks/preview/carbon/output/2014 Orange, Organic LCA/2141223455/none/ The IPCC, FAO, Nemecek (2013) Lippiatt (2007), and U.S. Global Climate Change Research Program (2014), references demonstrate that data is available for populating databases or TEXT data files with “prebuilt unit stock” data derived from sources such as government life cycle inventory datasets, regional and international datasets of climate change stock inventories, physical and socioeconomic indicators, agricultural water and nutrient stock budgets, automated sensing devices, school rankings, hospital medical treatment performance indicators, and utility company energy budgets (5*). The Monitoring and Evaluation tutorials demonstrate using similar Indicators with all base elements for carrying out M&E calculation and analysis. F. Input Stock Calculator Input Stock Calculators record Stock Indicator properties and carry out indicator calculations. These calculators should be run a way that allows them to be used as “Unit Stock Indicators” that enable them to be reused in any Operation or Component. Base Input properties can be changed by these calculators using the techniques explained in the Uncertain Cost and Benefit section of this reference. The following image displays a typical Input Calculator using the mobile view. These particular calculations are explained in Example 1. This example’s fertilizer input LCA used 3 Indicators to measure emissions and 5 Indicators to measure environmental performance. The following image display a typical media view of calculated results. This particular analysis is explained in the Social Budgeting and DevPacks tutorials. If running this calculator at the Input level, make sure to “make” the base document prior to running the calculations so that the children Input Series are updated correctly as well. G. Output Stock Calculator Output Stock Calculators record Stock Indicator properties and carry out indicator calculations. These calculators should be run in a way that allows them to be used as “Unit Stock Indicators” that enable them to be reused in any Outcome. Base Output properties can be changed by these calculators using the techniques explained in the Uncertain Cost and Benefit section of this reference. The following image displays a typical Output Calculator using the desktop view. This example does not include emissions for Outputs, but emissions could be calculated if some of the oranges fell from the trees and decomposed into the soil. If running this calculator at the Output level, make sure to “make” the base document prior to running the calculations so that the children Output Series are updated correctly as well. H. Resource Stock Analyzers The data generated by these calculators can be aggregated and further analyzed using the analyzers explained in the Resource Stock Analysis 1 reference. The Totals Analyzer displays summations of all of the quantitative Stock Indicator properties (Q1, Q2, Q3, Q4, Q5, QTM, QTL, QTU, ScoreM, ScoreL, and ScoreU). Custom analyses, carried out outside of DevTreks, can use those totals for further analysis. The associated Statistical, Change, and Progress analyzers only aggregate the QTM, ScoreM, ScoreL, and ScoreU properties. When the data being analyzed is observational data stored in Data URL datasets, these analyzers produce automated metadata analysis (analysis of analyses). Metadata analysis of randomized control trial (RCT) data is the primary technique employed in Health Technology Assessments. RCT examples can be found in the CTA and Resource Stock Analysis references. Input and Output Indicators are tracked separately but will be aggregated together into the same stock, at the Time Period base element in budgets, when they have the same label. The number of observations in the aggregated stock reflects the total number of Input and Output Indicators being aggregated, regardless of whether the Indicator debits (a negative number) or credits (a positive number) the stock. The logic is that it is possible for the same Input or Output to both credit and debit stocks. For example, a crop Output may debit a soil Nitrogen stock when harvested but may credit the soil Nitrogen stock if part of the harvest is left on the field to decompose. I. Multimedia (Resources) People will have an easier grasp of resource stocks results by including pictures, graphs, and videos that help to explain the calculations and analyses. The following image (Lippiatt, 2007) displays the results of a Life Cycle Analysis of building construction resource stock data. J. Stories (Linked Views) Stories should accompany each resource stock calculation and explain the calculations or analyses. Stories, such as an explanation for a food or agricultural output quality rating index, are particularly important when conducting resource stock analyses. https://www.devtreks.org/greentreks/preview/carbon/linkedviewpack/Resource Stock Analysis 1/180/none Summary and Conclusions Resource stocks are critical community capitals needed by everyone. When they get out of balance, floods can inundate, crops can wither, streams become polluted, children can become stunted, adolescents can remain ignorant, patients can be mistreated, workers can be stuck in low paying jobs, and governments can spend money wastefully. This reference demonstrates how to calculate basic resource stock indicators for Inputs and Outputs. These numbers may help people to manage resource stocks in ways that help them to improve the sustainability of their lives and livelihoods. Footnotes 1. As contrasted to a Resource Stock Calculation 2557 reference that uses Input and Output Stock calculators #2557. Software development is in its infancy. 2. These type of generic indicators are also used with the tools covered in the Monitoring and Evaluation (M&E) tutorials. These resource stock indicators and tools can be used as a supplemental set of M&E tools. The CTA tutorial discusses the M&E tools further. Version 2.04 upgraded the M&E tools to handle additional types of mathematical calculations or algorithms, including risk and uncertainty calculations. 3. Version 1.7.6 increased the complexity of these calculators for the specific purpose of supporting probabilistic and statistical algorithms. The Distribution Type options are more thoroughly explained in the NASA, IPCC, and GAO references. The IPCC reference (2006) emphasizes that “it must be knowledge of the underlying physical processes that governs the choice of a probability function”. For example, the NASA (2011) and GAO references (2009) mention that lognormal probability density functions (PDFs) are often appropriate for analyzing total costs because costs are often underestimated and hence PDFs tend to be skewed to the right. The mathematical library (see Footnote 8) documents the parameters used in each distribution and recommends looking up distribution definitions on Wikipedia (as do most statistical libraries). Additional distributions are available in the library and will be included in future releases. 4. Further documentation about one of the mathematical parsers being used, including the mathematical operators that are supported, can be found at https://github.com/pieterderycke/Jace/wiki . This parser supports both simple equations that use parentheses and equations that support EXCEL-style formulas. Some algorithms use internal parsers that are part of the algorithm’s scripting language (i.e. R project, Python). The left hand side of the equation is always QT and the Math Expression is the right hand side. Examples include: (I1.Q1 + I1.Q2) / I1.Q3 (I1.Q1.energy1 + I1.Q2.energy2) / I1.Q3.energy3 LOG(I6.Q1) + LOG(I5.Q2) Errors in the expression return a 0 value for QTAmount and a brief error message will be added to the Math Result. Missing variables in Math Expressions (I15.Q5) return zero. Algorithms that use scripting languages, such as R project and Python, use the scripts to carry out calculations. Specific algorithms document restrictions they impose on the datasets and variables that can be parsed and analyzed. These restrictions may be loosened as testing continues. 5. Bulk data uploads, or TEXT data files referenced by the Data URL property of calculators, are recommended for indicator data that is maintained by scientific organizations, government agencies, and other science-oriented organizations. For example, the emissions data used in the IPCC references, the agricultural emissions data found in the FAO reference, the building life cycle data used by Lippiatt (2007), insurance company hospital records, and agricultural life cycle data maintained by research organizations (i.e. Nemecek, 2013), are prime candidates for bulk uploads. The Malnutrition Calculation 1 reference gives an example of how to use bulk uploaded “unit stock” data. Example 3 in Appendix B shows how to use a calculator’s Indicator or Score Data URL properties to link TEXT data files holding these datasets to calculators and analyzers. 6. The Life Cycle references demonstrate additional techniques for carrying out life cycle cost and benefit analysis. The Performance Analysis and Social Performance Analysis references explain how to tie cost and benefit data to indicator data, using techniques such as Incremental Cost Effectiveness Analysis. 7. The author first financed an organic vegetable operation in 1980. Around 1988, he helped to finance one of the first commercial farms in the Imperial Valley of California, USA to convert to organic production. He financed citrus production throughout the 1980s. 8. Version 1.7.6 starting using the open source Math.Net library to carry out calculations and analyses. Further documentation about this mathematical library, including the mathematical calculations that are supported, can be found at http://numerics.mathdotnet.com/docs/ . Version 1.8.2 started using additional statistical libraries (Azure Machine Learning, R project, Python). Additional ways to use mathematical and statistical libraries will be included in future upgrades. 9. DevTreks recognizes that a lot of resource stock data, including most IPCC data, has spatial properties. Most of the climate change references demonstrate the value of GIS analytic techniques. People like maps (or at least they like colored pictures). Spatial algorithms that employ GIS analysis will be addressed in future releases. Example 3, below, demonstrates storing latitude-longitude and time data. 10. This reference assumes, for the most part, that the scientists aren’t overly influenced by group think, that their peer-reviewed results can be readily replicated, and that they don’t suffer unduly from the “empty box” syndrome mentioned in other DevTreks references (i.e. researchers who prescribe policies for controlling costs without actually knowing how much a single item costs). Closer inspection of more IPCC references reveals that while they’ve covered most bases for analyzing climate change, ample opportunities exist for applied conservation practitioners to fill in missing gaps. Specific gaps appear to include Work Breakdown Structures for classifying climate change processes and technologies, international knowledge banks of mitigation technologies and best practices, automated online GHG inventories, and automated online CTA data services. References Bessou, Basset-Mens, Tran, and Benoist. LCA applied to perennial cropping systems: a review focused on the farm stage. Int J Life Cycle Assessment, Sept 25, 2012. Bierbaum, Lee, Smith, Blair, Carter, Chapin, Fleming, Ruffo, McNeeley, Stults, Verduzco, and Seylier, 2014: Ch. 28: Adaptation. Climate Change Impacts in the United States: The Third National Climate Assessment, Melillo, Richmond, and Yohe, Eds., U.S. Global Climate Change Research Program, 670-706. CAP-NET, United Nations Development Program. IWRM as a Tool for Adaptation to Climate Change. Training Manual and Facilitator’s Guide. 2009 Correl, Liverman, Dow, Ebi, Kunkel, Mearns, and Melillo, 2014: Ch. 29: Research Needs for Climate and Global Change Assessments. Climate Change Impacts in the United States: The Third National Climate Assessment, Melillo, Richmond, and Yohe, Eds., U.S. Global Climate Change Research Program, 707-718. Environmental Services. City of Portland (OR, USA). RiverViews. Spring 2015. European Observatory on Health Systems and Policies Series. Diagnosis-Related Groups in Europe. Moving towards transparency, efficiency and quality in hospitals. Edited by Reinhard Busse, Alexander Geissler, Wilm Quentin, Miriam Wiley. McGraw Hill Open University Press. 2011 Food and Agriculture Organization. The FAOSTAT Emissions Database Manual. 2014 Galloway, Schlesinger, Clark, Grimm, Jackson, Law, Thornton, Townsend, and Marting, 2014, Ch. 15: Biogeochemical Cycles. Climate Change Impacts in the United States: The Third National Climate Assessment, Melillo, Richmond, and Yohe, Eds., U.S. Global Climate Change Research Program, 350-368. Groffman, Kareive, Carter, Grimm, Lawler, Mack, Matzek, and Tallis, 2014: Ch. 8: Ecosystems, Biodiversity, and Ecosystem Services. Climate Change Impacts in the United States: The Third National Climate Assessment, Melillo, Richmond, and Yohe, Eds., U.S. Global Climate Change Research Program, 195-219. IPCC, 2006 IPCC Guidelines for National Greenhouse Gas Inventories. Prepared by the Greenhouse Gas Inventories Programme. Eggleston H.S., Buendia, L., Miwa K., Ngara T., and Tanabe, K. (eds) PublishedL IGES, Japan IPCC. Climate Change 2013, The Physical Science Evidence. Working Group 1 Contribution to the Fifth Assessment Report of the Intergovernmental Panel on Climate Change. [Stocker, Qin, Plattner, Tignor, Allen, Boschung, Nauels, Xia, Bex, and Midgely (EDS)]. Cambridge University Press, Cambridge, UK and USA IPCC. Climate Change 2014, Impacts, Adaptation, and Vulnerability, Part A Global and Sectoral Aspects. Working Group 2 Contribution to the Fifth Assessment Report of the Intergovernmental Panel on Climate Change. [Field, Barnes, Barros, Dockken, Mach, Mastrandrea, Bilir, Chatterjee, Ebi, Estrada, Genova, Girma, Kissel, Levy, MacCracken, Mastrandea, and White (EDS)]. SUBJECT TO FINAL EDIT IPCC. Climate Change 2014, Mitigation of Climate Change. Working Group 3 Contribution to the Fifth Assessment Report of the Intergovernmental Panel on Climate Change. [Field, Barnes, Barros, Dockken, Mach, Mastrandrea, Bilir, Chatterjee, Ebi, Estrada, Genova, Girma, Kissel, Levy, MacCracken, Mastrandea, and White (EDS)]. SUBJECT TO FINAL EDIT IPCC 2014, 2013 Supplement to the 2006 IPCC Guidelines for National Greenhouse Gas Inventories: Wetlands, Hiraishi, T., Krug, T., Tanabe, K., Srivastava, N., Baasansuren, J., Fukuda, M. and Troxler, T.G. (eds). Published: IPCC, Switzerland. Jacoby, Janetor, Birdsey, Buizer, Calvin, de la Chesnaye, Schimel, Wing, Detchon, Edmonds, Russell, and West, 2014: Ch. 27: Mitigation. Climate Change Impacts in the United States: The Third National Climate Assessment, Melillo, Richmond, and Yohe, Eds., U.S. Global Climate Change Research Program, 648-669. Khazai, Bijan; Bendimerad, Fouad; Cardona, Omar Dario; Carreno, Martha-Lilliana; Barbat, Alex H.; Burton, Christopher G. A Guide to Measuring Urban Risk Resilience. Principle, Tools and Practice of Urban Indicators (Prerelease Draft). EMI. 2015 Knudsen, Marie Trydeman. Life Cycle Assessment of Organic Food. PhD Study. Department of Agroecology. Aarhus University. Denmark. Accessed on the web in June, 2014. Lippiatt, Barbara. BEES 4.0 Building for Environmental and Economic Sustainability Technical Manual and User Guide. US National Institute of Standards and Technology, US Department of Commerce. 2007 Moss, Scarlett, Kenney, Kunreuther, Lempert, Manning, Williams, Boyd, Cloyd, Kaatz, and Patton. 2014: Ch. 26: Decision Support: Connecting Science, Risk Perception, and Decisions. Climate Change Impacts in the United States: The Third National Climate Assessment, Melillo, Richmond, and Yohe, Eds., U.S. Global Climate Change Research Program, 620-647. National Academies of Science and Royal Society. Climate Change Evidence and Causes. An overview from the Royal Society and the US National Academies of Science. No date –accessed on the web in July, 2015. National Research Council of the National Academies. Climate Intervention: Carbon Dioxide Removal and Reliable Sequestration. The National Academies Press. 2015 Nemecek, Thomas. Life Cycle Assessment of Agricultural Systems. Introduction. Agroscope-Reckenholz-Tanikon Research Station ART. Federal Department of Economic Affairs, Switzerland. 2013 Accessed on the web in June, 2014. New York Times. NASA Launces Satellite to Measure Carbon. June 30, 2014 New York Times. (India’s Environment …). December 5, 2014 (exact title not on hand) New York Times. Hospital Rating Systems Differ on Best and Worst. March 3, 2015. New York Times. Healthy in a Falling Apart Sort of Way. March 3, 2015. New York Times. Evaluating Cancer Drugs on Cost, Too. June 23, 2016. New York Times. Judges Replace Conjecture with Formula for Bail. June 28, 2015. New York Times. U.S. Makes Final an Array of Rules on Food Safety. September 11, 2015. The Risky Business Project. Risky Business: The Economic Risks of Climate Change in the United States. 2014 United Nations. CAPNET. Drought risk reduction in integrated water resources management training manual. 2015 United Nations. UNISDR. DRAFT Post-2015 Framework for Disaster Risk Reduction: a proposal for monitoring progress. 2014 US Environmental Protection Agency. Guidelines for Preparing Economic Analyses. 2010 US Environmental Protection Agency. Life Cycle Assessment: Principles and Practices. 2006 US Government Accountability Office. Applied Research and Methods. GAO Cost Estimating and Assessment Guide. Best Practices for Developing and Managing Capital Program Costs. March, 2009. U.S. National Aeronautical and Space Administration. Probabilistic Risk Assessment Procedures Guide for NASA Managers and Practitioners, NASA/SP-2011-3421, Version 2.0, December, 2011. Vanclay, Frank, Ana Maria Esteves, IIse Aucamp, Daniel M. Franks. Social Impact Assessment: guidance for assessing and managing the social impacts of projects. Fargo, ND: International Association for Impact Assessment. 2015 V. Meyer, N. Becker, V. Markantonis, R. Schwarze, J. C. J. M. van den Bergh, L. M. Bouwer, P. Bubeck, P. Ciavola, E. Genovese, C. Green, S. Hallegatte, H. Kreibich, Q. Lequeux,I. Logar, E. Papyrakis,C. Pfurtscheller, J. Poussin, V. Przyluski, A. H. Thieken, and C. Viavattene. Review article: Assessing the costs of natural hazards – state of the art and knowledge gaps. Nat. Hazards Earth Syst. Sci., 13, 1351–1373, 2013 White, J.H. et al. Integrated description of agricultural field experiments and production: The ICASA Version 2.0 Data Standards. Computers and Electronics in Agriculture. 96 (2013) 1-12. Elsevier B. V. World Bank. World Development Report 2010. Development and Climate Change. 2010 World Bank. 2013. World Development Report 2014: Risk and Opportunity - Managing Risk for Development. Washington, DC World Bank and Climate Works. Climate-Smart Development. Adding up the benefits of actions that help build prosperity, end poverty, and combat climate change. 2014 World Bank and United Nations. Natural hazards, unnatural disasters: the economics of effective prevention. 2010 World Health Organization. Health Technology Assessment of Medical Devices. 2011 Zanoli, Gambelli, and Vitulano. Conceptual Framework on the Assessment of the Impact of Organic Agriculture on the Economies of Developing Countries. Food and Agriculture Organization. 2007 References Note We try to use references that are open access or that do not charge fees. Improvements, Errors, and New Features Please notify DevTreks (devtrekkers@gmail.com) if you find errors in these references. Also please let us know about suggested improvements or recommended new features. A video tutorial explaining this reference can be found at: https://www.devtreks.org/commontreks/preview/commons/resourcepack/Resource Stock Analysis 1/1525/none/ Appendix A. Resource Stock Management and Analysis A. Resource Stock Physical Science Analysis The origin of the term “resource stock” may have started in the natural resources area, where natural resources such as coal deposits, water reservoir quantities, Grand Bank cod numbers, soil nutrient amounts, and atmospheric carbon levels, could be characterized and modeled using a base stock amount that changes over time as Inputs are added that credit the stock quantity and Outputs are extracted that debit the stock quantity. The following image (Galloway et al, 2014) demonstrates that natural resource scientists also use the terms Sources for resources that contribute to, or credit, stocks, and Sinks for resources that remove, or debit, stocks. The following image (World Bank, 2010) illustrates how climate change impacts a river basin hydrologic cycle. The stock of water stored, transported, and used in the basin will change in ways that have serious implications for society. Changes to the stock can be measured over time using stock indicators such as temperature, biodiversity, rain, erosion, river flows, and wetland quality. Stock budgets can be used to keep track of the basic accounting: Stock Ending Balance = Stock Starting Balance + Stock Credits – Stock Debits. The main references used here tie directly into this natural resources stock theme. Three Intergovernmental Panel on Climate Change (IPCC) reports (2013 Working Group 1 or WG1, 2014 Working Group 2 or WG2, and 2014 Working Group 3 or WG3), and the U.S. Global Climate Change Research Program reference (2014), contain examples of recent science, completed by hundreds of scientists, which illustrate most of the major points being made about natural resource stocks, indicators for measuring changes in the stocks, and using stock budgets as an accounting framework (10*). The following image (EPA, 2006) of a life cycle analysis demonstrates that the stock credits are often measured as Inputs to a production process (i.e. the System Boundary) while the stock debits are measured using Outputs and emissions. This approach is commonly referred to as a production function, life cycle, or technology assessment, approach to stock accounting and valuation (EPA, 2006, 2010). Combinations of Inputs produce combinations of Outputs and emissions. The Social Performance Analysis tutorial documents a new algorithm that carries out life cycle analysis of data stored in TEXT datasets. Although stock budget accounting is straightforward, understanding cause and effect in the budgets is anything but (i.e. what are the impacts of the emissions in the previous image on the environment?). Natural resource scientists have a long history of building very elaborate models that capture the relationships in stock budgets over time. Examples include fishery stock models, habitat suitability indexes, soil nutrient budgets, and climate change models. Once the relationships have been quantified, the models often forecast the outcome of future events. The IPCC references have examples of climate change models that predict the incidence of hurricanes, droughts, and the trajectory of atmospheric C02. Some of those models use millions of observations and terabytes of data. The Social Performance Analysis 3 introduces formal Impact Evaluation statistical techniques used for measuring cause and effect attribution. B. Resource Stock Social Science Analysis Resource stocks need not be limited to natural resources. Any resource that can be described using the basic stock budgeting relationship, New Stock Amount = Old Stock Amount + Stock Credits - Stock Debits, can be analyzed using resource stock budgeting techniques. Human capital, health states, institutional capital, cultural capital, and social capital (see Chapter 4 in IPCC WG3 and refer to the Social Performance Analysis tutorial), are all resources that can be analyzed, to some degree, using resource stock budgeting methods. Even standard financial accounting (Financial Statement, Income Statement, and Cash Flow Statement) uses a production function approach to accounting and valuation. Vanclay et al (2015) use the following description and image of “community capitals” to illustrate the relation between the frameworks that underlie Social Impact Assessment (SIA) and the Sustainable Development Goals (SDG). The RCA Value Framework introduced in the SPA1 reference employs the same capitals (i.e. resource stocks) but uses the terms Physical Capital for Built Capital, Economic Capital for Financial Capital, and Institutional Capital for Political Capital. These frameworks aim to achieve better societal, or public service, outcomes and impacts from private and public sector activities. “The Sustainable Livelihoods Approach considers the capabilities, livelihood resources (assets, capitals) and livelihood strategies (activities) people undertake to make their living and conduct their way of life. At the heart of the model is the notion that all community resources or assets can be represented as a set of capitals. The assessment of social investment strategies can consider these capitals and how strengthening one or more of these capitals might increase the overall wellbeing in the community.” The use of stock budgeting techniques with institutional and social capital stocks is particularly important in terms of climate change. Much of the climate change literature (IPCC, NRC, and USGCCRP) emphasizes that institutional reform is a critical precursor to preventing the worse outcomes associated with this complex, global, problem. The Social Performance tutorial addresses more comprehensive stock budgeting. Appendix B. Resource Stock Calculation Examples This appendix contains examples demonstrating how to complete resource stock calculations. Examples of additional algorithms can be found throughout the tutorials. A. Natural Resource and Physical Stock Examples Professional examples of natural resource stock calculations include all of the cycle and budget data presented in the IPCC references (carbon, energy, nitrogen, water, and radiant energy), water budgets, soil and plant nutrient budgets, and energy budgets. The Social Performance Analysis 2 reference introduces new algorithms that demonstrate alternative techniques for carrying out the following natural and physical stock calculations. Example 1. Life Cycle Analysis (LCA) Resource stock flows and their impact on the environment are often quantified for products and technologies, such as building materials or organic crop production, using Life Cycle Analysis (IPCC WG3 App 2, 2014). Zanoli et al (2007) use the following definition from the International Standards Organization: “The ISO 14040 Standard defines a LCA as a compilation and evaluation of the inputs and outputs and the potential environmental impacts of a product system through its life cycle”. The USEPA, 2006 reference explains LCA in detail. The Social Performance Analysis tutorial documents a new algorithm for conducting LCA. USEPA uses the following image to demonstrate the steps involved in LCA: DevTreks extends the use of LCA beyond “product system” to include “technology assessments” as well. As with a product system, a technology is defined by combinations of inputs that produce outputs. DevTreks standard operating and capital budgets are used for technology assessments. The Social Performance Analysis tutorial includes examples of Life Cycle Impact Analysis, Product Life Cycle Analysis, Organization Life Cycle Analysis, Social Life Cycle Analysis, and Hotspots Analysis. 1. LCA Inventory The following image (Knudsen, 2014) displays emissions data for orange production that has been quantified during an inventory stage of a LCA. DevTreks considers this type of LCA to be a technology assessment of the differences between conventional and organic production technologies. The functional units being measure are 1 hectare of land and 1 ton of orange yield. Functional units are the same as the Unit Indicators discussed above. A variety of techniques, including field measurements, fixed equations, literature reviews, expert opinion, and simulation models, are used to obtain this type of emissions data. 2. LCA Assessment The next image (Knudsen, 2014) shows the assessment phase of this LCA. In this stage, emissions, or life cycle inventory indicators, are classified as belonging to one or more environmental impact categories. For example, NOx has been assigned to both Acidification and Eutrophication impact categories. Next, characterization factors are used determine the relative contribution of the emission to the impact. For example, the image shows that 1 kg NH4 contributes 25 times more to global warming than 1 kg CO2. The emission amounts are multiplied by these characterization factors to derive the environmental impact. The Lippiatt reference (2007) provides examples of dozens of characterization factors used to tie building construction materials to environmental impacts that include Global Warming Potential, Eutrophication Potential, and Ecological Toxicity. 3. LCA Normalization The next, or normalization, stage of LCA normalizes the disparate units of measures of environmental impacts (global warming potential from fertilizer, global warming potential from fuel use) into one common scale. This is done by dividing the environmental impact by a normalization factor, or reference value, such as total emissions or resource by geographic area, total emissions or resource for a given area on a per capita basis, the relation of one alternative to another (baseline), or the highest value among all options (USEPA, 2006). Normalized values can’t be compared between different impact categories (i.e. global warming and acidification). Normalization values should be adjusted to levels that are appropriate for DevTreks standard numeric precision (4 digits). Lippiatt (2007) uses normalization values with numbers that are over 1 billion that need adjustment for this level of precision. Modern machine learning platforms, such as AML, include automated tools for transforming data into a format that makes analysis more meaningful. These data transformations include standard techniques such as logarithmic transformation, but also include normalization techniques such as the following mathematical functions: z-score: (x – mean(x)) / stddev(x) min-max: (x – min(x)) / (max(x) – min(x)) logistic: 1 / (1 + exp(-x)) (uses the MathNet.Numerics.SpecialFunctions.Logistic(x) function) logit: inverse of the logistic function for y between 0 and 1 (uses the MathNet.Numerics.SpecialFunctions.Logit(y) function) tanh: hyperbolic tangent (uses the MathNet.Numerics.Trig.Tanh(x) function) pnorm: uses the MathNet.Normalize(p value) function to normalize a vector of doubles where p value is a double derived from a 2 tailed t test with n-1 observations These functions, along with similar functions that are supported by the MathNet library (i.e. normalized x = MathNet.Numerics.DistributionsLognormal.cdf(x, mean(x), stddev(x))) may appear in some algorithms. 4. LCA Weighting USEPA (2006) describes the next stage as follows: “The weighting step (also known as valuation) assigns weights or relative values to the different impact categories based on their perceived importance or weight”. For example, Lippiatt (2007) demonstrates how expert panels can be used to obtain the weights used in final weighted average calculations for each environmental impact. The IPCC 2006 reference also discusses the use of expert panels in developing probability density functions for resource stock indicators. The result will be a final performance score that can be compared among alternative mitigation technologies. 5. LCA Interpretation The final, or interpretation, stage of LCA involves judging the environmental performance of the product, often in comparison to alternatives. For example, the following image (Knudsen, 2014) compares conventional versus organic orange production in terms of several environmental performance measures. Note that socioeconomic performance measures, such as cost per unit environmental performance, can be, and should be, included in this type of study (see the CTA and Social Performance references). The Stock Indicators explained in this reference can be used to carry out LCA by using their properties as follows: 6. Environmental Performance 1 step LCA This produces a full LCA using 1 step. The advantage to this approach is brevity –an environmental performance score can be produced without additional work. The disadvantage is in analysis. The intermediate emissions and environmental impact amounts will not be analyzed in subsequent automated analysis –only the environmental performance score is analyzed. * Q1: Co-input or Co-output unit emissions amount. The next example shows that this amount can be derived from the first step of a 2 step LCA analysis. * Q2: Characterization factor: A typical LCA calculation does not include this step. * Q3: Normalization factor. Note that the magnitude of the normalization factor should be adjusted for DevTreks standard numerical precision (4 digits). * Q4: Weighting factor * Q5: 0 * MathExpression: ((I4.Q1 * I4.Q2) / I4.Q3) * I4.Q4 * MathType and SubMathType: none (the image below is also being used with Example 3 so shows different properties). * Total QT: Weighted, normalized, environmental performance measurement. If Q3 and Q4 both equal 1, Q5 equals the environmental impact of the emission. In this case, the parent Input is 1 kg/ha fertilizer; so this is a per unit calculation (kg CO2 equivs / kg applied N per ha). The calculations appear as follows: The following image (Lippiatt, 2007) shows that the results of this calculation can be used to analyze performance (but not emissions, and depending on the normalization and weight factors, environmental impact): 7. Emissions and Environmental Performance 2 step LCA This example produces a full LCA using 2 steps. The first step allocates the total amount of emissions taking place to a specific co-output or co-input and the second step is the same as Example 1 and produces the final environmental performance score or environmental impact amounts. Step 1. Co-Input and Co-Output Emissions Allocations. The Inputs use three different sources of N fertilizer, but the emissions data collected, such as NO3 in tile line or atmospheric N20 emissions, can’t distinguish which Input is responsible for a specific quantity of the emission. The measured emission has to be allocated, in some way, to each responsible Input. Similarly, the EPA 2006 reference gives examples of Outputs that are co-products and must have emissions allocated to each co-output. That reference discusses alternative ways to make these allocations. The calculations can be entered as follows (the next example explains the properties, and scaling, used to calculate the uncertainty of this Indicator): * Q1: Total input or output weight (or some other allocation basis). * Q2: Co-input or co-output weight (or some other allocation basis). * Q3: Total input or output emission amount. * Q4: Total input or output weight (or some other allocation basis). * Q5: 0 (Q5 is not needed in this example) * Math Expression: ((I3.Q1/ I3.Q2) * I3.Q3) / I3.Q4 * MathType: none * QT: Co-input or Co-output unit emissions The following image shows that the final calculation amount, 0.0133 kg N2ON/ha, measures the quantity of co-input emissions per 1 kg applied fertilizer. When this input is added to an Operation, the Input.OCAmount will be changed to the actual amount of fertilizer applied to a particular field to obtain full co-input emissions per hectare. This approach can be fine-tuned to work with specific soils and land ecosystems. The advantages to using step 1 is the transparency of the emissions calculations and the ability to include the co-input and co-output emission totals in further analyses (see Lippiatt’s images throughout this appendix). Step 2. Environmental Performance Calculation properties are identical to Example 1, but the Q1 property is taken from the allocated product emission total obtained from step 1. The following images display a typical calculated result (from Example 3). This particular fertilizer input LCA used 3 Indicators to measure emissions and 5 Indicators to measure environmental performance. The quantity of data generated by even a relatively small LCA calculation reinforces the need to use “large data” management techniques, as demonstrated throughout the CTA and CTAP references in the Technology Assessment tutorials (i.e. TEXT datasets). The following image (Lippiatt, 2007) shows that an Environmental Performance Indicator, Acidification, can be caused by a number of different Emission Indicators (NH3, HCl, HCN …). In this example, an Environmental Performance Indicator, Eutrophication, can derive from two Emissions Indicators –NO3 and NH3. This type of report can be generated by using a simple Labeling convention –the Environmental Performance Indicator is entered in 2 different indicators with the Labels SO2A and SO2B. The Related Label for each Indicator is NO3A and NH2A, respectively. A report writing rule can be enforced that parses the last letter of each Label so that this type of report can be manually, or automatically, built. Lippiatt’s (2007) Life Cycle Stage report displayed in the following image, is equivalent to Operations/Components/Outcomes base elements. Full product systems and technology assessments can be completed using standard Operating and Capital Budgets. Lippiatt (2007), V. Meyer et al (2013), IPCC (2006, 2014) explain additional techniques for measuring environmental and economic performance, such as Multi Attribute Decision Analysis and Benefit Cost Analysis. The Performance Analysis and Technology Assessment 2 tutorials explain how to use some of these techniques. Example 2. Indicator Risk and Uncertainty Analysis As mentioned in the accompanying Resource Stock Analysis 1 reference, a great deal of uncertainty underlies the measurement of stock flows and their relation to environmental performance. The Bessou reference (2012) discusses problems with how agricultural emissions data is obtained and then related to overall environmental performance. The USEPA reference (2006) discusses the differences between traditional risk analysis, which can be rigorously applied to actual damages to humans, and the simplified calculations used in some types of LCAs. This example adds risk and uncertainty properties to the QT results of Example 1, Step 2 to carry out a basic risk analysis. Alternative Step 2. Indicator Numeric Risk This step uses a simple numeric algorithm to generate most likely, lower bound, and upper bound, values for Example 1, Step 2’s QT Amount (Environmental Performance). This example changes the following properties used in Example 1, Step 2. * Distribution Type: normal distribution of QT. * QT: Calculated Result: Most Likely environmental performance score (QT) for Example 1, Step 2. * QTD1: Data Entry: For normal distributions, this will be the mean of QT. The 4 digit precision supported by the calculator required rescaling this particular distribution, or using a multiplier in the Q5 property, to generate meaningful results. * QTD2: Data Entry: For normal distributions, this will be the standard deviation of QT. For simplicity, the example fertilizer Inputs and Outputs use 10-20% of the mean. * Math Type: algorithm1, Sub Math Type: subalgorithm1 (Monte Carlo), uses a basic random number generating algorithm from the math library to solve for QTM, QTL, and QTU. This is an example of a simple numeric algorithm (8*). * Score Iterations: 10000: draw ten thousand random samples for use in the algorithm. The samples come from the QT, QTD1, QD2 and the Distribution Type properties. * Score Confidence Level: 95: Calculate confidence intervals of 95%. * Score Random Seed: 0: Generate different random samples of indicators for each calculation. * QTM: Calculated result: mean of QT. * QTL: Calculated result: 95% lower confidence interval. * QTU: Calculated result: 95% upper confidence interval. The calculator uses the following steps: * Step 1. Use the Math Expression to run and save the initial calculations, including the new QT Amount. * Step 2. Use the Distribution Type, QT, QTD1, QTD2, Math Type, Confidence Level, Random Seed, and Iterations, with a mathematical library to run and save the secondary calculations, including the new QTM, QTL, and QTU. The mathematical library automatically generates random samples using specific distributions with appropriate bounds. The library generates descriptive statistics, such as mean and standard deviation, from the random samples. * Step 2a. The secondary calculation also uses the Score Math Expression and each indicator’s QTM, QTL, and QTU to produce new ScoreM, ScoreL, and ScoreU results. The images displayed with Examples 1 and 3 show typical results. Examine Indicator 1 as well, it used a triangular distribution to generate a different type of range. Example 3. Pollution Index Risk and Uncertainty Analysis https://www.devtreks.org/greentreks/preview/carbon/inputseries/2012 Fertilizer, Orange, Conventional/2147380257/none https://devtreks1.blob.core.windows.net/resources/network_carbon/resourcepack_1534/resource_7937/DataURL.csv Version 2.1.6 tests Use the Score.DataURL to store background data: https://localhost:5001/greentreks/preview/carbon/inputseries/2012 Fertilizer, Orange, Conventional/2147380287/none Use Indicator.URL to store background data: https://localhost:5001/greentreks/preview/carbon/inputseries/2013 Fertilizer, Orange, Conventional/2147380289/none Use the Score.DataURL with a 10 variable dataset: https://localhost:5001/greentreks/preview/carbon/inputseries/2014 Fertilizer, Orange, Conventional/2147380290/none This example demonstrates one way to use the Data File URL property of calculators and analyzers to carry out a basic risk analysis of indicator data stored in a TEXT file. In this case, the indicator data is used in a pollution control index (i.e. Score) used by governments to monitor externalities generated by point source polluters (see the NYT, December 5 reference for a concrete example). This example changes the following properties used in Example 2. * Math Expression: Two indicators (NO3A and CO2) rely on data stored in the Data URL to generate descriptive statistics based on observed, rather than sampled, data. The Math Expression for these indicators use the following Ix.Qx.DataColName convention. The remaining indicators rely on sampled data and have the same properties as the previous example. Example 5 demonstrates using 10 variables in datasets and Math Expressions. ((I1.Q1.X1/I1.Q2.X2)*I1.Q3.X3)/I1.Q4.X4 * Q1 to Q5 Amounts: The NO3A and CO2A indicators automatically set these properties to the mean of the observed data. * Distribution Type, QTD1, QTD2: none; The NO3A and CO2A indicators use the actual data stored in the Data URL to generate descriptive statistics. These properties are used with the remaining indicators but are not used with these 2 indicators. * Math Type, Math SubType: none. The NO3A and CO2A indicators use the actual data stored in the Data URL to generate descriptive statistics. * QTM, QTL, and QTU: QTM is the mean of the calculated amounts from each row of observed or sampled data. The lower and upper confidence intervals are set from the standard deviation. * Score.DataURL, or as of Version 2.1.6, Indicator.URL: The following URL holds a small TEXT dataset containing 10 rows of data for both Indicator 1, Nitrate Emissions, and Indicator 4, Global Warming. The column named none is blank because the QT variable is calculated, rather than stored, for each row based on the Math Expression. label,date,latlong,Y,X1,X2,X3,X4,X5 NO3E,12/3/2015,N45'37.75W121'46.25,0,111,120,30,111,0 NO3E,12/4/2015,N45'37.75W121'46.26,0,122.1,132,30,122.1,0 NO3E,12/5/2015,N45'37.75W121'46.27,0,134.31,145.2,30,134.31,0 NO3E,12/6/2015,N45'37.75W121'46.28,0,147.741,159.72,30,147.741,0 NO3E,12/7/2015,N45'37.75W121'46.29,0,162.5151,175.692,30,162.5151,0 NO3E,12/8/2015,N45'37.75W121'46.30,0,105.45,114,30,105.45,0 NO3E,12/9/2015,N45'37.75W121'46.31,0,100.1775,125.4,30,100.1775,0 NO3E,12/10/2015,N45'37.75W121'46.32,0,95.1686,137.94,30,95.1686,0 NO3E,12/11/2015,N45'37.75W121'46.33,0,90.4102,151.734,30,90.4102,0 NO3E,12/12/2015,N45'37.75W121'46.34,0,85.8897,166.9074,30,85.8897,0 CO2,12/3/2015,N45'37.75W121'46.35,0,0.013,298,1,0.16,0 CO2,12/4/2015,N45'37.75W121'46.36,0,0.0137,298,1,0.168,0 CO2,12/5/2015,N45'37.75W121'46.37,0,0.0143,298,1,0.1764,0 CO2,12/6/2015,N45'37.75W121'46.38,0,0.015,298,1,0.1852,0 CO2,12/7/2015,N45'37.75W121'46.39,0,0.0158,298,1,0.1945,0 CO2,12/8/2015,N45'37.75W121'46.40,0,0.0124,298,1,0.152,0 CO2,12/9/2015,N45'37.75W121'46.41,0,0.013,298,1,0.1596,0 CO2,12/10/2015,N45'37.75W121'46.42,0,0.0136,298,1,0.1676,0 CO2,12/11/2015,N45'37.75W121'46.43,0,0.0143,298,1,0.176,0 CO2,12/12/2015,N45'37.75W121'46.44,0,0.015,298,1,0.1848,0 * Data URL Relationships: Parent Indicator calculations can be run in a manner that automatically updates their children (i.e. by setting Use in Descendants = true and Overwrite Descendants = true). This input series demonstrates that not every calculator property in the children is updated. In this instance, the author decided that Data URL properties tend to quite important and should not be automatically updated. In hindsight that logic is open for debate. The recommended convention for dealing with this type of debate is for network administrators to communicate with their information technologists (i.e. our role is demonstrate you what you should be doing rather than what you are actually doing). * Indicator Meta-Data: The Math Results include the mean amount of each column of data. Each indicator’s Q1 to Q5 Amounts do not need to be filled in because the calculated results fill in those properties. Each indicator acts as the meta-data describing the observational data stored in the TEXT data file. This data management technique can address the need to use large indicator datasets, while still displaying reasonably sized html views of that data. The calculator uses the following steps: * Step 1. Use the Math Expression to produce QT for each csv row. Calculate the Mean of each Q1 to QT column and add the results to each indicator’s Q amounts. * Step 2. Use the Math Type, algorithm1 and Math Sub Type, algorithm1 (basic statistics), to produce Mean, Variance, Median, Minimum, Maximum, and Standard Deviations for QTs that have the same label. The Math Result property stores the statistical results. These statistics were used to manually set the QTD1 and QTD2 distributions and the calculations were run a second time. Automatic setting of QTD1 and QTD2 was tested but rejected (for now) as too constraining. * Step 2a. Use the Distribution Type, Math Type, and Iterations, with a mathematical library to produce each Indicator’s QTM, QTL, and QTU. * Step 2b. Use the Score Math Expression, which defines a pollution control index, and each indicator’s QTM, QTL, and QTU to produce ScoreM, ScoreL, and ScoreU. The following image shows the results: Example 4. Uncertain Costs and Benefits This example adds 2 more input indicators to the 8 environmental indicators. The first indicator is an Input.OCPrice indicator and the second is an Input.OCAmount indicator. These two indicators will be used to calculate the probability of the input’s total operating cost. The major difference from typical indicator properties include: Indicator 1. Fertilizer price * QT = Q1: for simplicity, set to the fertilizer price, and QT set to Q1. Composite prices can be set for QT using all of the Qx properties with an appropriate MathExpression. * BaseIO: This property is set to ocprice. That tells the calculator to update the Input.OCPrice in the base Input element and in the base Input database table. When this Input is added to an Operation or Component, and any Resource Stock analyzer is run, the calculation is rerun and the Component/Operation.Input.OCPrice will be updated with any changes. However, because of issues involving scalability, the database will not be updated automatically. Instead, the results of a Resource Stock Totals Analysis can be used to manually set any updated Component/Operation.Input properties. That keeps the results of other calculators and analyzers, such as the NPV, synchronized with the Stock calculations. In general, base element Input and Output indicators should be entered carefully before being subsequently used in Operations, Components, and Outcomes, so that manual adjustments will not be needed. Indicator 2. Fertilizer amount * QT = Q1: for simplicity, set to a unit fertilizer amount of 1, and QT set to Q1. QT can also be set using all of the Qx properties with an appropriate MathExpression. DevTreks recommends running Stock calculations on per unit basis and then using the Component/Operation.Input.Quantities properties to the actual quantity used. * BaseIO: This property is set to ocamount. This works similarly to Indicator 1 but changes the Input.OCAmount. Base Input tables don’t store Input.AOHAmount or Input.CAPAmount properties (because Input quantities are usually entered as unit Inputs with quantities equal to 1 –actual quantities are set after the Input is added to an Operation or Component). Manual Operation/Component.Input quantity adjustments are usually needed when this property is being used to set the quantities. Scores * No Score property was changed, but it is relatively easy to derive a cost per unit environmental performance score, or cost per unit pollution index, for this example (see the CTA reference for examples). Communicating that type of performance measure in terms of confidence intervals can aid decision making. The following image, from an earlier software version, shows the result of both Indicators in the base Input element. The Input.OCPrice property was updated to 2.50 in the database. The Input.Amount property was not updated because the default value is 1 (and the 4 digit precision is not used by Inputs or Output base properties). These are the same properties used when the Input is added to an Operation or Component. Appendix C explains more about calculating uncertain base element costs and benefits. Example 5. 10 Variable Analysis This example adds 5 more fictitious columns of data to the dataset used in Example 3 to demonstrate how to use up to 10 input data variables in an analysis. One of the Input Series associated with that example was changed for this purpose. The 10 input variable limit is arbitrary but conforms with Occam. This example changes the following properties used in Example 3. * Math Expression: The expression tells the algorithm to include Q5 and Q6 to Q10 data columns in the analysis. For simplicity, those columns of data result in multiplication by 2 and double the results shown in Example 3. ((I1.Q1.X1/I1.Q2.X2)*I1.Q3.X3)/I1.Q4.X4 + (I1.Q1.X5 + I1.Q1.X6 + I1.Q1.X7 + I1.Q1.X8 + I1.Q1.X9 + I1.Q1.X10) * Data URL: see Example 3. The data labels follow. label,date,latlong,Y,X1,X2,X3,X4,X5,X6,X7,X8,X9,X10 The following image displays the results for the Global Warming Indicator. The image included Q5 in the Math Expression and filled in the displayed Q5 Amount with the mean of the data. Additional examples can be found throughout the CTA and CTAP references. Example 6. Indicator System Indexes Although Examples 1 to 5 demonstrate using Indicator systems to carry out one specific type of assessment, Life Cycle Assessment, systems of indicators can be used in a wide assortment of assessments. The following image (UNCAPNET, 2015) demonstrates a general disaster risk reduction approach that uses general systems of indicator to compute Indices. For example, Disaster Risk Reduction assessments (UN CAPNET 2015, Khazai et al 2015), also use these types of indicator systems to develop an assortment of Indices, including a Disaster Risk Index, a Risk Management Index, and a Drought Vulnerability Index. The associated CTA-Prevention (CTAP) reference includes complete examples of algorithms for completing these types of Indices. The following image (Khazai et al, 2015) demonstrates one example of the Indicators used in these assessments. Note how these indicators have been organized using a Work Breakdown Structure. The CTAP reference points out that, while this particular Index targets urban areas, the techniques can also be employed in other areas, including rural areas. The following image (UN, CAPNET, 2015) demonstrates how a specific drought-related indicator system, the Drought Vulnerability Index, is used in Disaster Risk Reduction analyses. The following image (UN, UNISDR, 2014) demonstrates that proposed disaster reduction-related indicator systems will play increasingly important roles at national and international levels. Although those are the primary levels this technology is designed to work at, the software works equally well at local scales for local disaster risk reduction indicator systems. The UN 2014 reference explains the importance of local scales as follows: “Disaster risk reduction requires local level action. Most disasters are small-scale and local. To be relevant and effective, national policies, such as educational curriculum on disaster risk reduction, need to be adapted to local contexts. Many smaller local governments lack the capacities to plan land use and development, let alone to ensure that these are risk sensitive. Many countries report the need to strengthen local capacities, however, despite the devolution of responsibility for risk management common to many countries, it is unclear how national level policy is really supporting local level decision making.” B. Human, Social, Cultural, Institutional, and Economic Stock Examples The Social Performance Analysis tutorial introduced new algorithms that begin to demonstrate how these generic resource stock indicator calculations can be applied to physical capital, economic capital, natural resources capital, human capital, social capital, institutional capital, and cultural capital, stocks. Besides the examples in that reference, some practical examples include: 1. Human Capital Stocks (human health): The NYT (March 3, 2015) used the term “wild west” to describe the performance measures used in hospital rating systems. Hospital performance measures can be measured using Indicators and rating systems can be reported using Scores (see the European Observatory 2011 reference for examples). The newspaper also reported (March 3, 2015) that WHO recognizes factors, or Indicators, effecting health to include income, social status, safe water, clean air, social support networks, genetics, sex, and personal behavior. Public goods-related rating, or scoring, systems are usually the responsibility of the public sector (but that may require a citizenry that understands public goods, a public sector that understands both public goods and IT, and a private sector that doesn’t confuse the other sectors about the issue). 2. Institutional and Human Capital Stocks (judicial system health): The Laura and John Arnold Foundation has developed an algorithm that generates scores for recidivism in prisoners. The NYT (June 28, 2015) described the algorithm as follows: “The algorithm gives defendants two scores – one for their likelihood of committing a crime and one for their risk of failing to appear in court – and flags those with an elevated risk of violence”. Two Input or Output base elements might be used with the Resource Stock Calculators to quantify these two scores. In the context of this reference, the fiscal costs of imprisonment, personal costs of imprisonment, and the social costs of recidivism, can begin to be factored into the calculation. Human capital stocks improve if the algorithm prevents citizens from being unjustly or inefficiently imprisoned. 3. Human Capital Stocks (human health): The American Society of Clinical Oncology developed a framework for scoring clinical cancer trials which is described as follows (NYT June 28, 2015): “The value framework envisions two costs: the out-of-pocket cost for the patient and the overall cost of a drug to the health system. The framework computes a score – called the net health benefit – based on clinical trials.” The CTA tutorial has examples that begin to demonstrate formal techniques for analyzing cost (or price), benefit, and randomized Indicator data, in a rigorous manner. The Health Care Analysis tutorial demonstrates how to use these techniques for entire disease-classification systems, such as the ICD-10 (i.e. several base elements, including Inputs and Outputs in HealthTreks, already have complete health care classification systems in place). 4. Natural Resources Capital Stocks (watershed health): The Environmental Services department of the city of Portland, OR, USA (2015) issues Watershed Report Cards that scores local watersheds on factors, or Indicators, which include Hydrology, Habitat, and Fish and Wildlife. They introduce the scores as follows: “Good scores reflect Portland’s investments in the environment …” The Technology Assessment 1 (CTA) tutorial has examples demonstrating formal techniques for using terms like “investments” (or outcomes, or costs, or benefits, or performance), along with Indicators and Scores, in a rigorous manner. 5. Institutional and Social Capital Stocks (the planet’s health): Khazai et al (2015) developed a guidebook that "presents the theory, development, and application of the urban risk and resiliency indicatory systems". They present three concrete examples of Urban Resiliency Indexes that help cities understand how to reduce the probability of damages from natural resource disasters. These assessments use systems of Indicators to develop resiliency indexes, or Scores. Besides improving the institutional capacity of cities to make risk assessments, they also incorporate strong social participatory approaches, meriting the Social Capital stock status. Appendix B, Example 6 summarizes three examples of these types of systems. The associated Technology Assessment 2 (CTAP) tutorial includes complete examples of algorithms that carry out these assessments. 6. Institutional and Human Capital Stocks (food system health): Consumer news reports periodically cover stories about national efforts to develop standardized quality rating, or life cycle safety, systems for food consumption and production industries (i.e. NYT, Sept. 11, 2015). Examples include agricultural production standards for organic food production, life cycle safety standards for food processing industries, and food quality ratings for restaurants. The Malnutrition Analysis tutorial demonstrates how to use these techniques for entire food-classification systems, such as the ARS-SR (i.e. Input base elements in HomeTreks already have complete food classification systems in place). The Ag Production tutorial demonstrates how to use these techniques with full national agricultural production datasets (i.e. an Operating Budgets data service in AgTreks includes an example of a complete dataset of USA crop rotations). 7. Physical and Human Capital Stocks (public infrastructure health): Consumer news reports periodically cover stories about national efforts to develop standardized quality rating, or life cycle safety, systems for building construction industries and public infrastructure. Examples include building standards for earthquake zones, life cycle safety standards for public infrastructure, and energy efficiency ratings for public buildings. The Building Construction Analysis tutorial demonstrates how to use these techniques for entire construction classification systems, such as the UNIFORMAT WBS. The Life Cycle Analysis tutorial demonstrates how to use these techniques with full national public infrastructure datasets (i.e. USA, NPS public infrastructure capital investments). Appendix C. Uncertain Base Element Costs and Benefits This appendix explains how to use the Stock Calculators to set base element properties for calculating uncertain costs and benefits. The associated CTA tutorial includes additional examples of setting these properties correctly. Use custom algorithms (i.e. R and Python algorithms) for more thorough estimation of uncertain costs, benefits, and performance. A key requirement of CTA is to tie base element economic cost and benefit amounts to indicator amounts. That allows common CTA Performance Analysis techniques, such as cost effectiveness analysis, to be supported. The NASA 2008 and GAO 2009 references in the associated CTA reference explain uncertain costs in depth. Example 1 in the associated CTA tutorial demonstrates these techniques further. Stock indicators can be used to calculate this uncertainty via the following steps: 1. Calculate Uncertain Input or Output Price: Use one indicator to calculate one Input or Output Price. Qx properties can be used to calculate a composite price (see the Capital Input or Life Cycle tutorials). Multiple Input Prices can be calculated by using multiple indicators. The base Input or Output Price will be filled in automatically by setting the BaseIO property to one of the following: ocprice = operating cost price aohprice = allocated overhead price capprice = capital price revprice = output price 2. Calculate Uncertain Input or Output Quantity: Use one indicator to calculate one Input or Output Amount. Qx indicator properties can be used to calculate a composite amount. The base Input or Output Amount will be filled in automatically by setting the BaseIO property to the following: quantity = Input.Amount or Output.Amount 3. Calculate Uncertain Input or Output Times (i.e. IPCC Activity Data): Use one indicator to calculate one Input or Output Times. Qx indicator properties can be used to calculate a composite times. The base Input or Output Times will be filled in automatically by setting the BaseIO property to the following: times = Input.Times or Output.Times 4. Calculate Uncertain Input Cost or Output Benefit: Use one indicator to calculate one Input Cost or Output Benefit. Use one of the following methods: a. New Uncertain Indicator: Add a new indicator and set the Math Expression property similar to the following: I1.QTM (Price Indicator) * I2.QTM (Quantity Indicator) * I3.QTM (Times Indicator) b. Existing Certain Indicator: Use an existing certain indicator and include the self-indicator in the Math Expression property. For example, I2, in the following expression, might be a logical indicator to store the final totals: I1.QTM (Price Indicator) * I2.Q1 (Quantity Indicator) * I3.QTM (Times Indicator) 5. Set the Operation/Component.Input Amounts and Outcome.Output Amounts: Examples 1A and 1J in the associated CTA tutorial demonstrates how to change unit Inputs and Outputs by changing their amounts once they have been added to Operations, Components, and Outcomes. The Resource Stock calculators will automatically update base element Input and Output prices and quantities in the database using the techniques just explained. The Resource Stock analyzers covered in the associated reference do not make any Input or Output database changes. If calculations need to be rerun in the future and Input or Output prices must be updated in the base element, calculations must be run at the Series level –just updating them from the parent won’t work unless they are completely overwritten. If base element Inputs and Outputs Amounts are changed after they are already being used in Operations, Components, and Outcomes, their quantities can be out of synch with the database. These points reinforce the need to calculate Indicators very carefully prior to adding their Inputs and Outputs to budgets and to make sure to “make” the latest base document prior to running any calculation. The CTA reference has several examples demonstrating how to correctly use these techniques. DevTreks –social budgeting that improves lives and livelihoods 1