femic.pipeline.vri

Helpers for legacy VRI table normalization/filtering stages.

Functions

assign_forest_type_from_species_pct(*, f_table)

Assign forest-type class column using supplied row-apply callable.

assign_stratum_codes_with_lexmatch(*, ...[, ...])

Populate legacy stratum and stratum_lexmatch fields from stand attributes.

classify_stand_cdm(row)

Classify stand as conifer/deciduous/mixed (c/d/m).

classify_stand_forest_type(row)

Classify stand into 1..4 forest-type classes from conifer proportion.

derive_species_list_from_slots(*, f_table[, ...])

Derive unique non-null species codes from species slot columns.

filter_post_thlb_stands(*, f_table[, ...])

Apply legacy checkpoint83 post-THLB stand filters.

initialize_aflb_land_base_records(*, f_table)

Build an AFLB-style reconstruction start without AU/VDYP-only pruning.

is_conifer_species_code(species_code)

Return True if species code represents a conifer species.

is_deciduous_species_code(species_code)

Return True if species code represents a deciduous species.

normalize_and_filter_checkpoint2_records(*, ...)

Apply legacy checkpoint2 fillna defaults and row filters.

normalize_vri_problem_values(*, f_table[, ...])

Normalize null/problematic VRI values shared by downstream workflows.

pconif(row, *[, species_slot_count])

Return conifer percent share from species-percent slots.

pdecid(row, *[, species_slot_count])

Return deciduous percent share from species-percent slots.

stratify_stand(row, *[, lexmatch, ...])

Build stratum code from BEC grouping + leading species combination.