USFS-PNW / Fia-Biosum-Manager

User interface and main code repository for Biosum
http://biosum.info/
Other
3 stars 3 forks source link

DATABASE: Mislabeled QMD columns in MASTER.COND #276

Closed jsfried closed 2 years ago

jsfried commented 2 years ago

master.cond contains 3 columns labeled qmd that have the indication that centimeters are the units of measure- they are not. these are calculated in inches so these labels are misleading. the attached spreadsheet shows how these are calculated (two different ways) for plot 41/52783 INVYR 2009 aka stand (biosum_cond_id in Douglas County) 1200941051001900527830001. The calculations are in English, not metric units and match the calculations in BioSum's MASTER.COND so only the names of these columns need to be changed-- could change cm to inches or drop the units altogether and simply document the units in the users guide.

BioSum_calculated_qmd_version2.xlsx

lbross commented 2 years ago

I assume the columns in question are qmd_tot_cm, hwd_qmd_tot_cm, and swd_qmd_tot_cm? Here is the formula for the first of these columns. The other two are identical except for filtering swd vs hwd. SQR(c.ba_ft2_ac/(.005454154 * c.tpacurr)) as qmd_tot_cm

If you would like to rename them, what should the new names be? This will entail updating the SQL that builds the cond table and the cond load SQL to reflect the new column names and writing version_control to update the column names in existing projects.

jsfried commented 2 years ago

That is the right formula.

These variable names are a legacy of when BioSum only worked with periodic inventory data (which was metric). They are also a bit nonsensical in the naming (why tot? when it is not the total of anything-- it is a kind of MEAN not a total). I suggest: qmd_swd_inch, qmd_hwd_inch and qmd_all_inch on the grounds that it is useful to remove ambiguity about units by having them in the column name (especially given that the name and units did NOT match to date). and yes, this is a lower priority update to fill in later when there is nothing urgent on the docket.

jsfried commented 2 years ago

looks good!