Skip to content

Re-factoring

Choose a tag to compare

@Aariq Aariq released this 14 Apr 22:05
· 500 commits to main since this release

Still doesn't quite work in an automated way, but re-factored to not use duckDB and handle interpolation better.

What's Changed

  • Refactored to not use databases and instead to produce a single table of interpolated data
  • Added new "main" functions get_fia_tables(), read_fia(), prep_data(), expand_data(), interpolate_data(), adjust_mortality(), prep_carbon(), and estimate_carbon()
  • Outlined the process of creating annualized data in docs/pop_scaling.qmd
  • Added "null and length 0 coalescing operator" %|||% to R/utils.R which is used to suppress warnings that come from adjusting for mortality when a tree hasn't yet died.
  • fixed bug where TPA_UNADJ wasn't getting joined for trees with DIA between 4.9 and 5 (#68)
  • fixed a bug where categorical vars weren't interpolated correctly when switching from NAs (#72)
  • trees that have had RECONCILECD 7 ("Cruiser error") or 8 ("Procedural change") at any inventory are now removed in prep_data() (#59)
  • interpolates trees with STATUSCD 0 and RECONCILECD 5, 6 or 9 at t2 to midpoint between t1 and t2 and then removes them from sample (#59)

Full Changelog: v0.1.0...v1.0.0