This function calculates the benefits for an entire dataset, sometimes called a tree inventory. This works similar to i-Trees Eco software where the user supplies data, the common name field, the botanical name field, the dbh field, and the region. All calculations are done on unique species/dbh pairs to avoid redundant computation and speed up the calculation.

eco_run_all(data, common_col, botanical_col, dbh_col, region, n = 0.8,
  unit = "in", print_time = NULL)

Arguments

data

Path to csv file containing tree inventory.

common_col

The name of the column containing common names.

botanical_col

The name of the column containing botanical names.

dbh_col

The name of the column containing dbh values.

region

Region code, see species or benefits.

n

Guessing threshold from 0.0 to 1.0, defaults at 0.8.

unit

The unit of measurement for DBH, either "in" for inches or "cm" for centimeters. Defaults to inches.

print_time

Logical TRUE or FALSE for printing the elapsed time.

Examples

# Add common name (typically not needed for a real inventory) trees$common_name <- "black cherry" # Guess the botanical name based on the common names trees$botanical_name <- eco_guess(trees$common_name, "botanical") # Run the benefits eco_run_all(trees, "common_name", "botanical_name", "Girth", "PiedmtCLT")
#> Gathering species matches...
#> Gathering interpolation parameters...
#> Interpolating benefits...
#> botanical common dbh benefit_value benefit unit #> 1: prunus serotina black cherry 8.3 0.0776 aq nox avoided lb #> 2: prunus serotina black cherry 8.3 0.0260 aq nox dep lb #> 3: prunus serotina black cherry 8.3 0.0556 aq ozone dep lb #> 4: prunus serotina black cherry 8.3 0.0150 aq pm10 avoided lb #> 5: prunus serotina black cherry 8.3 0.0633 aq pm10 dep lb #> --- #> 461: prunus serotina black cherry 20.6 606.2412 co2 sequestered lb #> 462: prunus serotina black cherry 20.6 7909.7504 co2 storage lb #> 463: prunus serotina black cherry 20.6 144.7267 electricity kwh #> 464: prunus serotina black cherry 20.6 5476.4716 hydro interception gal #> 465: prunus serotina black cherry 20.6 1194.6395 natural gas lb #> dollars rn #> 1: 0.51 1 #> 2: 0.17 1 #> 3: 0.36 1 #> 4: 0.04 1 #> 5: 0.16 1 #> --- #> 461: 4.55 31 #> 462: 59.32 31 #> 463: 10.98 31 #> 464: 54.22 31 #> 465: 12.50 31