Skip to contents

Converts a parcel-by-time state table into consecutive `from` -> `to` transitions. If a non-dominant probability column is present, transition weights are reduced when either endpoint is uncertain.

Usage

make_transitions(
  year_states,
  id_col = "parcel_id",
  time_col = "year",
  state_col = "state",
  non_dom_col = "non_dom_prob",
  min_weight = 0.05
)

Arguments

year_states

Data frame containing parcel states through time.

id_col

Name of the parcel identifier column.

time_col

Name of the integer time column.

state_col

Name of the state column.

non_dom_col

Name of the non-dominant probability column. If absent, all rows are treated as fully dominant.

min_weight

Minimum transition weight.

Value

A data frame containing the original columns plus `from`, `to`, `next_time`, `from_non_dom`, `to_non_dom`, and `weight`.