Personal tools
You are here: Home Workspace Synthesis meeting March 27-31 Forest Inventory and Analysis (FIA) Allometry equation query by jim regetz
Document Actions

equation query by jim regetz

Attached are three files... spcodes_auto.csv: - Basically the same thing as Table 4, with a new column added that combines the first two letters of genus and first two letters of species. Some human intervention required to ensure that these codes correspond to the desired codes in the Equation Library table (below). sp_eqlib.csv: - The subset of tree ("T") species with equations that can be calculated solely from DBH. Species codes and species descriptions are both included. There are multiple rows per species, one per response variable. This is from the *old* BIOPAK equation library. biomass.r: - An (as yet incomplete) R script intended to extract equations from the BIOPAK equation library, parse them into executable R functions, and apply them appropriately to the individual tree records in the "FIA_indivtrees.csv" file. The code is mostly working (in prototype fashion), but some issues are: - Matching up of species codes in the FIA data and in the equation library is imperfect. Several issues still to work out here. - In cases where there are more than one equation for the same quantity for a particular tree species, the code currently just takes the mean of the different outputs - Parts of the code might break if you change things like column headers, etc. This could be handled easily enough with function arguments, but for the most part isn't yet. - Speed problems: The cast/melt statement that converts the final list into a table is slooooooowwwww on the full 230k+ record FIA dataset. Note that everything before that happens in <10 minutes, which is not great but probably fast enough. Almost certainly can do some things to make the code faster if necessary. Also note that performance would probably get worse if you wanted more advanced logic about which equation to use in particular cases. I had hoped to send a first cut of results, but...it's still running. Hope this is a good start! Jim

No albums or photos uploaded yet.

« October 2019 »
Su Mo Tu We Th Fr Sa
12345
6789101112
13141516171819
20212223242526
2728293031
 

Powered by Plone CMS, the Open Source Content Management System