The goal of treeco is to provide R users a tool for calculating the eco benefits of trees. All data used to calculate benefits is ripped from OpenStreetMaps otm-ecoservice repository which was (probably) ripped from i-Tree’s Eco or Streets software. A single tree is represented by 15 rows and 8 columns as there are 15 benefits calculated for every tree. Since tree inventories can be rather large, treeco utilizes the data.table package for speed. All calculations are done on unique species/dbh pairs to avoid redundant computation.

Installation

treeco isn’t available on CRAN but you can install it directly from github using devtools:

More examples

Use eco_run to calculate benefits for a single tree:

One issue with eco benefits is that they all rely on i-Tree’s master_species_list which is a list of 3,000+ species, therefore a users data needs to fit this list in order to extract benefits. For example, “Commn fig” doesn’t match i-Tree’s “Common fig” because of the typo. So far, there really isn’t a great solution to this. For now, treeco guesses the species code on the fly by quantifying the “similarity”, anything below 90% similar is immediately discarded.

For example, if we misspell “Common fig” as “Commn fig”:

If you are missing a field, you can use eco_guess to try and find it:

x <- c("common fig", "red maple", "fir")
treeco::eco_guess(x, "botanical")
#> [1] "ficus carica" "acer rubrum"  "abies spp"